Kip37TokenApi

Kip37TokenApi

new Kip37TokenApi()

Version:
  • 1.0

Kip37Token service.

Methods

burnToken(opts, callback)

Burn KIP-37 Token Burns KIP-37 tokens. ##### From The account that sends the transaction. If the `from` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header. ##### Batch Items Call the contract function according to the Batch Items (`ids`, `amounts`) included in the request. - If there is one element, call the `burn` function. - If there are multiple elements, call the `burnBatch` function.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~burnTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

createToken(opts, callback)

Mint a KIP-37 Token Creates a new token from a specified KIP-37 contract. ##### Sender The account for sending the transaction. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~createTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

getTokens(opts, callback)

Get KIP-37 Token List Returns a list of KIP-37 tokens. ##### Sort Order - The response items are listed in lexicographical order of the token ID.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~getTokensCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TokenInfoListResponse

mintToken(opts, callback)

Mint Additional KIP-37 Tokens Mints multiple tokens for a given KIP-37 contract. Minting is possible after having created a token with Create KIP-37 Token. ##### Sender The account for sending the transaction. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header. ##### Batch Items Call the contract function according to the Batch Items (`ids`, `amounts`) included in the request. - If there is one element, call the `mint` function. - If there are multiple elements, call the `mintBatch` function.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~mintTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

pauseToken(opts, callback)

Pause KIP-37 Token Operations Pauses the operations of a specified token, such as minting and creating tokens. You can resume the opertations by using /v1/{contract-address-or-alias/token/unpause/{token-id}. ##### Sender The account for sending the transaction. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~pauseTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

transferToken(opts, callback)

Send KIP-37 Token Sends multiple tokens for a given KIP-37 contract. ##### Sender The account for sending the transaction. If the `sender` and`owner` are different,`sender` must be authorized to send the token. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header. ##### Batch Items Call the contract function according to the Batch Items (`ids`, `amounts`) included in the request. - If there is one element, call the `safeTransferFrom` function. - If there are multiple elements, call the `safeBatchTransferFrom` function.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~transferTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

unpauseToken(opts, callback)

Resume KIP-37 Token Operations Resumes paused token operations for a given contract. ##### Sender The account for sending the transaction. If the `sender` and `owner` are different, `sender` must be authorized to transfer the token. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~unpauseTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

Type Definitions

burnTokenCallback(error, data, response)

Callback function to receive the result of the burnToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

createTokenCallback(error, data, response)

Callback function to receive the result of the createToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

getTokensCallback(error, data, response)

Callback function to receive the result of the getTokens operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TokenInfoListResponse

The data returned by the service call.

response String

The complete HTTP response.

mintTokenCallback(error, data, response)

Callback function to receive the result of the mintToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

pauseTokenCallback(error, data, response)

Callback function to receive the result of the pauseToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

transferTokenCallback(error, data, response)

Callback function to receive the result of the transferToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

unpauseTokenCallback(error, data, response)

Callback function to receive the result of the unpauseToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

Kip37TokenApi

new Kip37TokenApi(apiClientopt)

Constructs a new Kip37TokenApi.

Parameters:
Name Type Attributes Description
apiClient ApiClient <optional>

Optional API client implementation to use, default to ApiClient#instance if unspecified.

Methods

burnToken(opts, callback)

Burn KIP-37 Token Burns KIP-37 tokens. ##### From The account that sends the transaction. If the `from` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header. ##### Batch Items Call the contract function according to the Batch Items (`ids`, `amounts`) included in the request. - If there is one element, call the `burn` function. - If there are multiple elements, call the `burnBatch` function.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~burnTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

createToken(opts, callback)

Mint a KIP-37 Token Creates a new token from a specified KIP-37 contract. ##### Sender The account for sending the transaction. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~createTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

getTokens(opts, callback)

Get KIP-37 Token List Returns a list of KIP-37 tokens. ##### Sort Order - The response items are listed in lexicographical order of the token ID.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~getTokensCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TokenInfoListResponse

mintToken(opts, callback)

Mint Additional KIP-37 Tokens Mints multiple tokens for a given KIP-37 contract. Minting is possible after having created a token with Create KIP-37 Token. ##### Sender The account for sending the transaction. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header. ##### Batch Items Call the contract function according to the Batch Items (`ids`, `amounts`) included in the request. - If there is one element, call the `mint` function. - If there are multiple elements, call the `mintBatch` function.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~mintTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

pauseToken(opts, callback)

Pause KIP-37 Token Operations Pauses the operations of a specified token, such as minting and creating tokens. You can resume the opertations by using /v1/{contract-address-or-alias/token/unpause/{token-id}. ##### Sender The account for sending the transaction. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~pauseTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

transferToken(opts, callback)

Send KIP-37 Token Sends multiple tokens for a given KIP-37 contract. ##### Sender The account for sending the transaction. If the `sender` and`owner` are different,`sender` must be authorized to send the token. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header. ##### Batch Items Call the contract function according to the Batch Items (`ids`, `amounts`) included in the request. - If there is one element, call the `safeTransferFrom` function. - If there are multiple elements, call the `safeBatchTransferFrom` function.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~transferTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

unpauseToken(opts, callback)

Resume KIP-37 Token Operations Resumes paused token operations for a given contract. ##### Sender The account for sending the transaction. If the `sender` and `owner` are different, `sender` must be authorized to transfer the token. If the `sender` account belongs to a default `account-pool` for either KIP-37 or Wallet, you can omit the KRN.<br /> Otherwise you have to provide the KRN data (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`) in the header.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip37TokenApi~unpauseTokenCallback

The callback function, accepting three arguments: error, data, response data is of type: Kip37TransactionStatusResponse

Type Definitions

burnTokenCallback(error, data, response)

Callback function to receive the result of the burnToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

createTokenCallback(error, data, response)

Callback function to receive the result of the createToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

getTokensCallback(error, data, response)

Callback function to receive the result of the getTokens operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TokenInfoListResponse

The data returned by the service call.

response String

The complete HTTP response.

mintTokenCallback(error, data, response)

Callback function to receive the result of the mintToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

pauseTokenCallback(error, data, response)

Callback function to receive the result of the pauseToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

transferTokenCallback(error, data, response)

Callback function to receive the result of the transferToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

unpauseTokenCallback(error, data, response)

Callback function to receive the result of the unpauseToken operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip37TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.