{"modulePath":"github.com/Evolution404/simcore","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package graphql\n\nPackage graphql provides a GraphQL interface to Ethereum node data.\n\n## Functions\n\n```go\nfunc New(stack *node.Node, backend ethapi.Backend, cors, vhosts []string) error\n```\nNew constructs a new GraphQL service instance.\n\n## Types\n\n```go\ntype AccessTuple struct {\n\t// contains filtered or unexported fields\n}\n```\nAccessTuple represents EIP-2930\n\n```go\nfunc (at *AccessTuple) Address(ctx context.Context) common.Address\n```\n\n```go\nfunc (at *AccessTuple) StorageKeys(ctx context.Context) []common.Hash\n```\n\n```go\ntype Account struct {\n\t// contains filtered or unexported fields\n}\n```\nAccount represents an Ethereum account at a particular block.\n\n```go\nfunc (a *Account) Address(ctx context.Context) (common.Address, error)\n```\n\n```go\nfunc (a *Account) Balance(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (a *Account) Code(ctx context.Context) (hexutil.Bytes, error)\n```\n\n```go\nfunc (a *Account) Storage(ctx context.Context, args struct{ Slot common.Hash }) (common.Hash, error)\n```\n\n```go\nfunc (a *Account) TransactionCount(ctx context.Context) (hexutil.Uint64, error)\n```\n\n```go\ntype Block struct {\n\t// contains filtered or unexported fields\n}\n```\nBlock represents an Ethereum block. backend, and numberOrHash are mandatory. All other fields are lazily fetched when required.\n\n```go\nfunc (b *Block) Account(ctx context.Context, args struct {\n\tAddress common.Address\n}) (*Account, error)\n```\n\n```go\nfunc (b *Block) BaseFeePerGas(ctx context.Context) (*hexutil.Big, error)\n```\n\n```go\nfunc (b *Block) Call(ctx context.Context, args struct {\n\tData ethapi.TransactionArgs\n}) (*CallResult, error)\n```\n\n```go\nfunc (b *Block) Difficulty(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (b *Block) EstimateGas(ctx context.Context, args struct {\n\tData ethapi.TransactionArgs\n}) (Long, error)\n```\n\n```go\nfunc (b *Block) ExtraData(ctx context.Context) (hexutil.Bytes, error)\n```\n\n```go\nfunc (b *Block) GasLimit(ctx context.Context) (Long, error)\n```\n\n```go\nfunc (b *Block) GasUsed(ctx context.Context) (Long, error)\n```\n\n```go\nfunc (b *Block) Hash(ctx context.Context) (common.Hash, error)\n```\n\n```go\nfunc (b *Block) Logs(ctx context.Context, args struct{ Filter BlockFilterCriteria }) ([]*Log, error)\n```\n\n```go\nfunc (b *Block) LogsBloom(ctx context.Context) (hexutil.Bytes, error)\n```\n\n```go\nfunc (b *Block) Miner(ctx context.Context, args BlockNumberArgs) (*Account, error)\n```\n\n```go\nfunc (b *Block) MixHash(ctx context.Context) (common.Hash, error)\n```\n\n```go\nfunc (b *Block) Nonce(ctx context.Context) (hexutil.Bytes, error)\n```\n\n```go\nfunc (b *Block) Number(ctx context.Context) (Long, error)\n```\n\n```go\nfunc (b *Block) OmmerAt(ctx context.Context, args struct{ Index int32 }) (*Block, error)\n```\n\n```go\nfunc (b *Block) OmmerCount(ctx context.Context) (*int32, error)\n```\n\n```go\nfunc (b *Block) OmmerHash(ctx context.Context) (common.Hash, error)\n```\n\n```go\nfunc (b *Block) Ommers(ctx context.Context) (*[]*Block, error)\n```\n\n```go\nfunc (b *Block) Parent(ctx context.Context) (*Block, error)\n```\n\n```go\nfunc (b *Block) ReceiptsRoot(ctx context.Context) (common.Hash, error)\n```\n\n```go\nfunc (b *Block) StateRoot(ctx context.Context) (common.Hash, error)\n```\n\n```go\nfunc (b *Block) Timestamp(ctx context.Context) (hexutil.Uint64, error)\n```\n\n```go\nfunc (b *Block) TotalDifficulty(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (b *Block) TransactionAt(ctx context.Context, args struct{ Index int32 }) (*Transaction, error)\n```\n\n```go\nfunc (b *Block) TransactionCount(ctx context.Context) (*int32, error)\n```\n\n```go\nfunc (b *Block) Transactions(ctx context.Context) (*[]*Transaction, error)\n```\n\n```go\nfunc (b *Block) TransactionsRoot(ctx context.Context) (common.Hash, error)\n```\n\n```go\ntype BlockFilterCriteria struct {\n\tAddresses *[]common.Address // restricts matches to events created by specific contracts\n\n\t// The Topic list restricts matches to particular event topics. Each event has a list\n\t// of topics. Topics matches a prefix of that list. An empty element slice matches any\n\t// topic. Non-empty elements represent an alternative that matches any of the\n\t// contained topics.\n\t//\n\t// Examples:\n\t// {} or nil          matches any topic list\n\t// {{A}}              matches topic A in first position\n\t// {{}, {B}}          matches any topic in first position, B in second position\n\t// {{A}, {B}}         matches topic A in first position, B in second position\n\t// {{A, B}}, {C, D}}  matches topic (A OR B) in first position, (C OR D) in second position\n\tTopics *[][]common.Hash\n}\n```\nBlockFilterCriteria encapsulates criteria passed to a \\`logs\\` accessor inside a block.\n\n```go\ntype BlockNumberArgs struct {\n\t// TODO: Ideally we could use input unions to allow the query to specify the\n\t// block parameter by hash, block number, or tag but input unions aren't part of the\n\t// standard GraphQL schema SDL yet, see: https://github.com/graphql/graphql-spec/issues/488\n\tBlock *hexutil.Uint64\n}\n```\nBlockNumberArgs encapsulates arguments to accessors that specify a block number.\n\n```go\nfunc (a BlockNumberArgs) NumberOr(current rpc.BlockNumberOrHash) rpc.BlockNumberOrHash\n```\nNumberOr returns the provided block number argument, or the \"current\" block number or hash if none was provided.\n\n```go\nfunc (a BlockNumberArgs) NumberOrLatest() rpc.BlockNumberOrHash\n```\nNumberOrLatest returns the provided block number argument, or the \"latest\" block number if none was provided.\n\n```go\ntype BlockType int\n```\n\n```go\ntype CallData struct {\n\tFrom                 *common.Address // The Ethereum address the call is from.\n\tTo                   *common.Address // The Ethereum address the call is to.\n\tGas                  *hexutil.Uint64 // The amount of gas provided for the call.\n\tGasPrice             *hexutil.Big    // The price of each unit of gas, in wei.\n\tMaxFeePerGas         *hexutil.Big    // The max price of each unit of gas, in wei (1559).\n\tMaxPriorityFeePerGas *hexutil.Big    // The max tip of each unit of gas, in wei (1559).\n\tValue                *hexutil.Big    // The value sent along with the call.\n\tData                 *hexutil.Bytes  // Any data sent with the call.\n}\n```\nCallData encapsulates arguments to \\`call\\` or \\`estimateGas\\`. All arguments are optional.\n\n```go\ntype CallResult struct {\n\t// contains filtered or unexported fields\n}\n```\nCallResult encapsulates the result of an invocation of the \\`call\\` accessor.\n\n```go\nfunc (c *CallResult) Data() hexutil.Bytes\n```\n\n```go\nfunc (c *CallResult) GasUsed() Long\n```\n\n```go\nfunc (c *CallResult) Status() Long\n```\n\n```go\ntype FilterCriteria struct {\n\tFromBlock *hexutil.Uint64   // beginning of the queried range, nil means genesis block\n\tToBlock   *hexutil.Uint64   // end of the range, nil means latest block\n\tAddresses *[]common.Address // restricts matches to events created by specific contracts\n\n\t// The Topic list restricts matches to particular event topics. Each event has a list\n\t// of topics. Topics matches a prefix of that list. An empty element slice matches any\n\t// topic. Non-empty elements represent an alternative that matches any of the\n\t// contained topics.\n\t//\n\t// Examples:\n\t// {} or nil          matches any topic list\n\t// {{A}}              matches topic A in first position\n\t// {{}, {B}}          matches any topic in first position, B in second position\n\t// {{A}, {B}}         matches topic A in first position, B in second position\n\t// {{A, B}}, {C, D}}  matches topic (A OR B) in first position, (C OR D) in second position\n\tTopics *[][]common.Hash\n}\n```\nFilterCriteria encapsulates the arguments to \\`logs\\` on the root resolver object.\n\n```go\ntype GraphiQL struct{}\n```\nGraphiQL is an in-browser IDE for exploring GraphiQL APIs. This handler returns GraphiQL when requested.\n\nFor more information, see [https://github.com/graphql/graphiql](https://github.com/graphql/graphiql).\n\n```go\nfunc (h GraphiQL) ServeHTTP(w http.ResponseWriter, r *http.Request)\n```\n\n```go\ntype Log struct {\n\t// contains filtered or unexported fields\n}\n```\nLog represents an individual log message. All arguments are mandatory.\n\n```go\nfunc (l *Log) Account(ctx context.Context, args BlockNumberArgs) *Account\n```\n\n```go\nfunc (l *Log) Data(ctx context.Context) hexutil.Bytes\n```\n\n```go\nfunc (l *Log) Index(ctx context.Context) int32\n```\n\n```go\nfunc (l *Log) Topics(ctx context.Context) []common.Hash\n```\n\n```go\nfunc (l *Log) Transaction(ctx context.Context) *Transaction\n```\n\n```go\ntype Long int64\n```\n\n```go\nfunc (b Long) ImplementsGraphQLType(name string) bool\n```\nImplementsGraphQLType returns true if Long implements the provided GraphQL type.\n\n```go\nfunc (b *Long) UnmarshalGraphQL(input interface{}) error\n```\nUnmarshalGraphQL unmarshals the provided GraphQL query data.\n\n```go\ntype Pending struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *Pending) Account(ctx context.Context, args struct {\n\tAddress common.Address\n}) *Account\n```\n\n```go\nfunc (p *Pending) Call(ctx context.Context, args struct {\n\tData ethapi.TransactionArgs\n}) (*CallResult, error)\n```\n\n```go\nfunc (p *Pending) EstimateGas(ctx context.Context, args struct {\n\tData ethapi.TransactionArgs\n}) (Long, error)\n```\n\n```go\nfunc (p *Pending) TransactionCount(ctx context.Context) (int32, error)\n```\n\n```go\nfunc (p *Pending) Transactions(ctx context.Context) (*[]*Transaction, error)\n```\n\n```go\ntype Resolver struct {\n\t// contains filtered or unexported fields\n}\n```\nResolver is the top-level object in the GraphQL hierarchy.\n\n```go\nfunc (r *Resolver) Block(ctx context.Context, args struct {\n\tNumber *Long\n\tHash   *common.Hash\n}) (*Block, error)\n```\n\n```go\nfunc (r *Resolver) Blocks(ctx context.Context, args struct {\n\tFrom *Long\n\tTo   *Long\n}) ([]*Block, error)\n```\n\n```go\nfunc (r *Resolver) ChainID(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (r *Resolver) GasPrice(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (r *Resolver) Logs(ctx context.Context, args struct{ Filter FilterCriteria }) ([]*Log, error)\n```\n\n```go\nfunc (r *Resolver) MaxPriorityFeePerGas(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (r *Resolver) Pending(ctx context.Context) *Pending\n```\n\n```go\nfunc (r *Resolver) SendRawTransaction(ctx context.Context, args struct{ Data hexutil.Bytes }) (common.Hash, error)\n```\n\n```go\nfunc (r *Resolver) Syncing() (*SyncState, error)\n```\nSyncing returns false in case the node is currently not syncing with the network. It can be up to date or has not yet received the latest block headers from its pears. In case it is synchronizing: - startingBlock:       block number this node started to synchronise from - currentBlock:        block number this node is currently importing - highestBlock:        block number of the highest block header this node has received from peers - syncedAccounts:      number of accounts downloaded - syncedAccountBytes:  number of account trie bytes persisted to disk - syncedBytecodes:     number of bytecodes downloaded - syncedBytecodeBytes: number of bytecode bytes downloaded - syncedStorage:       number of storage slots downloaded - syncedStorageBytes:  number of storage trie bytes persisted to disk - healedTrienodes:     number of state trie nodes downloaded - healedTrienodeBytes: number of state trie bytes persisted to disk - healedBytecodes:     number of bytecodes downloaded - healedBytecodeBytes: number of bytecodes persisted to disk - healingTrienodes:    number of state trie nodes pending - healingBytecode:     number of bytecodes pending\n\n```go\nfunc (r *Resolver) Transaction(ctx context.Context, args struct{ Hash common.Hash }) (*Transaction, error)\n```\n\n```go\ntype SyncState struct {\n\t// contains filtered or unexported fields\n}\n```\nSyncState represents the synchronisation status returned from the \\`syncing\\` accessor.\n\n```go\nfunc (s *SyncState) CurrentBlock() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HealedBytecodeBytes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HealedBytecodes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HealedTrienodeBytes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HealedTrienodes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HealingBytecode() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HealingTrienodes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) HighestBlock() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) StartingBlock() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) SyncedAccountBytes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) SyncedAccounts() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) SyncedBytecodeBytes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) SyncedBytecodes() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) SyncedStorage() hexutil.Uint64\n```\n\n```go\nfunc (s *SyncState) SyncedStorageBytes() hexutil.Uint64\n```\n\n```go\ntype Transaction struct {\n\t// contains filtered or unexported fields\n}\n```\nTransaction represents an Ethereum transaction. backend and hash are mandatory; all others will be fetched when required.\n\n```go\nfunc (t *Transaction) AccessList(ctx context.Context) (*[]*AccessTuple, error)\n```\n\n```go\nfunc (t *Transaction) Block(ctx context.Context) (*Block, error)\n```\n\n```go\nfunc (t *Transaction) CreatedContract(ctx context.Context, args BlockNumberArgs) (*Account, error)\n```\n\n```go\nfunc (t *Transaction) CumulativeGasUsed(ctx context.Context) (*Long, error)\n```\n\n```go\nfunc (t *Transaction) EffectiveGasPrice(ctx context.Context) (*hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) From(ctx context.Context, args BlockNumberArgs) (*Account, error)\n```\n\n```go\nfunc (t *Transaction) Gas(ctx context.Context) (hexutil.Uint64, error)\n```\n\n```go\nfunc (t *Transaction) GasPrice(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) GasUsed(ctx context.Context) (*Long, error)\n```\n\n```go\nfunc (t *Transaction) Hash(ctx context.Context) common.Hash\n```\n\n```go\nfunc (t *Transaction) Index(ctx context.Context) (*int32, error)\n```\n\n```go\nfunc (t *Transaction) InputData(ctx context.Context) (hexutil.Bytes, error)\n```\n\n```go\nfunc (t *Transaction) Logs(ctx context.Context) (*[]*Log, error)\n```\n\n```go\nfunc (t *Transaction) MaxFeePerGas(ctx context.Context) (*hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) MaxPriorityFeePerGas(ctx context.Context) (*hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) Nonce(ctx context.Context) (hexutil.Uint64, error)\n```\n\n```go\nfunc (t *Transaction) R(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) S(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) Status(ctx context.Context) (*Long, error)\n```\n\n```go\nfunc (t *Transaction) To(ctx context.Context, args BlockNumberArgs) (*Account, error)\n```\n\n```go\nfunc (t *Transaction) Type(ctx context.Context) (*int32, error)\n```\n\n```go\nfunc (t *Transaction) V(ctx context.Context) (hexutil.Big, error)\n```\n\n```go\nfunc (t *Transaction) Value(ctx context.Context) (hexutil.Big, error)\n```\n\n","path":"github.com/Evolution404/simcore/graphql","name":"graphql","synopsis":"Package graphql provides a GraphQL interface to Ethereum node data.","isRedistributable":true}
