This documentation lists differences between API.v3 and API.v2. If you are interested in more basic usage of Metaverse, please refer to the docs instead.
Compatiblity for API v2, please refers to API v2.
Compatiblity for API v1, please refers to API v1.
Common
API v3 returns object itself as result
field of response not a dictionary of name : object
.
transaction object
API v3 returns a transaction object while API v2 return a dictionary of transaction : object
.
Following commands are affected.
Method | API v3 | API v2 |
---|---|---|
burn |
v3 | v2 |
decoderawtx |
v3 | v2 |
deposit |
v3 | v2 |
didchangeaddress |
v3 | v2 |
didsend |
v3 | v2 |
didsendfrom |
v3 | v2 |
didsendmore |
v3 | v2 |
didsendasset |
v3 | v2 |
didsendassetfrom |
v3 | v2 |
issue |
v3 | v2 |
issuecert |
v3 | v2 |
transfercert |
v3 | v2 |
transfermit |
v3 | v2 |
registerdid |
v3 | v2 |
registermit |
v3 | v2 |
secondaryissue |
v3 | v2 |
send |
v3 | v2 |
sendasset |
v3 | v2 |
sendassetfrom |
v3 | v2 |
sendfrom |
v3 | v2 |
sendmore |
v3 | v2 |
asset object
API v3 returns a asset object while API v2 return a dictionary of asset : object
.
Following commands are affected.
Method | API v3 | API v2 |
---|---|---|
createasset |
v3 | v2 |
list object
API v3 returns a list of object while API v2 return a dictionary of name : list of object
.
Following commands are affected.
Method | API v3 | API v2 |
---|---|---|
listmultisig |
v3 | v2 |
getaccountasset |
v3 | v2 |
getaddressasset |
v3 | v2 |
getasset |
v3 | v2 |
listassets |
v3 | v2 |
getnewaddress |
v3 | v2 |
listaddresses |
v3 | v2 |
listbalances |
v3 | v2 |
listdids |
v3 | v2 |
listmits |
v3 | v2 |
string object
API v3 returns a string object while API v2 return a dictionary of name : string object
.
Following commands are affected.
Method | API v3 | API v2 |
---|---|---|
createrawtx |
v3 | v2 |
sendrawtx |
v3 | v2 |
Replace -
with _
API v3 replaces -
with _
in the field name of response.
Following field names are affected.
Method | API v3 | API v2 |
---|---|---|
deletemultisig |
v3 | v2 |
listmultisig |
v3 | v2 |
getaccount |
v3 | v2 |
getbalance |
v3 | v2 |
getinfo |
v3 | v2 |
getnewmultisig |
v3 | v2 |
getpublickey |
v3 | v2 |
validateaddress |
v3 | v2 |
Changes some fields
API v3 changes some fields of command.
getaccount
v3{
"address_count",
"mnemonic",
"name"
}
v2{
"address-count",
"mnemonic-key",
"name",
"user-status"
}
getnewaccount
v3{
"addresses",
"mnemonic",
"name"
}
v2{
"default-address",
"mnemonic"
}
getblock
v3{
"bits",
"hash",
"merkle_tree_hash",
"mixhash",
"nonce",
"number",
"previous_block_hash",
"timestamp",
"transaction_count",
"transactions",
"version"
}
v2{
"header",
"txs"
}
deletelocalasset
v3{
"status",
"symbol"
}
v2{
"operate",
"result",
"symbol"
}
importaccount
v3{
"addresses",
"mnemonic",
"name"
}
v2{
"addresses",
"hd_index",
"mnemonic",
"name"
}
signrawtx
v3{
"hash",
"rawtx"
}
v2{
"hash",
"hex"
}
signmultisigtx
v3{
"hash",
"rawtx"
}
v2{
"hex"
}
Change name of field
API v3 replaces time_stamp
with timestamp
.
Following commands are affected.
Method | API v3 | API v2 |
---|---|---|
getblock |
v3 | v2 |
getblockheader |
v3 | v2 |
getmit |
v3 | v2 |