client

package
v0.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Types for storage client responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EVMEthAddrFromPreimage

func EVMEthAddrFromPreimage(contextIdentifier string, contextVersion int, data []byte) ([]byte, error)

func EthChecksumAddrFromPreimage

func EthChecksumAddrFromPreimage(contextIdentifier string, contextVersion int, data []byte) *string

EthChecksumAddrFromPreimage gives the friendly Ethereum-style mixed-case checksum address (see ERC-55) for an address preimage or nil if the preimage context is not AddressV0Secp256k1EthContext.

Types

type Account

type Account = api.Account

Account is the storage response for GetAccount.

type AccountList

type AccountList = api.AccountList

AccountList is the storage response for ListAccounts.

type AccountStats

type AccountStats = api.AccountStats

type AddressDerivationContext

type AddressDerivationContext = api.AddressDerivationContext

Types that are a part of the storage response for GetRuntimeAccount.

type AddressPreimage

type AddressPreimage = api.AddressPreimage

Types that are a part of the storage response for GetRuntimeAccount.

type Allowance

type Allowance = api.Allowance

type BareTokenHolder

type BareTokenHolder = api.BareTokenHolder

type BigInt

type BigInt = common.BigInt

type Block

type Block = api.Block

Block is the storage response for GetBlock.

type BlockList

type BlockList = api.BlockList

BlockList is the storage response for ListBlocks.

type DailyActiveAccountsList

type DailyActiveAccountsList = api.ActiveAccountsList

DailyActiveAccountsList is the storage response for GetDailyActiveAccounts.

type DebondingDelegation

type DebondingDelegation = api.DebondingDelegation

DebondingDelegation is the storage response for GetDebondingDelegation.

type DebondingDelegationList

type DebondingDelegationList = api.DebondingDelegationList

DebondingDelegationList is the storage response for ListDebondingDelegations.

type Delegation

type Delegation = api.Delegation

Delegation is the storage response for GetDelegation.

type DelegationList

type DelegationList = api.DelegationList

DelegationList is the storage response for ListDelegations.

type Entity

type Entity = api.Entity

Entity is the storage response for GetEntity.

type EntityList

type EntityList = api.EntityList

EntityList is the storage response for ListEntities.

type Epoch

type Epoch = api.Epoch

Epoch is the storage response for GetEpoch.

type EpochList

type EpochList = api.EpochList

Epoch is the storage response for ListEpochs.

type Event

type Event = api.ConsensusEvent

Event is a consensus event.

type EventList

type EventList = api.ConsensusEventList

EventsList is the storage response for ListEvents.

type EvmNft added in v0.1.17

type EvmNft = api.EvmNft

type EvmNftList added in v0.1.17

type EvmNftList = api.EvmNftList

type EvmToken

type EvmToken = api.EvmToken

type EvmTokenList

type EvmTokenList = api.EvmTokenList

type Node

type Node = api.Node

Node is the storage response for GetEntityNode.

type NodeList

type NodeList = api.NodeList

NodeList is the storage response for ListEntityNodes.

type Proposal

type Proposal = api.Proposal

Proposal is the storage response for GetProposal.

type ProposalList

type ProposalList = api.ProposalList

ProposalList is the storage response for ListProposals.

type ProposalTarget

type ProposalTarget = api.ProposalTarget

type ProposalVote

type ProposalVote = api.ProposalVote

type ProposalVotes

type ProposalVotes = api.ProposalVotes

ProposalVotes is the storage response for GetProposalVotes.

type RuntimeAccount

type RuntimeAccount = api.RuntimeAccount

type RuntimeBlock

type RuntimeBlock = api.RuntimeBlock

Block is the storage response for RuntimeGetBlock.

type RuntimeBlockList

type RuntimeBlockList = api.RuntimeBlockList

RuntimeBlockList is the storage response for RuntimeListBlocks.

type RuntimeEvent

type RuntimeEvent = api.RuntimeEvent

type RuntimeEventList

type RuntimeEventList = api.RuntimeEventList

RuntimeEventList is the storage response for RuntimeEvents.

type RuntimeEventType

type RuntimeEventType = api.RuntimeEventType

type RuntimeEvmBalance

type RuntimeEvmBalance = api.RuntimeEvmBalance

Types that are a part of the storage response for GetRuntimeAccount.

type RuntimeEvmContract

type RuntimeEvmContract = api.RuntimeEvmContract

Types that are a part of the storage response for GetRuntimeAccount.

type RuntimeEvmContractVerification

type RuntimeEvmContractVerification = api.RuntimeEvmContractVerification

Types that are a part of the storage response for GetRuntimeAccount.

type RuntimeSdkBalance

type RuntimeSdkBalance = api.RuntimeSdkBalance

Types that are a part of the storage response for GetRuntimeAccount.

type RuntimeStatus

type RuntimeStatus = api.RuntimeStatus

RuntimeStatus is the storage response for RuntimeStatus.

type RuntimeTransaction

type RuntimeTransaction = api.RuntimeTransaction

RuntimeTransactionList is the storage response for RuntimeTransactions.

type RuntimeTransactionEncryptionEnvelope

type RuntimeTransactionEncryptionEnvelope = api.RuntimeTransactionEncryptionEnvelope

RuntimeTransactionList is the storage response for RuntimeTransactions.

type RuntimeTransactionList

type RuntimeTransactionList = api.RuntimeTransactionList

RuntimeTransactionList is the storage response for RuntimeTransactions.

type Status

type Status = api.Status

