Documentation ¶
Index ¶
- Constants
- type Address
- type AddressVersion
- func (a *AddressVersion) Decode(r *bytes.Reader) error
- func (i AddressVersion) Desc() string
- func (i AddressVersion) Int64() int64
- func (i AddressVersion) MarshalText() ([]byte, error)
- func (i *AddressVersion) SetInt64(in int64)
- func (i *AddressVersion) SetString(s string) error
- func (i AddressVersion) String() string
- func (i *AddressVersion) UnmarshalText(text []byte) error
- func (i AddressVersion) Values() []enums.Enum
- type AnchorMode
- func (a *AnchorMode) Decode(r *bytes.Reader) error
- func (i AnchorMode) Desc() string
- func (i AnchorMode) Int64() int64
- func (i AnchorMode) MarshalText() ([]byte, error)
- func (i *AnchorMode) SetInt64(in int64)
- func (i *AnchorMode) SetString(s string) error
- func (i AnchorMode) String() string
- func (i *AnchorMode) UnmarshalText(text []byte) error
- func (i AnchorMode) Values() []enums.Enum
- type AssetInfo
- type AuthorizationType
- func (a *AuthorizationType) Decode(r *bytes.Reader) error
- func (i AuthorizationType) Desc() string
- func (i AuthorizationType) Int64() int64
- func (i AuthorizationType) MarshalText() ([]byte, error)
- func (i *AuthorizationType) SetInt64(in int64)
- func (i *AuthorizationType) SetString(s string) error
- func (i AuthorizationType) String() string
- func (i *AuthorizationType) UnmarshalText(text []byte) error
- func (i AuthorizationType) Values() []enums.Enum
- type Bool
- type ChainID
- type ClarityBuffer
- type ClarityContractPrincipal
- type ClarityPrincipal
- type ClarityType
- func (i ClarityType) Desc() string
- func (i ClarityType) Int64() int64
- func (i ClarityType) MarshalText() ([]byte, error)
- func (i *ClarityType) SetInt64(in int64)
- func (i *ClarityType) SetString(s string) error
- func (i ClarityType) String() string
- func (i *ClarityType) UnmarshalText(text []byte) error
- func (i ClarityType) Values() []enums.Enum
- type ClarityValue
- type CoinbasePayload
- type ContractCallPayload
- type ContractDeployPayload
- type Decoder
- type FTPostConditionBody
- type FungibleConditionCode
- func (f *FungibleConditionCode) Decode(r *bytes.Reader) error
- func (i FungibleConditionCode) Desc() string
- func (i FungibleConditionCode) Int64() int64
- func (i FungibleConditionCode) MarshalText() ([]byte, error)
- func (i *FungibleConditionCode) SetInt64(in int64)
- func (i *FungibleConditionCode) SetString(s string) error
- func (i FungibleConditionCode) String() string
- func (i *FungibleConditionCode) UnmarshalText(text []byte) error
- func (i FungibleConditionCode) Values() []enums.Enum
- type HashMode
- func (h *HashMode) Decode(r *bytes.Reader) error
- func (i HashMode) Desc() string
- func (i HashMode) Int64() int64
- func (i HashMode) MarshalText() ([]byte, error)
- func (i *HashMode) SetInt64(in int64)
- func (i *HashMode) SetString(s string) error
- func (i HashMode) String() string
- func (i *HashMode) UnmarshalText(text []byte) error
- func (i HashMode) Values() []enums.Enum
- type Int128
- type List
- type MultiSigSpendingCondition
- type NFTConditionCode
- func (n *NFTConditionCode) Decode(r *bytes.Reader) error
- func (i NFTConditionCode) Desc() string
- func (i NFTConditionCode) Int64() int64
- func (i NFTConditionCode) MarshalText() ([]byte, error)
- func (i *NFTConditionCode) SetInt64(in int64)
- func (i *NFTConditionCode) SetString(s string) error
- func (i NFTConditionCode) String() string
- func (i *NFTConditionCode) UnmarshalText(text []byte) error
- func (i NFTConditionCode) Values() []enums.Enum
- type NFTPostConditionBody
- type NakamotoCoinbasePayload
- type Name
- type NetworkVersion
- func (v *NetworkVersion) Decode(r *bytes.Reader) error
- func (i NetworkVersion) Desc() string
- func (i NetworkVersion) Int64() int64
- func (i NetworkVersion) MarshalText() ([]byte, error)
- func (i *NetworkVersion) SetInt64(in int64)
- func (i *NetworkVersion) SetString(s string) error
- func (i NetworkVersion) String() string
- func (i *NetworkVersion) UnmarshalText(text []byte) error
- func (i NetworkVersion) Values() []enums.Enum
- type Option
- type Payload
- type PayloadType
- func (p *PayloadType) Decode(r *bytes.Reader) error
- func (i PayloadType) Desc() string
- func (i PayloadType) Int64() int64
- func (i PayloadType) MarshalText() ([]byte, error)
- func (i *PayloadType) SetInt64(in int64)
- func (i *PayloadType) SetString(s string) error
- func (i PayloadType) String() string
- func (i *PayloadType) UnmarshalText(text []byte) error
- func (i PayloadType) Values() []enums.Enum
- type PostCondition
- type PostConditionMode
- func (p *PostConditionMode) Decode(r *bytes.Reader) error
- func (i PostConditionMode) Desc() string
- func (i PostConditionMode) Int64() int64
- func (i PostConditionMode) MarshalText() ([]byte, error)
- func (i *PostConditionMode) SetInt64(in int64)
- func (i *PostConditionMode) SetString(s string) error
- func (i PostConditionMode) String() string
- func (i *PostConditionMode) UnmarshalText(text []byte) error
- func (i PostConditionMode) Values() []enums.Enum
- type PostConditionType
- func (p *PostConditionType) Decode(r *bytes.Reader) error
- func (i PostConditionType) Desc() string
- func (i PostConditionType) Int64() int64
- func (i PostConditionType) MarshalText() ([]byte, error)
- func (i *PostConditionType) SetInt64(in int64)
- func (i *PostConditionType) SetString(s string) error
- func (i PostConditionType) String() string
- func (i *PostConditionType) UnmarshalText(text []byte) error
- func (i PostConditionType) Values() []enums.Enum
- type Principal
- type PrincipalType
- func (p *PrincipalType) Decode(r *bytes.Reader) error
- func (i PrincipalType) Desc() string
- func (i PrincipalType) Int64() int64
- func (i PrincipalType) MarshalText() ([]byte, error)
- func (i *PrincipalType) SetInt64(in int64)
- func (i *PrincipalType) SetString(s string) error
- func (i PrincipalType) String() string
- func (i *PrincipalType) UnmarshalText(text []byte) error
- func (i PrincipalType) Values() []enums.Enum
- type Response
- type STXPostConditionBody
- type STXTransferPayload
- type SingleSigSpendingCondition
- type SpendingAuthorizationField
- type SpendingCondition
- type StringASCII
- type StringUTF8
- type TenureChangeCause
- func (i TenureChangeCause) Desc() string
- func (i TenureChangeCause) Int64() int64
- func (i TenureChangeCause) MarshalText() ([]byte, error)
- func (i *TenureChangeCause) SetInt64(in int64)
- func (i *TenureChangeCause) SetString(s string) error
- func (i TenureChangeCause) String() string
- func (i *TenureChangeCause) UnmarshalText(text []byte) error
- func (i TenureChangeCause) Values() []enums.Enum
- type TenureChangePayload
- type Transaction
- type TransactionAuthorization
- type Tuple
- type UInt128
- type VersionedContractDeployPayload
Constants ¶
const C32_CHARACTERS = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Version AddressVersion HashBytes [20]byte }
type AddressVersion ¶
type AddressVersion uint8 //enums:enum
const ( MainnetSingleSig AddressVersion = 22 // P MainnetMultiSig AddressVersion = 20 // M TestnetSingleSig AddressVersion = 26 // T TestnetMultiSig AddressVersion = 21 // N )
const AddressVersionN AddressVersion = 27
AddressVersionN is the highest valid value for type AddressVersion, plus one.
func AddressVersionValues ¶
func AddressVersionValues() []AddressVersion
AddressVersionValues returns all possible values for the type AddressVersion.
func (AddressVersion) Desc ¶
func (i AddressVersion) Desc() string
Desc returns the description of the AddressVersion value.
func (AddressVersion) Int64 ¶
func (i AddressVersion) Int64() int64
Int64 returns the AddressVersion value as an int64.
func (AddressVersion) MarshalText ¶
func (i AddressVersion) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*AddressVersion) SetInt64 ¶
func (i *AddressVersion) SetInt64(in int64)
SetInt64 sets the AddressVersion value from an int64.
func (*AddressVersion) SetString ¶
func (i *AddressVersion) SetString(s string) error
SetString sets the AddressVersion value from its string representation, and returns an error if the string is invalid.
func (AddressVersion) String ¶
func (i AddressVersion) String() string
String returns the string representation of this AddressVersion value.
func (*AddressVersion) UnmarshalText ¶
func (i *AddressVersion) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (AddressVersion) Values ¶
func (i AddressVersion) Values() []enums.Enum
Values returns all possible values for the type AddressVersion.
type AnchorMode ¶
type AnchorMode uint8 //enums:enum
const ( AnchorBlock AnchorMode = iota + 1 MicroBlock Any )
const AnchorModeN AnchorMode = 4
AnchorModeN is the highest valid value for type AnchorMode, plus one.
func AnchorModeValues ¶
func AnchorModeValues() []AnchorMode
AnchorModeValues returns all possible values for the type AnchorMode.
func (AnchorMode) Desc ¶
func (i AnchorMode) Desc() string
Desc returns the description of the AnchorMode value.
func (AnchorMode) Int64 ¶
func (i AnchorMode) Int64() int64
Int64 returns the AnchorMode value as an int64.
func (AnchorMode) MarshalText ¶
func (i AnchorMode) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*AnchorMode) SetInt64 ¶
func (i *AnchorMode) SetInt64(in int64)
SetInt64 sets the AnchorMode value from an int64.
func (*AnchorMode) SetString ¶
func (i *AnchorMode) SetString(s string) error
SetString sets the AnchorMode value from its string representation, and returns an error if the string is invalid.
func (AnchorMode) String ¶
func (i AnchorMode) String() string
String returns the string representation of this AnchorMode value.
func (*AnchorMode) UnmarshalText ¶
func (i *AnchorMode) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (AnchorMode) Values ¶
func (i AnchorMode) Values() []enums.Enum
Values returns all possible values for the type AnchorMode.
type AuthorizationType ¶
type AuthorizationType uint8 //enums:enum
const ( Standard AuthorizationType = 0x04 Sponsored AuthorizationType = 0x05 )
const AuthorizationTypeN AuthorizationType = 6
AuthorizationTypeN is the highest valid value for type AuthorizationType, plus one.
func AuthorizationTypeValues ¶
func AuthorizationTypeValues() []AuthorizationType
AuthorizationTypeValues returns all possible values for the type AuthorizationType.
func (AuthorizationType) Desc ¶
func (i AuthorizationType) Desc() string
Desc returns the description of the AuthorizationType value.
func (AuthorizationType) Int64 ¶
func (i AuthorizationType) Int64() int64
Int64 returns the AuthorizationType value as an int64.
func (AuthorizationType) MarshalText ¶
func (i AuthorizationType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*AuthorizationType) SetInt64 ¶
func (i *AuthorizationType) SetInt64(in int64)
SetInt64 sets the AuthorizationType value from an int64.
func (*AuthorizationType) SetString ¶
func (i *AuthorizationType) SetString(s string) error
SetString sets the AuthorizationType value from its string representation, and returns an error if the string is invalid.
func (AuthorizationType) String ¶
func (i AuthorizationType) String() string
String returns the string representation of this AuthorizationType value.
func (*AuthorizationType) UnmarshalText ¶
func (i *AuthorizationType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (AuthorizationType) Values ¶
func (i AuthorizationType) Values() []enums.Enum
Values returns all possible values for the type AuthorizationType.
type ClarityBuffer ¶
func (*ClarityBuffer) ClarityDecode ¶
func (b *ClarityBuffer) ClarityDecode(r *bytes.Reader) error
type ClarityContractPrincipal ¶
type ClarityContractPrincipal struct { ClarityPrincipal Name string }
func (*ClarityContractPrincipal) ClarityDecode ¶
func (c *ClarityContractPrincipal) ClarityDecode(r *bytes.Reader) error
type ClarityPrincipal ¶
func (*ClarityPrincipal) ClarityDecode ¶
func (p *ClarityPrincipal) ClarityDecode(r *bytes.Reader) error
type ClarityType ¶
type ClarityType uint8 //enums:enum
Define an enum called ClarityType with the following values: 0x00: 128-bit signed integer 0x01: 128-bit unsigned integer 0x02: buffer 0x03: boolean true 0x04: boolean false 0x05: standard principal 0x06: contract principal 0x07: Ok response 0x08: Err response 0x09: None option 0x0a: Some option 0x0b: List 0x0c: Tuple 0x0d: StringASCII 0x0e: StringUTF8
const ( Int128Signed ClarityType = iota Int128Unsigned Buffer BooleanTrue BooleanFalse StandardPrincipal ContractPrincipal OkResponse ErrResponse NoneOption SomeOption ListType TupleType StringASCIIType StringUTF8Type )
const ClarityTypeN ClarityType = 15
ClarityTypeN is the highest valid value for type ClarityType, plus one.
func ClarityTypeValues ¶
func ClarityTypeValues() []ClarityType
ClarityTypeValues returns all possible values for the type ClarityType.
func (ClarityType) Desc ¶
func (i ClarityType) Desc() string
Desc returns the description of the ClarityType value.
func (ClarityType) Int64 ¶
func (i ClarityType) Int64() int64
Int64 returns the ClarityType value as an int64.
func (ClarityType) MarshalText ¶
func (i ClarityType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*ClarityType) SetInt64 ¶
func (i *ClarityType) SetInt64(in int64)
SetInt64 sets the ClarityType value from an int64.
func (*ClarityType) SetString ¶
func (i *ClarityType) SetString(s string) error
SetString sets the ClarityType value from its string representation, and returns an error if the string is invalid.
func (ClarityType) String ¶
func (i ClarityType) String() string
String returns the string representation of this ClarityType value.
func (*ClarityType) UnmarshalText ¶
func (i *ClarityType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (ClarityType) Values ¶
func (i ClarityType) Values() []enums.Enum
Values returns all possible values for the type ClarityType.
type ClarityValue ¶
type CoinbasePayload ¶
type CoinbasePayload struct {
Buffer [32]byte
}
type ContractCallPayload ¶
type ContractDeployPayload ¶
type FTPostConditionBody ¶
type FTPostConditionBody struct { Principal Principal AssetInfo AssetInfo Code FungibleConditionCode Amount uint64 }
type FungibleConditionCode ¶
type FungibleConditionCode uint8 //enums:enum
const ( SentEq FungibleConditionCode = iota + 1 SentGt SentGe SentLt SentLe )
const FungibleConditionCodeN FungibleConditionCode = 6
FungibleConditionCodeN is the highest valid value for type FungibleConditionCode, plus one.
func FungibleConditionCodeValues ¶
func FungibleConditionCodeValues() []FungibleConditionCode
FungibleConditionCodeValues returns all possible values for the type FungibleConditionCode.
func (*FungibleConditionCode) Decode ¶
func (f *FungibleConditionCode) Decode(r *bytes.Reader) error
Implement Decode for FungibleConditionCode
func (FungibleConditionCode) Desc ¶
func (i FungibleConditionCode) Desc() string
Desc returns the description of the FungibleConditionCode value.
func (FungibleConditionCode) Int64 ¶
func (i FungibleConditionCode) Int64() int64
Int64 returns the FungibleConditionCode value as an int64.
func (FungibleConditionCode) MarshalText ¶
func (i FungibleConditionCode) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*FungibleConditionCode) SetInt64 ¶
func (i *FungibleConditionCode) SetInt64(in int64)
SetInt64 sets the FungibleConditionCode value from an int64.
func (*FungibleConditionCode) SetString ¶
func (i *FungibleConditionCode) SetString(s string) error
SetString sets the FungibleConditionCode value from its string representation, and returns an error if the string is invalid.
func (FungibleConditionCode) String ¶
func (i FungibleConditionCode) String() string
String returns the string representation of this FungibleConditionCode value.
func (*FungibleConditionCode) UnmarshalText ¶
func (i *FungibleConditionCode) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (FungibleConditionCode) Values ¶
func (i FungibleConditionCode) Values() []enums.Enum
Values returns all possible values for the type FungibleConditionCode.
type HashMode ¶
type HashMode uint8 //enums:enum
const ( // hash160(public-key), same as bitcoin's p2pkh P2PKH HashMode = iota // hash160(multisig-redeem-script), same as bitcoin's multisig p2sh P2SH // hash160(segwit-program-00(p2pkh)), same as bitcoin's p2sh-p2wpkh P2WPKH // hash160(segwit-program-00(public-keys)), same as bitcoin's p2sh-p2wsh P2WSH )
const HashModeN HashMode = 4
HashModeN is the highest valid value for type HashMode, plus one.
func HashModeValues ¶
func HashModeValues() []HashMode
HashModeValues returns all possible values for the type HashMode.
func (HashMode) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*HashMode) SetString ¶
SetString sets the HashMode value from its string representation, and returns an error if the string is invalid.
func (*HashMode) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type List ¶
type List struct { Length uint32 Values []ClarityValue }
type MultiSigSpendingCondition ¶
type MultiSigSpendingCondition struct { Authorizations []SpendingAuthorizationField SignatureCount uint16 }
type NFTConditionCode ¶
type NFTConditionCode uint8 //enums:enum
const ( Sent NFTConditionCode = 0x10 NotSent NFTConditionCode = 0x11 )
const NFTConditionCodeN NFTConditionCode = 18
NFTConditionCodeN is the highest valid value for type NFTConditionCode, plus one.
func NFTConditionCodeValues ¶
func NFTConditionCodeValues() []NFTConditionCode
NFTConditionCodeValues returns all possible values for the type NFTConditionCode.
func (*NFTConditionCode) Decode ¶
func (n *NFTConditionCode) Decode(r *bytes.Reader) error
Implement Decode for NFTConditionCode
func (NFTConditionCode) Desc ¶
func (i NFTConditionCode) Desc() string
Desc returns the description of the NFTConditionCode value.
func (NFTConditionCode) Int64 ¶
func (i NFTConditionCode) Int64() int64
Int64 returns the NFTConditionCode value as an int64.
func (NFTConditionCode) MarshalText ¶
func (i NFTConditionCode) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*NFTConditionCode) SetInt64 ¶
func (i *NFTConditionCode) SetInt64(in int64)
SetInt64 sets the NFTConditionCode value from an int64.
func (*NFTConditionCode) SetString ¶
func (i *NFTConditionCode) SetString(s string) error
SetString sets the NFTConditionCode value from its string representation, and returns an error if the string is invalid.
func (NFTConditionCode) String ¶
func (i NFTConditionCode) String() string
String returns the string representation of this NFTConditionCode value.
func (*NFTConditionCode) UnmarshalText ¶
func (i *NFTConditionCode) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (NFTConditionCode) Values ¶
func (i NFTConditionCode) Values() []enums.Enum
Values returns all possible values for the type NFTConditionCode.
type NFTPostConditionBody ¶
type NFTPostConditionBody struct { Principal Principal AssetInfo AssetInfo AssetName ClarityValue Code NFTConditionCode }
type NakamotoCoinbasePayload ¶
type NetworkVersion ¶
type NetworkVersion uint8 //enums:enum
const ( Mainnet NetworkVersion = iota Testnet )
TODO: do the validation during decode but consider preserving the version byte. Instead of the enum, just implement Stringer.
const NetworkVersionN NetworkVersion = 2
NetworkVersionN is the highest valid value for type NetworkVersion, plus one.
func NetworkVersionValues ¶
func NetworkVersionValues() []NetworkVersion
NetworkVersionValues returns all possible values for the type NetworkVersion.
func (NetworkVersion) Desc ¶
func (i NetworkVersion) Desc() string
Desc returns the description of the NetworkVersion value.
func (NetworkVersion) Int64 ¶
func (i NetworkVersion) Int64() int64
Int64 returns the NetworkVersion value as an int64.
func (NetworkVersion) MarshalText ¶
func (i NetworkVersion) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*NetworkVersion) SetInt64 ¶
func (i *NetworkVersion) SetInt64(in int64)
SetInt64 sets the NetworkVersion value from an int64.
func (*NetworkVersion) SetString ¶
func (i *NetworkVersion) SetString(s string) error
SetString sets the NetworkVersion value from its string representation, and returns an error if the string is invalid.
func (NetworkVersion) String ¶
func (i NetworkVersion) String() string
String returns the string representation of this NetworkVersion value.
func (*NetworkVersion) UnmarshalText ¶
func (i *NetworkVersion) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (NetworkVersion) Values ¶
func (i NetworkVersion) Values() []enums.Enum
Values returns all possible values for the type NetworkVersion.
type Option ¶
type Option struct { IsSome bool Value ClarityValue }
type Payload ¶
type Payload struct { Type PayloadType Transfer *STXTransferPayload ContractDeploy *ContractDeployPayload ContractCall *ContractCallPayload Coinbase *CoinbasePayload VersionedContractDeploy *VersionedContractDeployPayload NakamotoCoinbase *NakamotoCoinbasePayload TenureChange *TenureChangePayload }
type PayloadType ¶
type PayloadType uint8 //enums:enum
const ( TokenTransfer PayloadType = iota ContractDeploy ContractCall PoisonMicroblock Coinbase // https://github.com/stacksgov/sips/blob/main/sips/sip-015/sip-015-network-upgrade.md CoinbaseToAltRecipient VersionedContractDeploy // https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md TenureChange NakamotoCoinbase )
const PayloadTypeN PayloadType = 9
PayloadTypeN is the highest valid value for type PayloadType, plus one.
func PayloadTypeValues ¶
func PayloadTypeValues() []PayloadType
PayloadTypeValues returns all possible values for the type PayloadType.
func (*PayloadType) Decode ¶
func (p *PayloadType) Decode(r *bytes.Reader) error
Implement Decode for PayloadType
func (PayloadType) Desc ¶
func (i PayloadType) Desc() string
Desc returns the description of the PayloadType value.
func (PayloadType) Int64 ¶
func (i PayloadType) Int64() int64
Int64 returns the PayloadType value as an int64.
func (PayloadType) MarshalText ¶
func (i PayloadType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*PayloadType) SetInt64 ¶
func (i *PayloadType) SetInt64(in int64)
SetInt64 sets the PayloadType value from an int64.
func (*PayloadType) SetString ¶
func (i *PayloadType) SetString(s string) error
SetString sets the PayloadType value from its string representation, and returns an error if the string is invalid.
func (PayloadType) String ¶
func (i PayloadType) String() string
String returns the string representation of this PayloadType value.
func (*PayloadType) UnmarshalText ¶
func (i *PayloadType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (PayloadType) Values ¶
func (i PayloadType) Values() []enums.Enum
Values returns all possible values for the type PayloadType.
type PostCondition ¶
type PostCondition struct { Type PostConditionType STX *STXPostConditionBody FT *FTPostConditionBody NFT *NFTPostConditionBody }
type PostConditionMode ¶
type PostConditionMode uint8 //enums:enum
const ( Allow PostConditionMode = iota + 1 Deny )
const PostConditionModeN PostConditionMode = 3
PostConditionModeN is the highest valid value for type PostConditionMode, plus one.
func PostConditionModeValues ¶
func PostConditionModeValues() []PostConditionMode
PostConditionModeValues returns all possible values for the type PostConditionMode.
func (PostConditionMode) Desc ¶
func (i PostConditionMode) Desc() string
Desc returns the description of the PostConditionMode value.
func (PostConditionMode) Int64 ¶
func (i PostConditionMode) Int64() int64
Int64 returns the PostConditionMode value as an int64.
func (PostConditionMode) MarshalText ¶
func (i PostConditionMode) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*PostConditionMode) SetInt64 ¶
func (i *PostConditionMode) SetInt64(in int64)
SetInt64 sets the PostConditionMode value from an int64.
func (*PostConditionMode) SetString ¶
func (i *PostConditionMode) SetString(s string) error
SetString sets the PostConditionMode value from its string representation, and returns an error if the string is invalid.
func (PostConditionMode) String ¶
func (i PostConditionMode) String() string
String returns the string representation of this PostConditionMode value.
func (*PostConditionMode) UnmarshalText ¶
func (i *PostConditionMode) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (PostConditionMode) Values ¶
func (i PostConditionMode) Values() []enums.Enum
Values returns all possible values for the type PostConditionMode.
type PostConditionType ¶
type PostConditionType uint8 //enums:enum
const ( STXPostCondition PostConditionType = iota FTPostCondition NFTPostCondition )
const PostConditionTypeN PostConditionType = 3
PostConditionTypeN is the highest valid value for type PostConditionType, plus one.
func PostConditionTypeValues ¶
func PostConditionTypeValues() []PostConditionType
PostConditionTypeValues returns all possible values for the type PostConditionType.
func (*PostConditionType) Decode ¶
func (p *PostConditionType) Decode(r *bytes.Reader) error
Implement Decode for PostConditionType
func (PostConditionType) Desc ¶
func (i PostConditionType) Desc() string
Desc returns the description of the PostConditionType value.
func (PostConditionType) Int64 ¶
func (i PostConditionType) Int64() int64
Int64 returns the PostConditionType value as an int64.
func (PostConditionType) MarshalText ¶
func (i PostConditionType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*PostConditionType) SetInt64 ¶
func (i *PostConditionType) SetInt64(in int64)
SetInt64 sets the PostConditionType value from an int64.
func (*PostConditionType) SetString ¶
func (i *PostConditionType) SetString(s string) error
SetString sets the PostConditionType value from its string representation, and returns an error if the string is invalid.
func (PostConditionType) String ¶
func (i PostConditionType) String() string
String returns the string representation of this PostConditionType value.
func (*PostConditionType) UnmarshalText ¶
func (i *PostConditionType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (PostConditionType) Values ¶
func (i PostConditionType) Values() []enums.Enum
Values returns all possible values for the type PostConditionType.
type Principal ¶
type Principal struct { Type PrincipalType Address Address ContractName Name }
type PrincipalType ¶
type PrincipalType uint8 //enums:enum
const ( PrincipalStandard PrincipalType = 0x02 PrincipalContract PrincipalType = 0x03 RecipientStandard PrincipalType = 0x05 RecipientContract PrincipalType = 0x06 )
const PrincipalTypeN PrincipalType = 7
PrincipalTypeN is the highest valid value for type PrincipalType, plus one.
func PrincipalTypeValues ¶
func PrincipalTypeValues() []PrincipalType
PrincipalTypeValues returns all possible values for the type PrincipalType.
func (*PrincipalType) Decode ¶
func (p *PrincipalType) Decode(r *bytes.Reader) error
Implement Decode for PrincipalType
func (PrincipalType) Desc ¶
func (i PrincipalType) Desc() string
Desc returns the description of the PrincipalType value.
func (PrincipalType) Int64 ¶
func (i PrincipalType) Int64() int64
Int64 returns the PrincipalType value as an int64.
func (PrincipalType) MarshalText ¶
func (i PrincipalType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*PrincipalType) SetInt64 ¶
func (i *PrincipalType) SetInt64(in int64)
SetInt64 sets the PrincipalType value from an int64.
func (*PrincipalType) SetString ¶
func (i *PrincipalType) SetString(s string) error
SetString sets the PrincipalType value from its string representation, and returns an error if the string is invalid.
func (PrincipalType) String ¶
func (i PrincipalType) String() string
String returns the string representation of this PrincipalType value.
func (*PrincipalType) UnmarshalText ¶
func (i *PrincipalType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (PrincipalType) Values ¶
func (i PrincipalType) Values() []enums.Enum
Values returns all possible values for the type PrincipalType.
type Response ¶
type Response struct { IsOk bool Result ClarityValue }
type STXPostConditionBody ¶
type STXPostConditionBody struct { Principal Principal Code FungibleConditionCode Amount uint64 }
type STXTransferPayload ¶
type SpendingCondition ¶
type SpendingCondition struct { HashMode HashMode PubKeyHash [20]byte Nonce uint64 Fee uint64 SingleSigCondition *SingleSigSpendingCondition MultiSigCondition *MultiSigSpendingCondition }
type StringASCII ¶
func (*StringASCII) ClarityDecode ¶
func (s *StringASCII) ClarityDecode(r *bytes.Reader) error
type StringUTF8 ¶
func (*StringUTF8) ClarityDecode ¶
func (s *StringUTF8) ClarityDecode(r *bytes.Reader) error
type TenureChangeCause ¶
type TenureChangeCause uint8 //enums:enum
const ( BlockFound TenureChangeCause = iota Extend )
const TenureChangeCauseN TenureChangeCause = 2
TenureChangeCauseN is the highest valid value for type TenureChangeCause, plus one.
func TenureChangeCauseValues ¶
func TenureChangeCauseValues() []TenureChangeCause
TenureChangeCauseValues returns all possible values for the type TenureChangeCause.
func (TenureChangeCause) Desc ¶
func (i TenureChangeCause) Desc() string
Desc returns the description of the TenureChangeCause value.
func (TenureChangeCause) Int64 ¶
func (i TenureChangeCause) Int64() int64
Int64 returns the TenureChangeCause value as an int64.
func (TenureChangeCause) MarshalText ¶
func (i TenureChangeCause) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*TenureChangeCause) SetInt64 ¶
func (i *TenureChangeCause) SetInt64(in int64)
SetInt64 sets the TenureChangeCause value from an int64.
func (*TenureChangeCause) SetString ¶
func (i *TenureChangeCause) SetString(s string) error
SetString sets the TenureChangeCause value from its string representation, and returns an error if the string is invalid.
func (TenureChangeCause) String ¶
func (i TenureChangeCause) String() string
String returns the string representation of this TenureChangeCause value.
func (*TenureChangeCause) UnmarshalText ¶
func (i *TenureChangeCause) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (TenureChangeCause) Values ¶
func (i TenureChangeCause) Values() []enums.Enum
Values returns all possible values for the type TenureChangeCause.
type TenureChangePayload ¶
type Transaction ¶
type Transaction struct { Version NetworkVersion CID ChainID Authorization TransactionAuthorization AnchorMode AnchorMode PostConditionMode PostConditionMode PostConditions []*PostCondition Payload Payload }
type TransactionAuthorization ¶
type TransactionAuthorization struct { Type AuthorizationType OriginCondition SpendingCondition SponsorCondition *SpendingCondition }
type Tuple ¶
type Tuple struct { Length uint32 Values map[string]ClarityValue }
type VersionedContractDeployPayload ¶
type VersionedContractDeployPayload struct { ClarityVersion byte ContractDeployPayload }