Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SmartWalletWrapper

Index

Constructors

Properties

bump: number
key: PublicKey
program: AnchorProgram<SmartWalletIDL, { smartWallet: AnchorTypeDef<{ name: "SmartWallet"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "threshold"; type: "u64" }, { name: "minimumDelay"; type: "i64" }, { name: "gracePeriod"; type: "i64" }, { name: "ownerSetSeqno"; type: "u32" }, { name: "numTransactions"; type: "u64" }, { name: "owners"; type: { vec: "publicKey" } }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "SmartWallet" } & never & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>; subaccountInfo: AnchorTypeDef<never & never & { name: "SubaccountInfo"; type: { fields: [{ name: "smartWallet"; type: "publicKey" }, { name: "subaccountType"; type: { defined: "SubaccountType" } }, { name: "index"; type: "u64" }]; kind: "struct" } } & { name: "SubaccountInfo" }, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>; transaction: AnchorTypeDef<never & { name: "Transaction"; type: { fields: [{ name: "smartWallet"; type: "publicKey" }, { name: "index"; type: "u64" }, { name: "bump"; type: "u8" }, { name: "proposer"; type: "publicKey" }, { name: "instructions"; type: { vec: { defined: "TXInstruction" } } }, { name: "signers"; type: { vec: "bool" } }, { name: "ownerSetSeqno"; type: "u32" }]; kind: "struct" } } & { name: "Transaction" } & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>> }, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>, MakeInstructions<[{ accounts: [{ isMut: false; isSigner: true; name: "base" }, { isMut: true; isSigner: false; name: "smartWallet"; pda: { seeds: [{ kind: "const"; type: "string"; value: "GokiSmartWallet" }, { kind: "account"; path: "base"; type: "publicKey" }] } }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "maxOwners"; type: "u8" }, { name: "owners"; type: { vec: "publicKey" } }, { name: "threshold"; type: "u64" }, { name: "minimumDelay"; type: "i64" }]; name: "createSmartWallet" }, { accounts: [{ isMut: true; isSigner: true; name: "smartWallet" }]; args: [{ name: "owners"; type: { vec: "publicKey" } }]; name: "setOwners" }, { accounts: [{ isMut: true; isSigner: true; name: "smartWallet" }]; args: [{ name: "threshold"; type: "u64" }]; name: "changeThreshold" }], AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>, MakeInstructions<unknown, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>
sdk: GokiSDK

Accessors

  • get data(): undefined | AnchorTypeDef<{ name: "SmartWallet"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "threshold"; type: "u64" }, { name: "minimumDelay"; type: "i64" }, { name: "gracePeriod"; type: "i64" }, { name: "ownerSetSeqno"; type: "u32" }, { name: "numTransactions"; type: "u64" }, { name: "owners"; type: { vec: "publicKey" } }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "SmartWallet" } & never & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>
  • Returns undefined | AnchorTypeDef<{ name: "SmartWallet"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "threshold"; type: "u64" }, { name: "minimumDelay"; type: "i64" }, { name: "gracePeriod"; type: "i64" }, { name: "ownerSetSeqno"; type: "u32" }, { name: "numTransactions"; type: "u64" }, { name: "owners"; type: { vec: "publicKey" } }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "SmartWallet" } & never & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>

  • get provider(): AugmentedProvider

