@cfxlabsinc/b2b-services
    Preparing search index...
    Index
    • Build instructions to create a new authority for a token

      Parameters

      • args: {
            adminAuthority: Address;
            authority: Address;
            decimals: number;
            mintLimits: LimitArgs;
            payer: Address;
            permissions: UserPermissions;
            redeemLimits: LimitArgs;
            tokenId: string;
            withdrawLimits: LimitArgs;
        }

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

    • Build instructions to destroy an authority

      Parameters

      • args: { adminAuthority: Address; authority: Address; payer: Address; tokenId: string }

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

    • Get a parsed authority by its on-chain state address. The returned decimals are the precision the authority's limits were scaled with — callers must format and rebuild instructions with this value, never a separately-resolved token's.

      Parameters

      • __namedParameters: { authorityStateAddress: Address }

      Returns Promise<
          {
              address: string;
              authority: string;
              decimals: number;
              mintLimits: Limits;
              permissions: UserPermissions;
              redeemLimits: Limits;
              tokenId: string;
              withdrawLimits: Limits;
          },
      >

    • Get all authorities for the mintfx program, each carrying the decimals its limit values were scaled with.

      Returns Promise<
          {
              address: string;
              authority: string;
              decimals: number;
              mintLimits: Limits;
              permissions: UserPermissions;
              redeemLimits: Limits;
              tokenId: string;
              withdrawLimits: Limits;
          }[],
      >

    • Build instructions to update an existing authority

      Parameters

      • args: {
            adminAuthority: Address;
            authority: Address;
            decimals: number;
            mintLimits: LimitArgs;
            permissions: Partial<UserPermissions>;
            redeemLimits: LimitArgs;
            tokenId: string;
            withdrawLimits: LimitArgs;
        }

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