Flex API
Namespaces
Type Aliases
EscrowAccountData
EscrowAccountData = object
Defined in: types.ts:39
Decoded on-chain state of a Flex escrow account.
Properties
bump
bump: number
Defined in: types.ts:51
deadmanTimeoutSlots
deadmanTimeoutSlots: bigint
Defined in: types.ts:47
facilitator
facilitator: Address
Defined in: types.ts:42
index
index: bigint
Defined in: types.ts:43
lastActivitySlot
lastActivitySlot: bigint
Defined in: types.ts:48
maxSessionKeys
maxSessionKeys: number
Defined in: types.ts:49
mintCount
mintCount: bigint
Defined in: types.ts:45
owner
owner: Address
Defined in: types.ts:41
pendingCount
pendingCount: bigint
Defined in: types.ts:44
refundTimeoutSlots
refundTimeoutSlots: bigint
Defined in: types.ts:46
sessionKeyCount
sessionKeyCount: number
Defined in: types.ts:50
version
version: number
Defined in: types.ts:40
FlexError
FlexError = typeofDefined in: generated/errors/flex.ts:106FLEX_ERROR__AUTHORIZATION_EXPIRED| typeofFLEX_ERROR__DEADMAN_NOT_EXPIRED| typeofFLEX_ERROR__DEADMAN_TIMEOUT_TOO_LONG| typeofFLEX_ERROR__DEADMAN_TIMEOUT_TOO_SHORT| typeofFLEX_ERROR__DEADMAN_TOO_CLOSE_TO_REFUND| typeofFLEX_ERROR__DUPLICATE_ACCOUNTS| typeofFLEX_ERROR__DUPLICATE_SPLIT_RECIPIENT| typeofFLEX_ERROR__EXPIRY_TOO_FAR| typeofFLEX_ERROR__FINALIZATION_DEADLINE_PASSED| typeofFLEX_ERROR__GRACE_PERIOD_EXCEEDS_REFUND_TIMEOUT| typeofFLEX_ERROR__INSUFFICIENT_BALANCE| typeofFLEX_ERROR__INVALID_ED25519_INSTRUCTION| typeofFLEX_ERROR__INVALID_SIGNATURE| typeofFLEX_ERROR__INVALID_SPLIT_BPS| typeofFLEX_ERROR__INVALID_SPLIT_COUNT| typeofFLEX_ERROR__INVALID_SPLIT_RECIPIENT| typeofFLEX_ERROR__INVALID_TOKEN_ACCOUNT_PAIR| typeofFLEX_ERROR__INVALID_VOID_AUTHORITY| typeofFLEX_ERROR__MINT_LIMIT_REACHED| typeofFLEX_ERROR__OWNER_ONLY| typeofFLEX_ERROR__PENDING_COUNT_MISMATCH| typeofFLEX_ERROR__PENDING_LIMIT_REACHED| typeofFLEX_ERROR__PENDING_SETTLEMENTS_EXIST| typeofFLEX_ERROR__REFUND_AMOUNT_ZERO| typeofFLEX_ERROR__REFUND_EXCEEDS_AMOUNT| typeofFLEX_ERROR__REFUND_TIMEOUT_TOO_LONG| typeofFLEX_ERROR__REFUND_TIMEOUT_TOO_SHORT| typeofFLEX_ERROR__REFUND_WINDOW_EXPIRED| typeofFLEX_ERROR__REFUND_WINDOW_NOT_EXPIRED| typeofFLEX_ERROR__SESSION_KEY_ALREADY_EXPIRED| typeofFLEX_ERROR__SESSION_KEY_COUNT_UNDERFLOW| typeofFLEX_ERROR__SESSION_KEY_EXPIRED| typeofFLEX_ERROR__SESSION_KEY_GRACE_PERIOD_ACTIVE| typeofFLEX_ERROR__SESSION_KEY_LIMIT_REACHED| typeofFLEX_ERROR__SESSION_KEY_REVOKED| typeofFLEX_ERROR__SESSION_KEYS_EXIST| typeofFLEX_ERROR__SESSION_KEY_STILL_ACTIVE| typeofFLEX_ERROR__SETTLE_AMOUNT_ZERO| typeofFLEX_ERROR__SETTLE_EXCEEDS_MAX| typeofFLEX_ERROR__SPLIT_BPS_ZERO| typeofFLEX_ERROR__SPLIT_CALCULATION_OVERFLOW| typeofFLEX_ERROR__UNAUTHORIZED_FACILITATOR| typeofFLEX_ERROR__UNSUPPORTED_ACCOUNT_VERSION| typeofFLEX_ERROR__VOID_CONDITION_NOT_MET
FlexPaymentPayload
FlexPaymentPayload = typeof FlexPaymentPayload.infer
Defined in: types.ts:13
Runtime validator for the client-submitted Flex payment payload.
FlexPaymentRequirementsExtra
FlexPaymentRequirementsExtra = typeof FlexPaymentRequirementsExtra.infer
Defined in: types.ts:27
Runtime validator for the extra field in Flex payment requirements.
FlexSplitEntry
FlexSplitEntry = typeof FlexSplitEntry.infer
Defined in: types.ts:5
Runtime validator for a single split entry in a Flex payment payload.
PendingSettlementData
PendingSettlementData = object
Defined in: types.ts:68
Decoded on-chain state of a pending settlement awaiting finalization.
Properties
amount
amount: bigint
Defined in: types.ts:72
authorizationId
authorizationId: bigint
Defined in: types.ts:75
bump
bump: number
Defined in: types.ts:81
escrow
escrow: Address
Defined in: types.ts:70
expiresAtSlot
expiresAtSlot: bigint
Defined in: types.ts:76
maxAmount
maxAmount: bigint
Defined in: types.ts:74
mint
mint: Address
Defined in: types.ts:71
originalAmount
originalAmount: bigint
Defined in: types.ts:73
sessionKey
sessionKey: Address
Defined in: types.ts:78
splitCount
splitCount: number
Defined in: types.ts:79
splits
splits: object[]
Defined in: types.ts:80
bps
bps: number
recipient
recipient: Address
submittedAtSlot
submittedAtSlot: bigint
Defined in: types.ts:77
version
version: number
Defined in: types.ts:69
SessionKeyData
SessionKeyData = object
Defined in: types.ts:55
Decoded on-chain state of a session key registered to an escrow.
Properties
active
active: boolean
Defined in: types.ts:61
bump
bump: number
Defined in: types.ts:64
createdAtSlot
createdAtSlot: bigint
Defined in: types.ts:59
escrow
escrow: Address
Defined in: types.ts:57
expiresAtSlot
expiresAtSlot:Defined in: types.ts:60bigint|null
key
key: Address
Defined in: types.ts:58
revocationGracePeriodSlots
revocationGracePeriodSlots: bigint
Defined in: types.ts:63
revokedAtSlot
revokedAtSlot:Defined in: types.ts:62bigint|null
version
version: number
Defined in: types.ts:56
SplitEntry
SplitEntry = object
Defined in: generated/types/splitEntry.ts:23
Properties
bps
bps: number
Defined in: generated/types/splitEntry.ts:23
recipient
recipient: Address
Defined in: generated/types/splitEntry.ts:23
SplitInput
SplitInput = object
Defined in: authorization.ts:10
A single split directing a share of a settlement to a token account.
Properties
bps
bps: number
Defined in: authorization.ts:12
recipient
recipient: Address
Defined in: authorization.ts:11
Variables
FLEX_ERROR__AUTHORIZATION_EXPIRED
Defined in: generated/errors/flex.ts:22 AuthorizationExpired: Authorization has expiredconstFLEX_ERROR__AUTHORIZATION_EXPIRED:6002=0x1772
FLEX_ERROR__DEADMAN_NOT_EXPIRED
Defined in: generated/errors/flex.ts:28 DeadmanNotExpired: Cannot emergency close before timeoutconstFLEX_ERROR__DEADMAN_NOT_EXPIRED:6005=0x1775
FLEX_ERROR__DEADMAN_TIMEOUT_TOO_LONG
Defined in: generated/errors/flex.ts:86 DeadmanTimeoutTooLong: Deadman timeout exceeds maximum of 2592000 slotsconstFLEX_ERROR__DEADMAN_TIMEOUT_TOO_LONG:6034=0x1792
FLEX_ERROR__DEADMAN_TIMEOUT_TOO_SHORT
Defined in: generated/errors/flex.ts:82 DeadmanTimeoutTooShort: Deadman timeout below minimum of 1000 slotsconstFLEX_ERROR__DEADMAN_TIMEOUT_TOO_SHORT:6032=0x1790
FLEX_ERROR__DEADMAN_TOO_CLOSE_TO_REFUND
Defined in: generated/errors/flex.ts:88 DeadmanTooCloseToRefund: Deadman timeout must be at least 2x refund timeoutconstFLEX_ERROR__DEADMAN_TOO_CLOSE_TO_REFUND:6035=0x1793
FLEX_ERROR__DUPLICATE_ACCOUNTS
Defined in: generated/errors/flex.ts:52 DuplicateAccounts: Same account passed multiple timesconstFLEX_ERROR__DUPLICATE_ACCOUNTS:6017=0x1781
FLEX_ERROR__DUPLICATE_SPLIT_RECIPIENT
Defined in: generated/errors/flex.ts:66 DuplicateSplitRecipient: Duplicate recipient in splitsconstFLEX_ERROR__DUPLICATE_SPLIT_RECIPIENT:6024=0x1788
FLEX_ERROR__EXPIRY_TOO_FAR
Defined in: generated/errors/flex.ts:76 ExpiryTooFar: Authorization expiry exceeds refund timeoutconstFLEX_ERROR__EXPIRY_TOO_FAR:6029=0x178d
FLEX_ERROR__FINALIZATION_DEADLINE_PASSED
Defined in: generated/errors/flex.ts:96 FinalizationDeadlinePassed: Finalization deadline has passedconstFLEX_ERROR__FINALIZATION_DEADLINE_PASSED:6039=0x1797
FLEX_ERROR__GRACE_PERIOD_EXCEEDS_REFUND_TIMEOUT
Defined in: generated/errors/flex.ts:104 GracePeriodExceedsRefundTimeout: Grace period must be shorter than the escrow refund timeoutconstFLEX_ERROR__GRACE_PERIOD_EXCEEDS_REFUND_TIMEOUT:6043=0x179b
FLEX_ERROR__INSUFFICIENT_BALANCE
Defined in: generated/errors/flex.ts:26 InsufficientBalance: Token account balance insufficientconstFLEX_ERROR__INSUFFICIENT_BALANCE:6004=0x1774
FLEX_ERROR__INVALID_ED25519_INSTRUCTION
Defined in: generated/errors/flex.ts:56 InvalidEd25519Instruction: Ed25519 instruction malformed or missingconstFLEX_ERROR__INVALID_ED25519_INSTRUCTION:6019=0x1783
FLEX_ERROR__INVALID_SIGNATURE
Defined in: generated/errors/flex.ts:24 InvalidSignature: Ed25519 signature verification failedconstFLEX_ERROR__INVALID_SIGNATURE:6003=0x1773
FLEX_ERROR__INVALID_SPLIT_BPS
Defined in: generated/errors/flex.ts:62 InvalidSplitBps: Split bps do not sum to 10000constFLEX_ERROR__INVALID_SPLIT_BPS:6022=0x1786
FLEX_ERROR__INVALID_SPLIT_COUNT
Defined in: generated/errors/flex.ts:60 InvalidSplitCount: Split count must be between 1 and 5constFLEX_ERROR__INVALID_SPLIT_COUNT:6021=0x1785
FLEX_ERROR__INVALID_SPLIT_RECIPIENT
Defined in: generated/errors/flex.ts:58 InvalidSplitRecipient: Recipient is not a valid token account for the specified mintconstFLEX_ERROR__INVALID_SPLIT_RECIPIENT:6020=0x1784
FLEX_ERROR__INVALID_TOKEN_ACCOUNT_PAIR
Defined in: generated/errors/flex.ts:48 InvalidTokenAccountPair: Token account pair validation failedconstFLEX_ERROR__INVALID_TOKEN_ACCOUNT_PAIR:6015=0x177f
FLEX_ERROR__INVALID_VOID_AUTHORITY
Defined in: generated/errors/flex.ts:100 InvalidVoidAuthority: Authority must be escrow owner or facilitatorconstFLEX_ERROR__INVALID_VOID_AUTHORITY:6041=0x1799
FLEX_ERROR__MINT_LIMIT_REACHED
Defined in: generated/errors/flex.ts:46 MintLimitReached: Maximum mints per escrow reachedconstFLEX_ERROR__MINT_LIMIT_REACHED:6014=0x177e
FLEX_ERROR__OWNER_ONLY
Defined in: generated/errors/flex.ts:90 OwnerOnly: Only the escrow owner can create new vault accountsconstFLEX_ERROR__OWNER_ONLY:6036=0x1794
FLEX_ERROR__PENDING_LIMIT_REACHED
Defined in: generated/errors/flex.ts:44 PendingLimitReached: Maximum pending settlements reachedconstFLEX_ERROR__PENDING_LIMIT_REACHED:6013=0x177d
FLEX_ERROR__PENDING_SETTLEMENTS_EXIST
Defined in: generated/errors/flex.ts:34 PendingSettlementsExist: Cannot close escrow with pending settlementsconstFLEX_ERROR__PENDING_SETTLEMENTS_EXIST:6008=0x1778
FLEX_ERROR__REFUND_AMOUNT_ZERO
Defined in: generated/errors/flex.ts:78 RefundAmountZero: Refund amount must be greater than zeroconstFLEX_ERROR__REFUND_AMOUNT_ZERO:6030=0x178e
FLEX_ERROR__REFUND_EXCEEDS_AMOUNT
Defined in: generated/errors/flex.ts:40 RefundExceedsAmount: Cannot refund more than pending amountconstFLEX_ERROR__REFUND_EXCEEDS_AMOUNT:6011=0x177b
FLEX_ERROR__REFUND_TIMEOUT_TOO_LONG
Defined in: generated/errors/flex.ts:84 RefundTimeoutTooLong: Refund timeout exceeds maximum of 1296000 slotsconstFLEX_ERROR__REFUND_TIMEOUT_TOO_LONG:6033=0x1791
FLEX_ERROR__REFUND_TIMEOUT_TOO_SHORT
Defined in: generated/errors/flex.ts:80 RefundTimeoutTooShort: Refund timeout below minimum of 150 slotsconstFLEX_ERROR__REFUND_TIMEOUT_TOO_SHORT:6031=0x178f
FLEX_ERROR__REFUND_WINDOW_EXPIRED
Defined in: generated/errors/flex.ts:38 RefundWindowExpired: Cannot refund after refund timeoutconstFLEX_ERROR__REFUND_WINDOW_EXPIRED:6010=0x177a
FLEX_ERROR__REFUND_WINDOW_NOT_EXPIRED
Defined in: generated/errors/flex.ts:36 RefundWindowNotExpired: Cannot finalize before refund timeoutconstFLEX_ERROR__REFUND_WINDOW_NOT_EXPIRED:6009=0x1779
FLEX_ERROR__SESSION_KEY_ALREADY_EXPIRED
Defined in: generated/errors/flex.ts:102 SessionKeyAlreadyExpired: Session key expires_at_slot is already in the pastconstFLEX_ERROR__SESSION_KEY_ALREADY_EXPIRED:6042=0x179a
FLEX_ERROR__SESSION_KEY_EXPIRED
Defined in: generated/errors/flex.ts:18 SessionKeyExpired: Session key has expiredconstFLEX_ERROR__SESSION_KEY_EXPIRED:6000=0x1770
FLEX_ERROR__SESSION_KEY_GRACE_PERIOD_ACTIVE
Defined in: generated/errors/flex.ts:32 SessionKeyGracePeriodActive: Cannot close session key during grace periodconstFLEX_ERROR__SESSION_KEY_GRACE_PERIOD_ACTIVE:6007=0x1777
FLEX_ERROR__SESSION_KEY_LIMIT_REACHED
Defined in: generated/errors/flex.ts:54 SessionKeyLimitReached: Maximum session keys per escrow reachedconstFLEX_ERROR__SESSION_KEY_LIMIT_REACHED:6018=0x1782
FLEX_ERROR__SESSION_KEY_REVOKED
Defined in: generated/errors/flex.ts:20 SessionKeyRevoked: Session key revoked and grace period elapsedconstFLEX_ERROR__SESSION_KEY_REVOKED:6001=0x1771
FLEX_ERROR__SESSION_KEY_STILL_ACTIVE
Defined in: generated/errors/flex.ts:68 SessionKeyStillActive: Session key must be revoked before closingconstFLEX_ERROR__SESSION_KEY_STILL_ACTIVE:6025=0x1789
FLEX_ERROR__SESSION_KEYS_EXIST
Defined in: generated/errors/flex.ts:94 SessionKeysExist: Cannot close escrow with active session keysconstFLEX_ERROR__SESSION_KEYS_EXIST:6038=0x1796
FLEX_ERROR__SETTLE_AMOUNT_ZERO
Defined in: generated/errors/flex.ts:74 SettleAmountZero: Settle amount must be greater than zeroconstFLEX_ERROR__SETTLE_AMOUNT_ZERO:6028=0x178c
FLEX_ERROR__SETTLE_EXCEEDS_MAX
Defined in: generated/errors/flex.ts:72 SettleExceedsMax: Settle amount exceeds max authorized amountconstFLEX_ERROR__SETTLE_EXCEEDS_MAX:6027=0x178b
FLEX_ERROR__SPLIT_BPS_ZERO
Defined in: generated/errors/flex.ts:64 SplitBpsZero: A split entry has bps of zeroconstFLEX_ERROR__SPLIT_BPS_ZERO:6023=0x1787
FLEX_ERROR__SPLIT_CALCULATION_OVERFLOW
Defined in: generated/errors/flex.ts:92 SplitCalculationOverflow: Split calculation arithmetic overflowconstFLEX_ERROR__SPLIT_CALCULATION_OVERFLOW:6037=0x1795
FLEX_ERROR__UNAUTHORIZED_FACILITATOR
Defined in: generated/errors/flex.ts:30 UnauthorizedFacilitator: Signer is not the registered facilitatorconstFLEX_ERROR__UNAUTHORIZED_FACILITATOR:6006=0x1776
FLEX_ERROR__VOID_CONDITION_NOT_MET
Defined in: generated/errors/flex.ts:98 VoidConditionNotMet: Neither deadman timeout nor finalization deadline has passedconstFLEX_ERROR__VOID_CONDITION_NOT_MET:6040=0x1798
FLEX_PROGRAM_ADDRESS
Defined in: generated/programs/flex.ts:99constFLEX_PROGRAM_ADDRESS:Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
FlexPaymentPayload
Defined in: types.ts:13 Runtime validator for the client-submitted Flex payment payload.constFlexPaymentPayload:Type<{authorizationId:string;escrow:string;expiresAtSlot:string;maxAmount:string;mint:string;sessionKey:string;signature:string;splits:object[]; }, { }>
FlexPaymentRequirementsExtra
Defined in: types.ts:27 Runtime validator for theconstFlexPaymentRequirementsExtra:Type<{escrow?:string;facilitator:string;minGracePeriodSlots?:string;splits:object[];supportedMints:string[]; }, { }>
extra field in Flex payment requirements.
FlexSplitEntry
Defined in: types.ts:5 Runtime validator for a single split entry in a Flex payment payload.constFlexSplitEntry:Type<{bps:number;recipient:string; }, { }>
Functions
createEd25519VerifyInstruction()
createEd25519VerifyInstruction(Defined in: authorization.ts:97 Builds an Ed25519 precompile instruction that verifies a payment authorization signature inline within a Solana transaction. Header layout: u8 num_signatures = 1 u8 padding = 0 Entry layout (one per signature): u16 signature_offset u16 signature_instruction_index = 0xFFFF (inline) u16 public_key_offset u16 public_key_instruction_index = 0xFFFF (inline) u16 message_data_offset u16 message_data_size u16 message_instruction_index = 0xFFFF (inline) Data: [64 bytes] signature [32 bytes] public_key [N bytes] messageargs):Instruction
Parameters
args
message
Uint8Array
publicKey
Address
signature
Uint8Array
Returns
Instruction
fetchEscrowAccount()
fetchEscrowAccount(Defined in: query.ts:106 Fetches a single escrow account by address.rpc,addr):Promise<EscrowAccountData|null>
Parameters
rpc
FlexRpc
Solana RPC client
addr
Address
On-chain address of the escrow PDA
Returns
Promise<EscrowAccountData | null>
The decoded account data, or null if it does not exist
fetchPendingSettlement()
fetchPendingSettlement(Defined in: query.ts:138 Fetches a single pending settlement account by address.rpc,addr):Promise<PendingSettlementData|null>
Parameters
rpc
FlexRpc
Solana RPC client
addr
Address
On-chain address of the pending settlement PDA
Returns
Promise<PendingSettlementData | null>
The decoded settlement data, or null if it does not exist
fetchSessionKey()
fetchSessionKey(Defined in: query.ts:122 Fetches a single session key account by address.rpc,addr):Promise<SessionKeyData|null>
Parameters
rpc
FlexRpc
Solana RPC client
addr
Address
On-chain address of the session key PDA
Returns
Promise<SessionKeyData | null>
The decoded session key data, or null if it does not exist
findEscrowsByFacilitator()
findEscrowsByFacilitator(Defined in: query.ts:201 Finds all escrow accounts managed by a given facilitator usingrpc,facilitator):Promise<object[]>
getProgramAccounts with a discriminator + facilitator filter.
Parameters
rpc
FlexRpc
Solana RPC client
facilitator
Address
Address of the facilitator
Returns
Promise<object[]>
Array of escrow addresses and their decoded data
findEscrowsByOwner()
findEscrowsByOwner(Defined in: query.ts:155 Finds all escrow accounts owned by a given wallet usingrpc,owner):Promise<object[]>
getProgramAccounts with a discriminator + owner filter.
Parameters
rpc
FlexRpc
Solana RPC client
owner
Address
Wallet address of the escrow owner
Returns
Promise<object[]>
Array of escrow addresses and their decoded data
findPendingSettlementsByEscrow()
findPendingSettlementsByEscrow(Defined in: query.ts:249 Finds all pending settlement accounts belonging to an escrow usingrpc,escrow):Promise<object[]>
getProgramAccounts with a discriminator + escrow filter.
Parameters
rpc
FlexRpc
Solana RPC client
escrow
Address
Address of the parent escrow PDA
Returns
Promise<object[]>
Array of pending settlement addresses and their decoded data
findVaultPda()
findVaultPda(Defined in: generated/pdas/vault.ts:22seeds,config):Promise<readonly [Address<string>,ProgramDerivedAddressBump]>
Parameters
seeds
VaultSeeds
config
programAddress?
Address
Returns
Promise<readonly [Address<string>, ProgramDerivedAddressBump]>
getCloseEscrowInstruction()
getCloseEscrowInstruction<Defined in: generated/instructions/closeEscrow.ts:121TAccountEscrow,TAccountOwner,TAccountFacilitator,TAccountTokenProgram,TProgramAddress>(input,config?):CloseEscrowInstruction<TProgramAddress,TAccountEscrow,TAccountOwner,TAccountFacilitator,TAccountTokenProgram>
Type Parameters
TAccountEscrow
TAccountEscrow extends string
TAccountOwner
TAccountOwner extends string
TAccountFacilitator
TAccountFacilitator extends string
TAccountTokenProgram
TAccountTokenProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
CloseEscrowInput<TAccountEscrow, TAccountOwner, TAccountFacilitator, TAccountTokenProgram>
config?
programAddress?
TProgramAddress
Returns
CloseEscrowInstruction<TProgramAddress, TAccountEscrow, TAccountOwner, TAccountFacilitator, TAccountTokenProgram>
getCloseSessionKeyInstruction()
getCloseSessionKeyInstruction<Defined in: generated/instructions/closeSessionKey.ts:113TAccountOwner,TAccountEscrow,TAccountSessionKeyAccount,TProgramAddress>(input,config?):CloseSessionKeyInstruction<TProgramAddress,TAccountOwner,TAccountEscrow,TAccountSessionKeyAccount>
Type Parameters
TAccountOwner
TAccountOwner extends string
TAccountEscrow
TAccountEscrow extends string
TAccountSessionKeyAccount
TAccountSessionKeyAccount extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
CloseSessionKeyInput<TAccountOwner, TAccountEscrow, TAccountSessionKeyAccount>
config?
programAddress?
TProgramAddress
Returns
CloseSessionKeyInstruction<TProgramAddress, TAccountOwner, TAccountEscrow, TAccountSessionKeyAccount>
getCreateEscrowInstructionAsync()
getCreateEscrowInstructionAsync<Defined in: generated/instructions/createEscrow.ts:152TAccountOwner,TAccountEscrow,TAccountSystemProgram,TProgramAddress>(input,config?):Promise<CreateEscrowInstruction<TProgramAddress,TAccountOwner,TAccountEscrow,TAccountSystemProgram, []>>
Type Parameters
TAccountOwner
TAccountOwner extends string
TAccountEscrow
TAccountEscrow extends string
TAccountSystemProgram
TAccountSystemProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
CreateEscrowAsyncInput<TAccountOwner, TAccountEscrow, TAccountSystemProgram>
config?
programAddress?
TProgramAddress
Returns
Promise<CreateEscrowInstruction<TProgramAddress, TAccountOwner, TAccountEscrow, TAccountSystemProgram, []>>
getDepositInstructionAsync()
getDepositInstructionAsync<Defined in: generated/instructions/deposit.ts:149TAccountDepositor,TAccountEscrow,TAccountMint,TAccountVault,TAccountSource,TAccountTokenProgram,TAccountSystemProgram,TProgramAddress>(input,config?):Promise<DepositInstruction<TProgramAddress,TAccountDepositor,TAccountEscrow,TAccountMint,TAccountVault,TAccountSource,TAccountTokenProgram,TAccountSystemProgram, []>>
Type Parameters
TAccountDepositor
TAccountDepositor extends string
TAccountEscrow
TAccountEscrow extends string
TAccountMint
TAccountMint extends string
TAccountVault
TAccountVault extends string
TAccountSource
TAccountSource extends string
TAccountTokenProgram
TAccountTokenProgram extends string
TAccountSystemProgram
TAccountSystemProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
DepositAsyncInput<TAccountDepositor, TAccountEscrow, TAccountMint, TAccountVault, TAccountSource, TAccountTokenProgram, TAccountSystemProgram>
config?
programAddress?
TProgramAddress
Returns
Promise<DepositInstruction<TProgramAddress, TAccountDepositor, TAccountEscrow, TAccountMint, TAccountVault, TAccountSource, TAccountTokenProgram, TAccountSystemProgram, []>>
getEmergencyCloseInstruction()
getEmergencyCloseInstruction<Defined in: generated/instructions/emergencyClose.ts:115TAccountEscrow,TAccountOwner,TAccountTokenProgram,TProgramAddress>(input,config?):EmergencyCloseInstruction<TProgramAddress,TAccountEscrow,TAccountOwner,TAccountTokenProgram>
Type Parameters
TAccountEscrow
TAccountEscrow extends string
TAccountOwner
TAccountOwner extends string
TAccountTokenProgram
TAccountTokenProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
EmergencyCloseInput<TAccountEscrow, TAccountOwner, TAccountTokenProgram>
config?
programAddress?
TProgramAddress
Returns
EmergencyCloseInstruction<TProgramAddress, TAccountEscrow, TAccountOwner, TAccountTokenProgram>
getFinalizeInstruction()
getFinalizeInstruction<Defined in: generated/instructions/finalize.ts:119TAccountEscrow,TAccountFacilitator,TAccountPending,TAccountTokenAccount,TAccountTokenProgram,TProgramAddress>(input,config?):FinalizeInstruction<TProgramAddress,TAccountEscrow,TAccountFacilitator,TAccountPending,TAccountTokenAccount,TAccountTokenProgram>
Type Parameters
TAccountEscrow
TAccountEscrow extends string
TAccountFacilitator
TAccountFacilitator extends string
TAccountPending
TAccountPending extends string
TAccountTokenAccount
TAccountTokenAccount extends string
TAccountTokenProgram
TAccountTokenProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
FinalizeInput<TAccountEscrow, TAccountFacilitator, TAccountPending, TAccountTokenAccount, TAccountTokenProgram>
config?
programAddress?
TProgramAddress
Returns
FinalizeInstruction<TProgramAddress, TAccountEscrow, TAccountFacilitator, TAccountPending, TAccountTokenAccount, TAccountTokenProgram>
getFinalizeInstructionDataEncoder()
getFinalizeInstructionDataEncoder():Defined in: generated/instructions/finalize.ts:82FixedSizeEncoder<FinalizeInstructionDataArgs>
Returns
FixedSizeEncoder<FinalizeInstructionDataArgs>
getFlexErrorMessage()
getFlexErrorMessage(Defined in: generated/errors/flex.ts:202code):string
Parameters
code
FlexError
Returns
string
getRefundInstruction()
getRefundInstruction<Defined in: generated/instructions/refund.ts:119TAccountEscrow,TAccountFacilitator,TAccountPending,TProgramAddress>(input,config?):RefundInstruction<TProgramAddress,TAccountEscrow,TAccountFacilitator,TAccountPending>
Type Parameters
TAccountEscrow
TAccountEscrow extends string
TAccountFacilitator
TAccountFacilitator extends string
TAccountPending
TAccountPending extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
RefundInput<TAccountEscrow, TAccountFacilitator, TAccountPending>
config?
programAddress?
TProgramAddress
Returns
RefundInstruction<TProgramAddress, TAccountEscrow, TAccountFacilitator, TAccountPending>
getRegisterSessionKeyInstructionAsync()
getRegisterSessionKeyInstructionAsync<Defined in: generated/instructions/registerSessionKey.ts:153TAccountOwner,TAccountEscrow,TAccountSessionKeyAccount,TAccountSystemProgram,TProgramAddress>(input,config?):Promise<RegisterSessionKeyInstruction<TProgramAddress,TAccountOwner,TAccountEscrow,TAccountSessionKeyAccount,TAccountSystemProgram, []>>
Type Parameters
TAccountOwner
TAccountOwner extends string
TAccountEscrow
TAccountEscrow extends string
TAccountSessionKeyAccount
TAccountSessionKeyAccount extends string
TAccountSystemProgram
TAccountSystemProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
RegisterSessionKeyAsyncInput<TAccountOwner, TAccountEscrow, TAccountSessionKeyAccount, TAccountSystemProgram>
config?
programAddress?
TProgramAddress
Returns
Promise<RegisterSessionKeyInstruction<TProgramAddress, TAccountOwner, TAccountEscrow, TAccountSessionKeyAccount, TAccountSystemProgram, []>>
getRevokeSessionKeyInstruction()
getRevokeSessionKeyInstruction<Defined in: generated/instructions/revokeSessionKey.ts:114TAccountOwner,TAccountEscrow,TAccountSessionKeyAccount,TProgramAddress>(input,config?):RevokeSessionKeyInstruction<TProgramAddress,TAccountOwner,TAccountEscrow,TAccountSessionKeyAccount>
Type Parameters
TAccountOwner
TAccountOwner extends string
TAccountEscrow
TAccountEscrow extends string
TAccountSessionKeyAccount
TAccountSessionKeyAccount extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
RevokeSessionKeyInput<TAccountOwner, TAccountEscrow, TAccountSessionKeyAccount>
config?
programAddress?
TProgramAddress
Returns
RevokeSessionKeyInstruction<TProgramAddress, TAccountOwner, TAccountEscrow, TAccountSessionKeyAccount>
getSubmitAuthorizationInstructionAsync()
getSubmitAuthorizationInstructionAsync<Defined in: generated/instructions/submitAuthorization.ts:191TAccountEscrow,TAccountFacilitator,TAccountSessionKey,TAccountTokenAccount,TAccountPending,TAccountInstructionsSysvar,TAccountSystemProgram,TProgramAddress>(input,config?):Promise<SubmitAuthorizationInstruction<TProgramAddress,TAccountEscrow,TAccountFacilitator,TAccountSessionKey,TAccountTokenAccount,TAccountPending,TAccountInstructionsSysvar,TAccountSystemProgram, []>>
Type Parameters
TAccountEscrow
TAccountEscrow extends string
TAccountFacilitator
TAccountFacilitator extends string
TAccountSessionKey
TAccountSessionKey extends string
TAccountTokenAccount
TAccountTokenAccount extends string
TAccountPending
TAccountPending extends string
TAccountInstructionsSysvar
TAccountInstructionsSysvar extends string
TAccountSystemProgram
TAccountSystemProgram extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
SubmitAuthorizationAsyncInput<TAccountEscrow, TAccountFacilitator, TAccountSessionKey, TAccountTokenAccount, TAccountPending, TAccountInstructionsSysvar, TAccountSystemProgram>
config?
programAddress?
TProgramAddress
Returns
Promise<SubmitAuthorizationInstruction<TProgramAddress, TAccountEscrow, TAccountFacilitator, TAccountSessionKey, TAccountTokenAccount, TAccountPending, TAccountInstructionsSysvar, TAccountSystemProgram, []>>
getVoidPendingInstruction()
getVoidPendingInstruction<Defined in: generated/instructions/voidPending.ts:117TAccountEscrow,TAccountAuthority,TAccountFacilitator,TAccountPending,TProgramAddress>(input,config?):VoidPendingInstruction<TProgramAddress,TAccountEscrow,TAccountAuthority,TAccountFacilitator,TAccountPending>
Type Parameters
TAccountEscrow
TAccountEscrow extends string
TAccountAuthority
TAccountAuthority extends string
TAccountFacilitator
TAccountFacilitator extends string
TAccountPending
TAccountPending extends string
TProgramAddress
TProgramAddress extends Address = Address<"EcfUgNgDXmBx4Xns2qZLE54xpM7V1N6PL8MdDW1syujS">
Parameters
input
VoidPendingInput<TAccountEscrow, TAccountAuthority, TAccountFacilitator, TAccountPending>
config?
programAddress?
TProgramAddress
Returns
VoidPendingInstruction<TProgramAddress, TAccountEscrow, TAccountAuthority, TAccountFacilitator, TAccountPending>
serializePaymentAuthorization()
serializePaymentAuthorization(Defined in: authorization.ts:33 Serializes a payment authorization into the binary format expected by the Flex on-chain program for Ed25519 signature verification.args):Uint8Array<ArrayBuffer>
Parameters
args
SerializePaymentAuthorizationArgs
Authorization fields to serialize
Returns
Uint8Array<ArrayBuffer>
The serialized message bytes
signPaymentAuthorization()
signPaymentAuthorization(Defined in: authorization.ts:63 Signs a serialized payment authorization using the Web Crypto Ed25519 API.args):Promise<Uint8Array<ArrayBuffer>>
Parameters
args
The message bytes and the session key pairkeyPair
CryptoKeyPair
message
Uint8Array<ArrayBuffer>
Returns
Promise<Uint8Array<ArrayBuffer>>
The 64-byte Ed25519 signature