Kip7ContractApi

Kip7ContractApi

new Kip7ContractApi()

Version:
  • 1.0

Kip7Contract service.

Methods

addPauser(opts, callback)

Add Contract Pauser Grants a specified account the authority to pause the actions of a contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. To remove the authority, use Remove Pauser. > NOTE > > The `pauser` needs to be an account managed by Wallet API in order to use Remove Contract Pauser API. Otherwise, you will have to sign and send the transaction on your own. ##### Sender The account that grants the authority. If you leave it blank, it will automatically be set to the `deployer` address as default . You can find the `deployer` address by KIP7Deployer. You can omit the KRN if the `sender` address is managed by the KIP-7 or Wallet Service `account-pool`.<br/> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~addPauserCallback

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

deployContract(opts, callback)

Deploy Contract Deploys a new KIP-7 contract with the given parameters. You will automatically be assigned a `deployer` address, which cannot be changed. You can find the `deployer` address using KIP7Deployer. The alias must only consist of lowercase letters, numbers and hyphens, and the first letter is restricted to a lowercase letter.<p></p> ##### Options With `options` you can set the transaction fee payment method. You can find more details in Fee Payer Options.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~deployContractCallback

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

getContract(callback)

Get Contract Returns the data for a specified KIP-7 contract. You can use either the contract alias or contract address.<p></p>

Parameters:
Name Type Description
callback Kip7ContractApi~getContractCallback

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

listContractsInDeployerPool(opts, callback)

Get Contract List Returns a list of all KIP-7 contracts deployed by the user in chronological order of contract creation request.<p></p> The `status` field in the request has the following meanings:<p></p> - `init`: The initial state before sending the transaction - `submitted`: After the contract deployment transaction has been sent - `deployed`: The state in which the contract is deployed<p></p>

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~listContractsInDeployerPoolCallback

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

pauseContract(opts, callback)

Pause Contract Pauses all actions of a specified contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. You can resume the contract by using Resume Contract.<p></p> ##### Pauser The account that sends the transaction to pause the contract. If you leave it blank, it will automatically be set to the `deployer` address as default . You can find the `deployer` address by KIP7Deployer. You can omit the KRN if the `pauser` address is managed by the KIP-7 or Wallet Service `account-pool`.<br /> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~pauseContractCallback

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

renouncePauser(callback)

Remove Contract Pauser Removes the authority given to a certain account to pause the actions of specified contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. ##### Pauser The account whose authority to pause the contract will be removed. You can omit the KRN if the `pauser-address` is managed by the KIP-7 or Wallet Service `account-pool`.<br /> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
callback Kip7ContractApi~renouncePauserCallback

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

unpauseContract(opts, callback)

Resume Contract Resumes the actions of the given contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. ##### Pauser The account that sends the transaction to resume the contract. If you leave it blank, it will automatically be set to the `deployer` address as default . You can find the `deployer` address by KIP7Deployer. You can omit the KRN if the `pauser` address is managed by the KIP-7 or Wallet Service `account-pool`.<br/> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~unpauseContractCallback

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

updateContract(opts, callback)

Update Contract Updates the fee payment method for a contract. ##### Options With `options` you can set the transaction fee payment method. You can find more details in Fee Payer Options.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~updateContractCallback

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

Type Definitions

addPauserCallback(error, data, response)

Callback function to receive the result of the addPauser operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

deployContractCallback(error, data, response)

Callback function to receive the result of the deployContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7DeployResponse

The data returned by the service call.

response String

The complete HTTP response.

getContractCallback(error, data, response)

Callback function to receive the result of the getContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7ContractMetadataResponse

The data returned by the service call.

response String

The complete HTTP response.

listContractsInDeployerPoolCallback(error, data, response)

Callback function to receive the result of the listContractsInDeployerPool operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7ContractListResponse

The data returned by the service call.

response String

The complete HTTP response.

pauseContractCallback(error, data, response)

Callback function to receive the result of the pauseContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

renouncePauserCallback(error, data, response)

Callback function to receive the result of the renouncePauser operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

unpauseContractCallback(error, data, response)

Callback function to receive the result of the unpauseContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

updateContractCallback(error, data, response)

Callback function to receive the result of the updateContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7ContractMetadataResponse

The data returned by the service call.

response String

The complete HTTP response.

Kip7ContractApi

new Kip7ContractApi(apiClientopt)

Constructs a new Kip7ContractApi.

Parameters:
Name Type Attributes Description
apiClient ApiClient <optional>

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

Methods

addPauser(opts, callback)

