arweave

package
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arweave

type Arweave struct {
	*http.Client
}

func New

func New() *Arweave

func (*Arweave) TransactionByID

func (a *Arweave) TransactionByID(ctx context.Context, id string) ([]byte, error)

TransactionByID returns a transaction by its ID already decoded.

func (*Arweave) TransactionConnectionByTags

func (a *Arweave) TransactionConnectionByTags(ctx context.Context, tags TagFilters) (*TransactionConnectionResponse, error)

type Data

type Data struct {
	Transactions *TransactionConnection `json:"transactions"`
}

type GraphQLRequest

type GraphQLRequest struct {
	Query string `json:"query"`
}

type GraphqlError

type GraphqlError struct {
	Errors []*MessageError `json:"errors"`
}

func (*GraphqlError) Error

func (g *GraphqlError) Error() string

type MessageError

type MessageError struct {
	Message *string `json:"message"`
}

func (*MessageError) Error

func (e *MessageError) Error() string

type PageInfo

type PageInfo struct {
	HasNextPage *bool `json:"hasNextPage"`
}

type Tag

type Tag struct {
	Name  *string `json:"name"`
	Value *string `json:"value"`
}

type TagFilter

type TagFilter struct {
	Name   string   `json:"name"`
	Values []string `json:"values"`
}

func (*TagFilter) GraphqlInput

func (t *TagFilter) GraphqlInput() string

type TagFilters

type TagFilters []TagFilter

func (TagFilters) GraphqlInput

func (tags TagFilters) GraphqlInput() string

type Transaction

type Transaction struct {
	ID   *string `json:"id"`
	Tags []*Tag  `json:"tags"`
}

type TransactionConnection

type TransactionConnection struct {
	PageInfo *PageInfo          `json:"pageInfo"`
	Edges    []*TransactionEdge `json:"edges"`
}

type TransactionConnectionResponse

type TransactionConnectionResponse struct {
	Data *Data         `json:"data"`
	Err  *GraphqlError `json:"error"`
}

type TransactionEdge

type TransactionEdge struct {
	Cursor *string      `json:"cursor"`
	Node   *Transaction `json:"node"`
}

Jump to

Keyboard shortcuts

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