Methods

  • approveTransaction(transactionKey: PublicKey, owner?: PublicKey): TransactionEnvelope
  • changeThreshold(threshold: number): TransactionEnvelope
  • executeTransaction(__namedParameters: { owner?: PublicKey; transactionKey: PublicKey }): Promise<TransactionEnvelope>
  • Executes a transaction as the Smart Wallet.

    Parameters

    • __namedParameters: { owner?: PublicKey; transactionKey: PublicKey }
      • Optional owner?: PublicKey
      • transactionKey: PublicKey

    Returns Promise<TransactionEnvelope>

  • executeTransactionDerived(__namedParameters: { owner?: PublicKey; transactionKey: PublicKey; walletIndex: number }): Promise<TransactionEnvelope>
  • Executes a transaction using a wallet-derived address.

    Parameters

    • __namedParameters: { owner?: PublicKey; transactionKey: PublicKey; walletIndex: number }
      • Optional owner?: PublicKey
      • transactionKey: PublicKey
      • walletIndex: number

    Returns Promise<TransactionEnvelope>

  • fetchTransaction(key: PublicKey): Promise<AnchorTypeDef<never & { name: "Transaction"; type: { fields: [{ name: "smartWallet"; type: "publicKey" }, { name: "index"; type: "u64" }, { name: "bump"; type: "u8" }, { name: "proposer"; type: "publicKey" }, { name: "instructions"; type: { vec: { defined: "TXInstruction" } } }, { name: "signers"; type: { vec: "bool" } }, { name: "ownerSetSeqno"; type: "u32" }]; kind: "struct" } } & { name: "Transaction" } & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>
  • fetchTransaction

    Parameters

    • key: PublicKey

    Returns Promise<AnchorTypeDef<never & { name: "Transaction"; type: { fields: [{ name: "smartWallet"; type: "publicKey" }, { name: "index"; type: "u64" }, { name: "bump"; type: "u8" }, { name: "proposer"; type: "publicKey" }, { name: "instructions"; type: { vec: { defined: "TXInstruction" } } }, { name: "signers"; type: { vec: "bool" } }, { name: "ownerSetSeqno"; type: "u32" }]; kind: "struct" } } & { name: "Transaction" } & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>

  • fetchTransactionByIndex(index: number): Promise<null | AnchorTypeDef<never & { name: "Transaction"; type: { fields: [{ name: "smartWallet"; type: "publicKey" }, { name: "index"; type: "u64" }, { name: "bump"; type: "u8" }, { name: "proposer"; type: "publicKey" }, { name: "instructions"; type: { vec: { defined: "TXInstruction" } } }, { name: "signers"; type: { vec: "bool" } }, { name: "ownerSetSeqno"; type: "u32" }]; kind: "struct" } } & { name: "Transaction" } & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>
  • Fetches a transaction by its index.

    Parameters

    • index: number

    Returns Promise<null | AnchorTypeDef<never & { name: "Transaction"; type: { fields: [{ name: "smartWallet"; type: "publicKey" }, { name: "index"; type: "u64" }, { name: "bump"; type: "u8" }, { name: "proposer"; type: "publicKey" }, { name: "instructions"; type: { vec: { defined: "TXInstruction" } } }, { name: "signers"; type: { vec: "bool" } }, { name: "ownerSetSeqno"; type: "u32" }]; kind: "struct" } } & { name: "Transaction" } & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>

  • findOwnerInvokerAddress(index: number): Promise<[PublicKey, number]>
  • findWalletDerivedAddress(index: number): Promise<[PublicKey, number]>
  • ownerInvokeInstruction(__namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }): Promise<TransactionEnvelope>
  • Executes a transaction using an owner invoker address.

    Parameters

    • __namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }
      • index: number
      • instruction: TransactionInstruction
      • Optional owner?: PublicKey

    Returns Promise<TransactionEnvelope>

  • ownerInvokeInstructionV2(__namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }): Promise<TransactionEnvelope>
  • Executes a transaction using an owner invoker address.

    Parameters

    • __namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }
      • index: number
      • instruction: TransactionInstruction
      • Optional owner?: PublicKey

    Returns Promise<TransactionEnvelope>

  • reloadData(): Promise<AnchorTypeDef<{ name: "SmartWallet"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "threshold"; type: "u64" }, { name: "minimumDelay"; type: "i64" }, { name: "gracePeriod"; type: "i64" }, { name: "ownerSetSeqno"; type: "u32" }, { name: "numTransactions"; type: "u64" }, { name: "owners"; type: { vec: "publicKey" } }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "SmartWallet" } & never & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>
  • reloadData

    Returns Promise<AnchorTypeDef<{ name: "SmartWallet"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "threshold"; type: "u64" }, { name: "minimumDelay"; type: "i64" }, { name: "gracePeriod"; type: "i64" }, { name: "ownerSetSeqno"; type: "u32" }, { name: "numTransactions"; type: "u64" }, { name: "owners"; type: { vec: "publicKey" } }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "SmartWallet" } & never & never, AnchorDefined<SmartWalletIDL, { TXAccountMeta: AccountMeta; TXInstruction: SmartWalletInstruction }>>>

  • setOwners(owners: PublicKey[]): TransactionEnvelope

Generated using TypeDoc