|
| 1 | +## COLD STAKING SETUP INSTRUCTIONS |
| 2 | + |
| 3 | +**What you will need** |
| 4 | + |
| 5 | + - **Hot wallet** - this will be used for staking online, you can skip this if you are using a cold staking service |
| 6 | + - **Cold wallet** - this will hold your funds offline |
| 7 | + |
| 8 | +_Please note. It's important that both wallets are used with separate full nodes instances, and are not present in the same data folder._ |
| 9 | + |
| 10 | +--- |
| 11 | +****Hot Wallet**** |
| 12 | + |
| 13 | +_If you are using a cold staking service, your **coldstakinghotaddress** will be provided for you on their website and you can skip this section._ |
| 14 | + |
| 15 | +**1.1.** Convert your Hot wallet to be enable cold staking by using the the `cold-staking-account` API method with isColdWalletAccount set to "false" <br /> |
| 16 | +**1.2.** Get your Hot wallets coldstakinghotaddress using by using the `cold-staking-address` API method with "IsColdWalletAddress" set to "false"<br /> |
| 17 | +**1.3.** Then start the node staking with the Hot wallet from the command line or config file. |
| 18 | + |
| 19 | + --- |
| 20 | +****Cold wallet**** |
| 21 | + |
| 22 | +**2.1.** Fund the Cold wallet with coins that you eventually want to stake, these coins should go into the standard "account 0".<br /> |
| 23 | +**2.2.** Convert your Cold wallet to be enabled for cold staking by using the `cold-staking-account` API method with "isColdWalletAccount" set to "true"<br /> |
| 24 | +**2.3.** Get your Cold wallets coldstakingcoldaddress using by using the `cold-staking-address` API method with "IsColdWalletAddress" set to "true"<br /> |
| 25 | +**2.4.** Then, call the `setup-cold-staking` API to build the transaction, linking the funds in your Cold Wallet Address (Step #2.3) to the Hot Wallet Address (Step #1.2). This will return the hex that you use in the next step. |
| 26 | + |
| 27 | +``` |
| 28 | +{ |
| 29 | + "coldWalletAddress": "<<coldstakingcoldaddress>>", |
| 30 | + "hotWalletAddress": "<<coldstakinghotaddress>>", |
| 31 | + "walletName": "<<coldwalletname>>", |
| 32 | + "walletPassword": "<<coldwalletpassword>>", |
| 33 | + "walletAccount": "account 0", |
| 34 | + "amount": "<<amount to stake>>", |
| 35 | + "fees": "0.0002" |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +**2.5.** Finally, you use the "send-transaction" API to broadcast the transaction from step #2.4. |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## To withdraw funds back to your regular wallet |
| 44 | + |
| 45 | +**3.1.** From the PC running your cold wallet, call the "cold-staking-withdrawal" API to build a transaction and return coins from the Hot Wallet Address to Cold Wallet Address (account 0). This will return the hex that you use in the next step. |
| 46 | + |
| 47 | +``` |
| 48 | +{ |
| 49 | + "receivingAddress": "<<cold wallet address/ account 0>>", |
| 50 | + "walletName": "<<coldwalletname>>", |
| 51 | + "walletPassword": "<<coldwalletpassword>>", |
| 52 | + "amount": "<<amount to to return>>", |
| 53 | + "fees": "0.0001" |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +**3.2.** Then simply use the "send-transaction" API to broadcast the transaction hex from step #3.1. |
0 commit comments