Documentation
¶
Index ¶
- Variables
- func MakeCompressAccountTransaction(nonce *common.Account, bh solana.Blockhash, vm *common.Account, ...) (solana.Transaction, error)
- func MakeExternalTransferWithAuthorityTransaction(nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, ...) (solana.Transaction, error)
- func MakeExternalWithdrawTransaction(nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, ...) (solana.Transaction, error)
- func MakeInternalTransferWithAuthorityTransaction(nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, ...) (solana.Transaction, error)
- func MakeInternalWithdrawTransaction(nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, ...) (solana.Transaction, error)
- func MakeNoncedTransaction(nonce *common.Account, bh solana.Blockhash, instructions ...solana.Instruction) (solana.Transaction, error)
- func MakeOpenAccountTransaction(nonce *common.Account, bh solana.Blockhash, memory *common.Account, ...) (solana.Transaction, error)
- type MergedMemoryBankResult
- type SelectedNonce
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoAvailableNonces = errors.New("no available nonces")
)
Functions ¶
func MakeExternalTransferWithAuthorityTransaction ¶
func MakeExternalTransferWithAuthorityTransaction( nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, vm *common.Account, vmOmnibus *common.Account, nonceMemory *common.Account, nonceIndex uint16, sourceMemory *common.Account, sourceIndex uint16, externalDestination *common.Account, kinAmountInQuarks uint64, ) (solana.Transaction, error)
func MakeExternalWithdrawTransaction ¶
func MakeExternalWithdrawTransaction( nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, vm *common.Account, vmOmnibus *common.Account, nonceMemory *common.Account, nonceIndex uint16, sourceMemory *common.Account, sourceIndex uint16, externalDestination *common.Account, ) (solana.Transaction, error)
func MakeInternalTransferWithAuthorityTransaction ¶
func MakeInternalTransferWithAuthorityTransaction( nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, vm *common.Account, nonceMemory *common.Account, nonceIndex uint16, sourceMemory *common.Account, sourceIndex uint16, destinationMemory *common.Account, destinationIndex uint16, kinAmountInQuarks uint64, ) (solana.Transaction, error)
func MakeInternalWithdrawTransaction ¶
func MakeInternalWithdrawTransaction( nonce *common.Account, bh solana.Blockhash, virtualSignature solana.Signature, vm *common.Account, nonceMemory *common.Account, nonceIndex uint16, sourceMemory *common.Account, sourceIndex uint16, destinationMemory *common.Account, destinationIndex uint16, ) (solana.Transaction, error)
func MakeNoncedTransaction ¶
func MakeNoncedTransaction(nonce *common.Account, bh solana.Blockhash, instructions ...solana.Instruction) (solana.Transaction, error)
MakeNoncedTransaction makes a transaction that's backed by a nonce. The returned transaction is not signed.
Types ¶
type MergedMemoryBankResult ¶
type MergedMemoryBankResult struct { A *ed25519.PublicKey B *ed25519.PublicKey C *ed25519.PublicKey D *ed25519.PublicKey Indices []uint8 }
func MergeMemoryBanks ¶
func MergeMemoryBanks(accounts ...*common.Account) (*MergedMemoryBankResult, error)
type SelectedNonce ¶
type SelectedNonce struct { Account *common.Account Blockhash solana.Blockhash // contains filtered or unexported fields }
SelectedNonce is a nonce that is available and selected for use in a transaction. Implementations should unlock the lock after using the nonce. If used, its state must be updated as reserved.
func SelectAvailableNonce ¶
func SelectAvailableNonce(ctx context.Context, data code_data.Provider, env nonce.Environment, instance string, useCase nonce.Purpose) (*SelectedNonce, error)
SelectAvailableNonce selects an available from the nonce pool within an environment for the specified use case. The returned nonce is marked as reserved without a signature, so it cannot be selected again. It's the responsibility of the external caller to make it available again if it doesn't get assigned a fulfillment.
func (*SelectedNonce) MarkReservedWithSignature ¶
func (n *SelectedNonce) MarkReservedWithSignature(ctx context.Context, sig string) error
MarkReservedWithSignature marks the nonce as reserved with a signature
func (*SelectedNonce) ReleaseIfNotReserved ¶
func (n *SelectedNonce) ReleaseIfNotReserved() error
ReleaseIfNotReserved makes a nonce available if it hasn't been reserved with a signature. It's recommended to call this in tandem with Unlock when the caller knows it's safe to go from the reserved to available state (ie. don't use this in uprade flows!).
func (*SelectedNonce) Unlock ¶
func (n *SelectedNonce) Unlock()