azimuth-client-go/generated.go
Theodore Blackman 4d7ab16549 Initial release of azimuth-client-go library
- Consolidated azimuth client implementations from zenithd and janus
- Type-safe GraphQL client using genqlient code generation
- Comprehensive caching with configurable TTL (1 hour default)
- Full API coverage: authentication keys, ship activity, sponsorship, ownership
- Enhanced functionality combining best features from both original implementations
- Extensive test suite with 16 unit tests covering all functionality
- Complete documentation with examples and usage patterns
- Support for galaxy, star, and planet ship type classification
- BigInt utility for proper GraphQL number handling
- MIT licensed for open source usage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 14:01:03 -04:00

765 lines
26 KiB
Go

// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package azimuth
import (
"context"
"encoding/json"
"fmt"
"github.com/Khan/genqlient/graphql"
)
// EventsInRangeAzimuthEventsInRangeResultEvent includes the requested fields of the GraphQL type ResultEvent.
type EventsInRangeAzimuthEventsInRangeResultEvent struct {
Block EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_ `json:"block"`
Tx EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_ `json:"tx"`
EventIndex int `json:"eventIndex"`
Event EventsInRangeAzimuthEventsInRangeResultEventEvent `json:"-"`
}
// GetBlock returns EventsInRangeAzimuthEventsInRangeResultEvent.Block, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) GetBlock() EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_ {
return v.Block
}
// GetTx returns EventsInRangeAzimuthEventsInRangeResultEvent.Tx, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) GetTx() EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_ {
return v.Tx
}
// GetEventIndex returns EventsInRangeAzimuthEventsInRangeResultEvent.EventIndex, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) GetEventIndex() int { return v.EventIndex }
// GetEvent returns EventsInRangeAzimuthEventsInRangeResultEvent.Event, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) GetEvent() EventsInRangeAzimuthEventsInRangeResultEventEvent {
return v.Event
}
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) UnmarshalJSON(b []byte) error {
if string(b) == "null" {
return nil
}
var firstPass struct {
*EventsInRangeAzimuthEventsInRangeResultEvent
Event json.RawMessage `json:"event"`
graphql.NoUnmarshalJSON
}
firstPass.EventsInRangeAzimuthEventsInRangeResultEvent = v
err := json.Unmarshal(b, &firstPass)
if err != nil {
return err
}
{
dst := &v.Event
src := firstPass.Event
if len(src) != 0 && string(src) != "null" {
err = __unmarshalEventsInRangeAzimuthEventsInRangeResultEventEvent(
src, dst)
if err != nil {
return fmt.Errorf(
"unable to unmarshal EventsInRangeAzimuthEventsInRangeResultEvent.Event: %w", err)
}
}
}
return nil
}
type __premarshalEventsInRangeAzimuthEventsInRangeResultEvent struct {
Block EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_ `json:"block"`
Tx EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_ `json:"tx"`
EventIndex int `json:"eventIndex"`
Event json.RawMessage `json:"event"`
}
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) MarshalJSON() ([]byte, error) {
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
return json.Marshal(premarshaled)
}
func (v *EventsInRangeAzimuthEventsInRangeResultEvent) __premarshalJSON() (*__premarshalEventsInRangeAzimuthEventsInRangeResultEvent, error) {
var retval __premarshalEventsInRangeAzimuthEventsInRangeResultEvent
retval.Block = v.Block
retval.Tx = v.Tx
retval.EventIndex = v.EventIndex
{
dst := &retval.Event
src := v.Event
var err error
*dst, err = __marshalEventsInRangeAzimuthEventsInRangeResultEventEvent(
&src)
if err != nil {
return nil, fmt.Errorf(
"unable to marshal EventsInRangeAzimuthEventsInRangeResultEvent.Event: %w", err)
}
}
return &retval, nil
}
// EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_ includes the requested fields of the GraphQL type _Block_.
type EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_ struct {
Hash string `json:"hash"`
Number int `json:"number"`
}
// GetHash returns EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_.Hash, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_) GetHash() string { return v.Hash }
// GetNumber returns EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_.Number, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventBlockBlock_) GetNumber() int { return v.Number }
// EventsInRangeAzimuthEventsInRangeResultEventEvent includes the requested fields of the GraphQL interface Event.
//
// EventsInRangeAzimuthEventsInRangeResultEventEvent is implemented by the following types:
// EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent
type EventsInRangeAzimuthEventsInRangeResultEventEvent interface {
implementsGraphQLInterfaceEventsInRangeAzimuthEventsInRangeResultEventEvent()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
GetTypename() string
}
func (v *EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent) implementsGraphQLInterfaceEventsInRangeAzimuthEventsInRangeResultEventEvent() {
}
func __unmarshalEventsInRangeAzimuthEventsInRangeResultEventEvent(b []byte, v *EventsInRangeAzimuthEventsInRangeResultEventEvent) error {
if string(b) == "null" {
return nil
}
var tn struct {
TypeName string `json:"__typename"`
}
err := json.Unmarshal(b, &tn)
if err != nil {
return err
}
switch tn.TypeName {
case "OwnerChangedEvent":
*v = new(EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent)
return json.Unmarshal(b, *v)
case "":
return fmt.Errorf(
"response was missing Event.__typename")
default:
return fmt.Errorf(
`unexpected concrete type for EventsInRangeAzimuthEventsInRangeResultEventEvent: "%v"`, tn.TypeName)
}
}
func __marshalEventsInRangeAzimuthEventsInRangeResultEventEvent(v *EventsInRangeAzimuthEventsInRangeResultEventEvent) ([]byte, error) {
var typename string
switch v := (*v).(type) {
case *EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent:
typename = "OwnerChangedEvent"
result := struct {
TypeName string `json:"__typename"`
*EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent
}{typename, v}
return json.Marshal(result)
case nil:
return []byte("null"), nil
default:
return nil, fmt.Errorf(
`unexpected concrete type for EventsInRangeAzimuthEventsInRangeResultEventEvent: "%T"`, v)
}
}
// EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent includes the requested fields of the GraphQL type OwnerChangedEvent.
type EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent struct {
Typename string `json:"__typename"`
Point BigInt `json:"point"`
Owner string `json:"owner"`
}
// GetTypename returns EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent.Typename, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent) GetTypename() string {
return v.Typename
}
// GetPoint returns EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent.Point, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent) GetPoint() BigInt {
return v.Point
}
// GetOwner returns EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent.Owner, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventEventOwnerChangedEvent) GetOwner() string {
return v.Owner
}
// EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_ includes the requested fields of the GraphQL type _Transaction_.
type EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_ struct {
Hash string `json:"hash"`
Index int `json:"index"`
From string `json:"from"`
To string `json:"to"`
}
// GetHash returns EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_.Hash, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_) GetHash() string { return v.Hash }
// GetIndex returns EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_.Index, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_) GetIndex() int { return v.Index }
// GetFrom returns EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_.From, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_) GetFrom() string { return v.From }
// GetTo returns EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_.To, and is useful for accessing the field via an interface.
func (v *EventsInRangeAzimuthEventsInRangeResultEventTxTransaction_) GetTo() string { return v.To }
// EventsInRangeResponse is returned by EventsInRange on success.
type EventsInRangeResponse struct {
AzimuthEventsInRange []EventsInRangeAzimuthEventsInRangeResultEvent `json:"azimuthEventsInRange"`
}
// GetAzimuthEventsInRange returns EventsInRangeResponse.AzimuthEventsInRange, and is useful for accessing the field via an interface.
func (v *EventsInRangeResponse) GetAzimuthEventsInRange() []EventsInRangeAzimuthEventsInRangeResultEvent {
return v.AzimuthEventsInRange
}
// GetKeysAzimuthGetKeysResultGetKeysType includes the requested fields of the GraphQL type ResultGetKeysType.
type GetKeysAzimuthGetKeysResultGetKeysType struct {
Value GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType `json:"value"`
Proof GetKeysAzimuthGetKeysResultGetKeysTypeProof `json:"proof"`
}
// GetValue returns GetKeysAzimuthGetKeysResultGetKeysType.Value, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysType) GetValue() GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType {
return v.Value
}
// GetProof returns GetKeysAzimuthGetKeysResultGetKeysType.Proof, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysType) GetProof() GetKeysAzimuthGetKeysResultGetKeysTypeProof {
return v.Proof
}
// GetKeysAzimuthGetKeysResultGetKeysTypeProof includes the requested fields of the GraphQL type Proof.
type GetKeysAzimuthGetKeysResultGetKeysTypeProof struct {
Data string `json:"data"`
}
// GetData returns GetKeysAzimuthGetKeysResultGetKeysTypeProof.Data, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysTypeProof) GetData() string { return v.Data }
// GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType includes the requested fields of the GraphQL type GetKeysType.
type GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType struct {
Value0 string `json:"value0"`
Value1 string `json:"value1"`
Value2 BigInt `json:"value2"`
Value3 BigInt `json:"value3"`
}
// GetValue0 returns GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType.Value0, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType) GetValue0() string { return v.Value0 }
// GetValue1 returns GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType.Value1, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType) GetValue1() string { return v.Value1 }
// GetValue2 returns GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType.Value2, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType) GetValue2() BigInt { return v.Value2 }
// GetValue3 returns GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType.Value3, and is useful for accessing the field via an interface.
func (v *GetKeysAzimuthGetKeysResultGetKeysTypeValueGetKeysType) GetValue3() BigInt { return v.Value3 }
// GetKeysResponse is returned by GetKeys on success.
type GetKeysResponse struct {
AzimuthGetKeys GetKeysAzimuthGetKeysResultGetKeysType `json:"azimuthGetKeys"`
}
// GetAzimuthGetKeys returns GetKeysResponse.AzimuthGetKeys, and is useful for accessing the field via an interface.
func (v *GetKeysResponse) GetAzimuthGetKeys() GetKeysAzimuthGetKeysResultGetKeysType {
return v.AzimuthGetKeys
}
// GetOwnerAzimuthGetOwnerResultString includes the requested fields of the GraphQL type ResultString.
type GetOwnerAzimuthGetOwnerResultString struct {
Value string `json:"value"`
}
// GetValue returns GetOwnerAzimuthGetOwnerResultString.Value, and is useful for accessing the field via an interface.
func (v *GetOwnerAzimuthGetOwnerResultString) GetValue() string { return v.Value }
// GetOwnerResponse is returned by GetOwner on success.
type GetOwnerResponse struct {
AzimuthGetOwner GetOwnerAzimuthGetOwnerResultString `json:"azimuthGetOwner"`
}
// GetAzimuthGetOwner returns GetOwnerResponse.AzimuthGetOwner, and is useful for accessing the field via an interface.
func (v *GetOwnerResponse) GetAzimuthGetOwner() GetOwnerAzimuthGetOwnerResultString {
return v.AzimuthGetOwner
}
// GetSponsorAzimuthGetSponsorResultString includes the requested fields of the GraphQL type ResultString.
type GetSponsorAzimuthGetSponsorResultString struct {
Value string `json:"value"`
}
// GetValue returns GetSponsorAzimuthGetSponsorResultString.Value, and is useful for accessing the field via an interface.
func (v *GetSponsorAzimuthGetSponsorResultString) GetValue() string { return v.Value }
// GetSponsorResponse is returned by GetSponsor on success.
type GetSponsorResponse struct {
AzimuthGetSponsor GetSponsorAzimuthGetSponsorResultString `json:"azimuthGetSponsor"`
}
// GetAzimuthGetSponsor returns GetSponsorResponse.AzimuthGetSponsor, and is useful for accessing the field via an interface.
func (v *GetSponsorResponse) GetAzimuthGetSponsor() GetSponsorAzimuthGetSponsorResultString {
return v.AzimuthGetSponsor
}
// GetSponsoringAzimuthGetSponsoringResultArray includes the requested fields of the GraphQL type ResultArray.
type GetSponsoringAzimuthGetSponsoringResultArray struct {
Value []string `json:"value"`
}
// GetValue returns GetSponsoringAzimuthGetSponsoringResultArray.Value, and is useful for accessing the field via an interface.
func (v *GetSponsoringAzimuthGetSponsoringResultArray) GetValue() []string { return v.Value }
// GetSponsoringResponse is returned by GetSponsoring on success.
type GetSponsoringResponse struct {
AzimuthGetSponsoring GetSponsoringAzimuthGetSponsoringResultArray `json:"azimuthGetSponsoring"`
}
// GetAzimuthGetSponsoring returns GetSponsoringResponse.AzimuthGetSponsoring, and is useful for accessing the field via an interface.
func (v *GetSponsoringResponse) GetAzimuthGetSponsoring() GetSponsoringAzimuthGetSponsoringResultArray {
return v.AzimuthGetSponsoring
}
// GetSyncStatusAzimuthGetSyncStatus includes the requested fields of the GraphQL type SyncStatus.
type GetSyncStatusAzimuthGetSyncStatus struct {
LatestProcessedBlockHash string `json:"latestProcessedBlockHash"`
LatestProcessedBlockNumber int `json:"latestProcessedBlockNumber"`
}
// GetLatestProcessedBlockHash returns GetSyncStatusAzimuthGetSyncStatus.LatestProcessedBlockHash, and is useful for accessing the field via an interface.
func (v *GetSyncStatusAzimuthGetSyncStatus) GetLatestProcessedBlockHash() string {
return v.LatestProcessedBlockHash
}
// GetLatestProcessedBlockNumber returns GetSyncStatusAzimuthGetSyncStatus.LatestProcessedBlockNumber, and is useful for accessing the field via an interface.
func (v *GetSyncStatusAzimuthGetSyncStatus) GetLatestProcessedBlockNumber() int {
return v.LatestProcessedBlockNumber
}
// GetSyncStatusResponse is returned by GetSyncStatus on success.
type GetSyncStatusResponse struct {
AzimuthGetSyncStatus GetSyncStatusAzimuthGetSyncStatus `json:"azimuthGetSyncStatus"`
}
// GetAzimuthGetSyncStatus returns GetSyncStatusResponse.AzimuthGetSyncStatus, and is useful for accessing the field via an interface.
func (v *GetSyncStatusResponse) GetAzimuthGetSyncStatus() GetSyncStatusAzimuthGetSyncStatus {
return v.AzimuthGetSyncStatus
}
// IsActiveAzimuthIsActiveResultBool includes the requested fields of the GraphQL type ResultBool.
type IsActiveAzimuthIsActiveResultBool struct {
Value bool `json:"value"`
}
// GetValue returns IsActiveAzimuthIsActiveResultBool.Value, and is useful for accessing the field via an interface.
func (v *IsActiveAzimuthIsActiveResultBool) GetValue() bool { return v.Value }
// IsActiveResponse is returned by IsActive on success.
type IsActiveResponse struct {
AzimuthIsActive IsActiveAzimuthIsActiveResultBool `json:"azimuthIsActive"`
}
// GetAzimuthIsActive returns IsActiveResponse.AzimuthIsActive, and is useful for accessing the field via an interface.
func (v *IsActiveResponse) GetAzimuthIsActive() IsActiveAzimuthIsActiveResultBool {
return v.AzimuthIsActive
}
// __EventsInRangeInput is used internally by genqlient
type __EventsInRangeInput struct {
FromBlockNumber int `json:"fromBlockNumber"`
ToBlockNumber int `json:"toBlockNumber"`
Name string `json:"name"`
}
// GetFromBlockNumber returns __EventsInRangeInput.FromBlockNumber, and is useful for accessing the field via an interface.
func (v *__EventsInRangeInput) GetFromBlockNumber() int { return v.FromBlockNumber }
// GetToBlockNumber returns __EventsInRangeInput.ToBlockNumber, and is useful for accessing the field via an interface.
func (v *__EventsInRangeInput) GetToBlockNumber() int { return v.ToBlockNumber }
// GetName returns __EventsInRangeInput.Name, and is useful for accessing the field via an interface.
func (v *__EventsInRangeInput) GetName() string { return v.Name }
// __GetKeysInput is used internally by genqlient
type __GetKeysInput struct {
BlockHash string `json:"blockHash"`
ContractAddress string `json:"contractAddress"`
Point BigInt `json:"_point"`
}
// GetBlockHash returns __GetKeysInput.BlockHash, and is useful for accessing the field via an interface.
func (v *__GetKeysInput) GetBlockHash() string { return v.BlockHash }
// GetContractAddress returns __GetKeysInput.ContractAddress, and is useful for accessing the field via an interface.
func (v *__GetKeysInput) GetContractAddress() string { return v.ContractAddress }
// GetPoint returns __GetKeysInput.Point, and is useful for accessing the field via an interface.
func (v *__GetKeysInput) GetPoint() BigInt { return v.Point }
// __GetOwnerInput is used internally by genqlient
type __GetOwnerInput struct {
BlockHash string `json:"blockHash"`
ContractAddress string `json:"contractAddress"`
Point BigInt `json:"_point"`
}
// GetBlockHash returns __GetOwnerInput.BlockHash, and is useful for accessing the field via an interface.
func (v *__GetOwnerInput) GetBlockHash() string { return v.BlockHash }
// GetContractAddress returns __GetOwnerInput.ContractAddress, and is useful for accessing the field via an interface.
func (v *__GetOwnerInput) GetContractAddress() string { return v.ContractAddress }
// GetPoint returns __GetOwnerInput.Point, and is useful for accessing the field via an interface.
func (v *__GetOwnerInput) GetPoint() BigInt { return v.Point }
// __GetSponsorInput is used internally by genqlient
type __GetSponsorInput struct {
Point BigInt `json:"point"`
BlockHash string `json:"blockHash"`
ContractAddress string `json:"contractAddress"`
}
// GetPoint returns __GetSponsorInput.Point, and is useful for accessing the field via an interface.
func (v *__GetSponsorInput) GetPoint() BigInt { return v.Point }
// GetBlockHash returns __GetSponsorInput.BlockHash, and is useful for accessing the field via an interface.
func (v *__GetSponsorInput) GetBlockHash() string { return v.BlockHash }
// GetContractAddress returns __GetSponsorInput.ContractAddress, and is useful for accessing the field via an interface.
func (v *__GetSponsorInput) GetContractAddress() string { return v.ContractAddress }
// __GetSponsoringInput is used internally by genqlient
type __GetSponsoringInput struct {
Sponsor BigInt `json:"sponsor"`
BlockHash string `json:"blockHash"`
ContractAddress string `json:"contractAddress"`
}
// GetSponsor returns __GetSponsoringInput.Sponsor, and is useful for accessing the field via an interface.
func (v *__GetSponsoringInput) GetSponsor() BigInt { return v.Sponsor }
// GetBlockHash returns __GetSponsoringInput.BlockHash, and is useful for accessing the field via an interface.
func (v *__GetSponsoringInput) GetBlockHash() string { return v.BlockHash }
// GetContractAddress returns __GetSponsoringInput.ContractAddress, and is useful for accessing the field via an interface.
func (v *__GetSponsoringInput) GetContractAddress() string { return v.ContractAddress }
// __IsActiveInput is used internally by genqlient
type __IsActiveInput struct {
BlockHash string `json:"blockHash"`
ContractAddress string `json:"contractAddress"`
Point BigInt `json:"_point"`
}
// GetBlockHash returns __IsActiveInput.BlockHash, and is useful for accessing the field via an interface.
func (v *__IsActiveInput) GetBlockHash() string { return v.BlockHash }
// GetContractAddress returns __IsActiveInput.ContractAddress, and is useful for accessing the field via an interface.
func (v *__IsActiveInput) GetContractAddress() string { return v.ContractAddress }
// GetPoint returns __IsActiveInput.Point, and is useful for accessing the field via an interface.
func (v *__IsActiveInput) GetPoint() BigInt { return v.Point }
// The query executed by EventsInRange.
const EventsInRange_Operation = `
query EventsInRange ($fromBlockNumber: Int!, $toBlockNumber: Int!, $name: String) {
azimuthEventsInRange(fromBlockNumber: $fromBlockNumber, toBlockNumber: $toBlockNumber, name: $name) {
block {
hash
number
}
tx {
hash
index
from
to
}
eventIndex
event {
__typename
... on OwnerChangedEvent {
point
owner
}
}
}
}
`
func EventsInRange(
ctx_ context.Context,
client_ graphql.Client,
fromBlockNumber int,
toBlockNumber int,
name string,
) (data_ *EventsInRangeResponse, err_ error) {
req_ := &graphql.Request{
OpName: "EventsInRange",
Query: EventsInRange_Operation,
Variables: &__EventsInRangeInput{
FromBlockNumber: fromBlockNumber,
ToBlockNumber: toBlockNumber,
Name: name,
},
}
data_ = &EventsInRangeResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}
// The query executed by GetKeys.
const GetKeys_Operation = `
query GetKeys ($blockHash: String!, $contractAddress: String!, $_point: BigInt!) {
azimuthGetKeys(blockHash: $blockHash, contractAddress: $contractAddress, _point: $_point) {
value {
value0
value1
value2
value3
}
proof {
data
}
}
}
`
func GetKeys(
ctx_ context.Context,
client_ graphql.Client,
blockHash string,
contractAddress string,
_point BigInt,
) (data_ *GetKeysResponse, err_ error) {
req_ := &graphql.Request{
OpName: "GetKeys",
Query: GetKeys_Operation,
Variables: &__GetKeysInput{
BlockHash: blockHash,
ContractAddress: contractAddress,
Point: _point,
},
}
data_ = &GetKeysResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}
// The query executed by GetOwner.
const GetOwner_Operation = `
query GetOwner ($blockHash: String!, $contractAddress: String!, $_point: BigInt!) {
azimuthGetOwner(blockHash: $blockHash, contractAddress: $contractAddress, _point: $_point) {
value
}
}
`
func GetOwner(
ctx_ context.Context,
client_ graphql.Client,
blockHash string,
contractAddress string,
_point BigInt,
) (data_ *GetOwnerResponse, err_ error) {
req_ := &graphql.Request{
OpName: "GetOwner",
Query: GetOwner_Operation,
Variables: &__GetOwnerInput{
BlockHash: blockHash,
ContractAddress: contractAddress,
Point: _point,
},
}
data_ = &GetOwnerResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}
// The query executed by GetSponsor.
const GetSponsor_Operation = `
query GetSponsor ($point: BigInt!, $blockHash: String!, $contractAddress: String!) {
azimuthGetSponsor(_point: $point, blockHash: $blockHash, contractAddress: $contractAddress) {
value
}
}
`
func GetSponsor(
ctx_ context.Context,
client_ graphql.Client,
point BigInt,
blockHash string,
contractAddress string,
) (data_ *GetSponsorResponse, err_ error) {
req_ := &graphql.Request{
OpName: "GetSponsor",
Query: GetSponsor_Operation,
Variables: &__GetSponsorInput{
Point: point,
BlockHash: blockHash,
ContractAddress: contractAddress,
},
}
data_ = &GetSponsorResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}
// The query executed by GetSponsoring.
const GetSponsoring_Operation = `
query GetSponsoring ($sponsor: BigInt!, $blockHash: String!, $contractAddress: String!) {
azimuthGetSponsoring(_sponsor: $sponsor, blockHash: $blockHash, contractAddress: $contractAddress) {
value
}
}
`
func GetSponsoring(
ctx_ context.Context,
client_ graphql.Client,
sponsor BigInt,
blockHash string,
contractAddress string,
) (data_ *GetSponsoringResponse, err_ error) {
req_ := &graphql.Request{
OpName: "GetSponsoring",
Query: GetSponsoring_Operation,
Variables: &__GetSponsoringInput{
Sponsor: sponsor,
BlockHash: blockHash,
ContractAddress: contractAddress,
},
}
data_ = &GetSponsoringResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}
// The query executed by GetSyncStatus.
const GetSyncStatus_Operation = `
query GetSyncStatus {
azimuthGetSyncStatus {
latestProcessedBlockHash
latestProcessedBlockNumber
}
}
`
func GetSyncStatus(
ctx_ context.Context,
client_ graphql.Client,
) (data_ *GetSyncStatusResponse, err_ error) {
req_ := &graphql.Request{
OpName: "GetSyncStatus",
Query: GetSyncStatus_Operation,
}
data_ = &GetSyncStatusResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}
// The query executed by IsActive.
const IsActive_Operation = `
query IsActive ($blockHash: String!, $contractAddress: String!, $_point: BigInt!) {
azimuthIsActive(blockHash: $blockHash, contractAddress: $contractAddress, _point: $_point) {
value
}
}
`
func IsActive(
ctx_ context.Context,
client_ graphql.Client,
blockHash string,
contractAddress string,
_point BigInt,
) (data_ *IsActiveResponse, err_ error) {
req_ := &graphql.Request{
OpName: "IsActive",
Query: IsActive_Operation,
Variables: &__IsActiveInput{
BlockHash: blockHash,
ContractAddress: contractAddress,
Point: _point,
},
}
data_ = &IsActiveResponse{}
resp_ := &graphql.Response{Data: data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return data_, err_
}