stacks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxStringLengthBytes           = 128
	ClarityIntSize                 = 128
	ClarityIntByteSize             = 16
	RecoverableECDSASigLengthBytes = 65
	CompressedPubkeyLengthBytes    = 32
	UncompressedPubkeyLengthBytes  = 64
	MemoMaxLengthBytes             = 34
	AddressHashLength              = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressHashMode

type AddressHashMode uint8
const (
	AddressHashModeSerializeP2PKH  AddressHashMode = 0x00
	AddressHashModeSerializeP2WPKH AddressHashMode = 0x02
)

type AddressType

type AddressType byte
const (
	AddressTypeStandard AddressType = 0x05
	AddressTypeContract AddressType = 0x06
)

type AddressVersion

type AddressVersion uint8
const (
	AddressVersionMainnetSingleSig AddressVersion = 22
	AddressVersionTestnetSingleSig AddressVersion = 26
)

type AnchorMode

type AnchorMode uint8
const (
	AnchorModeOnChainOnly  AnchorMode = 0x01
	AnchorModeOffChainOnly AnchorMode = 0x02
	AnchorModeAny          AnchorMode = 0x03
)

type AuthType

type AuthType uint8
const (
	AuthTypeStandard  AuthType = 0x04
	AuthTypeSponsored AuthType = 0x05
)

type ChainID

type ChainID uint32
const (
	ChainIDTestnet ChainID = 0x80000000
	ChainIDMainnet ChainID = 0x00000001
)

type ClarityVersion added in v0.5.0

type ClarityVersion uint8
const (
	ClarityVersionUnspecified ClarityVersion = 0
	ClarityVersion1           ClarityVersion = 1
	ClarityVersion2           ClarityVersion = 2
	ClarityVersion3           ClarityVersion = 3
)

type FungibleConditionCode added in v0.5.0

type FungibleConditionCode uint8
const (
	FungibleConditionCodeSentEq FungibleConditionCode = 0x01
	FungibleConditionCodeSentGt FungibleConditionCode = 0x02
	FungibleConditionCodeSentGe FungibleConditionCode = 0x03
	FungibleConditionCodeSentLt FungibleConditionCode = 0x04
	FungibleConditionCodeSentLe FungibleConditionCode = 0x05
)

type NonFungibleConditionCode added in v0.5.0

type NonFungibleConditionCode uint8
const (
	NonFungibleConditionCodeSent    NonFungibleConditionCode = 0x10
	NonFungibleConditionCodeNotSent NonFungibleConditionCode = 0x11
)

type PayloadType

type PayloadType byte
const (
	PayloadTypeTokenTransfer          PayloadType = 0x00
	PayloadTypeSmartContract          PayloadType = 0x01
	PayloadTypeContractCall           PayloadType = 0x02
	PayloadTypePoisonMicroblock       PayloadType = 0x03
	PayloadTypeCoinbase               PayloadType = 0x04
	PayloadTypeCoinbaseToAltRecipient PayloadType = 0x05
	PayloadTypeVersionedSmartContract PayloadType = 0x06
	PayloadTypeTenureChange           PayloadType = 0x07
	PayloadTypeNakamotoCoinbase       PayloadType = 0x08
)

type PostConditionMode

type PostConditionMode uint8
const (
	PostConditionModeAllow PostConditionMode = 0x01
	PostConditionModeDeny  PostConditionMode = 0x02
)

type PostConditionPrincipalType added in v0.5.0

type PostConditionPrincipalType uint8
const (
	PostConditionPrincipalTypeOrigin   PostConditionPrincipalType = 0x01
	PostConditionPrincipalTypeStandard PostConditionPrincipalType = 0x02
	PostConditionPrincipalTypeContract PostConditionPrincipalType = 0x03
)

type PostConditionType

type PostConditionType uint8
const (
	PostConditionTypeSTX         PostConditionType = 0x00
	PostConditionTypeFungible    PostConditionType = 0x01
	PostConditionTypeNonFungible PostConditionType = 0x02
)

type PubKeyEncoding

type PubKeyEncoding uint8
const (
	PubKeyEncodingCompressed   PubKeyEncoding = 0x00
	PubKeyEncodingUncompressed PubKeyEncoding = 0x01
)

type StacksNetwork

type StacksNetwork struct {
	CoreAPIURL string
	Version    TransactionVersion
	ChainID    ChainID
}

func NewStacksCustomNetwork added in v0.3.1

func NewStacksCustomNetwork(coreAPIURL string, version TransactionVersion, chainID ChainID) *StacksNetwork

func NewStacksLocalnet added in v0.3.1

func NewStacksLocalnet() *StacksNetwork

func NewStacksMainnet

func NewStacksMainnet() *StacksNetwork

func NewStacksTestnet

func NewStacksTestnet() *StacksNetwork

func (*StacksNetwork) FetchFn

func (n *StacksNetwork) FetchFn(url string) (*http.Response, error)

func (*StacksNetwork) GetAccountAPIURL

func (n *StacksNetwork) GetAccountAPIURL(address string) string

func (*StacksNetwork) GetBroadcastAPIURL

func (n *StacksNetwork) GetBroadcastAPIURL() string

func (*StacksNetwork) GetNonceAPIURL

func (n *StacksNetwork) GetNonceAPIURL(address string) string

func (*StacksNetwork) GetTransactionFeeEstimateAPIURL

func (n *StacksNetwork) GetTransactionFeeEstimateAPIURL() string

func (*StacksNetwork) GetTransferFeeEstimateAPIURL

func (n *StacksNetwork) GetTransferFeeEstimateAPIURL() string

type TransactionVersion

type TransactionVersion uint8
const (
	TransactionVersionMainnet TransactionVersion = 0x00
	TransactionVersionTestnet TransactionVersion = 0x80
)

Jump to

Keyboard shortcuts

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