[关闭]
@Fangzheng1992 2018-10-12T08:57:14.000000Z 字数 5669 阅读 547

Wormhole will cover following features in Version 0.1.1 to support the issuance of stable coins

Freeze and unfreeze the manageable property.

Specifically, users can issue managed tokens carring the freeze function, that is to say, the issuer can decide to freeze or unfreeze tokens of designated user address. The frozen address will be forbidden to transfer its assets until they are thawed by the issuer. Note that only the managed property issuer has permissions to freeze or thaw transaction, simultaneously, issuer cannot freeze himself.

The process of stable currency business shown as follows:

2.png-155.3kB

The process corresponding to the RPC interface as follows:

1.Create managed properties that enable freeze:whc_sendissuancemanaged
2.Additional properties: whc_sendgrant
3.Transfer: whc_send
4.Freeze property: whc_sendfreeze
5.Unfreeze property: whc_sendunfreeze

The release will provide following RPC interfaces:

RPC feature
whc_createpayload_freeze Creat a frozen transaction OP_RETURN payload
whc_createpayload_unfreeze Creat a unfrozen transaction OP_RETURN payload
whc_sendfreeze Creat and send a frozen transaction
whc_sendunfreeze Creat and send a unfrozen transaction
whc_getfrozenbalance Query the property freezen of specified address and token ID
whc_getfrozenbalanceforid Query the unfrozen address and property balance under the specified token ID
whc_getfrozenbalanceforaddress Query all unfrozen properties and balances of the specified address

whc_createpayload_freeze

Description: Create transaction payload of wormhole frozen property
Call: wormholed-cli whc_createpayload_freeze "toaddress" propertyid "amount"

Parameter:
Example shown as follows:
  1. wormholed-cli whc_createpayload_freeze qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu 320 "100"
  2. 000000b90000014000000002540be400626368746573743a7171706a307975387739756b6737783468383378783761346e6a3866376d7373683564676e36666c667500

whc_createpayload_unfreeze

Description:Create transaction payload of wormhole unfrozing property
Call: wormholed-cli whc_createpayload_unfreeze "toaddress" propertyid "amount"

Parameter:
Example shown as follows:
  1. wormholed-cli whc_createpayload_unfreeze qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu 320 "100"
  2. 000000ba0000014000000002540be400626368746573743a7171706a307975387739756b6737783468383378783761346e6a3866376d7373683564676e36666c667500

whc_sendfreeze

Description:Create and send wormhole frozen property transaction
Call: wormholed-cli whc_sendfreeze "fromaddress" propertyid "amount"
"frozenaddress"
Caller: The property issuer

Parameter:
Examples shown as follows:
  1. wormholed-cli whc_sendfreeze qpjua0mvqpnyxddavqys2j3d8wuewarmnvx3kqha2q 320 "100.0" qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu
  2. 45a9e5702c7d5c9836d77a5f571059a2b50fe32e39bf7bf0c0d7951392cb4e0b

whc_sendunfreeze

Description:Create and send wormhole unfreeze property transaction
Call: wormholed-cli whc_sendunfreeze "fromaddress" propertyid "amount"
"frozenaddress"
Caller: The Property issuer

Parameter:
Examples shown as follows:
  1. wormholed-cli whc_sendunfreeze qpjua0mvqpnyxddavqys2j3d8wuewarmnvx3kqha2q
  2. 320 "100.0" qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu
  3. 4d7e239fbc1a71ce7b27ae7b6bc4c557131973505f0d1701377d0302177390f9

whc_getfrozenbalance

Description:Query wormhole frozen property balance according address and property ID
Call: wormholed-cli whc_getfrozenbalance "frozenaddress" propertyid

Parameter:
Examples shown as follows:
  1. wormholed-cli whc_getfrozenbalance qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu 320
  2. {
  3. "frozen": true,
  4. "balance": "1900.00000000"
  5. }
Return value field description:

whc_getfrozenbalanceforid

Description:Query wormhole frozen property balance according property ID
Call: wormholed-cli whc_getfrozenbalanceforid propertyid

Parameter:
Examples shown as follows:
  1. wormholed-cli whc_getfrozenbalanceforid 320
  2. [
  3. {
  4. "address": "bchtest:qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu",
  5. "balance": "1900.00000000"
  6. }
  7. ]
Return value field description:

whc_getfrozenbalanceforaddress

Description:Query wormhole frozen property balance according to property address
Call: wormholed-cli whc_getfrozenbalanceforaddress "address"

Parameter:
Examples shown as follows:
  1. wormholed-cli whc_getfrozenbalanceforaddress qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu
  2. [
  3. {
  4. "propertyid": 320,
  5. "balance": "1900.00000000"
  6. }
  7. ]
Return value field description:

Version changes RPC interface:

whc_sendissuancemanaged

Description:Issue managed tokens
Call:wormholed-cli whc_sendissuancemanaged "fromaddress" ecosystem precision previousid "category" "subcategory" "name" "url" "data"

Parameter:
Examples shown as follows:
  1. wormholed-cli whc_sendissuancemanaged qpjua0mvqpnyxddavqys2j3d8wuewarmnvx3kqha2q 1 8 1
  2. "test freeze" "frozentoken" "www" "hello" ""
  3. e32bff59d6088f2d6088ae90b31807cf4e50fde2f20bcdd3f1ca7b904b0fe2b6
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注