oreo-rust is a small tool for ironfish account creation, recovery (from spendingKey
, from mnemonic
), transaction
decryption and transaction causal send
.
Before beginning, please ensure your machine has Rust
installed. Instructions to install Rust can be found here.
Start by cloning this Github repository:
git clone https://github.com/hairtail/oreos-rust.git --depth 1
Next, move into the oreos-rust
directory:
cd oreos-rust
Then, install necessary dependency:
./install_dep.sh
Lastly,
cargo build --release
./target/release/oreos account new
Mnemonic invest trap equip course sweet crack slot youth once deposit enforce gas mammal teach latin cherry laugh you copy tattoo real fame wealth top
Spending Key 75fce93098adba63b307fb9a876128b0086bbd1f593b7d9fe4c06f2b2ea4fe0f
View Key 7b595402b5fbe834a0b4b240c1616d3a803879fb0a6376fc9c517497e6ef61bd460a6e8586ab2583080a811500d8d641f0108b1f99f54c18d7cbf32f896b60e3
Incoming View Key a3aaca44fca9395e103d6b2814d1c7e0b3ccea1d03027a12b1c63a51a4276207
Outgoing View Key 5a89f5654eae9a9c9498e25697cd32f262006575ef6625f81215802be943c3b0
Address 478eb2d09f6c0362673ceaa38416cd727b43ae11716a4bb9bd01cc5522abbba8
./target/release/oreos account new --key 75fce93098adba63b307fb9a876128b0086bbd1f593b7d9fe4c06f2b2ea4fe0f
Mnemonic invest trap equip course sweet crack slot youth once deposit enforce gas mammal teach latin cherry laugh you copy tattoo real fame wealth top
Spending Key 75fce93098adba63b307fb9a876128b0086bbd1f593b7d9fe4c06f2b2ea4fe0f
View Key 7b595402b5fbe834a0b4b240c1616d3a803879fb0a6376fc9c517497e6ef61bd460a6e8586ab2583080a811500d8d641f0108b1f99f54c18d7cbf32f896b60e3
Incoming View Key a3aaca44fca9395e103d6b2814d1c7e0b3ccea1d03027a12b1c63a51a4276207
Outgoing View Key 5a89f5654eae9a9c9498e25697cd32f262006575ef6625f81215802be943c3b0
Address 478eb2d09f6c0362673ceaa38416cd727b43ae11716a4bb9bd01cc5522abbba8
./target/release/oreos account new --mnemonic "invest trap equip course sweet crack slot youth once deposit enforce gas mammal teach latin cherry laugh you copy tattoo real fame wealth top"
Mnemonic invest trap equip course sweet crack slot youth once deposit enforce gas mammal teach latin cherry laugh you copy tattoo real fame wealth top
Spending Key 75fce93098adba63b307fb9a876128b0086bbd1f593b7d9fe4c06f2b2ea4fe0f
View Key 7b595402b5fbe834a0b4b240c1616d3a803879fb0a6376fc9c517497e6ef61bd460a6e8586ab2583080a811500d8d641f0108b1f99f54c18d7cbf32f896b60e3
Incoming View Key a3aaca44fca9395e103d6b2814d1c7e0b3ccea1d03027a12b1c63a51a4276207
Outgoing View Key 5a89f5654eae9a9c9498e25697cd32f262006575ef6625f81215802be943c3b0
Address 478eb2d09f6c0362673ceaa38416cd727b43ae11716a4bb9bd01cc5522abbba8
Transaction decryption with transactionHash
, incomingViewKey
, outgoingViewKey
.
- Get transaction info (blockHash) via oreoscan.info api
- Get raw transaction info (encrypted note) via oreoscan.info api
- Decrypt all encrypted note locally
Known AssetId
51f33a2f14f92735e562dc658a5639279ddca3d5079a6d1242b2a588a9cbf44c
-- Ironfish Native Token
./target/release/oreos transaction decrypt --hash <HASH> --incoming-viewkey <INCOMING_VIEWKEY> --outgoing-viewkey <OUTGOING_VIEWKEY>
// Sender address
Sender: 123xsdawegjkljsd
// Receiver: receiver address, value in IRON, asset id, memo
Receiver: xxx, 1, d7c86706f5817aa718cd1cfad03233bcd64a7789fd9422d3b17af6823a7e6ac6, hello
Receiver: xxx, 1, d7c86706f5817aa718cd1cfad03233bcd64a7789fd9422d3b17af6823a7e6ac6, hello
Alice
received 100 coins from Bob
in transactionX, Alice
exactly knows that she has never spent this 100 coins. Then she can send the received coins from transactionX to Amy
. So she can create a transaction locally without a fully syncd ironfish node, and post this transaction via a public rpc. The ironfish blockchain consensus is responsible for the transaction validation (no double spend).
- Get transaction info (blockHash) via oreoscan.info api
- Get raw transaction info (encrypted note) via oreoscan.info api
- Decrypt all encrypted note locally
- Transaction creation and signing locally
- Transaction broadcast via oreoscan.info api
Default parameters:
- memo: "oreos-causal-send"
- expiration: current chain header + 30
./target/release/oreos transaction send --hash <HASH> --incoming-viewkey <INCOMING_VIEWKEY> --outgoing-viewkey <OUTGOING_VIEWKEY> --spending-key <SPENDING_KEY> --receiver <RECEIVER> --amount <AMOUNT> --expiration <EXPIRATION> --memo <MEMO>