Creates the payload to burn bch to get whc.
string
:the hex-encoded payload
rpc.NewRPCInstance().WhcCreatePayloadBurnBCH()
// result:
00000044
Creats the payload to change the issuer on record of the given tokens.
- propertyid
int64
:the identifier of the tokens
string
:the hex-encoded payload
client.WhcCreatePayloadChangeIssuer(34)
// result:
0000004600000022
Creates the payload for a new tokens issuance with crowdsale.
- eco
int64
:the ecosystem to create the tokens in, must be 1 - precision
int64
: the precision of the tokens to create:[0, 8] - preId
int64
: an identifier of a predecessor token (0 for new crowdsales) - desiredID
int64
:the identifier of a token eligible to participate in the crowdsale - deadline
int64
:the deadline of the crowdsale as Unix timestamp - earlyBonus
int64
:an early bird bonus for participants in percent per week - issuerPercentage
int64
:(number, required) the value must be 0 - category
string
: a category for the new tokens (can be "") - subcategory
string
:a subcategory for the new tokens (can be "") - name
string
the name of the new tokens to create - url
string
: an URL for further information about the new tokens (can be "") - data
string
: a description for the new tokens (can be "") - tokensPerunit
string
:the amount of tokens granted per unit invested in the crowdsale - totalNumber
string
: (string, required) the number of tokens to create
string
:the hex-encoded payload
client.WhcCreatePayloadIssuanceCrowdSale(1, 8, 0, 1, 1540470809, 23, 0, "womhole expamle", "awesome", "crowdSaleToken", "https://wormhole.cash", "welcome to wormhole ecosystem", "12.34", "12734782")
// result:
0000003301000800000000776f6d686f6c6520657870616d6c6500617765736f6d650063726f776453616c65546f6b656e0068747470733a2f2f776f726d686f6c652e636173680077656c636f6d6520746f20776f726d686f6c652065636f73797374656d000000000100000000498d5880000000005bd1b819170000048638bfbd7e00
Create the payload for a participate crowsale transaction.
- amount
string
:the amount of WHC to particrowsale
string
:the hex-encoded payload
client.WhcCreatePayloadPartiCrowdSale("90.23")
// result:
00000001000000010000000219d00dc0
Creates the payload to manually close a crowdsale.
- propertyid
int64
:the identifier of the crowdsale to close
string
:the hex-encoded payload
client.WhcCreatePayloadCloseCrowdSale(46)
// result:
000000350000002e
Creates the payload for a new tokens issuance with fixed supply.
- eco
int64
:the ecosystem to create the tokens in, must be 1 - precision
int64
: the precision of the tokens to create:[0, 8] - preId
int64
: an identifier of a predecessor token (0 for new crowdsales) - category
string
: a category for the new tokens (can be "") - subcategory
string
:a subcategory for the new tokens (can be "") - name
string
the name of the new tokens to create - url
string
: an URL for further information about the new tokens (can be "") - data
string
: a description for the new tokens (can be "") - amount
string
: (string, required) the number of tokens to create
string
:the hex-encoded payload
client.WhcCreatePayloadIssuanceFixed(1, 8, 0, "womhole expamle", "awesome", "crowdSaleToken", "https://wormhole.cash", "welcome to wormhole ecosystem", "12734782")
// result:
0000003201000800000000776f6d686f6c6520657870616d6c6500617765736f6d650063726f776453616c65546f6b656e0068747470733a2f2f776f726d686f6c652e636173680077656c636f6d6520746f20776f726d686f6c652065636f73797374656d0000048638bfbd7e00
Creates the payload for a new tokens issuance with manageable supply.
- eco
int64
:the ecosystem to create the tokens in, must be 1 - precision
int64
: the precision of the tokens to create:[0, 8] - preId
int64
: an identifier of a predecessor token (0 for new crowdsales) - category
string
: a category for the new tokens (can be "") - subcategory
string
:a subcategory for the new tokens (can be "") - name
string
the name of the new tokens to create - url
string
: an URL for further information about the new tokens (can be "") - data
string
: a description for the new tokens (can be "")
string
:the hex-encoded payload
client.WhcCreatePayloadIssuanceManaged(1, 8, 0, "womhole expamle", "awesome", "crowdSaleToken", "https://wormhole.cash", "welcome to wormhole ecosystem")
// result:
0000003201000800000000776f6d686f6c6520657870616d6c6500617765736f6d650063726f776453616c65546f6b656e0068747470733a2f2f776f726d686f6c652e636173680077656c636f6d6520746f20776f726d686f6c652065636f73797374656d0000048638bfbd7e00
Creates the payload to issue or grant new units of managed tokens.
- id
int64
:the identifier of the tokens to revoke - amount
string
:the amount of tokens to revok - note
*string
optional:a text note attached to this transaction (none by default)
string
:the hex-encoded payload
client.WhcCreatePayloadGrant(4, "90.23", nil)
// result:
000000370000000400000000000008fc00
Creates the payload to revoke units of managed tokens.
- id
int64
:the identifier of the tokens to revoke - amount
string
:the amount of tokens to revok - note
*string
optional:a text note attached to this transaction (none by default)
string
:the hex-encoded payload
client.WhcCreatePayloadRevoke(4, "90.23", nil)
// result:
0000003800000004000000000000233f00
Create the payload for a send all transaction.
- eco
int64
: the ecosystem to create the tokens in, must be 1
string
:the hex-encoded payload
client.WhcCreatePayloadSendAll(1)
// result:
0000000401
Create the payload for a simple send transaction.
- id
int64
:the identifier of the tokens to send - amount
string
:the amount to send
string
:the hex-encoded payload
client.WhcCreatePayloadSimpleSend(35, "23")
// result:
000000000000002300000000000000e6
Creates the payload for a send-to-owners transaction.
- fromId
int64
:the identifier of the tokens to distribute - amount
string
:the amount to distribute - toID
*int64
optional:the identifier of the property holders to distribute to
string
:the hex-encoded payload
client.WhcCreatePayloadSto(35, "23", nil)
// result:
000000000000002300000000000000e6
Creates the payload to freeze an address for a centrally managed token.
- toaddress
string
: the address to freeze tokens for - propertyid
int64
: the property to freeze tokens for (must be managed type and have freezing option enabled) - amount
string
: the amount of tokens to freeze (note: this is unused - once frozen an address cannot send any transactions)
string
:the hex-encoded payload
client. WhcCreatePayloadFreeze("bchreg:qzrck6dmz5lgs7v87dr5lp4g56aldg9knucnuqyl2g", 5, "1")
// result:
0000004600000022
Creates the payload to unfreeze an address for a centrally managed token.
- toaddress
string
: the address to freeze tokens for - propertyid
int64
: the property to freeze tokens for (must be managed type and have freezing option enabled) - amount
string
: the amount of tokens to freeze (note: this is unused - once frozen an address cannot send any transactions)
string
:the hex-encoded payload
client. WhcCreatePayloadUnFreeze("bchreg:qzrck6dmz5lgs7v87dr5lp4g56aldg9knucnuqyl2g", 5, "1")
// result:
0000004600000022