Documentation ¶
Overview ¶
TODO: context not used in all graphql query
Index ¶
- type Account
- func (a *Account) Address(ctx context.Context) (types.Address, error)
- func (a *Account) Balance(ctx context.Context) (argtype.Big, error)
- func (a *Account) Code(ctx context.Context) (argtype.Bytes, error)
- func (a *Account) Storage(ctx context.Context, args struct{ ... }) (types.Hash, error)
- func (a *Account) TransactionCount(ctx context.Context) (argtype.Uint64, error)
- type Block
- func (b *Block) Account(ctx context.Context, args struct{ ... }) (*Account, error)
- func (b *Block) Difficulty(ctx context.Context) (argtype.Big, error)
- func (b *Block) ExtraData(ctx context.Context) (argtype.Bytes, error)
- func (b *Block) GasLimit(ctx context.Context) (argtype.Long, error)
- func (b *Block) GasUsed(ctx context.Context) (argtype.Long, error)
- func (b *Block) Hash(ctx context.Context) (types.Hash, error)
- func (b *Block) Logs(ctx context.Context, args struct{ ... }) ([]*Log, error)
- func (b *Block) LogsBloom(ctx context.Context) (argtype.Bytes, error)
- func (b *Block) Miner(ctx context.Context, args BlockNumberArgs) (*Account, error)
- func (b *Block) MixHash(ctx context.Context) (types.Hash, error)
- func (b *Block) Nonce(ctx context.Context) (argtype.Bytes, error)
- func (b *Block) Number(ctx context.Context) (argtype.Long, error)
- func (b *Block) Parent(ctx context.Context) (*Block, error)
- func (b *Block) Raw(ctx context.Context) (argtype.Bytes, error)
- func (b *Block) RawHeader(ctx context.Context) (argtype.Bytes, error)
- func (b *Block) ReceiptsRoot(ctx context.Context) (types.Hash, error)
- func (b *Block) StateRoot(ctx context.Context) (types.Hash, error)
- func (b *Block) Timestamp(ctx context.Context) (argtype.Uint64, error)
- func (b *Block) TransactionAt(ctx context.Context, args struct{ ... }) (*Transaction, error)
- func (b *Block) TransactionCount(ctx context.Context) (*int32, error)
- func (b *Block) Transactions(ctx context.Context) (*[]*Transaction, error)
- func (b *Block) TransactionsRoot(ctx context.Context) (types.Hash, error)
- type BlockFilterCriteria
- type BlockNumberArgs
- type Config
- type FilterCriteria
- type GraphQLService
- type GraphQLStore
- type GraphiQL
- type Log
- type Resolver
- func (r *Resolver) Block(ctx context.Context, args struct{ ... }) (*Block, error)
- func (r *Resolver) Blocks(ctx context.Context, args struct{ ... }) ([]*Block, error)
- func (r *Resolver) ChainID(ctx context.Context) (argtype.Big, error)
- func (r *Resolver) GasPrice(ctx context.Context) (argtype.Big, error)
- func (r *Resolver) Logs(ctx context.Context, args struct{ ... }) ([]*Log, error)
- func (r *Resolver) Transaction(ctx context.Context, args struct{ ... }) (*Transaction, error)
- type Transaction
- func (t *Transaction) Block(ctx context.Context) (*Block, error)
- func (t *Transaction) CreatedContract(ctx context.Context, args BlockNumberArgs) (*Account, error)
- func (t *Transaction) CumulativeGasUsed(ctx context.Context) (*argtype.Long, error)
- func (t *Transaction) From(ctx context.Context, args BlockNumberArgs) (*Account, error)
- func (t *Transaction) Gas(ctx context.Context) (argtype.Uint64, error)
- func (t *Transaction) GasPrice(ctx context.Context) (argtype.Big, error)
- func (t *Transaction) GasUsed(ctx context.Context) (*argtype.Long, error)
- func (t *Transaction) Hash(ctx context.Context) types.Hash
- func (t *Transaction) Index(ctx context.Context) (*int32, error)
- func (t *Transaction) InputData(ctx context.Context) (argtype.Bytes, error)
- func (t *Transaction) Logs(ctx context.Context) (*[]*Log, error)
- func (t *Transaction) Nonce(ctx context.Context) (argtype.Uint64, error)
- func (t *Transaction) R(ctx context.Context) (argtype.Big, error)
- func (t *Transaction) Raw(ctx context.Context) (argtype.Bytes, error)
- func (t *Transaction) RawReceipt(ctx context.Context) (argtype.Bytes, error)
- func (t *Transaction) S(ctx context.Context) (argtype.Big, error)
- func (t *Transaction) Status(ctx context.Context) (*argtype.Long, error)
- func (t *Transaction) To(ctx context.Context, args BlockNumberArgs) (*Account, error)
- func (t *Transaction) V(ctx context.Context) (argtype.Big, error)
- func (t *Transaction) Value(ctx context.Context) (argtype.Big, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account represents an Dogechain account at a particular block.
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block represents an Dogechain block. backend, and numberOrHash are mandatory. All other fields are lazily fetched when required.
func (*Block) TransactionAt ¶
func (*Block) TransactionCount ¶
func (*Block) Transactions ¶
func (b *Block) Transactions(ctx context.Context) (*[]*Transaction, error)
type BlockFilterCriteria ¶
type BlockFilterCriteria struct { Addresses *[]types.Address // restricts matches to events created by specific contracts // The Topic list restricts matches to particular event topics. Each event has a list // of topics. Topics matches a prefix of that list. An empty element slice matches any // topic. Non-empty elements represent an alternative that matches any of the // contained topics. // // Examples: // {} or nil matches any topic list // {{A}} matches topic A in first position // {{}, {B}} matches any topic in first position, B in second position // {{A}, {B}} matches topic A in first position, B in second position // {{A, B}}, {C, D}} matches topic (A OR B) in first position, (C OR D) in second position Topics *[][]types.Hash }
BlockFilterCriteria encapsulates criteria passed to a `logs` accessor inside a block.
type BlockNumberArgs ¶
BlockNumberArgs encapsulates arguments to accessors that specify a block number.
func (BlockNumberArgs) NumberOr ¶
func (a BlockNumberArgs) NumberOr(current rpc.BlockNumberOrHash) rpc.BlockNumberOrHash
NumberOr returns the provided block number argument, or the "current" block number or hash if none was provided.
func (BlockNumberArgs) NumberOrLatest ¶
func (a BlockNumberArgs) NumberOrLatest() rpc.BlockNumberOrHash
NumberOrLatest returns the provided block number argument, or the "latest" block number if none was provided.
type FilterCriteria ¶
type FilterCriteria struct { FromBlock *argtype.Uint64 // beginning of the queried range, nil means genesis block ToBlock *argtype.Uint64 // end of the range, nil means latest block Addresses *[]types.Address // restricts matches to events created by specific contracts // The Topic list restricts matches to particular event topics. Each event has a list // of topics. Topics matches a prefix of that list. An empty element slice matches any // topic. Non-empty elements represent an alternative that matches any of the // contained topics. // // Examples: // {} or nil matches any topic list // {{A}} matches topic A in first position // {{}, {B}} matches any topic in first position, B in second position // {{A}, {B}} matches topic A in first position, B in second position // {{A, B}}, {C, D}} matches topic (A OR B) in first position, (C OR D) in second position Topics *[][]types.Hash }
FilterCriteria encapsulates the arguments to `logs` on the root resolver object.
type GraphQLService ¶
type GraphQLService struct {
// contains filtered or unexported fields
}
func NewGraphQLService ¶
func NewGraphQLService(logger hclog.Logger, config *Config) (*GraphQLService, error)
NewJSONRPC returns the JSONRPC http server
type GraphQLStore ¶
type GraphQLStore interface {
// contains filtered or unexported methods
}
GraphQLStore defines all the methods required by all the JSON RPC endpoints
type GraphiQL ¶
type GraphiQL struct{}
GraphiQL is an in-browser IDE for exploring GraphiQL APIs. This handler returns GraphiQL when requested.
For more information, see https://github.com/graphql/graphiql.
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log represents an individual log message. All arguments are mandatory.
func (*Log) Transaction ¶
func (l *Log) Transaction(ctx context.Context) *Transaction
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is the top-level object in the GraphQL hierarchy.
func (*Resolver) Transaction ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction represents an Dogechain transaction. backend and hash are mandatory; all others will be fetched when required.
func (*Transaction) CreatedContract ¶
func (t *Transaction) CreatedContract(ctx context.Context, args BlockNumberArgs) (*Account, error)
func (*Transaction) CumulativeGasUsed ¶
func (*Transaction) From ¶
func (t *Transaction) From(ctx context.Context, args BlockNumberArgs) (*Account, error)
func (*Transaction) RawReceipt ¶
func (*Transaction) To ¶
func (t *Transaction) To(ctx context.Context, args BlockNumberArgs) (*Account, error)