Skip to main content
Version: 1.2.0

Protocol Documentation

Table of Contents​

Top

centerchain/tokenfactory/v1/tx.proto​

MsgAddBlacklist​

FieldTypeLabelDescription
senderstring
denomstring
addressstring

MsgAddBlacklistResponse​

MsgAddDelegate​

FieldTypeLabelDescription
senderstring
denomstring
addressstring

MsgAddDelegateResponse​

MsgBurn​

MsgBurn is the sdk.Msg type for allowing an admin account to burn a token. For now, we only support burning from the sender account.

FieldTypeLabelDescription
senderstring
amountcosmos.base.v1beta1.Coin
burnFromAddressstring

MsgBurnResponse​

MsgChangeAdmin​

MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign adminship of a denom to a new account

FieldTypeLabelDescription
senderstring
denomstring
new_adminstring

MsgChangeAdminResponse​

MsgChangeAdminResponse defines the response structure for an executed MsgChangeAdmin message.

MsgClaimMint​

MsgClaimMint mints new supply to mint_to on behalf of the denom owner. The owner is the signing authority: their pubkey must hash to owner and the signature must cover every field except executor and signature. The executor is only the courier that submits the message and pays the tx fee.

FieldTypeLabelDescription
executorstring
ownerstringowner is the denom admin/issuer whose signature authorizes the mint.
denomstring
amountstringamount is the canonical integer string.
mint_tostring
noncebytesnonce is the 128-bit single-use value chosen by the signer.
chain_idstring
expiry_heightuint64expiry_height is the absolute block height after which the permit is void.
pubkeybytespubkey is the signer's secp256k1 compressed public key.
signaturebytessignature is the secp256k1 signature over the claim payload.

MsgClaimMintNFT​

MsgClaimMintNFT mints a certificate into to on behalf of the class issuer. The class issuer is the signing authority: their pubkey must hash to issuer and the signature must cover every field except executor and signature. The executor is only the courier that pays the tx fee.

FieldTypeLabelDescription
executorstring
issuerstringissuer is the class issuer whose signature authorizes the mint.
class_idstring
tostring
uristring
uri_hashstring
noncebytesnonce is the 128-bit single-use value chosen by the signer.
chain_idstring
expiry_heightuint64expiry_height is the absolute block height after which the permit is void.
pubkeybytespubkey is the signer's secp256k1 compressed public key.
signaturebytessignature is the secp256k1 signature over the claim payload.

MsgClaimMintNFTResponse​

FieldTypeLabelDescription
token_idstringtoken_id is the minted certificate id.

MsgClaimMintResponse​

MsgClaimSend​

MsgClaimSend sends tokens from the balance holder from to to on behalf of the holder. The holder is the signing authority: their pubkey must hash to from and the signature must cover every field except executor and signature.

FieldTypeLabelDescription
executorstring
fromstringfrom is the balance holder whose signature authorizes the send.
denomstring
amountstringamount is the canonical integer string.
tostring
noncebytesnonce is the 128-bit single-use value chosen by the signer.
chain_idstring
expiry_heightuint64expiry_height is the absolute block height after which the permit is void.
pubkeybytespubkey is the signer's secp256k1 compressed public key.
signaturebytessignature is the secp256k1 signature over the claim payload.

MsgClaimSendNFT​

MsgClaimSendNFT sends a certificate from the current holder from to to. The holder's own signature is the consent; the executor submits the signed message and pays the tx fee. Lock, blocklist and class policy checks are re-applied by the handler.

FieldTypeLabelDescription
executorstring
fromstringfrom is the certificate holder whose signature authorizes the send.
class_idstring
token_idstring
tostring
noncebytesnonce is the 128-bit single-use value chosen by the signer.
chain_idstring
expiry_heightuint64expiry_height is the absolute block height after which the permit is void.
pubkeybytespubkey is the signer's secp256k1 compressed public key.
signaturebytessignature is the secp256k1 signature over the claim payload.

MsgClaimSendNFTResponse​

MsgClaimSendResponse​

MsgCreateAuthorization​

