smartweave

package
v0.2.180 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TagAppName         = "App-Name"
	TagAppVersion      = "App-Version"
	TagContractTxId    = "Contract"
	TagInput           = "Input"
	TagInputFormat     = "Input-Format"
	TagContentType     = "Content-Type"
	TagContractSrcTxId = "Contract-Src"
	TagSDK             = "SDK"
	TagMinFee          = "Min-Fee"
)

SmartWeave protocol tag names

View Source
const (
	TagAppNameValue         = "SmartWeaveAction"
	TagAppVersionValue      = "0.3.0"
	TagInputFormatTagValue  = "tag"
	TagInputFormatDataValue = "data"
	TagSDKValue             = "Warp"
)

SmartWeave protocol tag values

View Source
const MaxInteractionDataItemSizeBytes = 20000

Variables

This section is empty.

Functions

func IsInteractionWithData added in v0.2.122

func IsInteractionWithData(tx *arweave.Transaction) bool

whether the interaction should have a non-empty data field

func ValidateInteraction added in v0.2.111

func ValidateInteraction(tx *arweave.Transaction, isInputInDataEnabled bool) (isInteraction bool, err error)

Types

type Amount

type Amount struct {
	Winston string `json:"winston"`
}

type Block

type Block struct {
	Height    int64                `json:"height"`
	Id        arweave.Base64String `json:"id"`
	Timestamp int64                `json:"timestamp"`
}

type Interaction

type Interaction struct {
	Id             arweave.Base64String `json:"id"`
	Owner          Owner                `json:"owner"`
	Recipient      arweave.Base64String `json:"recipient"`
	Tags           []Tag                `json:"tags"`
	Block          Block                `json:"block"`
	Fee            Amount               `json:"fee"`
	Quantity       Amount               `json:"quantity"`
	Random         arweave.Base64String `json:"random,omitempty"`
	SequencerBlock *SequencerBlock      `json:"sequencer_block,omitempty"`
}

type Owner

type Owner struct {
	Address string `json:"address"`
}

type SequencerBlock added in v0.2.147

type SequencerBlock struct {
	Height    int64 `json:"height"`
	Timestamp int64 `json:"timestamp"`
}

type Tag added in v0.1.269

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

Jump to

Keyboard shortcuts

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