github.com/lino-network/lino@v0.6.11/docs/cli/README.org (about) 1 * Introduction 2 Linocli is the official CLI tool for users to interact with Lino 3 Blockchain. It can: 4 + Query on-chain state 5 + Build and broadcast transaction.(including offilne signing) 6 7 * Setup 8 ** Installation 9 To install linocli, you can clone and build from the lino 10 repository. 11 12 #+begin_src shell 13 # Prerequisite: go >= 1.12 is installed. 14 git clone https://github.com/lino-network/lino.git 15 cd lino 16 make install_cli 17 #+end_src 18 19 Also, you can download pre-build executables from our release page: 20 https://github.com/lino-network/lino/releases. Mac user should 21 download the `***_Darwin_x86_64.tar.gz`. 22 23 ** Configuration 24 25 To connect with latest Lino Blockchain, chain id and node url should be set specifically as following: 26 27 #+begin_src shell 28 linocli config node "https://fullnode.lino.network:443" 29 linocli config chain-id "lino-testnet-upgrade2" 30 #+end_src 31 32 Also, you can always overwrite these two values through --node 33 --chain-id flags. 34 35 * Query 36 ** Blockchain 37 *** Current Block Height 38 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#get-lastest-block-height 39 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#get-blockchain-status-last-block-height-last-block-time-etc 40 41 #+begin_src shell 42 $ linocli q blockchain height 43 223039 44 #+end_src 45 *** Messages In Block 46 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#get-all-transactions-in-a-block 47 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#get-txs-in-block 48 49 `linocli q blockchain msg <height>`, will print messages and results of the block height 50 #+begin_src shell 51 $ linocli q blockchain msg 5000 52 [ 53 { 54 "hash": "CD86D156FF062EB8E42922DF1C7C8E01FBB4D2F4D4C02674AB10A3ACA1DAD156", 55 "msgs": [ 56 { 57 "type": "lino/donate", 58 "value": { 59 "username": "mjay1989", 60 "amount": "100", 61 "author": "xav2k", 62 "post_id": "BVIHXNpWg", 63 "from_app": "dlivetv", 64 "memo": "@mjay1989 donated 100 points to post xav2k+BVIHXNpWg" 65 } 66 } 67 ] 68 } 69 ] 70 #+end_src 71 *** Query Tx Result 72 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#get-transactions-by-hash 73 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#get-tx-by-hash 74 75 `linocli q blockchain tx <hash>` 76 A transaction is considered as a success, when the Response code is 0 77 (which won't be printed on screen). Any other response code indicates 78 a failure. 79 #+begin_src text 80 $ linocli q blockchain tx CD86D156FF062EB8E42922DF1C7C8E01FBB4D2F4D4C02674AB10A3ACA1DAD156 81 { 82 "type": "auth/StdTx", 83 "value": { 84 "msg": [ 85 { 86 "type": "lino/donate", 87 "value": { 88 "username": "mjay1989", 89 "amount": "100", 90 "author": "xav2k", 91 "post_id": "BVIHXNpWg", 92 "from_app": "dlivetv", 93 "memo": "@mjay1989 donated 100 points to post xav2k+BVIHXNpWg" 94 } 95 } 96 ], 97 "fee": { 98 "amount": [ 99 { 100 "denom": "linocoin", 101 "amount": "100000" 102 } 103 ], 104 "gas": "0" 105 }, 106 "signatures": [ 107 { 108 "pub_key": { 109 "type": "tendermint/PubKeySecp256k1", 110 "value": "A3hsbA+PeGUFLk3fpUoH7UUqoSR0sjCUCNSb/GptZ5sE" 111 }, 112 "signature": "hPo3CWsq+Mo51mQpUabAILVKDdxFktL3NUWCcATqnqwJvupwSUjfJG5v/0wQJ2/yeDnH9FRYAn8sVckpxpcGUg==" 113 } 114 ], 115 "memo": "" 116 } 117 } 118 Response: 119 Height: 5000 120 TxHash: CD86D156FF062EB8E42922DF1C7C8E01FBB4D2F4D4C02674AB10A3ACA1DAD156 121 Raw Log: [{"msg_index":0,"success":true,"log":""}] 122 Logs: [{"msg_index":0,"success":true,"log":""}] 123 GasUsed: 476266 124 Timestamp: 2019-09-20T02:04:47Z 125 Events: 126 - message 127 - action: DonateMsg 128 #+end_src 129 130 *** Block Details 131 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#get-block-information 132 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#get-block 133 134 Get verified data for a the block at given height 135 #+begin_src text 136 $ linocli q blockchain block 5000 137 {"block_meta":{"block_id":{"hash":"63AC69D8CDCFD17FBFA8180632976F89E0BF94E4EDE6D6652A0C577F36D42B3B","parts":{"total":"1","hash":"FD9071F86DB6A66AFE4EFC73A64E3C69C020898CB58C30752DED8AC6BF94585B"}},"header":{"version":{"block":"10","app":"0"},"chain_id":"lino-testnet-upgrade2","height":"5000","time":"2019-09-20T02:04:47.872531687Z","num_txs":"1","total_txs":"9829","last_block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"last_commit_hash":"E51B442C89544E78F6768B0F2268AB08EF75D13450595239FF8F3158814ED290","data_hash":"A158D2CA6C5FD424A31693D8E6E8E2503CF52D7AE6156A43834E80A7F96A8A36","validators_hash":"F29730F7417C82A26FE3FA55D07E2D5F771FC2B0EA2E387E2E2A3CF10B1B571F","next_validators_hash":"F29730F7417C82A26FE3FA55D07E2D5F771FC2B0EA2E387E2E2A3CF10B1B571F","consensus_hash":"048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F","app_hash":"02B546649796CC03C59AC53492A4A187B5FC85A8C62E4BFC1012078D4185ED82","last_results_hash":"4837665DFE640A370E7496C691987562D02462142C5F34F59E185911A12370EA","evidence_hash":"","proposer_address":"DA6381BDA9B8654420A1F489823E5C1798657ABF"}},"block":{"header":{"version":{"block":"10","app":"0"},"chain_id":"lino-testnet-upgrade2","height":"5000","time":"2019-09-20T02:04:47.872531687Z","num_txs":"1","total_txs":"9829","last_block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"last_commit_hash":"E51B442C89544E78F6768B0F2268AB08EF75D13450595239FF8F3158814ED290","data_hash":"A158D2CA6C5FD424A31693D8E6E8E2503CF52D7AE6156A43834E80A7F96A8A36","validators_hash":"F29730F7417C82A26FE3FA55D07E2D5F771FC2B0EA2E387E2E2A3CF10B1B571F","next_validators_hash":"F29730F7417C82A26FE3FA55D07E2D5F771FC2B0EA2E387E2E2A3CF10B1B571F","consensus_hash":"048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F","app_hash":"02B546649796CC03C59AC53492A4A187B5FC85A8C62E4BFC1012078D4185ED82","last_results_hash":"4837665DFE640A370E7496C691987562D02462142C5F34F59E185911A12370EA","evidence_hash":"","proposer_address":"DA6381BDA9B8654420A1F489823E5C1798657ABF"},"data":{"txs":["eyJ0eXBlIjoiYXV0aC9TdGRUeCIsInZhbHVlIjp7Im1zZyI6W3sidHlwZSI6Imxpbm8vZG9uYXRlIiwidmFsdWUiOnsidXNlcm5hbWUiOiJtamF5MTk4OSIsImFtb3VudCI6IjEwMCIsImF1dGhvciI6InhhdjJrIiwicG9zdF9pZCI6IkJWSUhYTnBXZyIsImZyb21fYXBwIjoiZGxpdmV0diIsIm1lbW8iOiJAbWpheTE5ODkgZG9uYXRlZCAxMDAgcG9pbnRzIHRvIHBvc3QgeGF2MmsrQlZJSFhOcFdnIn19XSwiZmVlIjp7ImFtb3VudCI6W3siZGVub20iOiJsaW5vY29pbiIsImFtb3VudCI6IjEwMDAwMCJ9XSwiZ2FzIjoiMCJ9LCJzaWduYXR1cmVzIjpbeyJwdWJfa2V5Ijp7InR5cGUiOiJ0ZW5kZXJtaW50L1B1YktleVNlY3AyNTZrMSIsInZhbHVlIjoiQTNoc2JBK1BlR1VGTGszZnBVb0g3VVVxb1NSMHNqQ1VDTlNiL0dwdFo1c0UifSwic2lnbmF0dXJlIjoiaFBvM0NXc3ErTW81MW1RcFVhYkFJTFZLRGR4Rmt0TDNOVVdDY0FUcW5xd0p2dXB3U1VqZkpHNXYvMHdRSjIveWVEbkg5RlJZQW44c1Zja3B4cGNHVWc9PSJ9XSwibWVtbyI6IiJ9fQ=="]},"evidence":{"evidence":null},"last_commit":{"block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"precommits":[{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.833164205Z","validator_address":"1DB04F427828A3952E82E01004545742ADEB8C6A","validator_index":"0","signature":"yFeB5Jzcd1rKNk2HuUqJn/bQkuVc3a2tgvcAmfUjd+UwfNHnRXVyZ4rLKIC6oFjZYmmPsoKjXm0Woh4SNNfjDQ=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.848977968Z","validator_address":"1E1B60F12C837BB35218E1F370B935FEBC17B8A0","validator_index":"1","signature":"bVSJ57buRvyyOhPQZMabV6D3/y1nOUxo6ZpsO+G3oL3epAgD7YtuFmEBaCvdqAlbX+F5yQqB+bTLE+YdfMSmAA=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.93508494Z","validator_address":"26017706E5A3481108C09687DF661762ACC34A56","validator_index":"2","signature":"zO6EgId3xpqvN7T+SrNNkcDPJu6eHtYwNc2+ba/y67KFMG+pIvMVMDQ5W58ZtQSr9HmXQrJqNZ5fS2BpCD/MCw=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.936500585Z","validator_address":"3E10584CE6C811A154CCA3A55E62314B031895A5","validator_index":"3","signature":"HVMldW0LeF/WPUyy0ECtdMpUAIa9DlYu9o7UVL7GS7XPbPqrBfwmgTZv2X2rCTy5A+WWEIhR8kDk8OSf+XHgAw=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.933656998Z","validator_address":"7F6435EEDB4081BBDB3560B8BF723618F6690785","validator_index":"4","signature":"E3jwP/ljE73B0brG7/W5sSfDbznaK8NeMbd4QvyOvs0BxBUHtJbZcc5TitUvzPUh0Gr1J4OQIsAM04OwpTo2Ag=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.836291399Z","validator_address":"991B3275E3A86FB4817E070FA45EC0FDF39B8C3D","validator_index":"5","signature":"pg348/p9xxqEGmXq+l0qK5EopbLxzlB2OW5KLN82y+1YcNo75bCudDh/3ym2RWSEFloqCFjYZr3mRpvnbPbzCA=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.872531687Z","validator_address":"9BE329A4CB0D0656FBF10E1FF326AFD98F97C66D","validator_index":"6","signature":"sbUPLCZqnC34M8U4bqlzHgHVu6NmNXQwLMO+1w61fZ7vdiJidYX5FAb+ki8NBrW5WOBaUN0VOIDKWs7iZmpEBQ=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.927047103Z","validator_address":"A3E16AB3947215CEECCF5DF9C5FCE51BB30606A7","validator_index":"7","signature":"V9lM877mIUGIuFLZVTYku1YwPtk2H8MDldXRzmRTV+82y5g6mI2xq9PT4i7VCLjxbKz8DtOUH2oiZQUyfEZACw=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.884249891Z","validator_address":"DA6381BDA9B8654420A1F489823E5C1798657ABF","validator_index":"8","signature":"G0pEEE5ruN5zEcSckI2Kp+38mPu9FfXVs7K2r77hjKw4kKo0QuLayGTnD7UIbtm7ISYIm8wzObm3aGMtZv+aAg=="},{"type":2,"height":"4999","round":"0","block_id":{"hash":"A1B4AAFE6B089F5703869012F7736274779CB8C89BC8A6CBBAA99EF42AFF08DD","parts":{"total":"1","hash":"4C3DBB0AC0610E96DC07D630E463DFE5DFCC75FA4362505A216353A0030E305D"}},"timestamp":"2019-09-20T02:04:47.840068638Z","validator_address":"E717FDDA508B87B44327CF75F5F5310FB5F9F5EE","validator_index":"9","signature":"63o1ahrEdUxF8b4/zlUqIhcymnLjI7QAgYIBEmv/lGtiO5jF8TLJVUUI+RMZFvff4BMSlopJ2HjuOJM7iLbIBA=="}]}}} 138 #+end_src 139 140 *** Validators 141 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#get-all-validators 142 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#get-all-validators 143 144 linocli q blockchain tendermint-validator-set 145 #+begin_src text 146 $ linocli q blockchain tendermint-validator-set 147 blockheight: 27671 148 validators: 149 - address: linovalcons1rkcy7snc9z3e2t5zuqgqg4zhg2k7hrr20nh0wj 150 pubkey: linovalconspub1zcjduepq4nexa3gf0lhczrzty074l6dl9ydcx30a445ucfl8v9ht823sjcaq4s2akp 151 proposerpriority: 0 152 votingpower: 1000 153 - address: linovalcons1rcdkpufvsdamx5scu8ehpwf4l67p0w9q767za7 154 pubkey: linovalconspub1zcjduepqu2uzrlyxm67ne68ldvmkpx9f63079p6gymteme3wkgjzn98txcfqgr2e3a 155 proposerpriority: 0 156 votingpower: 1000 157 - address: linovalcons1ycqhwph95dypzzxqj6ra7eshv2kvxjjk9myk57 158 pubkey: linovalconspub1zcjduepqsxp0xqckfkyt89y6t58d8t5mvwc7j3syy3y2gcj80thezy6anu8s4tlkwj 159 proposerpriority: 0 160 votingpower: 1000 161 - address: linovalcons18cg9sn8xeqg6z4xv5wj4uc33fvp339d9qv0wal 162 pubkey: linovalconspub1zcjduepq3hhjx4d66at2lx280a0gmrx28glunjkl9h3gsp3wcysd4faqagusm435sx 163 proposerpriority: 0 164 votingpower: 1000 165 - address: linovalcons10ajrtmkmgzqmhke4vzut7u3krrmxjpu9c0p0e0 166 pubkey: linovalconspub1zcjduepqmxefkztwsdxemskyn7k47rqdjcag3gjw6tewlqlxcd6drmq7ptuskkfxn8 167 proposerpriority: 0 168 votingpower: 1000 169 - address: linovalcons1nydnya0r4phmfqt7qu86ghkqlheehrpa3a80r5 170 pubkey: linovalconspub1zcjduepqcuclpyzh386p0pcv6d64s4g97af3zyh67l25x0dft8yv9gg8cqwq68chf6 171 proposerpriority: 0 172 votingpower: 1000 173 - address: linovalcons1n03jnfxtp5r9d7l3pc0lxf40mx8e03ndpq8mqx 174 pubkey: linovalconspub1zcjduepqh60ctatwu85hpwcjgejda0a83t2sw43ec3rnujw9sm300dq7ar6s4u4jen 175 proposerpriority: 0 176 votingpower: 1000 177 - address: linovalcons150sk4vu5wg2uamx0thuutl89rwesvp48s09d8t 178 pubkey: linovalconspub1zcjduepq2pex2tvnd3qmfmugh7gfamcgpuadd60f6tl9ztlflk9clt32um3qrludjh 179 proposerpriority: 0 180 votingpower: 1000 181 - address: linovalcons1mf3cr0dfhpj5gg9p7jycy0juz7vx274lavf008 182 pubkey: linovalconspub1zcjduepq3aus4csxr9vjem3vn5j83l5fs55vv75lswl2xcf3a40q8f02sz7spnnfus 183 proposerpriority: 0 184 votingpower: 1000 185 - address: linovalcons1uutlmkjs3wrmgse8ea6ltaf3p76lna0w2u55u0 186 pubkey: linovalconspub1zcjduepqp5uck88rkd35ldn55zawxn5ycgkfgsjkw72jvzpp3klzzs9mrj5sayqzdt 187 proposerpriority: 0 188 votingpower: 1000 189 #+end_src 190 ** Lino Modules 191 *** Account 192 #+begin_src text 193 Usage: 194 linocli query account [flags] 195 linocli query account [command] 196 197 Available Commands: 198 info info USERNAME 199 bank bank USERNAME 200 meta meta USERNAME 201 list-grants list-grants USERNAME 202 203 #+end_src 204 **** Balance 205 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#account 206 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#get-accountbank 207 208 linocli q account bank <userrname> 209 #+begin_src text 210 $ linocli q account bank yxia 211 { 212 "saving": { 213 "amount": "101598958" 214 }, 215 "frozen_money_list": null, 216 "public_key": { 217 "type": "tendermint/PubKeySecp256k1", 218 "value": "A5LJfVGyYpkNK/xKpXXIdzUo9/tj6s/755KkFMHTGs1x" 219 }, 220 "sequence": "870", 221 "username": "yxia" 222 } 223 #+end_src 224 *** Others 225 226 You can find out all commands available for other modules by entering 227 `linocli q`. 228 #+begin_src text 229 $ linocli q 230 Querying subcommands 231 232 Usage: 233 linocli query [command] 234 235 Aliases: 236 query, q 237 238 Available Commands: 239 blockchain Blockchain-related Queries 240 241 developer Querying commands for the developer module 242 account Querying commands for the account module 243 post Querying commands for the post module 244 proposal Querying commands for the proposal module 245 validator Querying commands for the validator module 246 global Querying commands for the global module 247 bandwidth Querying commands for the bandwidth module 248 param Querying commands for the param module 249 reputation Querying commands for the reputation module 250 vote Querying commands for the vote module 251 252 Flags: 253 -h, --help help for query 254 255 Global Flags: 256 --chain-id string Chain ID of tendermint node 257 -e, --encoding string Binary encoding (hex|b64|btc) (default "hex") 258 --home string directory for config and data (default "/home/stumble/.linocli") 259 -o, --output string Output format (text|json) (default "text") 260 --trace print out full stack trace on errors 261 262 Use "linocli query [command] --help" for more information about a command. 263 #+end_src 264 * Transaction 265 For transactions, you must provide the following required flags 266 + --fees <amount>, maximum transaction fee, e.g. --fees 1000000linocoin. 267 + --priv-key, hex encoded private key. 268 + --sequence, the sequence number of the private key. 269 270 Example: 271 #+begin_src text 272 linocli tx account register <referrer> <regfee> <username> --sequence 123 --fees 10000linocoin --priv-key "PRIVATEKEYHEXBYTES" 273 #+end_src 274 ** Build Offline Transaction 275 You can generate a signed offline message by passing --offline=true to 276 any transaction subcommands. The printed result contains two line, 277 where the first line is the json encoded transaction. The second line 278 is the hex encoded transaction, which can used for broadcasting. 279 #+begin_src text 280 linocli tx account transfer dlivetv --to ytu --amount 1 --memo haha --priv-key <private-key-hex> --sequence 0 --fees 10000linocoin --offline=true 281 {"type":"auth/StdTx","value":{"msg":[{"type":"lino/transfer","value":{"sender":"dlivetv","receiver":"ytu","amount":"1","memo":"haha"}}],"fee":{"amount":[{"denom":"linocoin","amount":"10000"}],"gas":"1"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"A6nE19NXXEnsK69C+UOTqKhNq64pcnCFjVmchAfjsNSE"},"signature":"J6HsQqvHu34I5KNiPjX2N2Wa1tM8oIroo3Do0hJYW/RAETdUO53dGpWQKlV1tnghhDsSBd/MZyE9qFY1V8dQYw=="}],"memo":""}} 282 7B2274797065223A22617574682F5374645478222C2276616C7565223A7B226D7367223A5B7B2274797065223A226C696E6F2F7472616E73666572222C2276616C7565223A7B2273656E646572223A22646C6976657476222C227265636569766572223A22797475222C22616D6F756E74223A2231222C226D656D6F223A2268616861227D7D5D2C22666565223A7B22616D6F756E74223A5B7B2264656E6F6D223A226C696E6F636F696E222C22616D6F756E74223A223130303030227D5D2C22676173223A2231227D2C227369676E617475726573223A5B7B227075625F6B6579223A7B2274797065223A2274656E6465726D696E742F5075624B6579536563703235366B31222C2276616C7565223A2241366E4531394E5858456E734B3639432B554F54714B684E71363470636E43466A566D636841666A734E5345227D2C227369676E6174757265223A224A3648735171764875333449354B4E69506A58324E32576131744D386F49726F6F33446F30684A59572F5241455464554F353364477057514B6C5631746E67686844735342642F4D5A794539714659315638645159773D3D227D5D2C226D656D6F223A22227D7D 283 #+end_src 284 285 ** Broadcast 286 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#synchronizing-and-analyzing-the-successful-transfers 287 288 If you have a string of hex encoded transaction, you can broadcast it 289 by 290 #+begin_src text 291 linocli tx broadcast broadcast <tx-hex> 292 #+end_src 293 294 ** Lino Modules 295 *** Account 296 **** Register 297 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#register-a-new-user 298 299 `linocli tx account register <referrer> <regfee> <new-username>` will 300 register an account of <new-username>, by <referrer>, paying <regfee>. 301 #+begin_src text 302 linocli tx account register dlivetv 100 validator4 --sequence <seq> --fees 10000linocoin --priv-key <pk> 303 #+end_src 304 **** Transfer 305 go-sdk: https://github.com/lino-network/lino-go/tree/master/doc#transfer-lino-between-two-users 306 js-sdk: https://github.com/lino-network/lino-js/tree/master/doc#register-a-new-user 307 308 `linocli tx account transfer <from> --to <bar> --amount <amount> --memo memo` 309 #+begin_src text 310 $ `linocli tx account transfer yxia --to ytu --amount 1 --memo memo --sequence 123 --fees 10000linocoin --priv-key "PRIVATEKEY"` 311 Response: 312 Height: 223856 313 TxHash: 7860BA7CEE3205DC8694E0B39BCA53B8C9518544F96F62C4E6EBEE5811C952F1 314 Raw Log: [{"msg_index":0,"success":true,"log":""}] 315 Logs: [{"msg_index":0,"success":true,"log":""}] 316 GasUsed: 127028 317 Events: 318 - message 319 - action: TransferMsg 320 #+end_src 321 322 *** Others 323 You can find other transaction subcommands in `linocli tx`. 324 #+begin_src text 325 $ linocli tx 326 Transactions subcommands 327 328 Usage: 329 linocli tx [command] 330 331 Available Commands: 332 broadcast broadcast <tx-hex> 333 334 developer Developer tx subcommands 335 account Account tx subcommands 336 post Post tx subcommands 337 proposal vote tx subcommands 338 validator validator tx subcommands 339 vote vote tx subcommands 340 341 #+end_src