FieldTypeLabelDescription
holderstring
order_sequint64
chain_idstring
executorstring
from_denomstring
to_denomstring
to_amountstring
max_fromstring
from_nftNFTScope
to_nftNFTScope
kindAuthorizationKind
max_feestring
valid_blocksuint64valid_blocks is the holder-supplied relative lifetime in blocks. Zero resolves to params.default_authorization_blocks at creation time.

MsgCreateDenom​

MsgCreateDenom defines the message structure for the CreateDenom gRPC service method. It allows an account to create a new denom. It requires a sender address and a sub denomination. The (sender_address, sub_denomination) tuple must be unique and cannot be re-used.

The resulting denom created is defined as <factory/{creatorAddress}/{subdenom}>. The resulting denom's admin is originally set to be the creator, but this can be changed later. The token denom does not indicate the current admin.

FieldTypeLabelDescription
senderstring
subdenomstringsubdenom can be up to 44 "alphanumeric" characters long.

MsgCreateDenomResponse​

MsgCreateDenomResponse is the return value of MsgCreateDenom It returns the full string of the newly created denom

FieldTypeLabelDescription
new_token_denomstring

MsgExecuteBurn​

MsgExecuteBurn executes the input leg of a kind=BURN authorization: the fungible amount (or the single locked NFT) is moved into the module account and burned. There is no output leg and no gas field. Only the denom admin (fungible input) or the class issuer (NFT input) may execute it.

FieldTypeLabelDescription
executorstring
holderstring
order_sequint64
chain_idstring
amountstring

MsgExecuteMint​

MsgExecuteMint carries a separate, signer-authorized action permit. The referenced TX1 authorization only pays this transaction's gas and carries no mint terms. holder is the gas payer; executor is the denom admin signing the action and the tx signer.

FieldTypeLabelDescription
executorstring
holderstring
order_sequint64
chain_idstring
denomstring
amountstring
mint_tostring
noncebytes
expiry_heightuint64
pubkeybytes
signaturebytes

MsgExecutePull​

MsgExecutePull executes the input leg only: the amount is escrowed from the holder into the module account (never burned). There is no output leg and no gas field. It consumes a kind=PULL authorization.

FieldTypeLabelDescription
executorstring
holderstring
order_sequint64
chain_idstring
amountstring

MsgExecuteSend​

MsgExecuteSend carries a separate, signer-authorized action permit. The referenced TX1 authorization only pays this transaction's gas and carries no send terms. holder is the gas payer; executor is the balance holder signing the action and the tx signer.

FieldTypeLabelDescription
executorstring
holderstring
order_sequint64
chain_idstring
denomstring
amountstring
tostring
noncebytes
expiry_heightuint64
pubkeybytes
signaturebytes

MsgExecuteSwap​

FieldTypeLabelDescription
executorstring
holderstring
order_sequint64
chain_idstring
used_fromstring
to_amountstring

MsgForceTransfer​

FieldTypeLabelDescription
senderstring
amountcosmos.base.v1beta1.Coin
transferFromAddressstring
transferToAddressstring

MsgForceTransferResponse​

MsgMint​

MsgMint is the sdk.Msg type for allowing an admin account to mint more of a token. For now, we only support minting to the sender account

FieldTypeLabelDescription
senderstring
amountcosmos.base.v1beta1.Coin
mintToAddressstring

MsgMintResponse​

MsgRemoveBlacklist​

FieldTypeLabelDescription
senderstring
denomstring
addressstring

MsgRemoveBlacklistResponse​

MsgRemoveDelegate​

FieldTypeLabelDescription
senderstring
denomstring
addressstring

MsgRemoveDelegateResponse​

MsgRevokeAuthorization​

FieldTypeLabelDescription
holderstring
order_sequint64
chain_idstring

MsgRevokeClaim​

MsgRevokeClaim invalidates a single permit nonce before it is spent. The message is a normal tx signed by signer; there is no permit signature because the tx signature is the authorization.

FieldTypeLabelDescription
signerstring
noncebytesnonce is the 128-bit permit nonce to revoke.

MsgRevokeClaimResponse​

MsgSetDenomMetadata​

MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set the denom's bank metadata

FieldTypeLabelDescription
senderstring
metadatacosmos.bank.v1beta1.Metadata

