A representation of a Transfer, which moves an Amount of an Asset from a user-controlled Wallet to another Address. The fee is assumed to be paid in the native Asset of the Network.

Properties

model: Transfer

Methods

  • Returns the Destination Address ID of the Transfer.

    Returns string

    The Destination Address ID.

  • Returns the From Address ID of the Transfer.

    Returns string

    The From Address ID.

  • Returns the Transaction of the Transfer.

    Returns undefined | Transaction

    The ethers.js Transaction object.

    Throws

    (InvalidUnsignedPayload) If the Unsigned Payload is invalid.

  • Returns the Transaction Hash of the Transfer.

    Returns undefined | string

    The Transaction Hash as a Hex string, or undefined if not yet available.

  • Returns the link to the Transaction on the blockchain explorer.

    Returns undefined | string

    The link to the Transaction on the blockchain explorer.

  • Reloads the Transfer model with the latest data from the server.

    Returns Promise<void>

    Throws

    if the API request to get a Transfer fails.

  • Signs the Transfer with the provided key and returns the hex signature required for broadcasting the Transfer.

    Parameters

    • key: Wallet

      The key to sign the Transfer with

    Returns Promise<string>

    The hex-encoded signed payload

  • Returns a string representation of the Transfer.

    Returns string

    The string representation of the Transfer.

  • Waits for the Transfer to be confirmed on the Network or fail on chain. Waits until the Transfer is completed or failed on-chain by polling at the given interval. Raises an error if the Trade takes longer than the given timeout.

    Parameters

    • options: {
          intervalSeconds: undefined | number;
          timeoutSeconds: undefined | number;
      } = {}

      The options to configure the wait function.

      • intervalSeconds: undefined | number

        The interval to check the status of the Transfer.

      • timeoutSeconds: undefined | number

        The maximum time to wait for the Transfer to be confirmed.

    Returns Promise<Transfer>

    The Transfer object in a terminal state.

    Throws

    if the Transfer times out.