Properties
Readonly bump
bump: number
Readonly key
key: PublicKey
Readonly program
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 }>>>Accessors
data
- 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 }>>
provider
- get provider(): AugmentedProvider
Returns AugmentedProvider
Methods
approveTransaction
- approveTransaction(transactionKey: PublicKey, owner?: PublicKey): TransactionEnvelope
Parameters
transactionKey: PublicKey
owner: PublicKey = ...
Returns TransactionEnvelope
changeThreshold
- changeThreshold(threshold: number): TransactionEnvelope
Parameters
Returns TransactionEnvelope
executeTransaction
- executeTransaction(__namedParameters: { owner?: PublicKey; transactionKey: PublicKey }): Promise<TransactionEnvelope>
Parameters
__namedParameters: { owner?: PublicKey; transactionKey: PublicKey }
Optional owner?: PublicKey
transactionKey: PublicKey
Returns Promise<TransactionEnvelope>
executeTransactionDerived
- executeTransactionDerived(__namedParameters: { owner?: PublicKey; transactionKey: PublicKey; walletIndex: number }): Promise<TransactionEnvelope>
Parameters
__namedParameters: { owner?: PublicKey; transactionKey: PublicKey; walletIndex: number }
Optional owner?: PublicKey
transactionKey: PublicKey
walletIndex: number
Returns Promise<TransactionEnvelope>
fetchTransaction
- 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 }>>>
Parameters
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
- 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 }>>>
Parameters
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
- findOwnerInvokerAddress(index: number): Promise<[PublicKey, number]>
Parameters
Returns Promise<[PublicKey, number]>
findWalletDerivedAddress
- findWalletDerivedAddress(index: number): Promise<[PublicKey, number]>
Parameters
Returns Promise<[PublicKey, number]>
newTransactionFromEnvelope
ownerInvokeInstruction
- ownerInvokeInstruction(__namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }): Promise<TransactionEnvelope>
Parameters
__namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }
index: number
instruction: TransactionInstruction
Optional owner?: PublicKey
Returns Promise<TransactionEnvelope>
ownerInvokeInstructionV2
- ownerInvokeInstructionV2(__namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }): Promise<TransactionEnvelope>
Parameters
__namedParameters: { index: number; instruction: TransactionInstruction; owner?: PublicKey }
index: number
instruction: TransactionInstruction
Optional owner?: PublicKey
Returns Promise<TransactionEnvelope>
reloadData
- 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 }>>>
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
- setOwners(owners: PublicKey[]): TransactionEnvelope
Parameters
Returns TransactionEnvelope
Approves a transaction.