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, djtxAssetID 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, djtxAssetID 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, djtxAssetID 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 *djtx.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 ¶
type AddInsContainer struct { Ins []*djtx.TransferableInput ChainID string }
type AddOutsContainer ¶
type AddOutsContainer struct { Outs []*djtx.TransferableOutput Stake bool ChainID string }
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(networkID uint32, conns *utils.Connections, chainConsumers map[string]services.Consumer, cChainCconsumer services.ConsumerCChain, sc *servicesctrl.Control) (*Reader, error)
func (*Reader) AddressChains ¶
func (r *Reader) AddressChains(ctx context.Context, p *params.AddressChainsParams) (*models.AddressChains, error)
func (*Reader) Aggregate ¶
func (r *Reader) Aggregate(ctx context.Context, params *params.AggregateParams, conns *utils.Connections) (*models.AggregatesHistogram, error)
func (*Reader) CacheAddressCounts ¶
func (r *Reader) CacheAddressCounts() []*models.ChainCounts
func (*Reader) CacheAggregates ¶
func (r *Reader) CacheAggregates(tag string) *models.AggregatesHistogram
func (*Reader) CacheAssetAggregates ¶
func (r *Reader) CacheAssetAggregates() []*models.AssetAggregate
func (*Reader) CacheAssets ¶
func (*Reader) CacheTxCounts ¶
func (r *Reader) CacheTxCounts() []*models.ChainCounts
func (*Reader) GetAddress ¶
func (r *Reader) GetAddress(ctx context.Context, p *params.ListAddressesParams) (*models.AddressInfo, error)
func (*Reader) GetTransaction ¶
func (*Reader) ListAddresses ¶
func (r *Reader) ListAddresses(ctx context.Context, p *params.ListAddressesParams) (*models.AddressList, error)
func (*Reader) ListAssets ¶
func (r *Reader) ListAssets(ctx context.Context, p *params.ListAssetsParams, conns *utils.Connections) (*models.AssetList, error)
func (*Reader) ListBlocks ¶
func (*Reader) ListCTransactions ¶
func (r *Reader) ListCTransactions(ctx context.Context, p *params.ListCTransactionsParams) (*models.CTransactionList, error)
func (*Reader) ListOutputs ¶
func (r *Reader) ListOutputs(ctx context.Context, p *params.ListOutputsParams) (*models.OutputList, error)
func (*Reader) ListTransactions ¶
func (r *Reader) ListTransactions(ctx context.Context, p *params.ListTransactionsParams, djtxAssetID ids.ID) (*models.TransactionList, error)
func (*Reader) RawTransaction ¶
func (*Reader) Search ¶
func (r *Reader) Search(ctx context.Context, p *params.SearchParams, djtxAssetID ids.ID) (*models.SearchResults, error)
func (*Reader) TxfeeAggregate ¶
func (r *Reader) TxfeeAggregate(ctx context.Context, params *params.TxfeeAggregateParams) (*models.TxfeeAggregatesHistogram, error)
type ReaderAggregate ¶
type ReaderAggregate struct {
// contains filtered or unexported fields
}
type ReaderAggregateTxList ¶
type ReaderAggregateTxList struct { Lock sync.RWMutex Txs []*models.Transaction TxsMap map[models.StringID]*models.Transaction TxsByChain map[models.StringID][]*models.Transaction }
func (*ReaderAggregateTxList) FindTxs ¶
func (t *ReaderAggregateTxList) FindTxs(chainIDs []string, limit int) []*models.Transaction
func (*ReaderAggregateTxList) First ¶
func (t *ReaderAggregateTxList) First() *models.Transaction
func (*ReaderAggregateTxList) Get ¶
func (t *ReaderAggregateTxList) Get(tx models.StringID) (*models.Transaction, bool)
func (*ReaderAggregateTxList) IsProcessed ¶
func (t *ReaderAggregateTxList) IsProcessed() bool
func (*ReaderAggregateTxList) Set ¶
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 *djtx.BaseTx, creds []verify.Verifiable, txType models.TransactionType, addIns *AddInsContainer, addOuts *AddOutsContainer, addlOutTxfee uint64, genesis bool, ) error
func (*Writer) InsertTransactionBase ¶
func (*Writer) InsertTransactionIns ¶
func (w *Writer) InsertTransactionIns( idx int, ctx services.ConsumerCtx, totalin uint64, in *djtx.TransferableInput, txID ids.ID, creds []verify.Verifiable, unsignedBytes []byte, chainID string, ) (uint64, error)
func (*Writer) InsertTransactionOuts ¶
Click to show internal directories.
Click to hide internal directories.