Swig TS — API References
    Preparing search index...

    Class Ed25519SessionAuthority

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

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

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

    type: AuthorityType = AuthorityType.Ed25519Session

    Accessors

    Methods

    • Creates an AddAuthority Instructon

      Parameters

      • args: {
            actingRoleId: number;
            actions: Actions;
            newAuthorityInfo: CreateAuthorityInfo;
            payer: PublicKey;
            swigAddress: PublicKey;
        }

        The parameters required to create the Swig instruction.

        • actingRoleId: number

          The ID of the role signing the instruction.

        • actions: Actions

          Actions of the new authority

        • newAuthorityInfo: CreateAuthorityInfo

          CreateAuthorityInfo of new Authority to add

        • payer: PublicKey

          The public key of the swig payer.

        • swigAddress: PublicKey

          The public key of the swig

      Returns Promise<TransactionInstruction>

      AddAuthority Instruction.

    • 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 CreateSession Instructon

      Parameters

      • args: {
            newSessionKey: PublicKey;
            payer: PublicKey;
            roleId: number;
            sessionDuration?: bigint;
            swigAddress: PublicKey;
        }

        The parameters required to create the Swig instruction.

        • newSessionKey: PublicKey

          Ed25519 Public key of the Session key

        • payer: PublicKey

          The public key of the swig payer.

        • roleId: number

          The ID of the role signing the instruction.

        • OptionalsessionDuration?: bigint

          Session duration in slots

        • swigAddress: PublicKey

          The public key of the swig

      Returns Promise<TransactionInstruction>

      AddAuthority Instruction.

    • Creates an RemoveAuthority Instructon

      Parameters

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

        The parameters required for RemoveAuthority instruction.

        • 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[];
            payer: PublicKey;
            roleId: number;
            swigAddress: PublicKey;
        }

        The parameters required to create the Swig instruction.

        • innerInstructions: TransactionInstruction[]

          The instructions the Swig is to sign.

        • 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: { payer: PublicKey; roleId: number; swigAddress: PublicKey; swigId: Uint8Array }

      Returns Promise<TransactionInstruction>

    • Parameters

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

      Returns Promise<TransactionInstruction>

    • Parameters

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

      Returns Promise<TransactionInstruction>

    • Parameters

      • args: {
            amount: bigint;
            payer: PublicKey;
            roleId: number;
            subAccount: PublicKey;
            swigAddress: PublicKey;
        }

      Returns Promise<TransactionInstruction>

    • Parameters

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

      Returns Promise<TransactionInstruction>