[{"data":1,"prerenderedAt":291},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcore-tech\u002Fcold-wallet-implementation-(deprecated)":3,"docs-surround-\u002Fdocs\u002Fcore-tech\u002Fcold-wallet-implementation-(deprecated)":280},{"id":4,"title":5,"body":6,"description":254,"extension":272,"image":273,"meta":274,"navTitle":273,"navigation":275,"path":276,"seo":277,"stem":278,"__hash__":279},"docs\u002Fdocs\u002Fcore-tech\u002FCold-wallet-implementation-(DEPRECATED).md","Cold wallet implementation",{"type":7,"value":8,"toc":253},"minimark",[9,13,18,27,45,51,59,63,67,90,94,112,116,124,128,133,141,145,148,171,174,214,218],[10,11,5],"h1",{"id":12},"cold-wallet-implementation",[14,15,17],"h2",{"id":16},"definitions","Definitions",[19,20,22,26],"h3",{"id":21},"cold-wallet",[23,24,25],"strong",{},"cold"," wallet",[28,29,30,42],"ul",{},[31,32,33,34,38,39],"li",{},"can generate private keys, i.e. it has ",[35,36,37],"em",{},"master key"," generated from ",[35,40,41],{},"seed phrase",[31,43,44],{},"has no connection with internet, as a result, it cannot send transactions to the node, and it cannot get proofs and notifications from the node",[19,46,48,26],{"id":47},"hot-wallet",[23,49,50],{},"hot",[28,52,53,56],{},[31,54,55],{},"cannot generate any secrets from master key by the reason that it doesn't have it",[31,57,58],{},"has internet connection and can send\u002Fget messages from the node",[14,60,62],{"id":61},"design","Design",[64,65,66],"p",{},"The goal of this design is to get cold wallet scenario with minimal changes in existing codebase.",[64,68,69,70,73,74,76,77,80,81,83,84,86,87,89],{},"The main idea is to split wallet database (",[35,71,72],{},"wallet.db",") onto two parts: public (",[35,75,72],{},") and private (",[35,78,79],{},"wallet.db.private","). The last one should hold master key generated from seed phrase.\n\"Cold\" wallet has both of these files, \"hot\" has public data only. To be able to make tranasctions with this setup user have to constantly move public ",[35,82,72],{}," file between \"cold\" and \"hot\" wallets. Since we override ",[35,85,72],{}," we have to stop \"hot\" wallet before we copy ",[35,88,72],{}," file from\u002Finto its folder",[19,91,93],{"id":92},"changes","Changes",[95,96,97,100,106,109],"ol",{},[31,98,99],{},"For \"Cold\" wallet we don't set up connection with the node.",[31,101,102,103,105],{},"\"Cold\" wallet stores all outgoing encrypted messages into public database (",[35,104,72],{},"), we subclass existing behavior with SBBS",[31,107,108],{},"Add a stage for processing stored incoming messages.",[31,110,111],{},"For \"hot\" wallet there is a need to add some checks if it has master key, also \"hot\" wallet has no ability to decrypt incoming SBBS messages, since it doesn't have private keys, so it has to store all incoming messages from the channel.",[14,113,115],{"id":114},"usage","Usage",[64,117,118,119,123],{},"To tell wallet that it works in \"cold\" mode you have to add ",[120,121,122],"code",{},"--cold_wallet"," parameter",[19,125,127],{"id":126},"initialization-of-cold-wallet","Initialization of \"cold\" wallet",[64,129,130],{},[120,131,132],{},"beam-wallet init --cold_wallet",[64,134,135,136,138,139],{},"This command will create two databases: ",[35,137,72],{}," and ",[35,140,79],{},[19,142,144],{"id":143},"sending-from-cold-wallet","Sending from \"cold\" wallet",[64,146,147],{},"Pre-conditions:\nMake sure the cold wallet is synced. In order to do so, follow the next steps:",[95,149,150,156,159,165],{},[31,151,152,153,155],{},"copy the ",[35,154,72],{}," file to the \"hot\" wallet's data folder.",[31,157,158],{},"launch the \"hot\" wallet and wait till it's synced.",[31,160,161,162,164],{},"stop the \"hot\" wallet, copy the ",[35,163,72],{}," file into the \"cold\" wallet folder.",[31,166,167,168],{},"launch the \"cold\" wallet for listening.\n",[120,169,170],{},"beam-wallet listen --cold_wallet",[64,172,173],{},"Now as the \"cold\" wallet is synced, proceed with the next steps:",[95,175,176,183,189,192,198,204,209],{},[31,177,178,179,182],{},"In the cold wallet run the command:\n",[120,180,181],{},"beam-wallet send -a \u003Camount> -r\u003Creceiver address> -f \u003Cfee> --cold_wallet","\nNote: there is no need in node address in this case",[31,184,185,186,188],{},"copy ",[35,187,72],{}," file to \"hot\" wallet's data folder",[31,190,191],{},"launch \"hot\" wallet. It should send encrypted message to the node, also he may get encrypted message back.",[31,193,194,195,197],{},"stop \"hot\" wallet, copy ",[35,196,72],{}," file into \"cold\" wallet folder",[31,199,200,201,203],{},"launch \"cold\" wallet for listening\n",[120,202,170],{},"\nit should create a signed transaction kernel",[31,205,185,206,208],{},[35,207,72],{}," from \"cold\" to \"hot\"\nnew transaction should go to the node and got confirmed",[31,210,185,211,213],{},[35,212,72],{}," from \"hot\" to \"cold\"\n\"cold\" wallet should have actual balance and transactions statuses",[19,215,217],{"id":216},"receiving-to-cold-wallet","Receiving to \"cold\" wallet",[95,219,220,223,228,231,237,240,245,248],{},[31,221,222],{},"Generate new address in \"cold\" wallet and send it to the sender",[31,224,185,225,227],{},[35,226,72],{}," to \"hot\"",[31,229,230],{},"launch \"hot\" wallet. Note there will be no new transactions, since \"hot\" wallet cannot decrypt incoming messages",[31,232,233,234,236],{},"stop \"hot\". copy ",[35,235,72],{}," from \"hot\" to \"cold\"",[31,238,239],{},"launch \"cold\" wallet for listening, it should get new transaction and accept it.",[31,241,185,242,244],{},[35,243,72],{}," from \"cold\" to \"hot\"",[31,246,247],{},"launch \"hot\", wait until new transaction becomes completed",[31,249,185,250,252],{},[35,251,72],{}," \"hot\" to \"cold\" balance and transactions statuses should be correct.",{"title":254,"searchDepth":255,"depth":255,"links":256},"",2,[257,264,267],{"id":16,"depth":255,"text":17,"children":258},[259,262],{"id":21,"depth":260,"text":261},3,"cold wallet",{"id":47,"depth":260,"text":263},"hot wallet",{"id":61,"depth":255,"text":62,"children":265},[266],{"id":92,"depth":260,"text":93},{"id":114,"depth":255,"text":115,"children":268},[269,270,271],{"id":126,"depth":260,"text":127},{"id":143,"depth":260,"text":144},{"id":216,"depth":260,"text":217},"md",null,{},true,"\u002Fdocs\u002Fcore-tech\u002Fcold-wallet-implementation-(deprecated)",{"title":5,"description":254},"docs\u002Fcore-tech\u002FCold-wallet-implementation-(DEPRECATED)","mrjRDY8eFUUnsC6RMeEcDrDhFI_9910x9Ys4dmpkaC8",[281,286],{"title":282,"path":283,"stem":284,"description":285,"children":-1},"Blocks, Headers, System States Concept, Relevant Structures And Values","\u002Fdocs\u002Fcore-tech\u002Fblocks-headers-system-states.-concept-relevant-structures-and-values","docs\u002Fcore-tech\u002FBlocks,-headers,-system-states.-Concept,-relevant-structures-and-values","First let's define terminology.",{"title":287,"path":288,"stem":289,"description":290,"children":-1},"Confidential Assets","\u002Fdocs\u002Fcore-tech\u002Fconfidential-assets","docs\u002Fcore-tech\u002FConfidential-assets","This documents describes CLI Confidential Assets workflow.",1783006063986]