Skip to main content

Create a nano contract of a blueprint.

POST 

/wallet/nano-contracts/create

Create a nano contract of a blueprint.

Request

Header Parameters

    x-wallet-id stringrequired

    Define the key of the corresponding wallet it will be executed the request.

Body

required

Data to create the nano contract.

    blueprint_id stringrequired

    Blueprint ID of the new nano contract.

    address stringrequired

    Address caller that will sign the nano contract creation transaction.

    data

    object

    required

    Data of the method for the nano contract.

    actions

    object[]

    List of actions for the initialize method.

  • Array [

  • type stringrequired

    Type of action: 'deposit' or 'withdrawal'.

    token stringrequired

    Token of the action.

    amount integerrequired

    Amount to deposit or withdrawal.

    address string

    Required for withdrawal, and it's the address to send the token to. For deposit is optional and it's the address to get the utxo from.

    changeAddress string

    Address to send the change amount. Only used for deposit and it's optional.

  • ]

  • args

    object[]

    List of arguments for the method.

  • Array [

  • oneOf

    string

  • ]

Responses

Create the nano contract

Schema

    any

Loading...