@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: []) => SolanaMintfxWithdrawService = ...

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

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

      Parameters

      • __namedParameters: {
            idempotencyKey: string;
            skipTargetAtaCreate?: boolean;
            targets: { address?: Address; amount: BigNumber; owner?: Address }[];
            token: Token;
        }

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

    • Refund a hold, 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>)[],
          >[],
      >

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

      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>)[],
          >[],
      >

    • Move amount from a ledger account's PDA to owner's token account in one transaction: a withdrawal hold committed whole to that one target. Built without reading the chain, so it can precede the hold's existence. Build the transaction with cuLimit: WITHDRAW_TO_OWNER_CU_LIMIT.

      Parameters

      • __namedParameters: {
            amount: BigNumber;
            idempotencyKey: string;
            ledgerAccountId: string;
            owner: Address;
            token: Token;
        }

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