Add Contract Pauser Grants a specified account the authority to pause the actions of a contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. To remove the authority, use Remove Pauser. > NOTE > > The `pauser` needs to be an account managed by Wallet API in order to use Remove Contract Pauser API. Otherwise, you will have to sign and send the transaction on your own. ##### Sender The account that grants the authority. If you leave it blank, it will automatically be set to the `deployer` address as default . You can find the `deployer` address by KIP7Deployer. You can omit the KRN if the `sender` address is managed by the KIP-7 or Wallet Service `account-pool`.<br/> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~addPauserCallback

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

deployContract(opts, callback)

Deploy Contract Deploys a new KIP-7 contract with the given parameters. You will automatically be assigned a `deployer` address, which cannot be changed. You can find the `deployer` address using KIP7Deployer. The alias must only consist of lowercase letters, numbers and hyphens, and the first letter is restricted to a lowercase letter.<p></p> ##### Options With `options` you can set the transaction fee payment method. You can find more details in Fee Payer Options.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~deployContractCallback

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

getContract(callback)

Get Contract Returns the data for a specified KIP-7 contract. You can use either the contract alias or contract address.<p></p>

Parameters:
Name Type Description
callback Kip7ContractApi~getContractCallback

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

listContractsInDeployerPool(opts, callback)

Get Contract List Returns a list of all KIP-7 contracts deployed by the user in chronological order of contract creation request.<p></p> The `status` field in the request has the following meanings:<p></p> - `init`: The initial state before sending the transaction - `submitted`: After the contract deployment transaction has been sent - `deployed`: The state in which the contract is deployed<p></p>

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~listContractsInDeployerPoolCallback

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

pauseContract(opts, callback)

Pause Contract Pauses all actions of a specified contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. You can resume the contract by using Resume Contract.<p></p> ##### Pauser The account that sends the transaction to pause the contract. If you leave it blank, it will automatically be set to the `deployer` address as default . You can find the `deployer` address by KIP7Deployer. You can omit the KRN if the `pauser` address is managed by the KIP-7 or Wallet Service `account-pool`.<br /> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~pauseContractCallback

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

renouncePauser(callback)

Remove Contract Pauser Removes the authority given to a certain account to pause the actions of specified contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. ##### Pauser The account whose authority to pause the contract will be removed. You can omit the KRN if the `pauser-address` is managed by the KIP-7 or Wallet Service `account-pool`.<br /> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
callback Kip7ContractApi~renouncePauserCallback

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

unpauseContract(opts, callback)

Resume Contract Resumes the actions of the given contract. The actions of a contract here refer to sending tokens and sending tokens on the owner's behalf. ##### Pauser The account that sends the transaction to resume the contract. If you leave it blank, it will automatically be set to the `deployer` address as default . You can find the `deployer` address by KIP7Deployer. You can omit the KRN if the `pauser` address is managed by the KIP-7 or Wallet Service `account-pool`.<br/> Otherwise you have to provide the KRN object in the header (`x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}`).

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~unpauseContractCallback

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

updateContract(opts, callback)

Update Contract Updates the fee payment method for a contract. ##### Options With `options` you can set the transaction fee payment method. You can find more details in Fee Payer Options.

Parameters:
Name Type Description
opts Object

Optional parameters

callback Kip7ContractApi~updateContractCallback

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

Type Definitions

addPauserCallback(error, data, response)

Callback function to receive the result of the addPauser operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

deployContractCallback(error, data, response)

Callback function to receive the result of the deployContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7DeployResponse

The data returned by the service call.

response String

The complete HTTP response.

getContractCallback(error, data, response)

Callback function to receive the result of the getContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7ContractMetadataResponse

The data returned by the service call.

response String

The complete HTTP response.

listContractsInDeployerPoolCallback(error, data, response)

Callback function to receive the result of the listContractsInDeployerPool operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7ContractListResponse

The data returned by the service call.

response String

The complete HTTP response.

pauseContractCallback(error, data, response)

Callback function to receive the result of the pauseContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

renouncePauserCallback(error, data, response)

Callback function to receive the result of the renouncePauser operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

unpauseContractCallback(error, data, response)

Callback function to receive the result of the unpauseContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7TransactionStatusResponse

The data returned by the service call.

response String

The complete HTTP response.

updateContractCallback(error, data, response)

Callback function to receive the result of the updateContract operation.

Parameters:
Name Type Description
error String

Error message, if any.

data Kip7ContractMetadataResponse

The data returned by the service call.

response String

The complete HTTP response.