Status is the storage response for GetStatus.

type StorageClient

type StorageClient struct {
	// contains filtered or unexported fields
}

StorageClient is a wrapper around a storage.TargetStorage with knowledge of network semantics.

func NewStorageClient

func NewStorageClient(chainName common.ChainName, db storage.TargetStorage, l *log.Logger) (*StorageClient, error)

NewStorageClient creates a new storage client.

func (*StorageClient) Account

func (c *StorageClient) Account(ctx context.Context, address staking.Address) (*Account, error)

Account returns a consensus account.

func (*StorageClient) Accounts

Accounts returns a list of consensus accounts.

func (*StorageClient) Block

func (c *StorageClient) Block(ctx context.Context, height int64) (*Block, error)

Block returns a consensus block. This endpoint is cached.

func (*StorageClient) Blocks

Blocks returns a list of consensus blocks.

func (*StorageClient) DailyActiveAccounts

DailyActiveAccounts returns a list of daily active accounts.

func (*StorageClient) DebondingDelegations

DebondingDelegations returns a list of debonding delegations.

func (*StorageClient) DebondingDelegationsTo

DebondingDelegationsTo returns a list of debonding delegations to an address.

func (*StorageClient) Delegations

Delegations returns a list of delegations.

func (*StorageClient) DelegationsTo

DelegationsTo returns a list of delegations to an address.

func (*StorageClient) Entities

Entities returns a list of registered entities.

func (*StorageClient) Entity

func (c *StorageClient) Entity(ctx context.Context, entityID signature.PublicKey) (*Entity, error)

Entity returns a registered entity.

func (*StorageClient) EntityNode

func (c *StorageClient) EntityNode(ctx context.Context, entityID signature.PublicKey, nodeID signature.PublicKey) (*Node, error)

EntityNode returns a node controlled by the provided entity.

func (*StorageClient) EntityNodes

EntityNodes returns a list of nodes controlled by the provided entity.

func (*StorageClient) Epoch

func (c *StorageClient) Epoch(ctx context.Context, epoch int64) (*Epoch, error)

Epoch returns a consensus epoch.

func (*StorageClient) Epochs

Epochs returns a list of consensus epochs.

func (*StorageClient) Events

Events returns a list of events.

func (*StorageClient) Proposal

func (c *StorageClient) Proposal(ctx context.Context, proposalID uint64) (*Proposal, error)

Proposal returns a governance proposal.

func (*StorageClient) ProposalVotes

ProposalVotes returns votes for a governance proposal.

func (*StorageClient) Proposals

Proposals returns a list of governance proposals.

func (*StorageClient) RuntimeAccount

func (c *StorageClient) RuntimeAccount(ctx context.Context, address staking.Address) (*RuntimeAccount, error)

func (*StorageClient) RuntimeBlocks

RuntimeBlocks returns a list of runtime blocks.

func (*StorageClient) RuntimeEVMNFTs added in v0.1.17

func (c *StorageClient) RuntimeEVMNFTs(ctx context.Context, limit *uint64, offset *uint64, tokenAddress *staking.Address, id *common.BigInt, ownerAddress *staking.Address) (*EvmNftList, error)

func (*StorageClient) RuntimeEvents

RuntimeEvents returns a list of runtime events.

func (*StorageClient) RuntimeStatus

func (c *StorageClient) RuntimeStatus(ctx context.Context) (*RuntimeStatus, error)

RuntimeStatus returns runtime status information.

func (*StorageClient) RuntimeTokens

If `address` is non-nil, it is used to filter the results to at most 1 token: the one with the correcponding contract address.

func (*StorageClient) RuntimeTransactions

RuntimeTransactions returns a list of runtime transactions.

func (*StorageClient) Shutdown

func (c *StorageClient) Shutdown()

Shutdown closes the backing TargetStorage.

func (*StorageClient) Status

func (c *StorageClient) Status(ctx context.Context) (*Status, error)

Status returns status information for Oasis Nexus.

func (*StorageClient) Transaction

func (c *StorageClient) Transaction(ctx context.Context, txHash string) (*Transaction, error)

Transaction returns a consensus transaction. This endpoint is cached.

func (*StorageClient) Transactions

Transactions returns a list of consensus transactions.

func (*StorageClient) TxVolumes

TxVolumes returns a list of transaction volumes per time window.

func (*StorageClient) Validators

Validators returns a list of validators, or optionally the single validator matching `entityID`.

type TokenHolderList

type TokenHolderList = api.TokenHolderList

type Transaction

type Transaction = api.Transaction

Transaction is the storage response for GetTransaction.

type TransactionList

type TransactionList = api.TransactionList

TransactionList is the storage response for ListTransactions.

type TxError

type TxError = api.TxError

RuntimeTransactionList is the storage response for RuntimeTransactions.

type TxVolume

type TxVolume = api.TxVolume

TxVolume is the daily transaction volume on the specified day.

type TxVolumeList

type TxVolumeList = api.TxVolumeList

TxVolumeList is the storage response for GetVolumes.

type Validator

type Validator = api.Validator

Validator is the storage response for GetValidator.

type ValidatorCommissionBound

type ValidatorCommissionBound = api.ValidatorCommissionBound

ValidatorCommissionBound is the commission bound for a validator.

type ValidatorList

type ValidatorList = api.ValidatorList

ValidatorList is the storage response for GetValidators.

type ValidatorMedia

type ValidatorMedia = api.ValidatorMedia

ValidatorMedia is the metadata for a validator.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL