stacks

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 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
)

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 PayloadType

type PayloadType byte
const (
	PayloadTypeTokenTransfer PayloadType = 0x00
	PayloadTypeSmartContract PayloadType = 0x01
	PayloadTypeContractCall  PayloadType = 0x02
)

type PostConditionMode

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

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