Documentation ¶
Index ¶
- Constants
- Variables
- type AddInsContainer
- type AddOutsContainer
- type Reader
- func (r *Reader) ATxDATA(ctx context.Context, p *params.TxDataParam) ([]byte, error)
- func (r *Reader) AddressChains(ctx context.Context, p *params.AddressChainsParams) (*models.AddressChains, error)
- func (r *Reader) Aggregate(ctx context.Context, params *params.AggregateParams, conns *utils.Connections) (*models.AggregatesHistogram, error)
- func (r *Reader) CTxDATA(ctx context.Context, p *params.TxDataParam) ([]byte, error)
- func (r *Reader) CacheAddressCounts() []*models.ChainCounts
- func (r *Reader) CacheAggregates(tag string) *models.AggregatesHistogram
- func (r *Reader) CacheAssetAggregates() []*models.AssetAggregate
- func (r *Reader) CacheAssets() []*models.Asset
- func (r *Reader) CacheTxCounts() []*models.ChainCounts
- func (r *Reader) ETxDATA(ctx context.Context, p *params.TxDataParam) ([]byte, error)
- func (r *Reader) GetAddress(ctx context.Context, p *params.ListAddressesParams) (*models.AddressInfo, error)
- func (r *Reader) GetAsset(ctx context.Context, p *params.ListAssetsParams, idStrOrAlias string) (*models.Asset, error)
- func (r *Reader) GetBlock(ctx context.Context, id ids.ID) (*models.Block, error)
- func (r *Reader) GetOutput(ctx context.Context, id ids.ID) (*models.Output, error)
- func (r *Reader) GetTransaction(ctx context.Context, id ids.ID, avaxAssetID ids.ID) (*models.Transaction, error)
- func (r *Reader) ListAddresses(ctx context.Context, p *params.ListAddressesParams) (*models.AddressList, error)
- func (r *Reader) ListAssets(ctx context.Context, p *params.ListAssetsParams, conns *utils.Connections) (*models.AssetList, error)
- func (r *Reader) ListBlocks(ctx context.Context, params *params.ListBlocksParams) (*models.BlockList, error)
- func (r *Reader) ListCTransactions(ctx context.Context, p *params.ListCTransactionsParams) (*models.CTransactionList, error)
- func (r *Reader) ListOutputs(ctx context.Context, p *params.ListOutputsParams) (*models.OutputList, error)
- func (r *Reader) ListTransactions(ctx context.Context, p *params.ListTransactionsParams, avaxAssetID ids.ID) (*models.TransactionList, error)
- func (r *Reader) PTxDATA(ctx context.Context, p *params.TxDataParam) ([]byte, error)
- func (r *Reader) RawTransaction(ctx context.Context, id ids.ID) (*models.RawTx, error)
- func (r *Reader) Search(ctx context.Context, p *params.SearchParams, avaxAssetID ids.ID) (*models.SearchResults, error)
- func (r *Reader) TxfeeAggregate(ctx context.Context, params *params.TxfeeAggregateParams) (*models.TxfeeAggregatesHistogram, error)
- type ReaderAggregate
- type ReaderAggregateTxList
- func (t *ReaderAggregateTxList) FindTxs(chainIDs []string, limit int) []*models.Transaction
- func (t *ReaderAggregateTxList) First() *models.Transaction
- func (t *ReaderAggregateTxList) Get(tx models.StringID) (*models.Transaction, bool)
- func (t *ReaderAggregateTxList) IsProcessed() bool
- func (t *ReaderAggregateTxList) Set(txs []*models.Transaction)
- type Writer
- func (w *Writer) InsertAddressFromPublicKey(ctx services.ConsumerCtx, publicKey crypto.PublicKey) error
- func (w *Writer) InsertOutput(ctx services.ConsumerCtx, txID ids.ID, idx uint32, assetID ids.ID, ...) error
- func (w *Writer) InsertOutputAddress(ctx services.ConsumerCtx, outputID ids.ID, address ids.ShortID, sig []byte, ...) error
- func (w *Writer) InsertTransaction(ctx services.ConsumerCtx, txBytes []byte, unsignedBytes []byte, ...) error
- func (w *Writer) InsertTransactionBase(ctx services.ConsumerCtx, txID ids.ID, chainID string, txType string, ...) error
- func (w *Writer) InsertTransactionIns(idx int, ctx services.ConsumerCtx, totalin uint64, in *avax.TransferableInput, ...) (uint64, error)
- func (w *Writer) InsertTransactionOuts(idx uint32, ctx services.ConsumerCtx, totalout uint64, ...) (uint64, error)
- func (w *Writer) ProcessStateOut(ctx services.ConsumerCtx, out verify.State, txID ids.ID, outputCount uint32, ...) (uint64, uint64, error)
Constants ¶
View Source
const ( MaxAggregateIntervalCount = 20000 MinSearchQueryLength = 1 )
Variables ¶
View Source
var ( ErrAggregateIntervalCountTooLarge = errors.New("requesting too many intervals") ErrFailedToParseStringAsBigInt = errors.New("failed to parse string to big.Int") ErrSearchQueryTooShort = errors.New("search query too short") )
View Source
var ( MaxSerializationLen = (16 * 1024 * 1024) - 1 // MaxMemoLen is the maximum number of bytes a memo can be in the database MaxMemoLen = 1024 )
Functions ¶
This section is empty.
Types ¶
type AddInsContainer ¶ added in v1.1.3
type AddInsContainer struct { Ins []*avax.TransferableInput ChainID string }
type AddOutsContainer ¶ added in v1.1.3
type AddOutsContainer struct { Outs []*avax.TransferableOutput Stake bool ChainID string }
type Reader ¶ added in v1.1.2
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶ added in v1.1.2
func NewReader(networkID uint32, conns *utils.Connections, chainConsumers map[string]services.Consumer, cChainCconsumer services.ConsumerCChain, sc *servicesctrl.Control) (*Reader, error)
func (*Reader) AddressChains ¶ added in v1.1.2
func (r *Reader) AddressChains(ctx context.Context, p *params.AddressChainsParams) (*models.AddressChains, error)
func (*Reader) Aggregate ¶ added in v1.1.2
func (r *Reader) Aggregate(ctx context.Context, params *params.AggregateParams, conns *utils.Connections) (*models.AggregatesHistogram, error)
func (*Reader) CacheAddressCounts ¶ added in v1.3.2
func (r *Reader) CacheAddressCounts() []*models.ChainCounts
func (*Reader) CacheAggregates ¶ added in v1.2.3
func (r *Reader) CacheAggregates(tag string) *models.AggregatesHistogram
func (*Reader) CacheAssetAggregates ¶ added in v1.2.3
func (r *Reader) CacheAssetAggregates() []*models.AssetAggregate
func (*Reader) CacheAssets ¶ added in v1.3.2
func (*Reader) CacheTxCounts ¶ added in v1.4.0
func (r *Reader) CacheTxCounts() []*models.ChainCounts
func (*Reader) GetAddress ¶ added in v1.1.2
func (r *Reader) GetAddress(ctx context.Context, p *params.ListAddressesParams) (*models.AddressInfo, error)
func (*Reader) GetTransaction ¶ added in v1.1.2
func (*Reader) ListAddresses ¶ added in v1.1.2
func (r *Reader) ListAddresses(ctx context.Context, p *params.ListAddressesParams) (*models.AddressList, error)
func (*Reader) ListAssets ¶ added in v1.1.3
func (r *Reader) ListAssets(ctx context.Context, p *params.ListAssetsParams, conns *utils.Connections) (*models.AssetList, error)
func (*Reader) ListBlocks ¶ added in v1.1.3
func (*Reader) ListCTransactions ¶ added in v1.2.3
func (r *Reader) ListCTransactions(ctx context.Context, p *params.ListCTransactionsParams) (*models.CTransactionList, error)
func (*Reader) ListOutputs ¶ added in v1.1.2
func (r *Reader) ListOutputs(ctx context.Context, p *params.ListOutputsParams) (*models.OutputList, error)
func (*Reader) ListTransactions ¶ added in v1.1.2
func (r *Reader) ListTransactions(ctx context.Context, p *params.ListTransactionsParams, avaxAssetID ids.ID) (*models.TransactionList, error)
func (*Reader) RawTransaction ¶ added in v1.2.3
func (*Reader) Search ¶ added in v1.1.2
func (r *Reader) Search(ctx context.Context, p *params.SearchParams, avaxAssetID ids.ID) (*models.SearchResults, error)
func (*Reader) TxfeeAggregate ¶ added in v1.1.2
func (r *Reader) TxfeeAggregate(ctx context.Context, params *params.TxfeeAggregateParams) (*models.TxfeeAggregatesHistogram, error)
type ReaderAggregate ¶ added in v1.2.3
type ReaderAggregate struct {
// contains filtered or unexported fields
}
type ReaderAggregateTxList ¶ added in v1.4.5
type ReaderAggregateTxList struct { Lock sync.RWMutex Txs []*models.Transaction TxsMap map[models.StringID]*models.Transaction TxsByChain map[models.StringID][]*models.Transaction }
func (*ReaderAggregateTxList) FindTxs ¶ added in v1.4.5
func (t *ReaderAggregateTxList) FindTxs(chainIDs []string, limit int) []*models.Transaction
func (*ReaderAggregateTxList) First ¶ added in v1.4.5
func (t *ReaderAggregateTxList) First() *models.Transaction
func (*ReaderAggregateTxList) Get ¶ added in v1.4.5
func (t *ReaderAggregateTxList) Get(tx models.StringID) (*models.Transaction, bool)
func (*ReaderAggregateTxList) IsProcessed ¶ added in v1.4.5
func (t *ReaderAggregateTxList) IsProcessed() bool
func (*ReaderAggregateTxList) Set ¶ added in v1.4.5
func (t *ReaderAggregateTxList) Set(txs []*models.Transaction)
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) InsertAddressFromPublicKey ¶
func (*Writer) InsertOutput ¶
func (w *Writer) InsertOutput( ctx services.ConsumerCtx, txID ids.ID, idx uint32, assetID ids.ID, out *secp256k1fx.TransferOutput, outputType models.OutputType, groupID uint32, payload []byte, stakeLocktime uint64, chainID string, stake bool, frozen bool, stakeableout bool, genesisutxo bool, ) error
func (*Writer) InsertOutputAddress ¶
func (*Writer) InsertTransaction ¶
func (w *Writer) InsertTransaction( ctx services.ConsumerCtx, txBytes []byte, unsignedBytes []byte, baseTx *avax.BaseTx, creds []verify.Verifiable, txType models.TransactionType, addIns *AddInsContainer, addOuts *AddOutsContainer, addlOutTxfee uint64, genesis bool, ) error
func (*Writer) InsertTransactionBase ¶ added in v1.1.3
func (*Writer) InsertTransactionIns ¶ added in v1.1.3
func (w *Writer) InsertTransactionIns( idx int, ctx services.ConsumerCtx, totalin uint64, in *avax.TransferableInput, txID ids.ID, creds []verify.Verifiable, unsignedBytes []byte, chainID string, ) (uint64, error)
func (*Writer) InsertTransactionOuts ¶ added in v1.1.3
Click to show internal directories.
Click to hide internal directories.