Documentation ¶
Index ¶
- type AccountInfo
- type AccountInfoWithCtx
- type AccountNotifies
- type AccountWithLamport
- type AccountsInfoWithCtx
- type BalanceWithCtx
- type BlockCommitment
- type BlockInfo
- type BlockNotifies
- type BlockProduction
- type BlockProductionWithCtx
- type BlockReward
- type BlockTransaction
- type ClusterInformation
- type CompiledInstruction
- type ContextSlot
- type DataSlice
- type EnumCirculateFilter
- type EnumEncoding
- type EnumRpcCommitment
- type EnumTxDetailLevel
- type EpochInformation
- type EpochSchedule
- type HighestSnapshotSlot
- type Identity
- type InflationGovernor
- type InflationRate
- type InflationReward
- type InnerInstruction
- type Instruction
- type LastBlock
- type LastBlockWithCtx
- type LoadedAddresses
- type LogsNotifies
- type LogsValue
- type MentionsAccountProgramCfg
- type MentionsCfg
- type Message
- func (m Message) GetProgram(idIndex uint16) common.Address
- func (m *Message) IsSigner(account common.Address) bool
- func (m *Message) IsWritable(account common.Address) bool
- func (m *Message) MarshalBinary() ([]byte, error)
- func (m *Message) Signers() []common.Address
- func (m *Message) UnmarshalBase64(b64 string) error
- func (m *Message) UnmarshalLegacy(decoder *encodbin.Decoder) (err error)
- func (m *Message) UnmarshalV0(decoder *encodbin.Decoder) (err error)
- func (m *Message) UnmarshalWithDecoder(decoder *encodbin.Decoder) (err error)
- func (m *Message) Writable() (out []common.Address)
- type MessageAddressTableLookup
- type MessageAddressTableLookupSlice
- type MessageHeader
- type MessageVersion
- type ProgramAccount
- type ProgramNotifies
- type RawTransaction
- type RpcAccountInfoCfg
- type RpcCombinedCfg
- type RpcCommitmentCfg
- type RpcCommitmentWithEncodingCfg
- type RpcCommitmentWithFilter
- type RpcCommitmentWithIdentity
- type RpcCommitmentWithMinSlotCfg
- type RpcGetBlockContextCfg
- type RpcGetBlockProduction
- type RpcGetTransactionCfg
- type RpcMintWithProgramID
- type RpcPerfSample
- type RpcPrioritizationFee
- type RpcSearchTxHistoryCfg
- type RpcSendTxCfg
- type RpcSignaturesForAddressCfg
- type RpcSupplyCfg
- type RpcVoteAccountCfg
- type RpcVoteAccounts
- type SignatureInfo
- type SignatureNotifies
- type SignatureStatus
- type SignatureStatusWithCtx
- type SlotNotifies
- type SlotRange
- type SolVersion
- type StakeActivation
- type SupplyInfo
- type SupplyWithCtx
- type TokenAccount
- type TokenAccountWithCtx
- type TokenAccountsWithCtx
- type TokenBalance
- type TokenLargestHolders
- type Transaction
- func (tx *Transaction) MarshalBinary() ([]byte, error)
- func (tx *Transaction) Sign(accounts []crypto.Account) (err error)
- func (tx Transaction) ToBase58() (string, error)
- func (tx Transaction) ToBase64() (string, error)
- func (tx *Transaction) UnmarshalBase58(b58 string) error
- func (tx *Transaction) UnmarshalBase64(b64 string) error
- func (tx *Transaction) UnmarshalJSON(input []byte) error
- func (tx *Transaction) UnmarshalWithDecoder(decoder *encodbin.Decoder) (err error)
- type TransactionMeta
- type TxStatus
- type U64ValueWithCtx
- type UiTokenAmount
- type VoteAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { // data associated with the account, either as encoded binary data or JSON format {<program>: <state>} - depending on encoding parameter Data common.SolData `json:"data"` // base-58 encoded Pubkey of the program this account has been assigned to Owner common.Address `json:"owner"` // number of lamports assigned to this account, as an u64 Lamports *big.Int `json:"lamports"` // the epoch at which this account will next owe rent, as u64 RentEpoch *big.Int `json:"rentEpoch"` // boolean indicating if the account contains a program (and is strictly read-only) Executable bool `json:"executable"` // the data size of the account Space uint64 `json:"space,omitempty"` // the data size of the account Size uint64 `json:"size,omitempty"` }
type AccountInfoWithCtx ¶
type AccountInfoWithCtx struct { Context ContextSlot `json:"context"` AccountInfo *AccountInfo `json:"value,omitempty"` }
type AccountNotifies ¶ added in v0.1.1
type AccountNotifies AccountInfoWithCtx
type AccountWithLamport ¶
type AccountsInfoWithCtx ¶
type AccountsInfoWithCtx struct { Context ContextSlot `json:"context"` Accounts []AccountInfo `json:"value,omitempty"` }
type BalanceWithCtx ¶
type BalanceWithCtx struct { Context ContextSlot `json:"context"` Balance *big.Int `json:"value"` }
type BlockCommitment ¶
type BlockCommitment struct { // nil if Unknown block, or array of u64 integers // logging the amount of cluster stake in lamports // that has voted on the block at each depth from 0 to `MAX_LOCKOUT_HISTORY` + 1 Commitment []uint64 `json:"commitment"` // Total active stake, in lamports, of the current epoch. TotalStake uint64 `json:"totalStake"` }
type BlockInfo ¶
type BlockInfo struct { Err json.RawMessage `json:"err"` BlockHeight uint64 `json:"blockHeight"` BlockTime int64 `json:"blockTime"` ParentSlot uint64 `json:"parentSlot"` BlockHash common.Hash `json:"blockHash"` PreviousBlockhash common.Hash `json:"previousBlockhash"` Rewards []BlockReward `json:"rewards"` BlockTransaction []BlockTransaction `json:"transactions"` }
type BlockNotifies ¶ added in v0.1.1
type BlockNotifies struct { Context ContextSlot `json:"context"` BlockInfo BlockInfo `json:"value"` }
type BlockProduction ¶
type BlockProductionWithCtx ¶
type BlockProductionWithCtx struct { Context ContextSlot `json:"context"` BlockProduction BlockProduction `json:"value"` }
type BlockReward ¶
type BlockTransaction ¶
type BlockTransaction struct { // Transaction status metadata object Meta *TransactionMeta `json:"meta"` // The slot this transaction was processed in. Slot uint64 `json:"slot"` // Estimated production time, as Unix timestamp (seconds since the Unix epoch) // of when the transaction was processed. // Nil if not available. BlockTime *int64 `json:"blockTime" bin:"optional"` // Transaction Transaction *Transaction `json:"transaction"` // Version Of Transaction Version uint16 `json:"version"` }
type ClusterInformation ¶
type ClusterInformation struct { // Node public key, as base-58 encoded string PubKey common.Address `json:"pubKey"` // Gossip network address for the node Gossip string `json:"gossip,omitempty"` // TPU network address for the node Tpu string `json:"tpu,omitempty"` // JSON RPC network address for the node, or null if the JSON RPC service is not enabled Rpc string `json:"rpc,omitempty"` // The software version of the node, or null if the version information is not available Version string `json:"version,omitempty"` // The unique identifier of the node's feature set FeatureSet *uint32 `json:"featureSet,omitempty"` // The shred version the node has been configured to use ShredVersion *uint16 `json:"shredVersion,omitempty"` }
type CompiledInstruction ¶
type CompiledInstruction struct { // StackHeight if empty StackHeight *uint16 `json:"stackHeight"` // Index into the message.accountKeys array indicating the program account that executes this instruction. // NOTE: it is actually a uint8, but using a uint16 because uint8 is treated as a byte everywhere, // and that can be an issue. ProgramIDIndex uint16 `json:"programIdIndex"` // List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program. // NOTE: it is actually a []uint8, but using a uint16 because []uint8 is treated as a []byte everywhere, // and that can be an issue. Accounts []uint16 `json:"accounts"` // The program input data encoded in a base-58 string. Data common.Base58 `json:"data"` }
type ContextSlot ¶
type EnumCirculateFilter ¶
type EnumCirculateFilter string
const ( FilterCirculating EnumCirculateFilter = "circulating" FilterNonCirculating EnumCirculateFilter = "nonCirculating" )
filter results by account type
type EnumEncoding ¶
type EnumEncoding string
const ( EncodingBase58 EnumEncoding = "base58" EncodingBase64 EnumEncoding = "base64" EncodingBase64Zstd EnumEncoding = "base64+zstd" EncodingJson EnumEncoding = "json" EncodingJsonParsed EnumEncoding = "jsonParsed" )
base58 base64 base64+zstd jsonParsed
type EnumRpcCommitment ¶
type EnumRpcCommitment string
const ( // RpcCommitmentFinalized the node will query the most recent block confirmed // by supermajority of the cluster as having reached maximum lockout, // meaning the cluster has recognized this block as finalized RpcCommitmentFinalized EnumRpcCommitment = "finalized" // RpcCommitmentConfirmed the node will query the most recent block // that has been voted on by supermajority of the cluster. RpcCommitmentConfirmed EnumRpcCommitment = "confirmed" // RpcCommitmentProcessed the node will query its most recent block. // Note that the block may still be skipped by the cluster. RpcCommitmentProcessed EnumRpcCommitment = "processed" )
Rpc commitment context config
type EnumTxDetailLevel ¶
type EnumTxDetailLevel string
const ( TxDetailLevelNone EnumTxDetailLevel = "none" TxDetailLevelFull EnumTxDetailLevel = "full" TxDetailLevelAccounts EnumTxDetailLevel = "accounts" TxDetailLevelSignatures EnumTxDetailLevel = "signatures" )
level of transaction detail to return
type EpochInformation ¶
type EpochInformation struct { // the current slot AbsoluteSlot uint64 `json:"absoluteSlot"` // the current block height BlockHeight uint64 `json:"blockHeight"` // the current epoch Epoch uint64 `json:"epoch"` // the current slot relative to the start of the current epoch SlotIndex uint64 `json:"slotIndex"` // the number of slots in this epoch SlotsInEpoch uint64 `json:"slotsInEpoch"` // total number of transactions processed without error since genesis TransactionCount *uint64 `json:"transactionCount"` }
type EpochSchedule ¶
type EpochSchedule struct { // the maximum number of slots in each epoch SlotsPerEpoch uint64 `json:"slotsPerEpoch"` // the number of slots before beginning of an epoch to calculate a leader schedule for that epoch LeaderScheduleSlotOffset uint64 `json:"leaderScheduleSlotOffset"` // whether epochs start short and grow Warmup bool `json:"warmup"` // first normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM_SLOTS_PER_EPOCH) FirstNormalEpoch uint64 `json:"firstNormalEpoch"` // MINIMUM_SLOTS_PER_EPOCH * (2.pow(firstNormalEpoch) - 1) FirstNormalSlot uint64 `json:"firstNormalSlot"` }
type HighestSnapshotSlot ¶
type InflationGovernor ¶
type InflationGovernor struct { // the initial inflation percentage from time 0 Initial float64 `json:"initial"` // terminal inflation percentage Terminal float64 `json:"terminal"` // rate per year at which inflation is lowered. (Rate reduction is derived using the target slot time in genesis config) Taper float64 `json:"taper"` // percentage of total inflation allocated to the foundation Foundation float64 `json:"foundation"` // duration of foundation pool inflation in years FoundationTerm float64 `json:"foundationTerm"` }
type InflationRate ¶
type InflationRate struct { // total inflation Total float64 `json:"total"` // inflation allocated to validators Validator float64 `json:"validator"` // inflation allocated to the foundation Foundation float64 `json:"foundation"` // epoch for which these values are valid Epoch uint64 `json:"epoch"` }
type InflationReward ¶
type InflationReward struct { // epoch for which reward occured Epoch uint64 `json:"epoch"` // the slot in which the rewards are effective EffectiveSlot uint64 `json:"effectiveSlot"` // reward amount in lamports Amount uint64 `json:"amount"` // post balance of the account in lamports PostBalance uint64 `json:"postBalance"` // vote account commission when the reward was credited Commission *uint8 `json:"commission,omitempty"` }
type InnerInstruction ¶
type InnerInstruction struct { // Index of the transaction instruction from which the inner instruction(s) originated Index uint16 `json:"index"` // Ordered list of inner program instructions that were invoked during a single transaction instruction. Instructions []CompiledInstruction `json:"instructions"` }
type Instruction ¶ added in v0.0.3
type LastBlockWithCtx ¶
type LastBlockWithCtx struct { Context ContextSlot `json:"context"` LastBlock LastBlock `json:"value"` }
type LoadedAddresses ¶
type LogsNotifies ¶ added in v0.1.1
type LogsNotifies struct { Context ContextSlot `json:"context"` Value LogsValue `json:"value"` }
type LogsValue ¶ added in v0.0.3
type LogsValue struct { Signature common.Signature `json:"signature"` Err json.RawMessage `json:"err"` Logs []string `json:"logs"` }
type MentionsAccountProgramCfg ¶ added in v0.0.3
type MentionsCfg ¶ added in v0.0.3
type Message ¶
type Message struct { // List of base-58 encoded public keys used by the transaction, // including by the instructions and for signatures. // The first `message.header.numRequiredSignatures` public keys must sign the transaction. AccountKeys []common.Address `json:"accountKeys"` // Details the account types and signatures required by the transaction. Header MessageHeader `json:"header"` // A base-58 encoded hash of a recent block in the ledger used to // prevent transaction duplication and to give transactions lifetimes. RecentBlockhash common.Hash `json:"recentBlockhash"` // List of program instructions that will be executed in sequence // and committed in one atomic transaction if all succeed. Instructions []CompiledInstruction `json:"instructions"` // contains filtered or unexported fields }
func (Message) GetProgram ¶ added in v0.0.8
GetProgram current program address
func (*Message) IsWritable ¶ added in v0.0.7
func (*Message) MarshalBinary ¶ added in v0.0.7
func (*Message) Signers ¶ added in v0.0.7
Signers returns the pubkeys of all accounts that are signers.
func (*Message) UnmarshalBase64 ¶ added in v0.0.7
func (*Message) UnmarshalLegacy ¶ added in v0.0.7
func (*Message) UnmarshalV0 ¶ added in v0.0.7
func (*Message) UnmarshalWithDecoder ¶ added in v0.0.7
type MessageAddressTableLookup ¶ added in v0.0.7
type MessageAddressTableLookupSlice ¶ added in v0.0.7
type MessageAddressTableLookupSlice []MessageAddressTableLookup
func (MessageAddressTableLookupSlice) GetTableIDs ¶ added in v0.0.7
func (lookups MessageAddressTableLookupSlice) GetTableIDs() []common.Address
GetTableIDs returns the list of all address table IDs.
func (MessageAddressTableLookupSlice) NumLookups ¶ added in v0.0.7
func (lookups MessageAddressTableLookupSlice) NumLookups() int
NumLookups returns the number of accounts in all the MessageAddressTableLookupSlice
type MessageHeader ¶
type MessageHeader struct { // The total number of signatures required to make the transaction valid. // The signatures must match the first `numRequiredSignatures` of `message.account_keys`. NumRequiredSignatures uint8 `json:"numRequiredSignatures"` // The last numReadonlySignedAccounts of the signed keys are read-only accounts. // Programs may process multiple transactions that load read-only accounts within // a single PoH entry, but are not permitted to credit or debit lamports or modify // account data. // Transactions targeting the same read-write account are evaluated sequentially. NumReadonlySignedAccounts uint8 `json:"numReadonlySignedAccounts"` // The last `numReadonlyUnsignedAccounts` of the unsigned keys are read-only accounts. NumReadonlyUnsignedAccounts uint8 `json:"numReadonlyUnsignedAccounts"` }
type MessageVersion ¶ added in v0.0.3
type MessageVersion int
const ( MessageVersionLegacy MessageVersion = 0 // default MessageVersionV0 MessageVersion = 1 // v0 )
type ProgramAccount ¶
type ProgramAccount struct { Account AccountInfo `json:"account"` PubKey common.Address `json:"pubKey"` }
ProgramAccount program account
type ProgramNotifies ¶ added in v0.1.1
type ProgramNotifies struct { Context ContextSlot `json:"context"` Value TokenAccount `json:"value"` }
type RawTransaction ¶ added in v0.0.8
type RawTransaction struct {
// contains filtered or unexported fields
}
func NewRawTransaction ¶ added in v0.0.8
func NewRawTransaction(blockHash common.Hash, payer string, inst []Instruction, signers []string) *RawTransaction
type RpcAccountInfoCfg ¶
type RpcAccountInfoCfg struct { Encoding EnumEncoding `json:"encoding,omitempty"` Commitment EnumRpcCommitment `json:"commitment,omitempty"` MinContextSlot *uint64 `json:"minContextSlot,omitempty"` DataSlice *DataSlice `json:"dataSlice,omitempty"` }
RpcAccountInfoCfg Get multiple data
type RpcCombinedCfg ¶
type RpcCombinedCfg struct { WithContext bool `json:"withContext,omitempty"` Encoding EnumEncoding `json:"encoding,omitempty"` Commitment EnumRpcCommitment `json:"commitment,omitempty"` MinContextSlot *uint64 `json:"minContextSlot,omitempty"` DataSlice *DataSlice `json:"dataSlice,omitempty"` Filter []map[string]interface{} `json:"filter,omitempty"` }
type RpcCommitmentCfg ¶
type RpcCommitmentCfg struct {
Commitment EnumRpcCommitment `json:"commitment,omitempty"`
}
RpcCommitmentCfg rpc config of commitment
type RpcCommitmentWithEncodingCfg ¶ added in v0.0.3
type RpcCommitmentWithEncodingCfg struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` Encoding EnumEncoding `json:"encoding,omitempty"` }
RpcCommitmentWithEncodingCfg rpc config of commitment
type RpcCommitmentWithFilter ¶
type RpcCommitmentWithFilter struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` Filter EnumCirculateFilter `json:"filter,omitempty"` }
RpcCommitmentWithFilter commitment with filter
type RpcCommitmentWithIdentity ¶
type RpcCommitmentWithIdentity struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` Identity *common.Address `json:"identity,omitempty"` }
type RpcCommitmentWithMinSlotCfg ¶
type RpcCommitmentWithMinSlotCfg struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` MinContextSlot *uint64 `json:"minContextSlot,omitempty"` }
RpcCommitmentWithMinSlotCfg commitment & min slot
type RpcGetBlockContextCfg ¶
type RpcGetBlockContextCfg struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` Encoding EnumEncoding `json:"encoding,omitempty"` TransactionDetails EnumTxDetailLevel `json:"transactionDetails,omitempty"` MaxSupportedTxVersion uint8 `json:"maxSupportedTransactionVersion"` Rewards *bool `json:"rewards,omitempty"` }
RpcGetBlockContextCfg commitment & min slot
type RpcGetBlockProduction ¶
type RpcGetBlockProduction struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` Identity *common.Address `json:"identity,omitempty"` Range SlotRange `json:"range,omitempty"` }
RpcGetBlockProduction getBlock production
type RpcGetTransactionCfg ¶
type RpcGetTransactionCfg struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` Encoding EnumEncoding `json:"encoding,omitempty"` // MaxSupportedTransactionVersion Set the max transaction version to return in responses. // If the requested transaction is a higher version, an error will be returned. // If this parameter is omitted, only legacy transactions will be returned, and any versioned transaction will prompt the error. MaxSupportedTxVersion uint8 `json:"maxSupportedTransactionVersion,omitempty"` }
RpcGetTransactionCfg commitment & min slot
type RpcMintWithProgramID ¶
type RpcPerfSample ¶
type RpcPerfSample struct { // Slot in which sample was taken at Slot uint64 `json:"slot"` // Number of transactions processed during the sample period NumTransactions uint64 `json:"numTransactions"` // Number of slots completed during the sample period NumSlots uint64 `json:"numSlots"` // Number of seconds in a sample window SamplePeriodSecs uint16 `json:"samplePeriodSecs"` // Number of non-vote transactions processed during the sample period. NumNonVoteTransaction uint64 `json:"numNonVoteTransaction"` }
type RpcPrioritizationFee ¶
type RpcSearchTxHistoryCfg ¶
type RpcSearchTxHistoryCfg struct { // if true - a Solana node will search its ledger cache for any signatures not found in the recent status cache SearchTxHistory bool `json:"searchTransactionHistory,omitempty"` }
type RpcSendTxCfg ¶
type RpcSendTxCfg struct { // Encoding used for the transaction data. // Default: base58 // Values: base58 (slow, DEPRECATED), or base64. Encoding EnumEncoding `json:"encoding,omitempty"` // Default: false // when true, skip the preflight transaction checks SkipPreflight bool `json:"skipPreflight,omitempty"` // Default: finalized // Commitment level to use for preflight. PreflightCommitment string `json:"preflightCommitment,omitempty"` // Maximum number of times for the RPC node to retry sending the transaction to the leader. // If this parameter not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires. MaxRetries *uint64 `json:"maxRetries,omitempty"` // set the minimum slot at which to perform preflight transaction checks MinContextSlot *uint64 `json:"minContextSlot,omitempty"` }
RpcSendTxCfg struct
type RpcSignaturesForAddressCfg ¶
type RpcSignaturesForAddressCfg struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` MinContextSlot *uint64 `json:"minContextSlot,omitempty"` // Limit: maximum transaction signatures to return (between 1 and 1,000). Limit *uint `json:"limit,omitempty"` // start searching backwards from this transaction signature. // If not provided the search starts from the top of the highest max confirmed block. Before string `json:"before,omitempty"` // search until this transaction signature, if found before limit reached Util string `json:"util,omitempty"` }
type RpcSupplyCfg ¶
type RpcSupplyCfg struct { Commitment EnumRpcCommitment `json:"commitment,omitempty"` // exclude non circulating accounts list from response ExcludeNonCirculatingAccountsList *bool `json:"excludeNonCirculatingAccountsList,omitempty"` }
type RpcVoteAccountCfg ¶
type RpcVoteAccountCfg struct { // commitment Commitment EnumRpcCommitment `json:"commitment,omitempty"` // Only return results for this validator vote address (base-58 encoded) VotePubkey *common.Address `json:"votePubkey,omitempty"` // optional // Do not filter out delinquent validators with no stake KeepUnstakedDelinquents *bool `json:"keepUnstakedDelinquents,omitempty"` // optional // Specify the number of slots behind the tip that a validator must fall to be considered delinquent. NOTE: For the sake of consistency between ecosystem products, it is not recommended that this argument be specified. DelinquentSlotDistance *uint64 `json:"delinquentSlotDistance,omitempty"` // optional }
type RpcVoteAccounts ¶
type RpcVoteAccounts struct { Current []VoteAccount `json:"current"` Delinquent []VoteAccount `json:"delinquent"` }
type SignatureInfo ¶
type SignatureInfo struct { // transaction signature as base-58 encoded string Signature common.Signature `json:"signature,omitempty"` // The slot that contains the block with the transaction Slot uint64 `json:"slot"` // Error if transaction failed, null if transaction succeeded. See TransactionError definitions for more info. Err json.RawMessage `json:"err"` // Memo associated with the transaction, null if no memo is present Memo string `json:"memo,omitempty"` // estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available. BlockTime int64 `json:"blockTime,omitempty"` // The transaction's cluster confirmation status; Either processed, confirmed, or finalized. ConfirmationStatus string `json:"confirmationStatus,omitempty"` }
type SignatureNotifies ¶ added in v0.1.1
type SignatureNotifies struct { Context ContextSlot `json:"context"` Value interface{} `json:"value"` }
type SignatureStatus ¶ added in v0.1.1
type SignatureStatus struct { // The slot that contains the block with the transaction Slot uint64 `json:"slot"` // Error if transaction failed, null if transaction succeeded. See TransactionError definitions for more info. Err json.RawMessage `json:"err"` // estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available. Confirmations *uint64 `json:"confirmations,omitempty"` // The transaction's cluster confirmation status; Either processed, confirmed, or finalized. ConfirmationStatus string `json:"confirmationStatus,omitempty"` }
type SignatureStatusWithCtx ¶ added in v0.1.1
type SignatureStatusWithCtx struct { Context ContextSlot `json:"context"` SignatureStatus []SignatureStatus `json:"value,omitempty"` }
type SlotNotifies ¶ added in v0.1.1
type SlotRange ¶
type SlotRange struct { FirstSlot uint64 `json:"firstSlot,omitempty"` LastSlot uint64 `json:"lastSlot,omitempty"` }
SlotRange the first slot --> lastSlot
type SolVersion ¶
type StakeActivation ¶
type SupplyInfo ¶
type SupplyInfo struct { // Total supply in lamports Total uint64 `json:"total"` // Circulating supply in lamports Circulating uint64 `json:"circulating"` // Non-circulating supply in lamports NonCirculating uint64 `json:"nonCirculating"` // an array of account addresses of non-circulating accounts, as strings. If excludeNonCirculatingAccountsList is enabled, the returned array will be empty. NonCirculatingAccounts []common.Address `json:"nonCirculatingAccounts"` }
type SupplyWithCtx ¶
type SupplyWithCtx struct { Context ContextSlot `json:"context"` Supply SupplyInfo `json:"value"` }
type TokenAccount ¶
type TokenAccount struct { Account AccountInfo `json:"account"` Pubkey common.Address `json:"pubkey,omitempty"` }
type TokenAccountWithCtx ¶
type TokenAccountWithCtx struct { Context ContextSlot `json:"context"` UiToken UiTokenAmount `json:"value"` }
type TokenAccountsWithCtx ¶
type TokenAccountsWithCtx struct { Context ContextSlot `json:"context"` Accounts []TokenAccount `json:"value"` }
type TokenBalance ¶
type TokenBalance struct { // Index of the account in which the token balance is provided for. AccountIndex uint16 `json:"accountIndex"` // Pubkey of the token's mint. Mint common.Address `json:"mint"` // Pubkey of token balance's owner. Owner common.Address `json:"owner"` // ProgramId ProgramId string `json:"programId"` UiTokenAmount UiTokenAmount `json:"uiTokenAmount"` }
type TokenLargestHolders ¶
type TokenLargestHolders struct { Context ContextSlot `json:"context"` Holders []UiTokenAmount `json:"value"` }
type Transaction ¶ added in v0.0.3
type Transaction struct { // A list of base-58 encoded signatures applied to the transaction. // The list is always of length `message.header.numRequiredSignatures` and not empty. // The signature at index `i` corresponds to the public key at index // `i` in `message.account_keys`. The first one is used as the transaction id. Signatures []common.Signature `json:"signatures"` // Defines the content of the transaction. Message Message `json:"message"` }
func NewTransaction ¶ added in v0.0.3
func NewTransaction(instructions []Instruction, recentBlockHash common.Hash, payer common.Address) (*Transaction, error)
func (*Transaction) MarshalBinary ¶ added in v0.0.7
func (tx *Transaction) MarshalBinary() ([]byte, error)
func (*Transaction) Sign ¶ added in v0.0.7
func (tx *Transaction) Sign(accounts []crypto.Account) (err error)
func (Transaction) ToBase58 ¶ added in v0.0.7
func (tx Transaction) ToBase58() (string, error)
func (Transaction) ToBase64 ¶ added in v0.0.7
func (tx Transaction) ToBase64() (string, error)
func (*Transaction) UnmarshalBase58 ¶ added in v0.0.7
func (tx *Transaction) UnmarshalBase58(b58 string) error
UnmarshalBase58 decodes a base58 encoded transaction.
func (*Transaction) UnmarshalBase64 ¶ added in v0.0.7
func (tx *Transaction) UnmarshalBase64(b64 string) error
UnmarshalBase64 decodes a base64 encoded transaction.
func (*Transaction) UnmarshalJSON ¶ added in v0.0.7
func (tx *Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON parses the transaction Content
func (*Transaction) UnmarshalWithDecoder ¶ added in v0.0.7
func (tx *Transaction) UnmarshalWithDecoder(decoder *encodbin.Decoder) (err error)
type TransactionMeta ¶
type TransactionMeta struct { // TODO if has zero ComputeUnitsConsumed ComputeUnitsConsumed *uint64 `json:"computeUnitsConsumed"` // Error if transaction failed, null if transaction succeeded. // https://github.com/solana-labs/solana/blob/master/sdk/src/transaction.rs#L24 Err json.RawMessage `json:"err"` // Fee this transaction was charged Fee uint64 `json:"fee"` // Array of *big.Int account balances from before the transaction was processed PreBalances []*big.Int `json:"preBalances"` // Array of *big.Int account balances after the transaction was processed PostBalances []*big.Int `json:"postBalances"` // List of inner instructions or omitted if inner instruction recording // was not yet enabled during this transaction InnerInstructions []InnerInstruction `json:"innerInstructions"` // List of token balances from before the transaction was processed // or omitted if token balance recording was not yet enabled during this transaction PreTokenBalances []TokenBalance `json:"preTokenBalances"` // List of token balances from after the transaction was processed // or omitted if token balance recording was not yet enabled during this transaction PostTokenBalances []TokenBalance `json:"postTokenBalances"` // Array of string log messages or omitted if log message // recording was not yet enabled during this transaction LogMessages []string `json:"logMessages"` // Transaction status. Status TxStatus `json:"status"` Rewards []BlockReward `json:"rewards"` LoadedAddresses LoadedAddresses `json:"loadedAddresses"` }
type TxStatus ¶
type TxStatus struct { Ok interface{} `json:"Ok"` Err json.RawMessage `json:"Err"` }
type U64ValueWithCtx ¶
type U64ValueWithCtx struct { Context ContextSlot `json:"context"` Value *uint64 `json:"value,omitempty"` }
type UiTokenAmount ¶
type UiTokenAmount struct { // Address account Address *common.Address `json:"address,omitempty"` // Raw amount of tokens as a string, ignoring decimals. Amount string `json:"amount"` // Number of decimals configured for token's mint. Decimals uint8 `json:"decimals"` // Token amount as a float, accounting for decimals. UiAmount float64 `json:"uiAmount"` // Token amount as a string, accounting for decimals. UiAmountString string `json:"uiAmountString"` }
type VoteAccount ¶
type VoteAccount struct { // Vote account address, as base-58 encoded string VotePubkey common.Address `json:"votePubkey"` // Validator identity, as base-58 encoded string NodePubkey common.Address `json:"nodePubkey"` // the stake, in lamports, delegated to this vote account and active in this epoch ActivatedStake uint64 `json:"activatedStake"` // bool, whether the vote account is staked for this epoch EpochVoteAccount bool `json:"epochVoteAccount"` // percentage (0-100) of rewards payout owed to the vote account Commission uint8 `json:"commission"` // Most recent slot voted on by this vote account LastVote uint64 `json:"lastVote"` // Latest history of earned credits for up to five epochs, as an array of arrays containing: [epoch, credits, previousCredits]. EpochCredits [][]uint64 `json:"epochCredits"` // Current root slot for this vote RootSlot uint64 `json:"rootSlot"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package field implements fast arithmetic modulo 2^255-19.
|
Package field implements fast arithmetic modulo 2^255-19. |