types

package
v0.0.0-...-943aac3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefURL = "https://squid.gemini-3g.subspace.network/graphql"
	DefURL = "https://squid.gemini-3h.subspace.network/graphql"

	EventQuery     = "" /* 767-byte string literal not displayed */
	ExtrinsicQuery = "" /* 642-byte string literal not displayed */
	BlockQuery     = "" /* 485-byte string literal not displayed */
	EventByIdQuery = "" /* 527-byte string literal not displayed */
	HomeQuery      = "" /* 752-byte string literal not displayed */
)
View Source
const (
	OpExtrinsicsByBlockId = "ExtrinsicsByBlockId"
	OpEventsByBlockId     = "EventsByBlockId"
	OpBlockById           = "BlockById"
	OpEventById           = "EventById"
	OpHomeQuery           = "HomeQuery"
)
View Source
const (
	EventSubspaceFarmerVote  = "Subspace.FarmerVote"
	EventSubspaceBlockReward = "Rewards.BlockReward"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID       string `json:"id"`
	TypeName string `json:"__typename"`
}

type Block

type Block struct {
	Height   string `json:"height"`
	TypeName string `json:"__typename"`

	// event
	ID string `json:"id"`

	// Extrinsics
	Timestamp string `json:"timestamp"`
}

type BlockInfo

type BlockInfo struct {
	ID              string `json:"id"`
	Author          Author `json:"author"`
	Height          string `json:"height"`
	Hash            string `json:"hash"`
	StateRoot       string `json:"stateRoot"`
	Timestamp       string `json:"timestamp"`
	ExtrinsicsRoot  string `json:"extrinsicsRoot"`
	SpecId          string `json:"specId"`
	ParentHash      string `json:"parentHash"`
	ExtrinsicsCount int    `json:"extrinsicsCount"`
	EventsCount     int    `json:"eventsCount"`
	TypeName        string `json:"__typename"`

	// home query
	BlockchainSize string `json:"blockchainSize"`
	SpacePledged   string `json:"spacePledged"`
}

"id": "0001107843-614b9", "height": "1107843", "hash": "0x614b9af48696be5379051ac7c58d7afdaa1cf021d8222ce2634b0a6e961ca791", "stateRoot": "0x4dba3b88c4c7bb8d7dbf1ab21d5c604fc00f5cd152ac7ae8906a48ecbdbe5e32", "timestamp": "2024-01-15T09:11:59.180000Z", "extrinsicsRoot": "0x104805c18e9d0f00ee0508adf29b8c89b4065723c53f01faa3fc8439710dc7f4", "specId": "subspace@5", "parentHash": "0x42a18b7bff96cf0d08dff2fb3f7f3a530eb798e748727d4e9705ad1a6023d441", "extrinsicsCount": 8, "eventsCount": 44, "author": st8eJ9cuh4XsHyoqWNWr13o8e9SiqYvX2Yg7cSKVKQy6KeUCN

type Data

type Data struct {
	EventsConnection     EventsConnection     `json:"eventsConnection"`
	ExtrinsicsConnection ExtrinsicsConnection `json:"extrinsicsConnection"`
	Blocks               []BlockInfo          `json:"blocks"`
	EventDetail          EventDetail          `json:"eventById"`
}

type Event

type Event struct {
	Node     Node   `json:"node"`
	TypeName string `json:"__typename"`

	// Extrinsics
	Cursor string `json:"cursor"`
}

type EventArgs

type EventArgs struct {
	Height        int64  `json:"height"`
	PublicKey     string `json:"publicKey"`
	ParentHash    string `json:"parentHash"`
	RewardAddress string `json:"rewardAddress"`

	// Rewards.BlockReward
	BlockAuthor string `json:"blockAuthor"`
	Reward      string `json:"reward"`
}
"args": {
	"height": 1120563,
	"publicKey": "0x7483f122c69ed7ef3f8aad34a06de88381dc498b7a22f40732ff83cc0c25e40e",
	"parentHash": "0x08422c0705c18a604849f2302e301566e3c3c34e9081e352b070f3a5247a12da",
	"rewardAddress": "0x5c49626b1912124a5a83e174fc01e3f423d08a4c0a70fbb8c0e953ddfdaffd68"
}

type EventDetail

type EventDetail struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	EventArgs EventArgs `json:"args"`
	Timestamp string    `json:"timestamp"`
	TypeName  string    `json:"__typename"`
}

type EventsConnection

type EventsConnection struct {
	Edges      []Event  `json:"edges"`
	TotalCount int      `json:"totalCount"`
	PageInfo   PageInfo `json:"pageInfo"`
	TypeName   string   `json:"__typename"`
}

type Extrinsic

type Extrinsic struct {
	IndexInBlock int    `json:"indexInBlock"`
	Block        Block  `json:"block"`
	TypeName     string `json:"__typename"`
}

type ExtrinsicsConnection

type ExtrinsicsConnection struct {
	Edges      []Event  `json:"edges"`
	TotalCount int      `json:"totalCount"`
	PageInfo   PageInfo `json:"pageInfo"`
	TypeName   string   `json:"__typename"`
}

type Node

type Node struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	IndexInBlock int    `json:"indexInBlock"`
	Block        Block  `json:"block"`
	TypeName     string `json:"__typename"`

	// event
	Phase     string    `json:"phase"`
	Extrinsic Extrinsic `json:"extrinsic"`

	// Extrinsics
	Hash    string `json:"hash"`
	Success bool   `json:"success"`
}

type PageInfo

type PageInfo struct {
	EndCursor   string `json:"endCursor"`
	HasNextPage bool   `json:"hasNextPage"`
	HasPrevious bool   `json:"hasPreviousPage"`
	StartCursor string `json:"startCursor"`
	TypeName    string `json:"__typename"`
}

type Req

type Req struct {
	OperationName string    `json:"operationName"`
	Variables     Variables `json:"variables"`
	Query         string    `json:"query"`
}

type Resp

type Resp struct {
	Data Data `json:"data"`
}

type Variables

type Variables struct {
	BlockID int64  `json:"blockId"`
	First   int    `json:"first"`
	EventId string `json:"eventId"`

	Limit        int    `json:"limit"`
	Offset       int    `json:"offset"`
	AccountTotal string `json:"accountTotal"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL