Skip to main content

Create or update an atomic-swap proposal.

POST 

/wallet/atomic-swap/tx-proposal

Create or update an atomic-swap proposal.

Request

Header Parameters

    x-wallet-id stringrequired

    Defines the key of the wallet on which the request will be executed.

Body

required

Data to create the proposal

    partial_tx string

    A proposal to update. If not present a new one will be created.

    receive

    object

    Create outputs receiving the tokens as described in this parameter.

    tokens

    object[]

    required

    Description of tokens to be received.

  • Array [

  • value integerrequired

    The value parameter must be an integer with the value in cents, i.e., 123 means 1.23 HTR.

    token string

    Token id to be received. If not present, it will be interpreted as HTR.

    address string

    Receive tokens in this address, if not present, an address from the wallet will be chosen.

  • ]

  • send

    object

    Create inputs to send tokens from this wallet as described here. May add change outputs if needed.

    tokens

    object[]

    required

    Description of tokens to be sent.

  • Array [

  • value integerrequired

    The value parameter must be an integer with the value in cents, i.e., 123 means 1.23 HTR.

    token string

    Token id to be received. If not present, it will be interpreted as HTR.

  • ]

  • utxos

    object[]

    If present the wallet will try to use only these utxos and will not get more from the wallet history.

  • Array [

  • index integerrequired

    Output index of this utxo.

    txId stringrequired

    Transaction id of this utxo

  • ]

  • lock boolean

    Default value: true

    If the utxos chosen for this proposal should be locked so they are not spent on another call. Use with caution.

    change_address string

    Optional address to send the change amount.

    service

    object

    Property containing references for this proposal on the Atomic Swap Service

    is_new boolean

    Determines if this is a new proposal, so that a new proposalId is added to the response

    proposal_id string

    Determines the identifier of the existing proposal that is being referenced in this request

    password stringrequired

    Mandatory password for interacting with a service-mediated proposal.

    version integer

    Version of the proposal to be updated on the service mediator

Responses

Create a proposal.

Schema

    any

Loading...