@cfxlabsinc/b2b-services
    Preparing search index...

    Interact with Solana Mintfx program and related components

    This service is aware token mints and configuration

    Index
    instance: (...args: []) => SolanaMintfxRedeemService = ...

    The process default: MINTFX_ENV and SOLANA_RPC_ENDPOINT read at each call.

    • Burn the escrowed redemption, first paying each fee ledger account its share. The fee accounts are the instruction's remaining accounts, in order.

      Parameters

      • __namedParameters: {
            fees?: { amount: BigNumber; ledgerAccountId: string }[];
            idempotencyKey: string;
            token: Token;
        }

      Returns Promise<
          Instruction<
              string,
              readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[],
          >[],
      >

    • Fund a redemption from a wallet CFX does not control. sourceAuthority signs, so the transaction is built unsigned and returned to that wallet.

      Parameters

      • __namedParameters: {
            amount: number;
            idempotencyKey: string;
            sourceAuthority: Address;
            token: Token;
        }

      Returns Promise<
          Instruction<
              string,
              readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[],
          >[],
      >

    • Token transfer instruction and create ATA instructions (if required)

      Parameters

      • __namedParameters: {
            amount: number;
            idempotencyKey: string;
            ledgerAccountId: string;
            token: Token;
        }

      Returns Promise<
          Instruction<
              string,
              readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[],
          >[],
      >

    • Fetch every idempotent redemption PDA owned by the mintfx program.

      Returns Promise<
          {
              address: string;
              amount: string;
              redeemer: string;
              stage: "submitted"
              | "committed"
              | "voided";
              tokenId: string;
              type: "Redemption";
          }[],
      >

    • Refund a redemption, to a ledger account or to a wallet CFX does not control.

      Parameters

      • __namedParameters: {
            idempotencyKey: string;
            refund: { ledgerAccountId: string } | { owner: Address };
            token: Token;
        }

      Returns Promise<
          Instruction<
              string,
              readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[],
          >[],
      >