misc

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressIndex

func GetAddressIndex(targetChainID string, hexAddress string) (uint64, error)

Types

type Array

type Array struct {
	Element *CadenceType `json:"element"`
	Size    int64        `json:"size"`
}

type CadenceType

type CadenceType struct {
	Kind     CadenceTypeKind `json:"kind"`
	RawType  string          `json:"rawType"`
	Optional bool            `json:"optional"`

	// sub-type specific fields
	ArrayType      *Array      `json:"array"`
	DictionaryType *Dictionary `json:"dictionary"`
}

type CadenceTypeKind

type CadenceTypeKind uint
const (
	CadenceTypeUnknown CadenceTypeKind = iota
	CadenceTypeFixedPointNumber
	CadenceTypeIntegerNumber
	CadenceTypeTextual
	CadenceTypeBoolean
	CadenceTypeAddress
	CadenceTypeArray
	CadenceTypeDictionary
	CadenceTypePath
)

type Dictionary

type Dictionary struct {
	Key   *CadenceType `json:"key"`
	Value *CadenceType `json:"value"`
}

type Interaction

type Interaction struct {
	Kind        InteractionKind     `json:"kind"`
	Parameters  []*Parameter        `json:"parameters"`
	Transaction *TransactionDetails `json:"transaction"`
}

type InteractionKind

type InteractionKind uint
const (
	InteractionKindUnknown InteractionKind = iota
	InteractionKindScript
	InteractionKindTransaction
)

type InteractionResponse

type InteractionResponse struct {
	Interaction *Interaction `json:"interaction"`
	Program     *ast.Program `json:"program"`
	Error       string       `json:"error"`
}

InteractionResponse must match the messages specified in `shared/proto/api/interactions.proto`

func ParseInteraction

func ParseInteraction(code []byte) InteractionResponse

type Parameter

type Parameter struct {
	Identifier string       `json:"identifier"`
	Type       *CadenceType `json:"type"`
}

type TransactionDetails

type TransactionDetails struct {
	AuthorizerCount int `json:"authorizerCount"`
}

Jump to

Keyboard shortcuts

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