optgoar

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BundledInQueryTemplate = `{
		transaction(id: "%s") {
			bundledIn {
				id
			}
		}
	}`
)

Variables

This section is empty.

Functions

func CheckTransaction added in v0.4.3

func CheckTransaction(txid string, client *goar.Client) (bool, error)

func Download added in v0.4.3

func Download(itemID string, client *goar.Client) (*goarSchema.BundleItem, error)

func Downloads added in v0.4.3

func Downloads(itemsIds []string, client *goar.Client) (items []*goarSchema.BundleItem, err error)

func GetBundledInId added in v0.4.3

func GetBundledInId(txid string, client *goar.Client) (parentTxid string, err error)

func GraphQL added in v0.4.3

func GraphQL(query string, client *goar.Client) ([]byte, error)

Types

type BundledInResponse

type BundledInResponse struct {
	Transaction struct {
		BundledIn struct {
			ID string `json:"id"`
		} `json:"bundledIn"`
	} `json:"transaction"`
}

BundledInResponse GraphQL response structure

type OptGoar

type OptGoar struct {
	// contains filtered or unexported fields
}

func New

func New(wallet *goar.Wallet, ctx context.Context) *OptGoar

func (*OptGoar) CheckTransaction

func (o *OptGoar) CheckTransaction(txid string) (bool, error)

func (*OptGoar) Download

func (o *OptGoar) Download(itemID string) (*goarSchema.BundleItem, error)

func (*OptGoar) Downloads

func (o *OptGoar) Downloads(itemsIds []string) (items []*goarSchema.BundleItem, err error)

func (*OptGoar) GraphQL

func (o *OptGoar) GraphQL(query string) (result []byte, err error)

func (*OptGoar) Upload

func (o *OptGoar) Upload(items []goarSchema.BundleItem) (txid string, err error)

Jump to

Keyboard shortcuts

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