一、數字資產信任網關(信任網關纔可進行資產轉帳)
sudo ./dacd submit xhw7v3VNVUhT4ovMX8ADcNoiLWaDD
返回結果:
'{"Account":"zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt","LimitAmount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value":"500000000"},"TransactionType":"TrustSet"}'
備註:
xxSuJswbuouEGCACMm7u9BArCK3ha 爲資產帳號私鑰
zBtDg4u4bBb16RoUkBnLfemWegtbuy8ioD 爲網關地址
USD 爲發行的數字資產名稱, 可自定義
500000000 爲信任的數量, 信任多少則可發行多少
個人理解
sudo ./dacd submit 發行者master_seed
'{"Account」:」發行者account_id
」,」LimitAmount":{"currency」:」資產名字」,」issuer」:」網關account_id
」,」value」:」發行資產總量」},」TransactionType":"TrustSet"}'
二、 發行數字資產到剛生成的地址上(即便用網關向地址轉數字資產)
sudo ./dacd submit xnQiGESjh1NUwEdSyzAgxRc5peXss
返回結果:
'{"Account":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","Amount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value":"500000000"},"Destination":"zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt","TransactionType":"Payment"}'
備註:
xnmGtEajykEqVsMpq7dmbFeyqWhzu 爲網關私鑰
zBtDg4u4bBb16RoUkBnLfemWegtbuy8ioD 爲網關地址, 其中Account和Issuer的值都爲網關地址
USD 爲發行的數字資產名稱
50000000 爲發行總量, 值不能超過上面信任的數量
zE1sCr7VZFknyjQFWvvH1A3BYfY9yr59Gk 爲接收的數字資產帳號地址
個人理解:
sudo ./dacd submit 網關master_seed
'{"Account」:」網關account_id
」,」Amount":{"currency":"USD","issuer":"網關account_id","value":"500000000"},"Destination」:」發行者account_id」,」TransactionType":"Payment"}'
三、 轉移數字資產到錢包上(轉帳前錢包須要添加此資產)
sudo ./dacd submit xhw7v3VNVUhT4ovMX8ADcNoiLWaDD
返回結果:
'{"Account":"zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt","Amount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value":"500000000"},"Destination":"z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx","TransactionType":"Payment"}'
sudo ./dacd submit xhw7v3VNVUhT4ovMX8ADcNoiLWaDD
返回結果:
'{"Account":"zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt","Amount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value」:」100000000"},"Destination":"z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx","TransactionType":"Payment"}'
備註:
xxSuJswbuouEGCACMm7u9BArCK3ha爲數字資產帳號私鑰
zBtDg4u4bBb16RoUkBnLfemWegtbuy8ioD爲網關地址
個人理解
sudo ./dacd submit 發行者master_seed
'{"Account」:」發行者account_id
」,」Amount":{"currency":"USD","issuer」:」網關account_id
」,」value":"500000000"},"Destination」:」接收者錢包地址account_id","TransactionType":"Payment"}'
四、查詢系統資產
./dacd account_info z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ
./dacd account_info zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt
./dacd account_info z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx
五、查詢發行資產.
./dacd account_lines z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ
./dacd account_lines zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt
./dacd account_lines z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx
接收者數字資產信任網關(信任網關纔可進行資產轉帳)
sudo ./dacd submit xhexiiXwxX3sWqdXQqCBcP58VKnqT
返回結果:
'{"Account":"z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx","LimitAmount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value":"500000000"},"TransactionType":"TrustSet"}'
sudo ./dacd submit xhfNCW6PhKGswq6hf1Ea8YUWZCFjB
返回結果:
'{"Account":"zU4Wvm4RE1CfkLhim1cuhRvzLVBuSpU9Xj","LimitAmount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value":"500000000"},"TransactionType":"TrustSet"}'
備註:
xxSuJswbuouEGCACMm7u9BArCK3ha 爲資產帳號私鑰
zBtDg4u4bBb16RoUkBnLfemWegtbuy8ioD 爲網關地址
USD 爲發行的數字資產名稱, 可自定義
500000000 爲信任的數量, 信任多少則可發行多少
個人理解
sudo ./dacd submit 接收者master_seed
'{"Account」:」接收者account_id
」,」LimitAmount":{"currency」:」資產名字」,」issuer」:」網關account_id
」,」value」:」發行資產總量」},」TransactionType":"TrustSet"}'
六、往回轉
sudo ./dacd submit xhexiiXwxX3sWqdXQqCBcP58VKnqT
返回結果:
'{"Account":"z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx","Amount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value」:」500000000"},"Destination":"zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt","TransactionType":"Payment"}'
個人理解:
sudo ./dacd submit 發送者master_seed
'{"Account」:」發送者account_id
」,」Amount":{"currency":"USD","issuer」:」網關account_id
」,」value":"500000000"},"Destination」:」接收者account_id","TransactionType":"Payment"}'
七、再創建一個帳號
./dacd wallet_propose
返回結果:
Loading: "/opt/dacd_testnet/dacd.cfg"
2018-Oct-23 02:47:14 HTTPClient:NFO Connecting to 127.0.0.1:15006
{
"id" : 1,
"result" : {
"account_id" : "zU4Wvm4RE1CfkLhim1cuhRvzLVBuSpU9Xj",
"key_type" : "secp256k1",
"master_key" : "APS DRY CUFF CORN ATOM DIE WU HEBE LAWS CALL WALE PEA",
"master_seed" : "xhfNCW6PhKGswq6hf1Ea8YUWZCFjB",
"master_seed_hex" : "65665F31AEBA52461CEEB4B5B4F5C102",
"public_key" : "cBPJXTtyj97jCTeDtCVxvEZMeoNBZgaap8dsuybV7TKBPyNfRwxv",
"public_key_hex" : "02B12A71789862405FB200C564109601598F29A58DDA1EB993AF24898D44ED2556",
"status" : "success"
}
}
八、 先激活這個帳號:給他轉帳 2 DAC
./dacd submit xnQiGESjh1NUwEdSyzAgxRc5peXss '{"Account":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","Amount":"2000000","Destination":"zU4Wvm4RE1CfkLhim1cuhRvzLVBuSpU9Xj","TransactionType":"Payment"}'
說明:
./dacd submit master_seed '{"Account」:」source account_id","Amount」:」10000000」,」Destination」:」dest account_id","TransactionType":"Payment"}'
查詢他的系統DAC
./dacd account_info zU4Wvm4RE1CfkLhim1cuhRvzLVBuSpU9Xj
九、往其餘帳號轉
sudo ./dacd submit xhexiiXwxX3sWqdXQqCBcP58VKnqT
返回結果:
'{"Account":"z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx","Amount":{"currency":"USD","issuer":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","value」:」500000000"},"Destination":"zU4Wvm4RE1CfkLhim1cuhRvzLVBuSpU9Xj","TransactionType":"Payment"}'
不成功!