{"modulePath":"github.com/cartesi/rollups-node","version":"v1.5.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package readerclient\n\nThis package contains auxiliary functions generated with genqlient to query the Rollups GraphQL API\n\n## Functions\n\n```go\nfunc ConvertToContractProof(proof *Proof) *contracts.Proof\n```\n\n## Types\n\n```go\ntype CompletionStatus string\n```\n\n```go\nconst (\n\tCompletionStatusUnprocessed                CompletionStatus = \"UNPROCESSED\"\n\tCompletionStatusAccepted                   CompletionStatus = \"ACCEPTED\"\n\tCompletionStatusRejected                   CompletionStatus = \"REJECTED\"\n\tCompletionStatusException                  CompletionStatus = \"EXCEPTION\"\n\tCompletionStatusMachineHalted              CompletionStatus = \"MACHINE_HALTED\"\n\tCompletionStatusCycleLimitExceeded         CompletionStatus = \"CYCLE_LIMIT_EXCEEDED\"\n\tCompletionStatusTimeLimitExceeded          CompletionStatus = \"TIME_LIMIT_EXCEEDED\"\n\tCompletionStatusPayloadLengthLimitExceeded CompletionStatus = \"PAYLOAD_LENGTH_LIMIT_EXCEEDED\"\n)\n```\n\n```go\ntype Input struct {\n\t// Input index starting from genesis\n\tIndex int `json:\"index\"`\n\t// Status of the input\n\tStatus CompletionStatus `json:\"status\"`\n\t// Address responsible for submitting the input\n\tMsgSender common.Address `json:\"msgSender\"`\n\t// Timestamp of the input submission, defined by the base layer's block where it was recorded\n\tTimestamp time.Duration `json:\"timestamp\"`\n\t// Number of the base layer block in which the input was recorded\n\tBlockNumber uint64 `json:\"blockNumber\"`\n\t// Input payload in Ethereum hex binary format, starting with '0x'\n\tPayload hexutil.Bytes `json:\"payload\"`\n\t// Notices from this particular input\n\tNotices []Notice `json:\"notices\"`\n\t// Vouchers from this particular input\n\tVouchers []Voucher `json:\"vouchers\"`\n\t// Reports from this particular input\n\tReports []Report `json:\"reports\"`\n}\n```\n\n```go\nfunc GetInput(\n\tctx context.Context,\n\tclient graphql.Client,\n\tindex int,\n) (*Input, error)\n```\nGetInput returns the input at index\n\n```go\nfunc GetInputs(\n\tctx context.Context,\n\tclient graphql.Client,\n) ([]Input, error)\n```\nGetInputs returns multiple inputs ordered by index\n\n```go\ntype Notice struct {\n\t// Notice index within the context of the input that produced it\n\tIndex int `json:\"index\"`\n\t// Input whose processing produced the notice\n\tInputIndex int `json:\"inputIndex\"`\n\t// Notice data as a payload in Ethereum hex binary format, starting with '0x'\n\tPayload hexutil.Bytes `json:\"payload\"`\n\t// Proof object that allows this notice to be validated by the base layer blockchain\n\tProof *Proof `json:\"proof\"`\n}\n```\n\n```go\nfunc GetInputNotices(\n\tctx context.Context,\n\tclient graphql.Client,\n\tinputIndex int,\n) ([]Notice, error)\n```\nGet multiple notices from GraphQL for the given input index.\n\n```go\nfunc GetNotice(\n\tctx context.Context,\n\tclient graphql.Client,\n\tnoticeIndex int,\n\tinputIndex int,\n) (*Notice, error)\n```\nGet notice from GraphQL given the input and notice indices.\n\n```go\nfunc GetNotices(\n\tctx context.Context,\n\tclient graphql.Client,\n) ([]Notice, error)\n```\nGet multiple notices from graphql.\n\n```go\ntype Proof struct {\n\t// Local input index within the context of the related epoch\n\tInputIndexWithinEpoch int `json:\"inputIndexWithinEpoch\"`\n\t// Output index within the context of the input that produced it\n\tOutputIndexWithinInput int `json:\"outputIndexWithinInput\"`\n\t// Merkle root of all output hashes of the related input\n\t// given in Ethereum hex binary format (32 bytes), starting with '0x'\n\tOutputHashesRootHash hexutil.Bytes `json:\"outputHashesRootHash\"`\n\t// Merkle root of all voucher hashes of the related epoch\n\t// given in Ethereum hex binary format (32 bytes), starting with '0x'\n\tVouchersEpochRootHash hexutil.Bytes `json:\"vouchersEpochRootHash\"`\n\t// Merkle root of all notice hashes of the related epoch\n\t// given in Ethereum hex binary format (32 bytes), starting with '0x'\n\tNoticesEpochRootHash hexutil.Bytes `json:\"noticesEpochRootHash\"`\n\t// Hash of the machine state claimed for the related epoch\n\t// given in Ethereum hex binary format (32 bytes), starting with '0x'\n\tMachineStateHash hexutil.Bytes `json:\"machineStateHash\"`\n\t// Proof that this output hash is in the output-hashes merkle tree.\n\t// This array of siblings is bottom-up ordered (from the leaf to the root).\n\t// Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'.\n\tOutputHashInOutputHashesSiblings []hexutil.Bytes `json:\"outputHashInOutputHashesSiblings\"`\n\t// Proof that this output-hashes root hash is in epoch's output merkle tree.\n\t// This array of siblings is bottom-up ordered (from the leaf to the root).\n\t// Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'.\n\tOutputHashesInEpochSiblings []hexutil.Bytes `json:\"outputHashesInEpochSiblings\"`\n\t// Data that allows the validity proof to be contextualized within submitted claims,\n\t// given as a payload in Ethereum hex binary format, starting with '0x'\n\tContext hexutil.Bytes `json:\"context\"`\n}\n```\n\n```go\ntype Report struct {\n\t// Report index within the context of the input that produced it\n\tIndex int `json:\"index\"`\n\t// Input whose processing produced the report\n\tInputIndex int `json:\"inputIndex\"`\n\t// Report data as a payload in Ethereum hex binary format, starting with '0x'\n\tPayload hexutil.Bytes `json:\"payload\"`\n}\n```\n\n```go\nfunc GetInputReports(\n\tctx context.Context,\n\tclient graphql.Client,\n\tinputIndex int,\n) ([]Report, error)\n```\nGet multiple reports from GraphQL for the given input index.\n\n```go\nfunc GetReport(\n\tctx context.Context,\n\tclient graphql.Client,\n\treportIndex int,\n\tinputIndex int,\n) (*Report, error)\n```\nGet report from GraphQL given the input and report indices.\n\n```go\nfunc GetReports(\n\tctx context.Context,\n\tclient graphql.Client,\n) ([]Report, error)\n```\nGet multiple reports from graphql.\n\n```go\ntype Voucher struct {\n\t// Voucher index within the context of the input that produced it\n\tIndex int `json:\"index\"`\n\t// Input whose processing produced the voucher\n\tInputIndex int `json:\"inputIndex\"`\n\t// Transaction destination address in Ethereum hex binary format (20 bytes), starting with '0x'\n\tDestination common.Address `json:\"destination\"`\n\t// Voucher data as a payload in Ethereum hex binary format, starting with '0x'\n\tPayload hexutil.Bytes `json:\"payload\"`\n\t// Proof object that allows this voucher to be validated by the base layer blockchain\n\tProof *Proof `json:\"proof\"`\n}\n```\n\n```go\nfunc GetInputVouchers(\n\tctx context.Context,\n\tclient graphql.Client,\n\tinputIndex int,\n) ([]Voucher, error)\n```\nGet multiple vouchers from GraphQL for the given input index.\n\n```go\nfunc GetVoucher(\n\tctx context.Context,\n\tclient graphql.Client,\n\tvoucherIndex int,\n\tinputIndex int,\n) (*Voucher, error)\n```\nGet voucher from GraphQL given the input and voucher indices.\n\n```go\nfunc GetVouchers(\n\tctx context.Context,\n\tclient graphql.Client,\n) ([]Voucher, error)\n```\nGet multiple vouchers from graphql.\n\n","path":"github.com/cartesi/rollups-node/pkg/readerclient","name":"readerclient","synopsis":"This package contains auxiliary functions generated with genqlient to query the Rollups GraphQL API","isRedistributable":true}
