Swig TS — API References
    Preparing search index...

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    data: Uint8Array
    roleId: null | number
    session: boolean = false

    Indicates if Authority is Session-based or not. true if Authority is Session-based

    type: AuthorityType = AuthorityType.Secp256k1

    Accessors

    Methods

    • Creates a Swig instruction for initializing a new entity on-chain.

      Parameters

      • args: { actions: Actions; id: Uint8Array; payer: PublicKey }

        The parameters required to create the Swig instruction.

        • actions: Actions

          A container holding the set of actions to include. *

        • id: Uint8Array

          32-bytes Uint8Array.

        • payer: PublicKey

          The public key of the account paying for the transaction.

      Returns TransactionInstruction

      The serialized instruction for creating the Swig.

    • Creates an RemoveAuthority Instructon

      Parameters

      • args: {
            options: InstructionDataOptions;
            payer: PublicKey;
            roleId: number;
            roleIdToRemove: number;
            swigAddress: PublicKey;
        }

        The parameters required for RemoveAuthority instruction.

        • options: InstructionDataOptions
        • payer: PublicKey

          The public key of the swig payer.

        • roleId: number

          The ID of the role signing the instruction.

        • roleIdToRemove: number

          ID of the role to remove

        • swigAddress: PublicKey

          The public key of the swig

      Returns Promise<TransactionInstruction>

      RemoveAuthority Instruction.

    • Creates a Sign instruction for signing provided instructions with the Swig

      Parameters

      • args: {
            innerInstructions: TransactionInstruction[];
            options: InstructionDataOptions;
            payer: PublicKey;
            roleId: number;
            swigAddress: PublicKey;
        }

        The parameters required to create the Swig instruction.

        • innerInstructions: TransactionInstruction[]

          The instructions the Swig is to sign.

        • options: InstructionDataOptions
        • payer: PublicKey

          The public key of the swig payer.

        • roleId: number

          The ID of the role signing the instruction.

        • swigAddress: PublicKey

          The public key of the swig

      Returns Promise<TransactionInstruction>

      Sign Instruction.

    • Parameters

      • args: {
            innerInstructions: TransactionInstruction[];
            options: InstructionDataOptions;
            payer: PublicKey;
            roleId: number;
            subAccount: PublicKey;
            swigAddress: PublicKey;
        }

      Returns Promise<TransactionInstruction>

    • Parameters

      • args: {
            enabled: boolean;
            options: InstructionDataOptions;
            payer: PublicKey;
            roleId: number;
            subAccount: PublicKey;
            swigAddress: PublicKey;
        }

      Returns Promise<TransactionInstruction>

    • Parameters

      • args: {
            amount: bigint;
            mint: PublicKey;
            options: InstructionDataOptions;
            payer: PublicKey;
            roleId: number;
            subAccount: PublicKey;
            swigAddress: PublicKey;
            tokenProgram?: PublicKey;
        }

      Returns Promise<TransactionInstruction>