表一:數(shù)據(jù)查詢
RPC | feature |
---|---|
whc_getinfo | 獲取wormhole節(jié)點(diǎn)的基礎(chǔ)信息 |
whc_getactivecrowd | 獲取指定地址的活躍眾籌 |
whc_getallbalancesforaddress | 獲取指定地址所有種類的token金額 |
whc_getallbalancesforid | 獲取wormhole系統(tǒng)中含有指定token的所有地址及金額信息 |
whc_getbalance | 獲取指定地址上指定token的金額信息 |
whc_getbalanceshash | 獲取本節(jié)點(diǎn)當(dāng)前高度下指定token的狀態(tài)哈希 |
whc_getcrowdsale | 獲取眾籌token的詳細(xì)信息 |
whc_getcurrentconsensushash | 獲取本節(jié)點(diǎn)當(dāng)前高度下wormhole系統(tǒng)的狀態(tài)哈希 |
whc_getgrants | 獲取指定管理token的增發(fā)像樊,銷毀信息 |
whc_getpayload | 獲取指定交易的wormhole載荷數(shù)據(jù) |
whc_getproperty | 獲取指定token的信息 |
whc_getsto | 獲取指定空投交易的詳細(xì)信息 |
whc_gettransaction | 獲取指定交易的wormhole協(xié)議信息 |
whc_listblocktransactions | 獲取指定區(qū)塊中的wormhole交易列表 |
whc_listpendingtransactions | 獲取節(jié)點(diǎn)待確認(rèn)的wormhole交易列表 |
whc_listproperties | 列出wormhole系統(tǒng)中的所有token |
whc_listtransactions | 列出與節(jié)點(diǎn)錢包中的wormhole交易 |
whc_getinfo
解釋:獲取當(dāng)前wormhole節(jié)點(diǎn)的基本信息
調(diào)用:wormholed-cli whc_getinfo
返回值:當(dāng)前wormhole節(jié)點(diǎn)的基本信息
示例如下
wormholed-cli whc_getinfo
{
"wormholeversion_int": 6000,
"wormholeversion": "0.0.6",
"bitcoincoreversion": "0.17.2",
"block": 543198,
"blocktime": 1534136847,
"blocktransactions": 0,
"totaltransactions": 1099,
"alerts": [
]
}
返回值字段描述
- wormholeversion_int : wormhole 節(jié)點(diǎn)的版本
- wormholeversion :wormhole 節(jié)點(diǎn)的版本
- bitcoincoreversion :bitcoin-abc 的版本
- block :節(jié)點(diǎn)最新的區(qū)塊高度
- blocktime:節(jié)點(diǎn)最新的區(qū)塊時(shí)間戳
- blocktransactions :當(dāng)前最新的區(qū)塊中包含的wormhole交易個(gè)數(shù)
- totaltransactions :當(dāng)前高度下吨悍,塊鏈中所有wormhole交易的個(gè)數(shù)
- alerts :節(jié)點(diǎn)規(guī)則的警告信息
whc_getactivecrowd
解釋:獲取指定地址的活躍眾籌
調(diào)用:wormholed-cli whc_getactivecrowd address
參數(shù):address
: 指定查詢地址
返回值
- 該地址存在活躍眾籌時(shí)工坊,返回活躍眾籌token的信息
- 不存在活躍眾籌,返回
{}
.
示例如下
wormholed-cli whc_getactivecrowd qq893ghdg697e5t5anh5fqpxwxxhw3akyu9l7wej0q
{
"propertyid": 168,
"name": "bcext",
"category": "bcext development",
"subcategory": "gcash cashwallet cashutil neutrino",
"data": "contribute to bitcoin-abc",
"url": "https://github.com/bcext",
"precision": 8,
"issuer": "bitcoincash:qq893ghdg697e5t5anh5fqpxwxxhw3akyu9l7wej0q",
"creationtxid": "1f2a39a5fce4e2ce877b611925ef4c6eedb805c1337edd8f1d4bab49e2fe2449",
"totaltokens": "100000000.12345678"
}
返回值字段描述
- propertyid : tokenID
- name : token名稱
- category : token類別
- subcategory : token子類別
- data : token信息
- url : token的URL
- precision : token精度
- issuer : 發(fā)行者
- creationtxid : 創(chuàng)建該token的交易ID
- totaltokens : 總共發(fā)行的眾籌token數(shù)量
whc_getallbalancesforaddress
解釋:獲取指定地址所有類型token的非0余額信息;對(duì)于金額為0的token,不顯示
調(diào)用:wormholed-cli whc_getallbalancesforaddress address
參數(shù):address
: 指定查詢地址
返回值
- 存在金額非0的token,返回該token的金額信息击困;否則返回
{}
.
示例如下
wormholed-cli whc_getallbalancesforaddress qr3pzyxl33vdhga54rvh80s62pjznl9eyu9k7q9tmv
[
{
"propertyid": 1,
"balance": "14.00000000",
"reserved": "0.00000000"
},
{
"propertyid": 3,
"balance": "500",
"reserved": "0"
}
]
返回值字段描述
- propertyid : tokenID
- balance : 可用余額
- reserved : 凍結(jié)余額荒叼,當(dāng)前版本不可用
whc_getallbalancesforid
解釋:獲取當(dāng)前塊鏈中含有指定token的所有地址及該token的金額信息
調(diào)用:wormholed-cli whc_getallbalancesforid property
參數(shù):property
: tokenID
返回值
- 含有該token的地址列表
示例如下
wormholed-cli whc_getallbalancesforid 1
[
{
"address": "bitcoincash:qrpcu87d3y83jg6pjhxrk7ys2225rp9m25nypfvtvk",
"balance": "0.00003000",
"reserved": "0.00000000"
},
{
"address": "bitcoincash:qzf6rh7z40963a9jhh8agmnexw486g205upjjhsfzl",
"balance": "100.00000000",
"reserved": "0.00000000"
}
]
返回值字段描述
- address : 地址
- balance : 可用余額
- reserved : 凍結(jié)余額轿偎,當(dāng)前版本不可用
whc_getbalanceshash
描述:返回當(dāng)前節(jié)點(diǎn)最高區(qū)塊狀態(tài)下,指定token在系統(tǒng)中存在的狀態(tài)哈希
調(diào)用:wormholed-cli whc_getbalanceshash 1
參數(shù):指定的tokenID
返回值:token在系統(tǒng)中存在的狀態(tài)哈希
示例如下
wormholed-cli whc_getbalanceshash 1
{
"block": 542347,
"blockhash": "000000000000000000f6d63c8adeff1f4bc6fe3618d73f74813c05f08761060a",
"propertyid": 1,
"balanceshash": "f4a051549368b79409b25ad5c3dba4a9e8b0434996d88be8281969f204b35dee"
}
返回值字段描述
- block : 當(dāng)前節(jié)點(diǎn)的最高區(qū)塊號(hào)
- blockhash : 該區(qū)塊的哈希
- propertyid : tokenID
- balanceshash : token在系統(tǒng)中存在的狀態(tài)哈希
whc_getbalance
描述:返回指定地址被廓,指定token的金額信息
調(diào)用:wormholed-cli whc_getbalance address propertyid
參數(shù)
-
address
:指定的地址 -
propertyid
:tokenID
返回值:指定地址的指定token的金額信息
示例如下
wormholed-cli whc_getbalance qqmrktdkuj0qtu0dyef0h2xkn7u6stycuvk70k0ups 1
{
"balance": "5.00000000",
"reserved": "0.00000000"
}
返回值字段描述
- balance : 可用余額
- reserved : 凍結(jié)余額坏晦,當(dāng)前版本不可用
whc_getcrowdsale
描述:獲取眾籌token的信息
調(diào)用:wormholed-cli whc_getcrowdsale propertyid (verbose)
參數(shù):
- propertyid :眾籌token的ID
- verbose :true, 列出眾籌參與的信息;false, 不列出眾籌參與的信息
返回值:返回眾籌token的信息
示例如下
wormholed-cli whc_getcrowdsale 168 true
{
"propertyid": 168,
"name": "bcext",
"active": true,
"issuer": "bitcoincash:qq893ghdg697e5t5anh5fqpxwxxhw3akyu9l7wej0q",
"propertyiddesired": 1,
"precision": "8",
"tokensperunit": "1000.11111111",
"earlybonus": 10,
"starttime": 1533266569,
"deadline": 1534733523,
"amountraised": "1.12345000",
"tokensissued": "100000000.12345678",
"addedissuertokens": "0.00000000",
"participanttransactions": [
{
"txid": "ebdc302cddb8fad9e8e11a210af7c01e57b4cf3c883b1ff7d504b4a3791177da",
"amountsent": "1.12345000",
"participanttokens": "1393.76317766"
}
]
}
返回值字段描述
propertyid :tokenID
name :token名稱
active :眾籌是否處于活躍狀態(tài)
issuer :眾籌的發(fā)行者
propertyiddesired :募集的tokenID
precision :眾籌token的精度
tokensperunit : 該眾籌token的單價(jià)嫁乘,即1WHC等于多少token昆婿。
earlybonus :早鳥獎(jiǎng)勵(lì)
starttime : 該眾籌開始的時(shí)間
deadline : 該眾籌截止時(shí)間
amountraised :已募集到的資金
tokensissued : 眾籌token發(fā)行的數(shù)量
addedissuertokens :當(dāng)眾籌關(guān)閉時(shí),未售完的眾籌數(shù)量蜓斧,這些數(shù)量的token 會(huì)計(jì)入發(fā)行者的賬戶地址
-
participanttransactions :眾籌參與者的信息
- txid:參與眾籌的交易ID
- amountsent:參與眾籌的WHC金額
- participanttokens:購買到的眾籌token數(shù)量
whc_getcurrentconsensushash
描述:獲取當(dāng)前wormhole系統(tǒng)的狀態(tài)哈希
調(diào)用:wormholed-cli whc_getcurrentconsensushash
返回值:系統(tǒng)狀態(tài)的哈希
示例如下
wormholed-cli whc_getcurrentconsensushash
{
"block": 542354,
"blockhash": "00000000000000000104a3002e3ddf7ccc835751e09ef3335a22078b129c2c71",
"consensushash": "95e4e7fa0d92f84b18ec45ad9b39fdafcc5200ba8175227d7d571864aa5948c9"
}
返回值字段描述
- block : 當(dāng)前節(jié)點(diǎn)的最高區(qū)塊號(hào)
- blockhash : 該區(qū)塊的哈希
- consensushash : 系統(tǒng)狀態(tài)的哈希
whc_getgrants
描述:返回管理token的增發(fā)或銷毀信息
調(diào)用:wormholed-cli whc_getgrants propertyid
參數(shù):tokenID
返回值:管理token的增發(fā)或銷毀信息
示例如下
wormholed-cli whc_getgrants 166
{
"propertyid": 166,
"name": "blockchain extension development",
"issuer": "bitcoincash:qpadl79yr4hh0fym4gw73mxp3rm4325knqe7fj6a9s",
"creationtxid": "a82b29d69538268fb67df384b9be7128456724e6fa69e4eb387944cb78ed9d66",
"totaltokens": "0.00000",
"issuances": [
{
"txid":
"grant":
}
{
"txid":
"revoke":
}
]
}
返回值字段描述
- propertyid : tokenID
- name :token名稱
- issuer :token發(fā)行者
- creationtxid :創(chuàng)建該筆token的交易ID
- totaltokens : 當(dāng)前token的發(fā)行量
- issuances :token管理的信息
- txid :增發(fā)或銷毀的交易ID
- grant:增發(fā)的token數(shù)量
- revoke:銷毀的token數(shù)量
whc_getpayload
描述:獲取指定交易的wormhole載荷數(shù)據(jù)
調(diào)用:wormholed-cli whc_getpayload txid
參數(shù):交易ID
返回值:指定交易中wormhole協(xié)議的數(shù)據(jù)
示例如下
wormholed-cli whc_getpayload a82b29d69538268fb67df384b9be7128456724e6fa69e4eb387944cb78ed9d66
{
"payload": "00000036010005000000006263657874207265706f7369746f7279006763617368206361736877616c6c657420636173687574696c206e65757472696e6f00626c6f636b636861696e20657874656e73696f6e20646576656c6f706d656e740068747470733a2f2f6769746875622e636f6d2f626365787400666f72207468652066757475726500",
"payloadsize": 136
}
返回值字段描述
- payload :載荷數(shù)據(jù)
- payloadsize :載荷數(shù)據(jù)的長(zhǎng)度
whc_getproperty
描述:獲取指定token信息
調(diào)用:wormholed-cli whc_getproperty propertyid
參數(shù):tokenID
返回值:該token的詳細(xì)信息
示例如下
wormholed-cli whc_getproperty 168
{
"propertyid": 168,
"name": "bcext",
"category": "bcext development",
"subcategory": "gcash cashwallet cashutil neutrino",
"data": "contribute to bitcoin-abc",
"url": "https://github.com/bcext",
"precision": 8,
"issuer": "bitcoincash:qq893ghdg697e5t5anh5fqpxwxxhw3akyu9l7wej0q",
"creationtxid": "1f2a39a5fce4e2ce877b611925ef4c6eedb805c1337edd8f1d4bab49e2fe2449",
"fixedissuance": false,
"managedissuance": false,
"totaltokens": "100000000.12345678"
}
返回值字段描述
- propertyid :tokenID
- name :token名稱
- category : token類別
- subcategory : token子類別
- data : token信息
- url : token的URL
- precision : token精度
- issuer : 發(fā)行者
- fixedissuance : 是否屬于固定屬性token
- managedissuance : 是否屬于可管理token
- creationtxid : 創(chuàng)建該token的交易ID
- totaltokens : 總共發(fā)行的眾籌token數(shù)量
whc_getsto
描述:獲取空投相關(guān)的信息
調(diào)用:wormholed-cli whc_getsto txid recipientfilter
參數(shù)
- txid : 空投的交易ID
- recipientfilter : 過濾器仓蛆;指定地址時(shí),只顯示該接收的空投金額信息挎春;當(dāng)為
*
時(shí)多律,默認(rèn)顯示所有賬戶接收的空投金額信息。
返回值:空投的詳細(xì)信息
示例如下
wormholed-cli whc_getsto 403ec9b6f8b142485ea514d52bc4c782f008021a261f637028a28e1a64681d1b
{
"txid": "403ec9b6f8b142485ea514d52bc4c782f008021a261f637028a28e1a64681d1b",
"fee": "268",
"sendingaddress": "bchtest:qz04wg2jj75x34tge2v8w0l6r0repfcvcygv3t7sg5",
"ismine": false,
"version": 0,
"type_int": 3,
"type": "Send To Owners",
"propertyid": 12,
"precision": "1",
"amount": "50.0",
"totalstofee": "0",
"recipients": [
],
"valid": false,
"invalidreason": "Unknown error",
"blockhash": "000000000000037252bf77bba30e5599b20239eb8f9f68c8b18c238688a27f6b",
"blocktime": 1531904498,
"positioninblock": 999999,
"block": 1247269,
"confirmations": 3368
}
返回值字段描述
- txid : 該空投交易ID
- fee : 該交易的BCH手續(xù)費(fèi)
- sendingaddress : 空投交易的發(fā)送者
- ismine :該發(fā)送地址是否屬于節(jié)點(diǎn)錢包中的地址
- version :空投類型的版本號(hào)
- type_int :空投交易類型
- type : 空投交易類型
- propertyid :空投的tokenID
- precision :空投的token精度
- amount :空投的金額
- totalstofee : 這筆空投花費(fèi)的手續(xù)費(fèi)
- valid :是否有效的空投交易
- invalidreason : 無效的原因
- blockhash :該交易所在的區(qū)塊哈希
- blocktime :該交易所在區(qū)塊的時(shí)間戳
- positioninblock :該交易在區(qū)塊中的索引
- block : 該交易所在的區(qū)塊號(hào)
- confirmations :該交易被確認(rèn)的次數(shù)
- recipients :這次空投接收者的信息
- address :接收此次空投的地址
- amount :接收的空投金額
whc_gettransaction
描述:獲取wormhole交易的信息
調(diào)用:wormholed-cli whc_gettransaction txid
參數(shù):交易ID
返回值:如果為wormhole交易搂蜓,則返回它的詳細(xì)信息
示例如下
wormholed-cli whc_gettransaction a82b29d69538268fb67df384b9be7128456724e6fa69e4eb387944cb78ed9d66
{
"txid": "a82b29d69538268fb67df384b9be7128456724e6fa69e4eb387944cb78ed9d66",
"fee": "390",
"sendingaddress": "bitcoincash:qpadl79yr4hh0fym4gw73mxp3rm4325knqe7fj6a9s",
"ismine": false,
"version": 0,
"type_int": 54,
"type": "Create Property - Manual",
"propertyid": 166,
"precision": "5",
"ecosystem": "main",
"category": "bcext repository",
"subcategory": "gcash cashwallet cashutil neutrino",
"propertyname": "blockchain extension development",
"data": "for the future",
"url": "https://github.com/bcext",
"amount": "0.00000",
"valid": true,
"blockhash": "0000000000000000009179a89e5ef71fabac5404c61a11cc60a21c1d6caefb7e",
"blocktime": 1533194387,
"positioninblock": 1553,
"block": 541634,
"confirmations": 729
}
返回值字段描述
- txid : 交易ID
- fee : 該交易的BCH手續(xù)費(fèi)
- sendingaddress : 交易的發(fā)送者
- ismine :該發(fā)送地址是否屬于節(jié)點(diǎn)錢包中的地址
- version :wormhole類型的版本號(hào)
- type_int :wormhole的交易類型
- wormholed-cli : wormhole的交易類型
- propertyid :如為創(chuàng)建token類型的交易狼荞,標(biāo)識(shí)tokenID
- precision :精度
- ecosystem :該token所在的生態(tài)體系
- category : 創(chuàng)建的token類別
- amount :創(chuàng)建的token數(shù)量
- valid : 該筆wormhole交易是否有效
- blockhash :該交易所在的區(qū)塊哈希
- blocktime :該交易所在區(qū)塊的時(shí)間戳
- positioninblock :該交易在區(qū)塊中的索引
- block : 該交易所在的區(qū)塊號(hào)
- confirmations :該交易被確認(rèn)的次數(shù)
whc_listblocktransactions
描述:返回指定塊中所有wormhole交易
調(diào)用:wormholed-cli whc_listblocktransactions blockHeight
參數(shù):塊號(hào)
返回值:wormhole的交易哈希列表
示例如下
wormholed-cli whc_listblocktransactions 541634
[
"599e5126759a98c977fce4056b14628f4e175d757d090ed11809c9f0474e6d55",
"fa072ca373c6a38248207eab6a4e85933792628188f6ba6eb99a0fa719d8e808",
"ec451d67689ed2d990652a013b1af87edce694f5675c11b5063c89889f5fa8ed",
"548a10ca6c0b36bed39a78e4d47636fa16ccd3b9ba0dadb5882deb4933f83336",
"72d266f60e6c7ddb64b5009b59bc263da4ee1be89257b1fd1625a3c674b23795",
"a82b29d69538268fb67df384b9be7128456724e6fa69e4eb387944cb78ed9d66",
"0956f48b0b097df6d3aa2d34acfe75a362a185fdfe32f90b5683f178558d5569"
]
whc_listpendingtransactions
描述:查詢節(jié)點(diǎn)交易池中相關(guān)地址未確認(rèn)的wormhole交易
調(diào)用:wormholed-cli whc_listpendingtransactions address
參數(shù):過濾地址
返回值:指定地址未確認(rèn)的交易信息列表
示例如下
wormholed-cli whc_listpendingtransactions qpadl79yr4hh0fym4gw73mxp3rm4325knqe7fj6a9s
[
]
whc_listproperties
描述:列出整個(gè)系統(tǒng)的所有token信息
調(diào)用:wormholed-cli whc_listproperties
返回值:系統(tǒng)的所有token列表
示例如下
wormholed-cli whc_listproperties
[
{
"propertyid": 1,
"name": "WHC",
"category": "N/A",
"subcategory": "N/A",
"data": "WHC serve as the binding between Bitcoin cash, smart properties and contracts created on the Wormhole.",
"url": "http://www.wormhole.cash",
"precision": 0
},
{
"propertyid": 3,
"name": "BFT",
"category": "BitApp",
"subcategory": "Blockchain",
"data": "BitApp Founder Token",
"url": "ht\ntps://www.bitapp.pro",
"precision": 0
},
{
"propertyid": 4,
"name": "WHD",
"category": "group",
"subcategory": "coprenet",
"data": "the mainnet token issued",
"url": "www.wormhole.cash",
"precision": 8
}
]
whc_listtransactions
描述:列出塊鏈上與當(dāng)前節(jié)點(diǎn)錢包地址相關(guān)的所有交易信息
調(diào)用:wormholed-cli whc_listtransactions (address, count, skip, startblock, endblock)
參數(shù):該RPC的所有參數(shù)都是可選填的
- address :過濾的地址
- count :獲取的交易個(gè)數(shù)
- skip :跳過前n個(gè)交易
- startblock :交易開始的塊號(hào)
- endblock :交易結(jié)束的塊號(hào)
返回值:交易信息列表
示例如下
wormholed-cli whc_listtransactions qz04wg2jj75x34tge2v8w0l6r0repfcvcygv3t7sg5
[
]
交易創(chuàng)建
下述提供兩種方案來創(chuàng)建交易
方案一:調(diào)用表二中的RPC,可以直接創(chuàng)建wormhole交易帮碰;這系列RPC調(diào)用對(duì)節(jié)點(diǎn)有如下要求
- 要求wormhole節(jié)點(diǎn)必須有一個(gè)可以使用的錢包
- 錢包中必須有足夠的BCH和WHC相味,可以用來從創(chuàng)建交易
- 優(yōu)點(diǎn)是:調(diào)用接口簡(jiǎn)單,可以供節(jié)點(diǎn)用戶直接使用
- 缺點(diǎn)是:必須在當(dāng)前節(jié)點(diǎn)有一個(gè) 含有BCH和WHC的錢包
方案二:通過表三和表四RPC的組合調(diào)用殉挽,也可以用來創(chuàng)建wormhole交易
- 本調(diào)用方案可以用來開發(fā)錢包等應(yīng)用丰涉,通過調(diào)用服務(wù)器端的RPC服務(wù),生成未簽名的交易斯碌;然后錢包進(jìn)行簽名一死,向外發(fā)送簽名后的交易
- 優(yōu)點(diǎn)是:不要求調(diào)用節(jié)點(diǎn)必須含有錢包,不用擔(dān)心token遺失問題傻唾;允許線下簽名投慈,廣播交易
- 缺點(diǎn)是:調(diào)用流程稍加繁瑣
表二 :創(chuàng)建wormhole交易
RPC | feature |
---|---|
whc_burnbchgetwhc | 燃燒BCH,獲取WHC |
whc_sendissuancefixed | 發(fā)行固定屬性的token |
whc_sendissuancemanaged | 發(fā)行可管理的token |
whc_sendissuancecrowdsale | 發(fā)行可眾籌的token |
whc_particrowsale | 參與眾籌 |
whc_sendclosecrowdsale | 關(guān)閉眾籌 |
whc_sendgrant | 增發(fā)管理token的token數(shù)量 |
whc_sendrevoke | 銷毀管理token的token數(shù)量 |
whc_send | 轉(zhuǎn)賬 |
whc_sendsto | 空投 |
whc_sendall | 發(fā)送指定地址的所有token至另一個(gè)地址 |
whc_sendchangeissuer | 修改token的發(fā)行者 |
whc_burnbchgetwhc
描述:燃燒BCH冠骄,獲取WHC
調(diào)用:wormholed-cli whc_burnbchgetwhc "amount" (redeemaddress)
參數(shù)
- amount : 燃燒的BCH金額
- redeemaddress :多余的BCH贖回地址伪煤;可選項(xiàng),默認(rèn)有錢包生成一個(gè)新地址凛辣。
返回值:生成的交易哈希
示例如下
wormholed-cli whc_burnbchgetwhc 1.5
153438e063d2533f6337d86b9ab7494cf907c4e927c3cef7a9358504cb049cf6
whc_sendissuancefixed
描述:發(fā)行固定屬性的token
調(diào)用:wormholed-cli whc_sendissuancefixed "fromaddress" ecosystem precision previousid "category" "subcategory" "name" "url" "data" "totalNumber"
參數(shù)
- fromaddress :發(fā)行固定屬性token的地址
- ecosystem :token的生態(tài)體系抱既;當(dāng)前必須為1
- precision :token的精度
- previousid :附加價(jià)值的tokenID;當(dāng)前必須為0
- category :token的類別
- subcategory :token的子類別
- name :token的名稱
- url :token的URL
- data :token的自定義描述數(shù)據(jù)
- totalNumber :發(fā)行token的數(shù)量
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendissuancefixed qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 1 3 0 "company" "compute" "luzhiyao" "www.ludete.com" "hello world" 10082936279.232
1d059313c873018a2f0dfe855ba1dde0ce19ec50db51eca42236baa1b8c8d6f4
whc_sendissuancemanaged
描述:發(fā)行可管理的token
調(diào)用:wormholed-cli whc_sendissuancemanaged "fromaddress" ecosystem precision previousid "category" "subcategory" "name" "url" "data"
參數(shù)
- fromaddress :發(fā)行可管理token的地址
- ecosystem :token的生態(tài)體系扁誓;當(dāng)前必須為1
- precision :token的精度
- previousid :附加價(jià)值的tokenID防泵;當(dāng)前必須為0
- category :token的類別
- subcategory :token的子類別
- name :token的名稱
- url :token的URL
- data :token的自定義描述數(shù)據(jù)
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendissuancemanaged qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 1 3 0 "company" "compute" "luzhiyao" "www.ludete.com" "hello world"
ae878af640344f3c8fae85ed4d37eb0f2a77a2553a0cb7645ff7c92d23d89768
whc_sendissuancecrowdsale
描述:發(fā)行可眾籌的token
調(diào)用:wormholed-cli whc_sendissuancecrowdsale "fromaddress" ecosystem precision previousid "category" "subcategory" "name" "url" "data" propertyiddesired tokensperunit deadline earlybonus undefine totalNumber
參數(shù)
- fromaddress :發(fā)行可管理token的地址
- ecosystem :token的生態(tài)體系蚀之;當(dāng)前必須為1
- precision :token的精度
- previousid :附加價(jià)值的tokenID;當(dāng)前必須為0
- category :token的類別
- subcategory :token的子類別
- name :token的名稱
- url :token的URL
- data :token的自定義描述數(shù)據(jù)
- propertyiddesired :募集的tokenID
- tokensperunit :眾籌token的單價(jià)捷泞;1WHC等于多少token足删,單價(jià)的范圍[10-8, 108]
- deadline : 眾籌的截止時(shí)間
- earlybonus :早鳥激勵(lì)
- undefine :未定義字段,必須為0
- totalNumber :發(fā)行眾籌的數(shù)量
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendissuancecrowdsale qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 1 3 0 "company" "compute" "luzhiyao" "www.ludete.com" "hello world" 1 1002 1536565622 1 0 21231242131
e7d2c232a91a3c1855cbfed05bf75e31041676898b37fa93420308cb3ff7a666
whc_particrowsale
描述:參與眾籌
調(diào)用:wormholed-cli whc_particrowsale "fromaddress" "toaddress" "amount" ( "redeemaddress" "referenceamount" )
參數(shù)
- fromaddress :參與眾籌的地址
- toaddress : 眾籌發(fā)行者的地址
- amount :參與眾籌的WHC金額
- redeemaddress :贖回多余BCH的地址肚邢;可選,默認(rèn)為參與眾籌的地址
- referenceamount :給眾籌發(fā)行者的BCH的金額拭卿;可選骡湖,默認(rèn)為系統(tǒng)的最小金額
返回值:生成的交易哈希
示例如下
wormholed-cli whc_particrowsale qpalmy832fp9ytdlx444sehajljnm554dulckcvjl5 qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 100
d0a21fd05ed0e2f23f594d77b8ecec96a94ad1dec2785b658e4f705504766cda
whc_sendclosecrowdsale
描述:關(guān)閉眾籌
調(diào)用:wormholed-cli whc_sendclosecrowdsale "fromaddress" propertyid
參數(shù):
- fromaddress :眾籌發(fā)行者的地址
- propertyid :眾籌的tokenID
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendclosecrowdsale qpalmy832fp9ytdlx444sehajljnm554dulckcvjl5 11
967328ba4b60876e0b1039e7e4ac77c2d7678ac98e968599786a68df18f353cf
whc_sendgrant
描述:增發(fā)管理token的數(shù)量
調(diào)用:wormholed-cli whc_sendgrant "fromaddress" "toaddress" propertyid "amount" ( "memo" )
參數(shù):
- fromaddress :token的發(fā)行者地址
- toaddress :向該地址增發(fā)指定數(shù)量的token
- propertyid :可管理tokenID
- amount :增發(fā)的token數(shù)量
- memo :增發(fā)token的自定義信息
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendgrant qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq qpalmy832fp9ytdlx444sehajljnm554dulckcvjl5 115 1242
ed76f90ef3950cac5198045a009483dc90d3ce8a4c8d491d86127b1b3f55a555
whc_sendrevoke
描述:銷毀管理token的數(shù)量
調(diào)用:wormholed-cli whc_sendrevoke "fromaddress" propertyid "amount" ( "memo" )
參數(shù):
- fromaddress :token的發(fā)行者地址
- propertyid :可管理tokenID
- amount :銷毀的token數(shù)量
- memo :銷毀token的自定義信息
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendrevoke qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 115 100
91c56172524fe11fabb7f954cf893a7c42be31e79f549031d11b89a5ea7d4581
whc_send
描述:轉(zhuǎn)賬
調(diào)用:wormholed-cli whc_send "fromaddress" "toaddress" propertyid "amount" ( "redeemaddress" "referenceamount" )
參數(shù):
- fromaddress :token的發(fā)送者地址
- toaddress :token的接收者地址
- propertyid :轉(zhuǎn)賬的tokenID
- amount :轉(zhuǎn)賬的token數(shù)量
- redeemaddress :贖回BCH地址;可選峻厚,默認(rèn)為token發(fā)送者的地址
- referenceamount :token接收者輸出的BCH金額响蕴;可選,默認(rèn)為系統(tǒng)最小金額
返回值:生成的交易哈希
示例如下
wormholed-cli whc_send qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq qpalmy832fp9ytdlx444sehajljnm554dulckcvjl5 115 100
d87ae34ed64e23087228eba458af1ebaf94f0db04912c59f6531f2b8c5c72f91
whc_sendsto
描述:空投
調(diào)用:wormholed-cli whc_sendsto "fromaddress" propertyid "amount" ( "redeemaddress" distributionproperty )
參數(shù):
- fromaddress :空投的發(fā)送者地址
- propertyid :進(jìn)行空投的tokenID
- amount :空投的token數(shù)量
- redeemaddress :贖回BCH地址惠桃;可選浦夷,默認(rèn)為token發(fā)送者的地址
- distributionproperty :接收空投的目標(biāo)tokenID;可選辜王,默認(rèn)為空投token的ID
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendsto qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 115 1000 qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 1
bf3d30fc9c9424bdc6e38fc55320bad6cda9488e74296fc8dfb06cb2d9ee0fd9
whc_sendall
描述:發(fā)送指定地址的所有token至另一個(gè)地址
調(diào)用:wormholed-cli whc_sendall "fromaddress" "toaddress" ecosystem ( "redeemaddress" "referenceamount" )
參數(shù):
- fromaddress :token發(fā)送者地址
- toaddress :token接收者地址
- ecosystem :生態(tài)體系劈狐;當(dāng)前必須為1
- redeemaddress :贖回BCH地址;可選呐馆,默認(rèn)為token發(fā)送者的地址
- referenceamount :token接收者輸出的BCH金額肥缔;可選,默認(rèn)為系統(tǒng)最小金額
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendall qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq qpalmy832fp9ytdlx444sehajljnm554dulckcvjl5 1
cb93fbe852955201b757a790a73bb964728dd4309a449b2e46e67c9f69292909
whc_sendchangeissuer
描述:修改token的發(fā)行者
調(diào)用:wormholed-cli whc_sendchangeissuer "fromaddress" "toaddress" propertyid
參數(shù):
- fromaddress :token的發(fā)行者
- toaddress :修改后的發(fā)行者
- propertyid :tokenID
返回值:生成的交易哈希
示例如下
wormholed-cli whc_sendchangeissuer qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq qpalmy832fp9ytdlx444sehajljnm554dulckcvjl5 115
d1fb2ee670e3489e80f9fbfbd9e001dfb4ed64d5107354e7b74ceb0398625fb1
表三 :創(chuàng)建wormhole協(xié)議的載荷數(shù)據(jù)
RPC | feature |
---|---|
whc_createpayload_burnbch | 燃燒BCH汹来,獲取WHC |
whc_createpayload_issuancefixed | 發(fā)行固定屬性的token |
whc_createpayload_issuancemanaged | 發(fā)行可管理的token |
whc_createpayload_issuancecrowdsale | 發(fā)行可眾籌的token |
whc_createpayload_particrowdsale | 參與眾籌 |
whc_createpayload_closecrowdsale | 關(guān)閉眾籌 |
whc_createpayload_grant | 增發(fā)管理token的數(shù)量 |
whc_createpayload_revoke | 銷毀管理token的數(shù)量 |
whc_createpayload_simplesend | 轉(zhuǎn)賬 |
whc_createpayload_sto | 空投 |
whc_createpayload_sendall | 發(fā)送指定地址的所有token至另一個(gè)地址 |
whc_createpayload_changeissuer | 修改token的發(fā)行者 |
whc_createpayload_burnbch
描述:燃燒BCH续膳,獲取WHC
調(diào)用:wormholed-cli whc_createpayload_burnbch
返回值:生成的wormhole 協(xié)議載荷數(shù)據(jù)
示例如下
wormholed-cli whc_createpayload_burnbch
00000044
whc_createpayload_issuancefixed
描述:發(fā)行固定屬性的token
調(diào)用:wormholed-cli whc_createpayload_issuancefixed ecosystem precision previousid "category" "subcategory" "name" "url" "data" "totalNumber"
參數(shù)
- ecosystem :token的生態(tài)體系;當(dāng)前必須為1
- precision :token的精度
- previousid :附加價(jià)值的tokenID收班;當(dāng)前必須為0
- category :token的類別
- subcategory :token的子類別
- name :token的名稱
- url :token的URL
- data :token的自定義描述數(shù)據(jù)
- totalNumber :發(fā)行token的數(shù)量
返回值:生成的wormhole 協(xié)議載荷數(shù)據(jù)
示例如下
wormholed-cli whc_createpayload_issuancefixed 1 3 0 "company" "compute" "luzhiyao" "www.ludete.com" "hello world" 10082936279.232
0000003201000300000000636f6d70616e7900636f6d70757465006c757a686979616f007777772e6c75646574652e636f6d0068656c6c6f20776f726c64000000092b9dd5d0c0
whc_createpayload_issuancemanaged
描述:發(fā)行可管理的token
調(diào)用:wormholed-cli whc_createpayload_issuancemanaged ecosystem precision previousid "category" "subcategory" "name" "url" "data"
參數(shù)
- ecosystem :token的生態(tài)體系坟岔;當(dāng)前必須為1
- precision :token的精度
- previousid :附加價(jià)值的tokenID;當(dāng)前必須為0
- category :token的類別
- subcategory :token的子類別
- name :token的名稱
- url :token的URL
- data :token的自定義描述數(shù)據(jù)
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_issuancemanaged 1 3 0 "company" "compute" "luzhiyao" "www.ludete.com" "hello world"
0000003601000300000000636f6d70616e7900636f6d70757465006c757a686979616f007777772e6c75646574652e636f6d0068656c6c6f20776f726c6400
whc_createpayload_issuancecrowdsale
描述:發(fā)行可眾籌的token
調(diào)用:wormholed-cli whc_createpayload_issuancecrowdsale ecosystem precision previousid "category" "subcategory" "name" "url" "data" propertyiddesired tokensperunit deadline earlybonus undefine totalNumber
參數(shù)
- ecosystem :token的生態(tài)體系摔桦;當(dāng)前必須為1
- precision :token的精度
- previousid :附加價(jià)值的tokenID社付;當(dāng)前必須為0
- category :token的類別
- subcategory :token的子類別
- name :token的名稱
- url :token的URL
- data :token的自定義描述數(shù)據(jù)
- propertyiddesired :募集的tokenID
- tokensperunit :眾籌token的單價(jià);1WHC等于多少token,單價(jià)的范圍[10-8, 108]
- deadline : 眾籌的截止時(shí)間
- earlybonus :早鳥激勵(lì)
- undefine :未定義字段,必須為0
- totalNumber :發(fā)行眾籌的數(shù)量
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_issuancecrowdsale 1 3 0 "company" "compute" "luzhiyao" "www.ludete.com" "hello world" 1 1002 1536565622 1 0 21231242131
0000003301000300000000636f6d70616e7900636f6d70757465006c757a686979616f007777772e6c75646574652e636f6d0068656c6c6f20776f726c640000000001000000175462aa00000000005b96217601000000134f48a53638
whc_createpayload_particrowdsale
描述:參與眾籌
調(diào)用:wormholed-cli whc_createpayload_particrowdsale "amount"
參數(shù)
- amount :參與眾籌的WHC金額
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_particrowdsale 100
000000010000000100000002540be400
whc_createpayload_closecrowdsale
描述:關(guān)閉眾籌
調(diào)用:wormholed-cli whc_createpayload_closecrowdsale propertyid
參數(shù):
- propertyid :眾籌的tokenID
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_closecrowdsale 11
000000350000000b
whc_createpayload_grant
描述:增發(fā)管理token的數(shù)量
調(diào)用:wormholed-cli whc_createpayload_grant propertyid "amount" ( "memo" )
參數(shù):
- propertyid :可管理tokenID
- amount :增發(fā)的token數(shù)量
- memo :增發(fā)token的自定義信息
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_grant 115 1242
0000003700000073000000000012f39000
whc_createpayload_revoke
描述:銷毀管理token的數(shù)量
調(diào)用:wormholed-cli whc_createpayload_revoke propertyid "amount" ( "memo" )
參數(shù):
- propertyid :可管理tokenID
- amount :銷毀的token數(shù)量
- memo :銷毀token的自定義信息
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_revoke 115 100
000000380000007300000000000186a000
whc_createpayload_simplesend
描述:轉(zhuǎn)賬
調(diào)用:wormholed-cli whc_createpayload_simplesend propertyid "amount"
參數(shù):
- fromaddress :token的發(fā)送者地址
- toaddress :token的接收者地址
- propertyid :轉(zhuǎn)賬的tokenID
- amount :轉(zhuǎn)賬的token數(shù)量
- redeemaddress :贖回BCH地址啊犬;可選可婶,默認(rèn)為token發(fā)送者的地址
- referenceamount :token接收者輸出的BCH金額;可選瘫析,默認(rèn)為系統(tǒng)最小金額
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_simplesend 115 100
000000000000007300000000000186a0
whc_createpayload_sto
描述:空投
調(diào)用:wormholed-cli whc_createpayload_sto propertyid "amount" distributionproperty?
參數(shù):
- fromaddress :空投的發(fā)送者地址
- propertyid :進(jìn)行空投的tokenID
- amount :空投的token數(shù)量
- redeemaddress :贖回BCH地址;可選,默認(rèn)為token發(fā)送者的地址
- distributionproperty :接收空投的目標(biāo)tokenID熙兔;可選悲伶,默認(rèn)為空投token的ID
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_sto 115 1000 1
000000030000007300000000000f424000000001
whc_createpayload_sendall
描述:發(fā)送指定地址的所有token至另一個(gè)地址
調(diào)用:wormholed-cli whc_createpayload_sendall ecosystem
參數(shù):
- ecosystem :生態(tài)體系;當(dāng)前必須為1
- redeemaddress :贖回BCH地址住涉;可選麸锉,默認(rèn)為token發(fā)送者的地址
- referenceamount :token接收者輸出的BCH金額;可選舆声,默認(rèn)為系統(tǒng)最小金額
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_sendall 1
0000000401
whc_createpayload_changeissuer
描述:修改token的發(fā)行者
調(diào)用:wormholed-cli whc_createpayload_changeissuer propertyid
參數(shù):
- fromaddress :token的發(fā)行者
- toaddress :修改后的發(fā)行者
- propertyid :tokenID
返回值:生成的交易哈希
示例如下
wormholed-cli whc_createpayload_changeissuer 115
0000004600000073
表四 :創(chuàng)建交易
RPC | feature |
---|---|
whc_createrawtx_input | 向未簽名的交易追加一個(gè)交易輸入 |
whc_createrawtx_opreturn | 將wormhole協(xié)議的載荷數(shù)據(jù)作為新輸出的腳本追加在未簽名交易中 |
whc_createrawtx_reference | 向未簽名交易追加一個(gè)交易輸出 |
whc_createrawtx_change | 向未簽名交易輸出集合的指定位置追加一個(gè)交易輸出 |
whc_decodetransaction | 解析wormhole的原始交易 |
whc_createrawtx_input
描述:向未簽名的交易追加一個(gè)交易輸入
調(diào)用:wormholed-cli whc_createrawtx_input "rawtx" "txid" c
參數(shù):
- rawtx :未簽名的交易花沉,可以為NULL
- txid :交易ID
- txid :要花費(fèi)該交易(txid)的輸出索引
返回值:添加交易輸入后的交易數(shù)據(jù)
示例如下
wormholed-cli whc_createrawtx_input "" "d1fb2ee670e3489e80f9fbfbd9e001dfb4ed64d5107354e7b74ceb0398625fb1" 2
0200000001b15f629803eb4cb7e7547310d564edb4df01e0d9fbfbf9809e48e370e62efbd10200000000ffffffff0000000000
whc_createrawtx_opreturn
描述:將wormhole協(xié)議的載荷數(shù)據(jù)作為新輸出的腳本追加在未簽名交易中
調(diào)用:wormholed-cli wormhole "rawtx" "payload"
參數(shù):
- rawtx :未簽名的交易,可以為NULL
- payload :wormhole協(xié)議的載荷數(shù)據(jù)
返回值:添加交易輸出后的交易數(shù)據(jù)
示例如下
wormholed-cli whc_createrawtx_opreturn 0200000001b15f629803eb4cb7e7547310d564edb4df01e0d9fbfbf9809e48e370e62efbd10200000000ffffffff0000000000 0000004600000073
0200000001b15f629803eb4cb7e7547310d564edb4df01e0d9fbfbf9809e48e370e62efbd10200000000ffffffff0100000000000000000e6a0c08776863000000460000007300000000
whc_createrawtx_reference
描述:向未簽名交易追加一個(gè)交易輸出
調(diào)用:wormholed-cli whc_createrawtx_reference "rawtx" "destination" ( amount )
參數(shù):
- rawtx :未簽名的交易媳握,可以為NULL
- destination :將要添加輸出的的目的地址
- amount :該輸出的金額碱屁;可選,默認(rèn)為系統(tǒng)的最小金額
返回值:添加交易輸出后的交易數(shù)據(jù)
示例如下
wormholed-cli whc_createrawtx_reference 0200000001b15f629803eb4cb7e7547310d564edb4df01e0d9fbfbf9809e48e370e62efbd10200000000ffffffff0100000000000000000e6a0c08776863000000460000007300000000 qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq 1.24
0200000001b15f629803eb4cb7e7547310d564edb4df01e0d9fbfbf9809e48e370e62efbd10200000000ffffffff0200000000000000000e6a0c08776863000000460000007300176407000000001976a9149e763b620e844d5e926206ba534d2a4b979fb15188ac00000000
whc_createrawtx_change
描述:向未簽名交易輸出集合的指定位置追加一個(gè)交易輸出
調(diào)用:wormholed-cli whc_createrawtx_change "rawtx" "prevtxs" "destination" fee ( position )
參數(shù):
- rawtx :未簽名的交易蛾找,可以為NULL
- prevtxs : 未簽名交易的引用輸入集合
- destination :將要添加輸出的的目的地址
- fee :交易費(fèi)
- position :將這個(gè)交易輸出追加在輸出集合的指定位置娩脾;可選,默認(rèn)追加在索引為0的位置打毛。
返回值:添加交易輸出后的交易數(shù)據(jù)
示例如下
wormholed-cli whc_createrawtx_change "0100000001b15ee60431ef57ec682790dec5a3c0d83a0c360633ea8308fbf6d5fc10a779670400000000ffffffff025c0d00000000000047512102f3e471222bb57a7d416c82bf81c627bfcd2bdc47f36e763ae69935bba4601ece21021580b888ff56feb27f17f08802ebed26258c23697d6a462d43fc13b565fda2dd52aeaa0a0000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac00000000" "[{\"txid\":\"6779a710fcd5f6fb0883ea3306360c3ad8c0a3c5de902768ec57ef3104e65eb1\",\"vout\":4,\"scriptPubKey\":\"76a9147b25205fd98d462880a3e5b0541235831ae959e588ac\",\"value\":0.00068257}]" "qz08vwmzp6zy6h5jvgrt556d9f9e08a32y5eqaqztq" 0.00003500 1
0100000001b15ee60431ef57ec682790dec5a3c0d83a0c360633ea8308fbf6d5fc10a779670400000000ffffffff035c0d00000000000047512102f3e471222bb57a7d416c82bf81c627bfcd2bdc47f36e763ae69935bba4601ece21021580b888ff56feb27f17f08802ebed26258c23697d6a462d43fc13b565fda2dd52aeefe40000000000001976a9149e763b620e844d5e926206ba534d2a4b979fb15188acaa0a0000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac00000000
表三柿赊,表四 RPC組合調(diào)用流程
燃燒BCH,獲取基礎(chǔ)貨幣RPC調(diào)用流程
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 創(chuàng)建輸出幻枉,向指定的燃燒地址打幣:
wormholed-cli whc_createrawtx_reference
- 創(chuàng)建燃燒BCH的wormhole載荷數(shù)據(jù):
wormholed-cli whc_createpayload_burnbch
- 創(chuàng)建輸出碰声,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
(這步可以省略熬甫,多余的金額會(huì)全部作為交易費(fèi)) - 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
示例如下
1. wormholed-cli whc_createrawtx_input "" cda3e90e9ad1cd73ef793263d4b38a2ff6b80c149c04b7faf5540aac35d837d4 2
返回值:0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0000000000
2. wormholed-cli whc_createrawtx_reference "0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0000000000" "bchtest:qqqqqqqqqqqqqqqqqqqqqqqqqqqqqdmwgvnjkt8whc" 2
返回值:0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0100c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000
3. wormholed-cli whc_createpayload_burnbch
返回值:00000044
4. wormholed-cli whc_createrawtx_opreturn "0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0100c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000" "00000044"
返回值:0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0200c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000000000000a6a08087768630000004400000000
5. wormholed-cli whc_createrawtx_reference "0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0200c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000000000000a6a08087768630000004400000000" "qpnprg0h9y8ts3p9257f3sfe7j040yemqql84kh26q" 2.999
返回值:0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0300c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000000000000a6a080877686300000044601ce011000000001976a9146611a1f7290eb84425553c98c139f49f57933b0088ac00000000
6. wormholed-cli signrawtransaction 0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd0200000000ffffffff0300c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000000000000a6a080877686300000044601ce011000000001976a9146611a1f7290eb84425553c98c139f49f57933b0088ac00000000
返回值:
{
"hex": "0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd020000006b483045022100a70f30364283c1382d179f85a1f2b5a0bc26e8d11d6ccbd9dce4bde02bb6fc3e02202d3876e4db506de74bc387e7fa6f57e6d8f84188f0e6e3ffa1ee2656d5213104412102cfdb34fee8eb0f17e5fe731094036327e645803050797620f46fc718dc5479d3ffffffff0300c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000000000000a6a080877686300000044601ce011000000001976a9146611a1f7290eb84425553c98c139f49f57933b0088ac00000000",
"complete": true
}
7. wormholed-cli sendrawtransaction 0200000001d437d835ac0a54f5fab7049c140cb8f62f8ab3d4633279ef73cdd19a0ee9a3cd020000006b483045022100a70f30364283c1382d179f85a1f2b5a0bc26e8d11d6ccbd9dce4bde02bb6fc3e02202d3876e4db506de74bc387e7fa6f57e6d8f84188f0e6e3ffa1ee2656d5213104412102cfdb34fee8eb0f17e5fe731094036327e645803050797620f46fc718dc5479d3ffffffff0300c2eb0b000000001976a9140000000000000000000000000000000000376e4388ac00000000000000000a6a080877686300000044601ce011000000001976a9146611a1f7290eb84425553c98c139f49f57933b0088ac00000000
返回值 :2b932bf1e73a31e87ce30be3a4f86b9d68beb9e61e9badf399474b95c32180eb
轉(zhuǎn)賬
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 創(chuàng)建發(fā)送Token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_simplesend
- 創(chuàng)建交易輸出奥邮,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 創(chuàng)建輸出罗珍,將token轉(zhuǎn)入該地址:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
轉(zhuǎn)移指定賬戶的所有的token
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 創(chuàng)建發(fā)送token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_sendall
- 創(chuàng)建交易輸出洽腺,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
(這步可以省略) - 創(chuàng)建輸出覆旱,將token轉(zhuǎn)入該地址:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
創(chuàng)建固定屬性的token
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成創(chuàng)建固定token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_issuancefixed
- 創(chuàng)建交易輸出蘸朋,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
結(jié)果:此時(shí)創(chuàng)建的新token會(huì)在 第一個(gè)交易輸入的地址上(即:在第一步引入)扣唱。 - 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
創(chuàng)建眾籌token
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成創(chuàng)建眾籌token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_issuancecrowdsale
- 創(chuàng)建交易輸出藕坯,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
結(jié)果:此時(shí)創(chuàng)建的新token會(huì)在 第一個(gè)交易輸入的地址上(即:在第一步引入)噪沙。 - 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
參與眾籌
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成參與眾籌的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_particrowdsale
- 創(chuàng)建交易輸出炼彪,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 創(chuàng)建一個(gè)眾籌的地址輸出:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
關(guān)閉眾籌
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成關(guān)閉眾籌的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_closecrowdsale
- 創(chuàng)建交易輸出正歼,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出辐马,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
創(chuàng)建可管理token
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成創(chuàng)建可管理token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_issuancemanaged
- 創(chuàng)建交易輸出,將生成的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出局义,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
增發(fā)token
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成增發(fā)token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_grant
- 創(chuàng)建交易輸出喜爷,將創(chuàng)建的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出冗疮,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 創(chuàng)建增發(fā)地址的輸出:
wormholed-cli whc_createrawtx_reference
;如果向token的發(fā)行者地址增發(fā)檩帐,這步可以省略 - 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
銷毀token
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
- 生成銷毀token的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_revoke
- 創(chuàng)建交易輸出术幔,將生成的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
進(jìn)行空投
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
(注意:第一個(gè)輸入必須含有足夠的空投token) - 生成空投的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_sto
- 創(chuàng)建交易輸出湃密,將生成的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出诅挑,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
更改token的發(fā)行者
- 添加交易輸入:
wormholed-cli whc_createrawtx_input
(注意:第一個(gè)輸入必須為token的發(fā)行地址) - 生成修改發(fā)行者的載荷數(shù)據(jù):
wormholed-cli whc_createpayload_changeissuer
- 創(chuàng)建交易輸出,將生成的wormhole載荷數(shù)據(jù)添加進(jìn)交易輸出:
wormholed-cli whc_createrawtx_opreturn
- 創(chuàng)建輸出泛源,進(jìn)行找零:
wormholed-cli whc_createrawtx_reference
- 創(chuàng)建token接收者輸出:
wormholed-cli whc_createrawtx_reference
- 對(duì)創(chuàng)建的交易進(jìn)行簽名:
wormholed-cli signrawtransaction
- 發(fā)送交易:
wormholed-cli sendrawtransaction
本文由 Wormhole團(tuán)隊(duì) 姚永芯
寫作拔妥,轉(zhuǎn)載無需授權(quán)。