Documentation ¶
Index ¶
- Variables
- func NewAPIRouter(params api.RouterParams) error
- type APIContext
- func (c *APIContext) ListBlocks(w web.ResponseWriter, r *web.Request)
- func (c *APIContext) ListChains(w web.ResponseWriter, r *web.Request)
- func (c *APIContext) ListSubnets(w web.ResponseWriter, r *web.Request)
- func (c *APIContext) ListValidators(w web.ResponseWriter, r *web.Request)
- func (c *APIContext) Overview(w web.ResponseWriter, _ *web.Request)
- type Block
- type BlockList
- type BlockSort
- type BlockType
- type Chain
- type ChainList
- type ControlKey
- type ControlSignature
- type DB
- func (db *DB) Bootstrap(ctx context.Context) error
- func (db *DB) Close(context.Context) error
- func (db *DB) Consume(ctx context.Context, c services.Consumable) error
- func (db *DB) ListBlocks(ctx context.Context, params ListBlocksParams) (*BlockList, error)
- func (db *DB) ListChains(ctx context.Context, params ListChainsParams) (*ChainList, error)
- func (db *DB) ListSubnets(ctx context.Context, params ListSubnetsParams) (*SubnetList, error)
- func (db *DB) ListValidators(ctx context.Context, params ListValidatorsParams) (*ValidatorList, error)
- type Index
- func (i *Index) Bootstrap(ctx context.Context) error
- func (i *Index) Close(ctx context.Context) error
- func (i *Index) Consume(ctx context.Context, ingestable services.Consumable) error
- func (i *Index) GetBlock(ctx context.Context, id ids.ID) (*Block, error)
- func (i *Index) GetChain(ctx context.Context, id ids.ID) (*Chain, error)
- func (i *Index) GetChainInfo(alias string, networkID uint32) (*models.ChainInfo, error)
- func (i *Index) GetSubnet(ctx context.Context, id ids.ID) (*Subnet, error)
- func (i *Index) GetValidator(ctx context.Context, id ids.ID) (*Validator, error)
- func (i *Index) ListBlocks(ctx context.Context, p ListBlocksParams) (*BlockList, error)
- func (i *Index) ListChains(ctx context.Context, p ListChainsParams) (*ChainList, error)
- func (i *Index) ListSubnets(ctx context.Context, p ListSubnetsParams) (*SubnetList, error)
- func (i *Index) ListValidators(ctx context.Context, p ListValidatorsParams) (*ValidatorList, error)
- func (i *Index) Name() string
- type ListBlocksParams
- type ListChainsParams
- type ListSubnetsParams
- type ListValidatorsParams
- type SearchParams
- type Subnet
- type SubnetList
- type Transaction
- type TransactionList
- type TransactionType
- type Validator
- type ValidatorList
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSerializationTooLong = errors.New("serialization is too long")
)
View Source
var (
ErrUnknownBlockType = errors.New("unknown block type")
)
Functions ¶
func NewAPIRouter ¶
func NewAPIRouter(params api.RouterParams) error
Types ¶
type APIContext ¶
type APIContext struct { *api.RootRequestContext // contains filtered or unexported fields }
func (*APIContext) ListBlocks ¶
func (c *APIContext) ListBlocks(w web.ResponseWriter, r *web.Request)
func (*APIContext) ListChains ¶
func (c *APIContext) ListChains(w web.ResponseWriter, r *web.Request)
func (*APIContext) ListSubnets ¶
func (c *APIContext) ListSubnets(w web.ResponseWriter, r *web.Request)
func (*APIContext) ListValidators ¶
func (c *APIContext) ListValidators(w web.ResponseWriter, r *web.Request)
func (*APIContext) Overview ¶
func (c *APIContext) Overview(w web.ResponseWriter, _ *web.Request)
type Chain ¶
type Chain struct { ID models.StringID `json:"id"` SubnetID models.StringID `json:"subnetID"` Name string `json:"name"` VMID models.StringID `json:"vmID" db:"vm_id"` ControlSignatures []ControlSignature `json:"controlSignatures"` FxIDs []models.StringID `json:"fxIDs"` GenesisData []byte `json:"genesisData"` }
type ControlKey ¶
type ControlKey struct { Address models.StringShortID `json:"address"` PublicKey []byte `json:"publicKey"` }
type ControlSignature ¶
type ControlSignature []byte
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func NewDBIndex ¶
func NewDBIndex(stream *health.Stream, db *dbr.Connection, networkID uint32, chainID string, codec codec.Codec) *DB
NewDBIndex creates a new DB for the given config
func (*DB) ListBlocks ¶
func (*DB) ListChains ¶
func (*DB) ListSubnets ¶
func (db *DB) ListSubnets(ctx context.Context, params ListSubnetsParams) (*SubnetList, error)
func (*DB) ListValidators ¶
func (db *DB) ListValidators(ctx context.Context, params ListValidatorsParams) (*ValidatorList, error)
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) GetChainInfo ¶
func (*Index) GetValidator ¶
func (*Index) ListBlocks ¶
func (*Index) ListChains ¶
func (*Index) ListSubnets ¶
func (i *Index) ListSubnets(ctx context.Context, p ListSubnetsParams) (*SubnetList, error)
func (*Index) ListValidators ¶
func (i *Index) ListValidators(ctx context.Context, p ListValidatorsParams) (*ValidatorList, error)
type ListBlocksParams ¶
type ListChainsParams ¶
type ListSubnetsParams ¶
type ListSubnetsParams struct { params.ListParams ID *ids.ID }
type ListValidatorsParams ¶
type SearchParams ¶
type SearchParams struct {
params.ListParams
}
type SubnetList ¶
type SubnetList struct {
Subnets []*Subnet `json:"subnets"`
}
type Transaction ¶
type Transaction struct{}
type TransactionList ¶
type TransactionList struct{}
type TransactionType ¶
type TransactionType uint8
const ( // Timed TransactionTypeAddDefaultSubnetValidator TransactionType = (iota * 2) + 11 TransactionTypeAddNonDefaultSubnetValidator TransactionTypeAddDefaultSubnetDelegator // Decision TransactionTypeCreateChain TransactionTypeCreateSubnet // Atomic TransactionTypeImport TransactionTypeExport )
type Validator ¶
type Validator struct { TransactionID models.StringID `json:"transactionID"` NodeID models.StringShortID `json:"nodeID"` Weight string `json:"weight"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Destination models.StringShortID `json:"destination"` SubnetID models.StringID `json:"subnetID"` }
type ValidatorList ¶
type ValidatorList struct {
Validators []*Validator `json:"validators"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.