注册
注册数字身份前必须有已经创建好的账户,需要目的地址支付有 1个etp来支付手续费,注册成功并入块后,才可以使用它来发送交易
注册数字身份需要参数: 账户,账户密码,目的地址,数字身份标志。
命令: |
示例: 使用账号’test’注册名称为’test.mvs’的数字身份,并绑定到该账户下的有效地址’M9L3ipy3Hcf6kdvknU3mH7mwH9ER3uCziu’命令:
$ ./mvs-cli registerdid test 123 M9L3ipy3Hcf6kdvknU3mH7mwH9ER3uCziu test.mvs
输出:
{
"transaction" :
{
"hash" : "4d5ae5bfdd89d30a771680cd3080478e741ff1bea65b4903ea42160952c0c9e8",
"inputs" :
[
{
"address" : "M9L3ipy3Hcf6kdvknU3mH7mwH9ER3uCziu",
"previous_output" :
{
"hash" : "a7db09dcf9e8d9341f8343a6f1edfb2fd1fdf350ccef8f3517b446eeb2d73076",
"index" : 0
},
"script" : "[ 304402201c9b9706b3e198e9de8887c94c6e7f1192a65cb1fa15318b409f6d4fc4952f9a0220306d2f5fcdf2e1e32861399dc55b7c81a1cedc7790d2ff8a73a8bb3f9bac5fde01 ] [ 035f572a164ec0e7d8f1935e357d86c6441152bed7251389a1c66174ae890dad90 ]",
"sequence" : 4294967295
}
],
"lock_time" : "0",
"outputs" :
[
{
"address" : "M9L3ipy3Hcf6kdvknU3mH7mwH9ER3uCziu",
"attachment" :
{
"address" : "M9L3ipy3Hcf6kdvknU3mH7mwH9ER3uCziu",
"symbol" : "test.mvs",
"type" : "did-register"
},
"index" : 0,
"locked_height_range" : 0,
"script" : "dup hash160 [ 0fad171975f1100309022c83c7b9dca0a8f8e6b8 ] equalverify checksig",
"value" : 0
}
],
"version" : "4"
}
}