MsgSetDenomMetadataResponse​

MsgSetDenomMetadataResponse defines the response structure for an executed MsgSetDenomMetadata message.

MsgSetDenomRestriction​

FieldTypeLabelDescription
senderstring
denomstringsubdenom can be up to 44 "alphanumeric" characters long.
isRestrictedbool

MsgSetDenomRestrictionResponse​

MsgSetPoolDenylist​

FieldTypeLabelDescription
authoritystringauthority is the configured tokenfactory governance authority.
denomstring
denylistedbool

MsgSetPoolDenylistResponse​

MsgSetPoolable​

FieldTypeLabelDescription
senderstring
denomstring
poolablebool

MsgSetPoolableResponse​

MsgSetSwapConfig​

FieldTypeLabelDescription
authoritystring
configSwapConfig

MsgUpdateParams​

MsgUpdateParams is the Msg/UpdateParams request type.

Since: cosmos-sdk 0.47

FieldTypeLabelDescription
authoritystringauthority is the address of the governance account.
paramsParamsparams defines the x/mint parameters to update.

NOTE: All parameters must be supplied. |

MsgUpdateParamsResponse​

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

Since: cosmos-sdk 0.47

NFTScope​

FieldTypeLabelDescription
class_idstring
token_idstring

SwapConfig​

SwapResponse​

AuthorizationKind​

AuthorizationKind binds a two-phase authorization to exactly one consuming message. MINT and SEND kinds authorize TX2 gas only; their action permits are signed and verified separately.

NameNumberDescription
AUTHORIZATION_KIND_UNSPECIFIED0
AUTHORIZATION_KIND_SWAP1
AUTHORIZATION_KIND_PULL2
AUTHORIZATION_KIND_BURN3
AUTHORIZATION_KIND_MINT4
AUTHORIZATION_KIND_SEND5

Msg​

Msg defines the tokefactory module's gRPC message service.

Method NameRequest TypeResponse TypeDescription
CreateDenomMsgCreateDenomMsgCreateDenomResponse
MintMsgMintMsgMintResponse
BurnMsgBurnMsgBurnResponse
ChangeAdminMsgChangeAdminMsgChangeAdminResponse
SetDenomMetadataMsgSetDenomMetadataMsgSetDenomMetadataResponse
ForceTransferMsgForceTransferMsgForceTransferResponse
AddDelegateMsgAddDelegateMsgAddDelegateResponse
RemoveDelegateMsgRemoveDelegateMsgRemoveDelegateResponse
AddBlacklistMsgAddBlacklistMsgAddBlacklistResponse
RemoveBlacklistMsgRemoveBlacklistMsgRemoveBlacklistResponse
SetDenomRestrictionMsgSetDenomRestrictionMsgSetDenomRestrictionResponse
SetPoolableMsgSetPoolableMsgSetPoolableResponse
SetPoolDenylistMsgSetPoolDenylistMsgSetPoolDenylistResponse
CreateAuthorizationMsgCreateAuthorizationSwapResponseTwo-phase authorization execution.
ExecuteSwapMsgExecuteSwapSwapResponse
ExecutePullMsgExecutePullSwapResponse
ExecuteBurnMsgExecuteBurnSwapResponse
ExecuteMintMsgExecuteMintSwapResponse
ExecuteSendMsgExecuteSendSwapResponse
RevokeAuthorizationMsgRevokeAuthorizationSwapResponse
SetSwapConfigMsgSetSwapConfigSwapResponse
ClaimMintMsgClaimMintMsgClaimMintResponseSingle-transaction permit messages.
ClaimSendMsgClaimSendMsgClaimSendResponse
ClaimMintNFTMsgClaimMintNFTMsgClaimMintNFTResponse
ClaimSendNFTMsgClaimSendNFTMsgClaimSendNFTResponse
RevokeClaimMsgRevokeClaimMsgRevokeClaimResponse
UpdateParamsMsgUpdateParamsMsgUpdateParamsResponseUpdateParams defines a governance operation for updating the x/mint module parameters. The authority is hard-coded to the x/gov module account.

Since: cosmos-sdk 0.47 |

Scalar Value Types​

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)