Documentation
¶
Index ¶
- Constants
- Variables
- func GetDecompressInstructionArgsSize(args *DecompressInstructionArgs) int
- func GetMemoryAccountAddress(args *GetMemoryAccountAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetMerkleTreeSize(levels int) int
- func GetPageSizeFromMemoryLayout(layout MemoryLayout) uint32
- func GetRecentRootsSize(length int) int
- func GetRelayAccountAddress(args *GetRelayAccountAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetRelayCommitmentAddress(args *GetRelayCommitmentAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetRelayDestinationAddress(args *GetRelayDestinationAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetRelayProofAddress(args *GetRelayProofAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetSliceAllocatorSize(capacity, itemSize int) int
- func GetStorageAccountAddress(args *GetMemoryAccountAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVirtualAccountSize(accountType VirtualAccountType) uint32
- func GetVirtualAccountSizeInMemory(accountType VirtualAccountType) uint32
- func GetVirtualDurableNonceAddress(args *GetVirtualDurableNonceAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVirtualTimelockAccountAddress(args *GetVirtualTimelockAccountAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVirtualTimelockVaultAddress(args *GetVirtualTimelockVaultAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVmAddress(args *GetVmAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVmDepositAddress(args *GetVmDepositAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVmObnibusAddress(args *GetVmObnibusAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetVmUnlockStateAccountAddress(args *GetVmUnlockStateAccountAddressArgs) (ed25519.PublicKey, uint8, error)
- func GetWithdrawReceiptAccountAddress(args *GetWithdrawReceiptAccountAddressArgs) (ed25519.PublicKey, uint8, error)
- func NewCompressInstruction(accounts *CompressInstructionAccounts, args *CompressInstructionArgs) solana.Instruction
- func NewDecompressInstruction(accounts *DecompressInstructionAccounts, args *DecompressInstructionArgs) solana.Instruction
- func NewDepositInstruction(accounts *DepositInstructionAccounts, args *DepositInstructionArgs) solana.Instruction
- func NewExecInstruction(accounts *ExecInstructionAccounts, args *ExecInstructionArgs) solana.Instruction
- func NewInitMemoryInstruction(accounts *InitMemoryInstructionAccounts, args *InitMemoryInstructionArgs) solana.Instruction
- func NewInitNonceInstruction(accounts *InitNonceInstructionAccounts, args *InitNonceInstructionArgs) solana.Instruction
- func NewInitRelayInstruction(accounts *InitRelayInstructionAccounts, args *InitRelayInstructionArgs) solana.Instruction
- func NewInitStorageInstruction(accounts *InitStorageInstructionAccounts, args *InitStorageInstructionArgs) solana.Instruction
- func NewInitTimelockInstruction(accounts *InitTimelockInstructionAccounts, args *InitTimelockInstructionArgs) solana.Instruction
- func NewInitUnlockInstruction(accounts *InitUnlockInstructionAccounts, args *InitUnlockInstructionArgs) solana.Instruction
- func NewInitVmInstruction(accounts *InitVmInstructionAccounts, args *InitVmInstructionArgs) solana.Instruction
- func NewRelaySaveRecentRootInstruction(accounts *RelaySaveRecentRootInstructionAccounts, ...) solana.Instruction
- func NewResizeMemoryInstruction(accounts *ResizeMemoryInstructionAccounts, args *ResizeMemoryInstructionArgs) solana.Instruction
- type AccountType
- type AirdropVirtualInstructionArgs
- type CodeInstruction
- type CodeVmAccount
- type CompactMessage
- type CompressInstructionAccounts
- type CompressInstructionArgs
- type ConditionalTransferVirtualInstructionArgs
- type DecompressInstructionAccounts
- type DecompressInstructionArgs
- type DepositInstructionAccounts
- type DepositInstructionArgs
- type ExecArgsAndAccounts
- type ExecInstructionAccounts
- type ExecInstructionArgs
- type ExternalRelayVirtualInstructionArgs
- type ExternalTransferVirtualInstructionArgs
- type ExternalWithdrawVirtualInstructionArgs
- type GetCompactAirdropMessageArgs
- type GetCompactTransferMessageArgs
- type GetCompactWithdrawMessageArgs
- type GetMemoryAccountAddressArgs
- type GetRelayAccountAddressArgs
- type GetRelayCommitmentAddressArgs
- type GetRelayDestinationAddressArgs
- type GetRelayProofAddressArgs
- type GetStorageAccountAddressArgs
- type GetVirtualDurableNonceAddressArgs
- type GetVirtualTimelockAccountAddressArgs
- type GetVirtualTimelockVaultAddressArgs
- type GetVmAddressArgs
- type GetVmDepositAddressArgs
- type GetVmObnibusAddressArgs
- type GetVmUnlockStateAccountAddressArgs
- type GetWithdrawReceiptAccountAddressArgs
- type Hash
- type HashArray
- type InitMemoryInstructionAccounts
- type InitMemoryInstructionArgs
- type InitNonceInstructionAccounts
- type InitNonceInstructionArgs
- type InitRelayInstructionAccounts
- type InitRelayInstructionArgs
- type InitStorageInstructionAccounts
- type InitStorageInstructionArgs
- type InitTimelockInstructionAccounts
- type InitTimelockInstructionArgs
- type InitUnlockInstructionAccounts
- type InitUnlockInstructionArgs
- type InitVmInstructionAccounts
- type InitVmInstructionArgs
- type ItemState
- type ItemStateArray
- type MemoryAccount
- type MemoryAccountWithData
- type MemoryAllocator
- type MemoryLayout
- type MemoryVersion
- type MerkleTree
- type Message
- type Opcode
- type RecentRoots
- type RelayAccount
- type RelaySaveRecentRootInstructionAccounts
- type RelaySaveRecentRootInstructionArgs
- type RelayVirtualInstructionArgs
- type ResizeMemoryInstructionAccounts
- type ResizeMemoryInstructionArgs
- type Signature
- type SliceAllocator
- type TimelockState
- type TokenPool
- type TransferVirtualInstructionArgs
- type UnlockStateAccount
- type VirtualAccountType
- type VirtualDurableNonce
- type VirtualInstruction
- func NewAirdropVirtualInstruction(args *AirdropVirtualInstructionArgs) VirtualInstruction
- func NewConditionalTransferVirtualInstruction(args *ConditionalTransferVirtualInstructionArgs) VirtualInstruction
- func NewExternalRelayVirtualInstruction(args *ExternalRelayVirtualInstructionArgs) VirtualInstruction
- func NewExternalTransferVirtualInstruction(args *TransferVirtualInstructionArgs) VirtualInstruction
- func NewExternalWithdrawVirtualInstruction(args *ExternalWithdrawVirtualInstructionArgs) VirtualInstruction
- func NewRelayVirtualInstruction(args *RelayVirtualInstructionArgs) VirtualInstruction
- func NewTransferVirtualInstruction(args *TransferVirtualInstructionArgs) VirtualInstruction
- func NewWithdrawVirtualInstruction(args *WithdrawVirtualInstructionArgs) VirtualInstruction
- type VirtualRelayAccount
- type VirtualTimelockAccount
- type WithdrawVirtualInstructionArgs
Constants ¶
View Source
const ( DefaultRelayStateDepth = 63 DefaultRelayHistoryItems = 32 MaxRelayAccountNameSize = 32 )
View Source
const ( DefaultCompressedStateDepth = 20 MaxStorageAccountNameSize = 32 )
View Source
const ( AirdropVirtrualInstructionDataSize = (SignatureSize + 8 + 1) // count )
View Source
const ( CodeVmAccountSize = (8 + 32 + 32 + 8 + HashSize + TokenPoolSize + 1 + 1 + 5) // padding )
View Source
const ( CompressInstructionArgsSize = (2 + SignatureSize) // signature )
View Source
const ( ConditionalTransferVirtrualInstructionDataSize = (SignatureSize + 8) // amount )
View Source
const ( DepositInstructionArgsSize = (2 + 8 + 1) // bump )
View Source
const ( ExternalRelayVirtrualInstructionDataSize = (8 + HashSize + HashSize + HashSize) // commitment )
View Source
const ( ExternalTransferVirtrualInstructionDataSize = (SignatureSize + 8) // amount )
View Source
const (
ExternalWithdrawVirtrualInstructionDataSize = SignatureSize // signature
)
View Source
const HashSize = 32
View Source
const ( InitMemoryInstructionArgsSize = (MaxMemoryAccountNameLength + 4 + 2 + 1) // vm_memory_bump )
View Source
const (
InitNonceInstructionArgsSize = 2 // account_index
)
View Source
const ( InitRelayInstructionArgsSize = (MaxRelayAccountNameSize + 1 + 1) // relay_vault_bump )
View Source
const ( InitStorageInstructionArgsSize = (MaxStorageAccountNameLength + 1) // vm_storage_bump )
View Source
const ( InitTimelockInstructionArgsSize = (2 + 1 + 1 + 1) // vm_unlock_pda_bump )
View Source
const (
InitUnlockInstructionArgsSize = 0
)
View Source
const ( InitVmInstructionArgsSize = (1 + 1 + 1) // vm_omnibus_bump )
View Source
const (
ItemStateSize = 1
)
View Source
const (
MaxMemoryAccountNameLength = 32
)
View Source
const (
MaxStorageAccountNameLength = 32
)
View Source
const MemoryAccountSize = (8 + 32 + MaxMemoryAccountNameLength + 1 + 1 + 2 + 4) // num_accounts
View Source
const (
MemoryV0NumAccounts = 32_000
)
View Source
const ( MinDecompressInstructionArgsSize = (8 + 2 + 4 + 4 + SignatureSize) // signature )
View Source
const (
RelaySaveRecentRootInstructionArgsSize = 0
)
View Source
const ( RelayVirtrualInstructionDataSize = (8 + HashSize + HashSize + HashSize) // commitment )
View Source
const (
ResizeMemoryInstructionArgsSize = 4 // account_size
)
View Source
const SignatureSize = 64
View Source
const (
TimelockDataVersion1 = 3
)
View Source
const ( TokenPoolSize = (32 + 1) // vault_bump )
View Source
const ( TransferVirtrualInstructionDataSize = (SignatureSize + 8) // amount )
View Source
const ( UnlockStateAccountSize = (8 + 32 + 32 + 32 + 1 + 1 + 6) // padding )
View Source
const VirtualDurableNonceSize = (32 + 32) // hash
View Source
const VirtualRelayAccountSize = (32 + 32) // destination
View Source
const VirtualTimelockAccountSize = (32 + 32 + 1 + 1 + 1 + 8 + 1) // bump
View Source
const (
WithdrawVirtrualInstructionDataSize = SignatureSize // signature
)
Variables ¶
View Source
var ( CodeVmPrefix = []byte("code_vm") VmOmnibusPrefix = []byte("vm_omnibus") VmMemoryPrefix = []byte("vm_memory_account") VmStoragePrefix = []byte("vm_storage_account") VmDurableNoncePrefix = []byte("vm_durable_nonce") VmUnlockPdaPrefix = []byte("vm_unlock_pda_account") VmWithdrawReceiptPrefix = []byte("vm_withdraw_receipt_account") VmDepositPdaPrefix = []byte("vm_deposit_pda") VmRelayPrefix = []byte("vm_relay_account") VmRelayProofPrefix = []byte("vm_proof_account") VmRelayVaultPrefix = []byte("vm_relay_vault") VmRelayCommitmentPrefix = []byte("relay_commitment") VmTimelockStatePrefix = []byte("timelock_state") VmTimelockVaultPrefix = []byte("timelock_vault") )
View Source
var ( ErrInvalidProgram = errors.New("invalid program id") ErrInvalidAccountData = errors.New("unexpected account data") ErrInvalidVirtualAccountData = errors.New("unexpected virtual account data") ErrInvalidVirtualAccountType = errors.New("unexpected virtual account type") ErrInvalidInstructionData = errors.New("unexpected instruction data") )
View Source
var ( PROGRAM_ADDRESS = mustBase58Decode("vmZ1WUq8SxjBWcaeTCvgJRZbS84R61uniFsQy5YMRTJ") PROGRAM_ID = ed25519.PublicKey(PROGRAM_ADDRESS) )
View Source
var ( SYSTEM_PROGRAM_ID = ed25519.PublicKey(mustBase58Decode("11111111111111111111111111111111")) SPL_TOKEN_PROGRAM_ID = ed25519.PublicKey(mustBase58Decode("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")) TIMELOCK_PROGRAM_ID = ed25519.PublicKey(mustBase58Decode("time2Z2SCnn3qYg3ULKVtdkh8YmZ5jFdKicnA1W2YnJ")) SPLITTER_PROGRAM_ID = ed25519.PublicKey(mustBase58Decode("spLit2eb13Tz93if6aJM136nUWki5PVUsoEjcUjwpwW")) SYSVAR_RENT_PUBKEY = ed25519.PublicKey(mustBase58Decode("SysvarRent111111111111111111111111111111111")) )
View Source
var CodeVmAccountDiscriminator = []byte{byte(AccountTypeCodeVm), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
View Source
var MemoryAccountDiscriminator = []byte{byte(AccountTypeMemory), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
View Source
var (
MerkleTreePrefix = []byte("merkletree")
)
View Source
var RelayAccountDiscriminator = []byte{byte(AccountTypeRelay), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
View Source
var ( RelayAccountSize = (8 + 32 + MaxRelayAccountNameSize + TokenPoolSize + 1 + 1 + 1 + 4 + GetRecentRootsSize(DefaultRelayHistoryItems) + GetMerkleTreeSize(DefaultRelayStateDepth)) // history )
View Source
var UnlockStateAccountDiscriminator = []byte{byte(AccountTypeUnlockState), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
Functions ¶
func GetDecompressInstructionArgsSize ¶
func GetDecompressInstructionArgsSize(args *DecompressInstructionArgs) int
func GetMemoryAccountAddress ¶
func GetMemoryAccountAddress(args *GetMemoryAccountAddressArgs) (ed25519.PublicKey, uint8, error)
func GetMerkleTreeSize ¶
func GetPageSizeFromMemoryLayout ¶
func GetPageSizeFromMemoryLayout(layout MemoryLayout) uint32
func GetRecentRootsSize ¶
func GetRelayAccountAddress ¶
func GetRelayAccountAddress(args *GetRelayAccountAddressArgs) (ed25519.PublicKey, uint8, error)
func GetRelayCommitmentAddress ¶
func GetRelayCommitmentAddress(args *GetRelayCommitmentAddressArgs) (ed25519.PublicKey, uint8, error)
func GetRelayDestinationAddress ¶
func GetRelayDestinationAddress(args *GetRelayDestinationAddressArgs) (ed25519.PublicKey, uint8, error)
func GetRelayProofAddress ¶
func GetRelayProofAddress(args *GetRelayProofAddressArgs) (ed25519.PublicKey, uint8, error)
func GetSliceAllocatorSize ¶
func GetStorageAccountAddress ¶
func GetStorageAccountAddress(args *GetMemoryAccountAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVirtualAccountSize ¶
func GetVirtualAccountSize(accountType VirtualAccountType) uint32
func GetVirtualAccountSizeInMemory ¶
func GetVirtualAccountSizeInMemory(accountType VirtualAccountType) uint32
func GetVirtualDurableNonceAddress ¶
func GetVirtualDurableNonceAddress(args *GetVirtualDurableNonceAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVirtualTimelockAccountAddress ¶
func GetVirtualTimelockAccountAddress(args *GetVirtualTimelockAccountAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVirtualTimelockVaultAddress ¶
func GetVirtualTimelockVaultAddress(args *GetVirtualTimelockVaultAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVmAddress ¶
func GetVmAddress(args *GetVmAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVmDepositAddress ¶
func GetVmDepositAddress(args *GetVmDepositAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVmObnibusAddress ¶
func GetVmObnibusAddress(args *GetVmObnibusAddressArgs) (ed25519.PublicKey, uint8, error)
func GetVmUnlockStateAccountAddress ¶
func GetVmUnlockStateAccountAddress(args *GetVmUnlockStateAccountAddressArgs) (ed25519.PublicKey, uint8, error)
func GetWithdrawReceiptAccountAddress ¶
func GetWithdrawReceiptAccountAddress(args *GetWithdrawReceiptAccountAddressArgs) (ed25519.PublicKey, uint8, error)
func NewCompressInstruction ¶
func NewCompressInstruction( accounts *CompressInstructionAccounts, args *CompressInstructionArgs, ) solana.Instruction
func NewDecompressInstruction ¶
func NewDecompressInstruction( accounts *DecompressInstructionAccounts, args *DecompressInstructionArgs, ) solana.Instruction
func NewDepositInstruction ¶
func NewDepositInstruction( accounts *DepositInstructionAccounts, args *DepositInstructionArgs, ) solana.Instruction
func NewExecInstruction ¶
func NewExecInstruction( accounts *ExecInstructionAccounts, args *ExecInstructionArgs, ) solana.Instruction
func NewInitMemoryInstruction ¶
func NewInitMemoryInstruction( accounts *InitMemoryInstructionAccounts, args *InitMemoryInstructionArgs, ) solana.Instruction
func NewInitNonceInstruction ¶
func NewInitNonceInstruction( accounts *InitNonceInstructionAccounts, args *InitNonceInstructionArgs, ) solana.Instruction
func NewInitRelayInstruction ¶
func NewInitRelayInstruction( accounts *InitRelayInstructionAccounts, args *InitRelayInstructionArgs, ) solana.Instruction
func NewInitStorageInstruction ¶
func NewInitStorageInstruction( accounts *InitStorageInstructionAccounts, args *InitStorageInstructionArgs, ) solana.Instruction
func NewInitTimelockInstruction ¶
func NewInitTimelockInstruction( accounts *InitTimelockInstructionAccounts, args *InitTimelockInstructionArgs, ) solana.Instruction
func NewInitUnlockInstruction ¶
func NewInitUnlockInstruction( accounts *InitUnlockInstructionAccounts, args *InitUnlockInstructionArgs, ) solana.Instruction
func NewInitVmInstruction ¶
func NewInitVmInstruction( accounts *InitVmInstructionAccounts, args *InitVmInstructionArgs, ) solana.Instruction
func NewRelaySaveRecentRootInstruction ¶
func NewRelaySaveRecentRootInstruction( accounts *RelaySaveRecentRootInstructionAccounts, args *RelaySaveRecentRootInstructionArgs, ) solana.Instruction
func NewResizeMemoryInstruction ¶
func NewResizeMemoryInstruction( accounts *ResizeMemoryInstructionAccounts, args *ResizeMemoryInstructionArgs, ) solana.Instruction
Types ¶
type AccountType ¶
type AccountType uint8
const ( AccountTypeUnknown AccountType = iota AccountTypeCodeVm AccountTypeMemory AccountTypeStorage AccountTypeRelay AccountTypeUnlockState AccountTypeWithdrawReceipt )
type CodeInstruction ¶
type CodeInstruction uint8
const ( Unknown CodeInstruction = iota CodeInstructionInitVm CodeInstructionInitMemory CodeInstructionInitStorage CodeInstructionInitRelay CodeInstructionInitNonce CodeInstructionInitTimelock CodeInstructionInitUnlock CodeInstructionExec CodeInstructionCompress CodeInstructionDecompress CodeInstructionResizeMemory CodeInstructionSnapshot CodeInstructionDeposit CodeInstructionWithdraw CodeInstructionUnlockI )
type CodeVmAccount ¶
type CodeVmAccount struct { Authority ed25519.PublicKey Mint ed25519.PublicKey Slot uint64 Poh Hash Omnibus TokenPool LockDuration uint8 Bump uint8 }
func (*CodeVmAccount) String ¶
func (obj *CodeVmAccount) String() string
func (*CodeVmAccount) Unmarshal ¶
func (obj *CodeVmAccount) Unmarshal(data []byte) error
type CompactMessage ¶
type CompactMessage Hash
func GetCompactAirdropMessage ¶
func GetCompactAirdropMessage(args *GetCompactAirdropMessageArgs) CompactMessage
func GetCompactTransferMessage ¶
func GetCompactTransferMessage(args *GetCompactTransferMessageArgs) CompactMessage
func GetCompactWithdrawMessage ¶
func GetCompactWithdrawMessage(args *GetCompactWithdrawMessageArgs) CompactMessage
type CompressInstructionArgs ¶
type DepositInstructionArgs ¶
type ExecArgsAndAccounts ¶
type ExecArgsAndAccounts struct { Args ExecInstructionArgs Accounts ExecInstructionAccounts }
type ExecInstructionAccounts ¶
type ExecInstructionAccounts struct { VmAuthority ed25519.PublicKey Vm ed25519.PublicKey VmMemA *ed25519.PublicKey VmMemB *ed25519.PublicKey VmMemC *ed25519.PublicKey VmMemD *ed25519.PublicKey VmOmnibus *ed25519.PublicKey VmRelay *ed25519.PublicKey VmRelayVault *ed25519.PublicKey ExternalAddress *ed25519.PublicKey }
type ExecInstructionArgs ¶
type ExternalWithdrawVirtualInstructionArgs ¶
type ExternalWithdrawVirtualInstructionArgs struct {
Signature Signature
}
type GetVmAddressArgs ¶
type GetVmDepositAddressArgs ¶
type GetVmObnibusAddressArgs ¶
type InitNonceInstructionArgs ¶
type InitNonceInstructionArgs struct {
AccountIndex uint16
}
type InitUnlockInstructionArgs ¶
type InitUnlockInstructionArgs struct { }
type InitVmInstructionArgs ¶
type ItemStateArray ¶
type ItemStateArray []ItemState
func (ItemStateArray) String ¶
func (obj ItemStateArray) String() string
type MemoryAccount ¶
type MemoryAccount struct { Vm ed25519.PublicKey Name string Bump uint8 Version MemoryVersion AccountSize uint16 NumAccounts uint32 }
func (*MemoryAccount) String ¶
func (obj *MemoryAccount) String() string
func (*MemoryAccount) Unmarshal ¶
func (obj *MemoryAccount) Unmarshal(data []byte) error
type MemoryAccountWithData ¶
type MemoryAccountWithData struct { Vm ed25519.PublicKey Name string Bump uint8 Version MemoryVersion AccountSize uint16 NumAccounts uint32 Data SliceAllocator // todo: support other implementations }
func (*MemoryAccountWithData) String ¶
func (obj *MemoryAccountWithData) String() string
func (*MemoryAccountWithData) Unmarshal ¶
func (obj *MemoryAccountWithData) Unmarshal(data []byte) error
type MemoryAllocator ¶
type MemoryLayout ¶
type MemoryLayout uint8
const ( MemoryLayoutUnknown MemoryLayout = iota MemoryLayoutTimelock MemoryLayoutNonce MemoryLayoutRelay )
type MemoryVersion ¶
type MemoryVersion uint8
const ( MemoryVersionV0 MemoryVersion = iota MemoryVersionV1 )
type MerkleTree ¶
func (*MerkleTree) String ¶
func (obj *MerkleTree) String() string
type RecentRoots ¶
func (*RecentRoots) String ¶
func (obj *RecentRoots) String() string
type RelayAccount ¶
type RelayAccount struct { Vm ed25519.PublicKey Name string Treasury TokenPool Bump uint8 NumLevels uint8 NumHistory uint8 History MerkleTree RecentRoots RecentRoots }
func (*RelayAccount) String ¶
func (obj *RelayAccount) String() string
func (*RelayAccount) Unmarshal ¶
func (obj *RelayAccount) Unmarshal(data []byte) error
type RelaySaveRecentRootInstructionArgs ¶
type RelaySaveRecentRootInstructionArgs struct { }
type ResizeMemoryInstructionArgs ¶
type ResizeMemoryInstructionArgs struct {
AccountSize uint32
}
type Signature ¶
type Signature [SignatureSize]byte
type SliceAllocator ¶
type SliceAllocator struct { State ItemStateArray Data [][]byte }
func (*SliceAllocator) IsAllocated ¶
func (obj *SliceAllocator) IsAllocated(index int) bool
func (*SliceAllocator) String ¶
func (obj *SliceAllocator) String() string
type TimelockState ¶
type TimelockState uint8
const ( TimelockStateUnknown TimelockState = iota TimelockStateUnlocked TimelockStateWaitingForTimeout )
func (TimelockState) String ¶
func (s TimelockState) String() string
type UnlockStateAccount ¶
type UnlockStateAccount struct { Vm ed25519.PublicKey Owner ed25519.PublicKey Address ed25519.PublicKey UnlockAt int64 Bump uint8 State TimelockState }
func (*UnlockStateAccount) IsUnlocked ¶
func (obj *UnlockStateAccount) IsUnlocked() bool
func (*UnlockStateAccount) String ¶
func (obj *UnlockStateAccount) String() string
func (*UnlockStateAccount) Unmarshal ¶
func (obj *UnlockStateAccount) Unmarshal(data []byte) error
type VirtualAccountType ¶
type VirtualAccountType uint8
const ( VirtualAccountTypeDurableNonce VirtualAccountType = iota VirtualAccountTypeTimelock VirtualAccountTypeRelay )
func GetVirtualAccountTypeFromMemoryLayout ¶
func GetVirtualAccountTypeFromMemoryLayout(layout MemoryLayout) (VirtualAccountType, error)
type VirtualDurableNonce ¶
func (*VirtualDurableNonce) Marshal ¶
func (obj *VirtualDurableNonce) Marshal() []byte
func (*VirtualDurableNonce) String ¶
func (obj *VirtualDurableNonce) String() string
func (*VirtualDurableNonce) UnmarshalDirectly ¶
func (obj *VirtualDurableNonce) UnmarshalDirectly(data []byte) error
func (*VirtualDurableNonce) UnmarshalFromMemory ¶
func (obj *VirtualDurableNonce) UnmarshalFromMemory(data []byte) error
type VirtualInstruction ¶
func NewAirdropVirtualInstruction ¶
func NewAirdropVirtualInstruction( args *AirdropVirtualInstructionArgs, ) VirtualInstruction
func NewConditionalTransferVirtualInstruction ¶
func NewConditionalTransferVirtualInstruction( args *ConditionalTransferVirtualInstructionArgs, ) VirtualInstruction
func NewExternalRelayVirtualInstruction ¶
func NewExternalRelayVirtualInstruction( args *ExternalRelayVirtualInstructionArgs, ) VirtualInstruction
func NewExternalTransferVirtualInstruction ¶
func NewExternalTransferVirtualInstruction( args *TransferVirtualInstructionArgs, ) VirtualInstruction
func NewExternalWithdrawVirtualInstruction ¶
func NewExternalWithdrawVirtualInstruction( args *ExternalWithdrawVirtualInstructionArgs, ) VirtualInstruction
func NewRelayVirtualInstruction ¶
func NewRelayVirtualInstruction( args *RelayVirtualInstructionArgs, ) VirtualInstruction
func NewTransferVirtualInstruction ¶
func NewTransferVirtualInstruction( args *TransferVirtualInstructionArgs, ) VirtualInstruction
func NewWithdrawVirtualInstruction ¶
func NewWithdrawVirtualInstruction( args *WithdrawVirtualInstructionArgs, ) VirtualInstruction
type VirtualRelayAccount ¶
func (*VirtualRelayAccount) Marshal ¶
func (obj *VirtualRelayAccount) Marshal() []byte
func (*VirtualRelayAccount) String ¶
func (obj *VirtualRelayAccount) String() string
func (*VirtualRelayAccount) UnmarshalDirectly ¶
func (obj *VirtualRelayAccount) UnmarshalDirectly(data []byte) error
func (*VirtualRelayAccount) UnmarshalFromMemory ¶
func (obj *VirtualRelayAccount) UnmarshalFromMemory(data []byte) error
type VirtualTimelockAccount ¶
type VirtualTimelockAccount struct { Owner ed25519.PublicKey Nonce Hash TokenBump uint8 UnlockBump uint8 WithdrawBump uint8 Balance uint64 Bump uint8 }
func (*VirtualTimelockAccount) Marshal ¶
func (obj *VirtualTimelockAccount) Marshal() []byte
func (*VirtualTimelockAccount) String ¶
func (obj *VirtualTimelockAccount) String() string
func (*VirtualTimelockAccount) UnmarshalDirectly ¶
func (obj *VirtualTimelockAccount) UnmarshalDirectly(data []byte) error
func (*VirtualTimelockAccount) UnmarshalFromMemory ¶
func (obj *VirtualTimelockAccount) UnmarshalFromMemory(data []byte) error
type WithdrawVirtualInstructionArgs ¶
type WithdrawVirtualInstructionArgs struct {
Signature Signature
}
Source Files
¶
- accounts_code_vm.go
- accounts_memory_account.go
- accounts_relay.go
- accounts_storage.go
- accounts_unlock_state.go
- address.go
- instructions_compress.go
- instructions_decompress.go
- instructions_exec.go
- instructions_init_memory.go
- instructions_init_nonce.go
- instructions_init_relay.go
- instructions_init_storage.go
- instructions_init_timelock.go
- instructions_init_unlock.go
- instructions_init_vm.go
- instructions_resize_memory.go
- instructions_snapshot.go
- instructions_timelock_deposit.go
- program.go
- transaction.go
- types_account_type.go
- types_code_instruction.go
- types_hash.go
- types_item_state.go
- types_memory_allocator.go
- types_memory_layout.go
- types_memory_version.go
- types_merkle_tree.go
- types_message.go
- types_opcode.go
- types_recent_roots.go
- types_signature.go
- types_slice_allocator.go
- types_timelock_state.go
- types_token_pool.go
- types_virtual_account_type.go
- utils.go
- virtual_accounts.go
- virtual_accounts_durable_nonce.go
- virtual_accounts_relay_account.go
- virtual_accounts_timelock_account.go
- virtual_instructions.go
- virtual_instructions_airdrop.go
- virtual_instructions_conditional_transfer.go
- virtual_instructions_external_relay.go
- virtual_instructions_external_transfer.go
- virtual_instructions_external_withdraw.go
- virtual_instructions_relay.go
- virtual_instructions_transfer.go
- virtual_instructions_withdraw.go
Click to show internal directories.
Click to hide internal directories.