Options
All
  • Public
  • Public/Protected
  • All
Menu

A Switchboard account representing a permission or privilege granted by one account signer to another account.

Hierarchy

  • PermissionAccount

Index

Constructors

Properties

keypair?: Keypair
program: Program<Idl>
publicKey: PublicKey

Methods

  • loadData(): Promise<any>
  • Load and parse PermissionAccount data based on the program IDL.

    Returns Promise<any>

    PermissionAccount data parsed in accordance with the Switchboard IDL.

  • size(): number
  • Get the size of a PermissionAccount on chain.

    Returns number

    size.

  • Create and initialize the PermissionAccount.

    Parameters

    • program: Program<Idl>

      Switchboard program representation holding connection and IDL.

    • params: PermissionInitParams

    Returns Promise<PermissionAccount>

    newly generated PermissionAccount.

  • fromSeed(program: Program<Idl>, authority: PublicKey, granter: PublicKey, grantee: PublicKey): [PermissionAccount, number]
  • Loads a PermissionAccount from the expected PDA seed format.

    Parameters

    • program: Program<Idl>
    • authority: PublicKey

      The authority pubkey to be incorporated into the account seed.

    • granter: PublicKey

      The granter pubkey to be incorporated into the account seed.

    • grantee: PublicKey

      The grantee pubkey to be incorporated into the account seed.

    Returns [PermissionAccount, number]

    PermissionAccount and PDA bump.

Generated using TypeDoc