CircleBridge protocol definition, providing a consistent client interface to the CircleBridge protocol (CCTP).

Find the source contracts here: $https://github.com/circlefin/evm-cctp-contracts

Type Parameters

  • N extends Network = Network

  • C extends Chain = Chain

Hierarchy

  • CircleBridge

Methods

  • Check if a transfer has been completed according to the bridge contract

    Parameters

    • message: {
          destinationCaller: UniversalAddress;
          destinationDomain: number;
          nonce: bigint;
          payload: { readonly burnToken: UniversalAddress; readonly mintRecipient: UniversalAddress; readonly amount: bigint; readonly messageSender: UniversalAddress; };
          recipient: UniversalAddress;
          sender: UniversalAddress;
          sourceDomain: number;
      }

      The message to check

      • destinationCaller: UniversalAddress
      • destinationDomain: number
      • nonce: bigint
      • payload: { readonly burnToken: UniversalAddress; readonly mintRecipient: UniversalAddress; readonly amount: bigint; readonly messageSender: UniversalAddress; }
      • recipient: UniversalAddress
      • sender: UniversalAddress
      • sourceDomain: number

    Returns Promise<boolean>

  • Grabs the logs from the transaction and parse the circle message

    Parameters

    • txid: string

      The transaction hash from which to parse a message

    Returns Promise<CircleTransferMessage>

    The parsed CircleTransferMessage

  • Redeem a circle transfer against the Circle Bridge

    Parameters

    • sender: AccountAddress<C>

      The address of the sender

    • message: {
          destinationCaller: UniversalAddress;
          destinationDomain: number;
          nonce: bigint;
          payload: { readonly burnToken: UniversalAddress; readonly mintRecipient: UniversalAddress; readonly amount: bigint; readonly messageSender: UniversalAddress; };
          recipient: UniversalAddress;
          sender: UniversalAddress;
          sourceDomain: number;
      }

      The Circle message to redeem

      • destinationCaller: UniversalAddress
      • destinationDomain: number
      • nonce: bigint
      • payload: { readonly burnToken: UniversalAddress; readonly mintRecipient: UniversalAddress; readonly amount: bigint; readonly messageSender: UniversalAddress; }
      • recipient: UniversalAddress
      • sender: UniversalAddress
      • sourceDomain: number
    • attestation: string

      The attestation, from the Circle attestation service

    Returns AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

    a stream of unsigned transactions to be signed and submitted on chain

  • Initiate a transfer through the Circle CCTP Bridge

    Parameters

    • sender: AccountAddress<C>

      the sender of the transaction

    • recipient: ChainAddress

      the chain and address of the recipient of the transfer

    • amount: bigint

      how much to send in base units

    Returns AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

Generated using TypeDoc