basics

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Offline indicates that the associated account receives rewards but does not participate in the consensus.
	Offline Status = iota
	// Online indicates that the associated account participates in the consensus and receive rewards.
	Online
	// NotParticipating indicates that the associated account neither participates in the consensus, nor recieves rewards.
	// Accounts that are marked as NotParticipating cannot change their status, but can receive and send Algos to other accounts.
	// Two special accounts that are defined as NotParticipating are the incentive pool (also know as rewards pool) and the fee sink.
	// These two accounts also have additional Algo transfer restrictions.
	NotParticipating

	// MaxEncodedAccountDataSize is a rough estimate for the worst-case scenario we're going to have of the account data and address serialized.
	// this number is verified by the TestEncodedAccountDataSize function.
	MaxEncodedAccountDataSize = 750000

	// EncodedMaxAppLocalStates is the decoder limit for number of opted-in apps in a single account.
	// It is verified in TestEncodedAccountAllocationBounds to align with
	// config.Consensus[protocol.ConsensusCurrentVersion].MaxppsOptedIn
	EncodedMaxAppLocalStates = 64

	// EncodedMaxAppParams is the decoder limit for number of created apps in a single account.
	// It is verified in TestEncodedAccountAllocationBounds to align with
	// config.Consensus[protocol.ConsensusCurrentVersion].MaxAppsCreated
	EncodedMaxAppParams = 64

	// EncodedMaxKeyValueEntries is the decoder limit for the length of a key/value store.
	// It is verified in TestEncodedAccountAllocationBounds to align with
	// config.Consensus[protocol.ConsensusCurrentVersion].MaxLocalSchemaEntries and
	// config.Consensus[protocol.ConsensusCurrentVersion].MaxGlobalSchemaEntries
	EncodedMaxKeyValueEntries = 1024
)

Variables

This section is empty.

Functions

func AddSaturate

func AddSaturate(a uint64, b uint64) uint64

AddSaturate adds 2 values with saturation on overflow

func MulSaturate

func MulSaturate(a uint64, b uint64) uint64

MulSaturate multiplies 2 values with saturation on overflow

func Muldiv

func Muldiv(a uint64, b uint64, c uint64) (res uint64, overflow bool)

Muldiv computes a*b/c. The overflow flag indicates that the result was 2^64 or greater.

func OAdd

func OAdd(a uint64, b uint64) (res uint64, overflowed bool)

OAdd adds 2 values with overflow detection

func OAdd16

func OAdd16(a uint16, b uint16) (res uint16, overflowed bool)

OAdd16 adds 2 uint16 values with overflow detection

func OMul

func OMul(a uint64, b uint64) (res uint64, overflowed bool)

OMul multiplies 2 values with overflow detection

func OSub

func OSub(a uint64, b uint64) (res uint64, overflowed bool)

OSub subtracts b from a with overflow detection

func OneTimeIDForRound

func OneTimeIDForRound(round Round, keyDilution uint64) crypto.OneTimeSignatureIdentifier

OneTimeIDForRound maps a round to the identifier for which ephemeral key should be used for that round. keyDilution specifies the number of keys in the bottom-level of the two-level key structure.

func SubSaturate

func SubSaturate(a uint64, b uint64) uint64

SubSaturate subtracts 2 values with saturation on underflow

Types

type AccountData

type AccountData struct {
	Status     Status     `codec:"onl"`
	MicroAlgos MicroAlgos `codec:"algo"`

	// RewardsBase is used to implement rewards.
	// This is not meaningful for accounts with Status=NotParticipating.
	//
	// Every block assigns some amount of rewards (algos) to every
	// participating account.  The amount is the product of how much
	// block.RewardsLevel increased from the previous block and
	// how many whole config.Protocol.RewardUnit algos this
	// account holds.
	//
	// For performance reasons, we do not want to walk over every
	// account to apply these rewards to AccountData.MicroAlgos.  Instead,
	// we defer applying the rewards until some other transaction
	// touches that participating account, and at that point, apply all
	// of the rewards to the account's AccountData.MicroAlgos.
	//
	// For correctness, we need to be able to determine how many
	// total algos are present in the system, including deferred
	// rewards (deferred in the sense that they have not been
	// reflected in the account's AccountData.MicroAlgos, as described
	// above).  To compute this total efficiently, we avoid
	// compounding rewards (i.e., no rewards on rewards) until
	// they are applied to AccountData.MicroAlgos.
	//
	// Mechanically, RewardsBase stores the block.RewardsLevel
	// whose rewards are already reflected in AccountData.MicroAlgos.
	// If the account is Status=Offline or Status=Online, its
	// effective balance (if a transaction were to be issued
	// against this account) may be higher, as computed by
	// AccountData.Money().  That function calls
	// AccountData.WithUpdatedRewards() to apply the deferred
	// rewards to AccountData.MicroAlgos.
	RewardsBase uint64 `codec:"ebase"`

	// RewardedMicroAlgos is used to track how many algos were given
	// to this account since the account was first created.
	//
	// This field is updated along with RewardBase; note that
	// it won't answer the question "how many algos did I make in
	// the past week".
	RewardedMicroAlgos MicroAlgos `codec:"ern"`

	VoteID      crypto.OneTimeSignatureVerifier `codec:"vote"`
	SelectionID crypto.VRFVerifier              `codec:"sel"`

	VoteFirstValid  Round  `codec:"voteFst"`
	VoteLastValid   Round  `codec:"voteLst"`
	VoteKeyDilution uint64 `codec:"voteKD"`

	// If this account created an asset, AssetParams stores
	// the parameters defining that asset.  The params are indexed
	// by the Index of the AssetID; the Creator is this account's address.
	//
	// An account with any asset in AssetParams cannot be
	// closed, until the asset is destroyed.  An asset can
	// be destroyed if this account holds AssetParams.Total units
	// of that asset (in the Assets array below).
	//
	// NOTE: do not modify this value in-place in existing AccountData
	// structs; allocate a copy and modify that instead.  AccountData
	// is expected to have copy-by-value semantics.
	AssetParams map[AssetIndex]AssetParams `codec:"apar,allocbound=encodedMaxAssetsPerAccount"`

	// Assets is the set of assets that can be held by this
	// account.  Assets (i.e., slots in this map) are explicitly
	// added and removed from an account by special transactions.
	// The map is keyed by the AssetID, which is the address of
	// the account that created the asset plus a unique counter
	// to distinguish re-created assets.
	//
	// Each asset bumps the required MinBalance in this account.
	//
	// An account that creates an asset must have its own asset
	// in the Assets map until that asset is destroyed.
	//
	// NOTE: do not modify this value in-place in existing AccountData
	// structs; allocate a copy and modify that instead.  AccountData
	// is expected to have copy-by-value semantics.
	Assets map[AssetIndex]AssetHolding `codec:"asset,allocbound=encodedMaxAssetsPerAccount"`

	// AuthAddr is the address against which signatures/multisigs/logicsigs should be checked.
	// If empty, the address of the account whose AccountData this is is used.
	// A transaction may change an account's AuthAddr to "re-key" the account.
	// This allows key rotation, changing the members in a multisig, etc.
	AuthAddr Address `codec:"spend"`

	// AppLocalStates stores the local states associated with any applications
	// that this account has opted in to.
	AppLocalStates map[AppIndex]AppLocalState `codec:"appl,allocbound=EncodedMaxAppLocalStates"`

	// AppParams stores the global parameters and state associated with any
	// applications that this account has created.
	AppParams map[AppIndex]AppParams `codec:"appp,allocbound=EncodedMaxAppParams"`

	// TotalAppSchema stores the sum of all of the LocalStateSchemas
	// and GlobalStateSchemas in this account (global for applications
	// we created local for applications we opted in to), so that we don't
	// have to iterate over all of them to compute MinBalance.
	TotalAppSchema StateSchema `codec:"tsch"`

	// TotalExtraAppPages stores the extra length in pages (MaxAppProgramLen bytes per page)
	// requested for app program by this account
	TotalExtraAppPages uint32 `codec:"teap"`
	// contains filtered or unexported fields
}

AccountData contains the data associated with a given address.

This includes the account balance, cryptographic public keys, consensus delegation status, asset data, and application data.

func MakeAccountData

func MakeAccountData(status Status, algos MicroAlgos) AccountData

MakeAccountData returns a UserToken

func (*AccountData) CanMarshalMsg

func (_ *AccountData) CanMarshalMsg(z interface{}) bool

func (*AccountData) CanUnmarshalMsg

func (_ *AccountData) CanUnmarshalMsg(z interface{}) bool

func (AccountData) IsZero

func (u AccountData) IsZero() bool

IsZero checks if an AccountData value is the same as its zero value.

func (AccountData) KeyDilution

func (u AccountData) KeyDilution(proto config.ConsensusParams) uint64

KeyDilution returns the key dilution for this account, returning the default key dilution if not explicitly specified.

func (*AccountData) MarshalMsg

func (z *AccountData) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (AccountData) MinBalance

func (u AccountData) MinBalance(proto *config.ConsensusParams) (res MicroAlgos)

MinBalance computes the minimum balance requirements for an account based on some consensus parameters. MinBalance should correspond roughly to how much storage the account is allowed to store on disk.

func (AccountData) Money

func (u AccountData) Money(proto config.ConsensusParams, rewardsLevel uint64) (money MicroAlgos, rewards MicroAlgos)

Money returns the amount of MicroAlgos associated with the user's account

func (*AccountData) MsgIsZero

func (z *AccountData) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*AccountData) Msgsize

func (z *AccountData) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (AccountData) NormalizedOnlineBalance

func (u AccountData) NormalizedOnlineBalance(proto config.ConsensusParams) uint64

NormalizedOnlineBalance returns a “normalized” balance for this account.

The normalization compensates for rewards that have not yet been applied, by computing a balance normalized to round 0. To normalize, we estimate the microalgo balance that an account should have had at round 0, in order to end up at its current balance when rewards are included.

The benefit of the normalization procedure is that an account's normalized balance does not change over time (unlike the actual algo balance that includes rewards). This makes it possible to compare normalized balances between two accounts, to sort them, and get results that are close to what we would get if we computed the exact algo balance of the accounts at a given round number.

The normalization can lead to some inconsistencies in comparisons between account balances, because the growth rate of rewards for accounts depends on how recently the account has been touched (our rewards do not implement compounding). However, online accounts have to periodically renew participation keys, so the scale of the inconsistency is small.

func (*AccountData) UnmarshalMsg

func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (AccountData) VotingStake

func (u AccountData) VotingStake() MicroAlgos

VotingStake returns the amount of MicroAlgos associated with the user's account for the purpose of participating in the Algorand protocol. It assumes the caller has already updated rewards appropriately using WithUpdatedRewards().

func (AccountData) WithUpdatedRewards

func (u AccountData) WithUpdatedRewards(proto config.ConsensusParams, rewardsLevel uint64) AccountData

WithUpdatedRewards returns an updated number of algos in an AccountData to reflect rewards up to some rewards level.

type AccountDetail

type AccountDetail struct {
	Address Address
	Algos   MicroAlgos
	Status  Status
}

AccountDetail encapsulates meaningful details about a given account, for external consumption

type Address

type Address crypto.Digest

Address is a unique identifier corresponding to ownership of money

func UnmarshalChecksumAddress

func UnmarshalChecksumAddress(address string) (Address, error)

UnmarshalChecksumAddress tries to unmarshal the checksummed address string. Algorand strings addresses ( base32 encoded ) have a postamble which serves as the checksum of the address. When converted to an Address object representation, that checksum is dropped (after validation).

func (*Address) CanMarshalMsg

func (_ *Address) CanMarshalMsg(z interface{}) bool

func (*Address) CanUnmarshalMsg

func (_ *Address) CanUnmarshalMsg(z interface{}) bool

func (Address) GetChecksum

func (addr Address) GetChecksum() []byte

GetChecksum returns the checksum as []byte Checksum in Algorand are the last 4 bytes of the shortAddress Hash. H(Address)[28:]

func (Address) GetUserAddress

func (addr Address) GetUserAddress() string

GetUserAddress returns the human-readable, checksummed version of the address

func (Address) IsInput

func (addr Address) IsInput() bool

func (Address) IsZero

func (addr Address) IsZero() bool

IsZero checks if an address is the zero value.

func (*Address) MarshalMsg

func (z *Address) MarshalMsg(b []byte) []byte

MarshalMsg implements msgp.Marshaler

func (Address) MarshalText

func (addr Address) MarshalText() ([]byte, error)

MarshalText returns the address string as an array of bytes

func (*Address) MsgIsZero

func (z *Address) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*Address) Msgsize

func (z *Address) Msgsize() int

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Address) String

func (addr Address) String() string

String returns a string representation of Address

func (*Address) UnmarshalMsg

func (z *Address) UnmarshalMsg(bts []byte) ([]byte, error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Address) UnmarshalText

func (addr *Address) UnmarshalText(text []byte) error

UnmarshalText initializes the Address from an array of bytes.

type AppIndex

type AppIndex uint64

AppIndex is the unique integer index of an application that can be used to look up the creator of the application, whose balance record contains the AppParams

func (AppIndex) CanMarshalMsg

func (_ AppIndex) CanMarshalMsg(z interface{}) bool

func (*AppIndex) CanUnmarshalMsg

func (_ *AppIndex) CanUnmarshalMsg(z interface{}) bool

func (AppIndex) MarshalMsg

func (z AppIndex) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (AppIndex) MsgIsZero

func (z AppIndex) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (AppIndex) Msgsize

func (z AppIndex) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AppIndex) UnmarshalMsg

func (z *AppIndex) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AppLocalState

type AppLocalState struct {
	Schema   StateSchema  `codec:"hsch"`
	KeyValue TealKeyValue `codec:"tkv"`
	// contains filtered or unexported fields
}

AppLocalState stores the LocalState associated with an application. It also stores a cached copy of the application's LocalStateSchema so that MinBalance requirements may be computed 1. without looking up the AppParams and 2. even if the application has been deleted

func (*AppLocalState) CanMarshalMsg

func (_ *AppLocalState) CanMarshalMsg(z interface{}) bool

func (*AppLocalState) CanUnmarshalMsg

func (_ *AppLocalState) CanUnmarshalMsg(z interface{}) bool

func (*AppLocalState) Clone

func (al *AppLocalState) Clone() (res AppLocalState)

Clone returns a copy of some AppLocalState that may be modified without affecting the original

func (*AppLocalState) MarshalMsg

func (z *AppLocalState) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*AppLocalState) MsgIsZero

func (z *AppLocalState) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*AppLocalState) Msgsize

func (z *AppLocalState) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AppLocalState) UnmarshalMsg

func (z *AppLocalState) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AppParams

type AppParams struct {
	ApprovalProgram   []byte       `codec:"approv,allocbound=config.MaxAvailableAppProgramLen"`
	ClearStateProgram []byte       `codec:"clearp,allocbound=config.MaxAvailableAppProgramLen"`
	GlobalState       TealKeyValue `codec:"gs"`
	StateSchemas
	ExtraProgramPages uint32 `codec:"epp"`
	// contains filtered or unexported fields
}

AppParams stores the global information associated with an application

func (*AppParams) CanMarshalMsg

func (_ *AppParams) CanMarshalMsg(z interface{}) bool

func (*AppParams) CanUnmarshalMsg

func (_ *AppParams) CanUnmarshalMsg(z interface{}) bool

func (*AppParams) Clone

func (ap *AppParams) Clone() (res AppParams)

Clone returns a copy of some AppParams that may be modified without affecting the original

func (*AppParams) MarshalMsg

func (z *AppParams) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*AppParams) MsgIsZero

func (z *AppParams) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*AppParams) Msgsize

func (z *AppParams) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AppParams) UnmarshalMsg

func (z *AppParams) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AssetHolding

type AssetHolding struct {
	Amount uint64 `codec:"a"`
	Frozen bool   `codec:"f"`
	// contains filtered or unexported fields
}

AssetHolding describes an asset held by an account.

func (*AssetHolding) CanMarshalMsg

func (_ *AssetHolding) CanMarshalMsg(z interface{}) bool

func (*AssetHolding) CanUnmarshalMsg

func (_ *AssetHolding) CanUnmarshalMsg(z interface{}) bool

func (*AssetHolding) MarshalMsg

func (z *AssetHolding) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*AssetHolding) MsgIsZero

func (z *AssetHolding) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*AssetHolding) Msgsize

func (z *AssetHolding) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AssetHolding) UnmarshalMsg

func (z *AssetHolding) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AssetIndex

type AssetIndex uint64

AssetIndex is the unique integer index of an asset that can be used to look up the creator of the asset, whose balance record contains the AssetParams

func (AssetIndex) CanMarshalMsg

func (_ AssetIndex) CanMarshalMsg(z interface{}) bool

func (*AssetIndex) CanUnmarshalMsg

func (_ *AssetIndex) CanUnmarshalMsg(z interface{}) bool

func (AssetIndex) MarshalMsg

func (z AssetIndex) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (AssetIndex) MsgIsZero

func (z AssetIndex) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (AssetIndex) Msgsize

func (z AssetIndex) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AssetIndex) UnmarshalMsg

func (z *AssetIndex) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type AssetParams

type AssetParams struct {

	// Total specifies the total number of units of this asset
	// created.
	Total uint64 `codec:"t"`

	// Decimals specifies the number of digits to display after the decimal
	// place when displaying this asset. A value of 0 represents an asset
	// that is not divisible, a value of 1 represents an asset divisible
	// into tenths, and so on. This value must be between 0 and 19
	// (inclusive).
	Decimals uint32 `codec:"dc"`

	// DefaultFrozen specifies whether slots for this asset
	// in user accounts are frozen by default or not.
	DefaultFrozen bool `codec:"df"`

	// UnitName specifies a hint for the name of a unit of
	// this asset.
	UnitName string `codec:"un"`

	// AssetName specifies a hint for the name of the asset.
	AssetName string `codec:"an"`

	// URL specifies a URL where more information about the asset can be
	// retrieved
	URL string `codec:"au"`

	// MetadataHash specifies a commitment to some unspecified asset
	// metadata. The format of this metadata is up to the application.
	MetadataHash [32]byte `codec:"am"`

	// Manager specifies an account that is allowed to change the
	// non-zero addresses in this AssetParams.
	Manager Address `codec:"m"`

	// Reserve specifies an account whose holdings of this asset
	// should be reported as "not minted".
	Reserve Address `codec:"r"`

	// Freeze specifies an account that is allowed to change the
	// frozen state of holdings of this asset.
	Freeze Address `codec:"f"`

	// Clawback specifies an account that is allowed to take units
	// of this asset from any account.
	Clawback Address `codec:"c"`
	// contains filtered or unexported fields
}

AssetParams describes the parameters of an asset.

func (*AssetParams) CanMarshalMsg

func (_ *AssetParams) CanMarshalMsg(z interface{}) bool

func (*AssetParams) CanUnmarshalMsg

func (_ *AssetParams) CanUnmarshalMsg(z interface{}) bool

func (*AssetParams) MarshalMsg

func (z *AssetParams) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*AssetParams) MsgIsZero

func (z *AssetParams) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*AssetParams) Msgsize

func (z *AssetParams) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AssetParams) UnmarshalMsg

func (z *AssetParams) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BalanceDetail

type BalanceDetail struct {
	Round       Round
	TotalMoney  MicroAlgos
	OnlineMoney MicroAlgos
	Accounts    []AccountDetail
}

BalanceDetail encapsulates meaningful details about the current balances of the ledger, for external consumption

type BalanceRecord

type BalanceRecord struct {
	Addr Address `codec:"addr"`

	AccountData
	// contains filtered or unexported fields
}

BalanceRecord pairs an account's address with its associated data.

func (*BalanceRecord) CanMarshalMsg

func (_ *BalanceRecord) CanMarshalMsg(z interface{}) bool

func (*BalanceRecord) CanUnmarshalMsg

func (_ *BalanceRecord) CanUnmarshalMsg(z interface{}) bool

func (*BalanceRecord) MarshalMsg

func (z *BalanceRecord) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*BalanceRecord) MsgIsZero

func (z *BalanceRecord) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*BalanceRecord) Msgsize

func (z *BalanceRecord) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (BalanceRecord) ToBeHashed

func (u BalanceRecord) ToBeHashed() (protocol.HashID, []byte)

ToBeHashed implements the crypto.Hashable interface

func (*BalanceRecord) UnmarshalMsg

func (z *BalanceRecord) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type CreatableIndex

type CreatableIndex uint64

CreatableIndex represents either an AssetIndex or AppIndex, which come from the same namespace of indices as each other (both assets and apps are "creatables")

func (CreatableIndex) CanMarshalMsg

func (_ CreatableIndex) CanMarshalMsg(z interface{}) bool

func (*CreatableIndex) CanUnmarshalMsg

func (_ *CreatableIndex) CanUnmarshalMsg(z interface{}) bool

func (CreatableIndex) MarshalMsg

func (z CreatableIndex) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (CreatableIndex) MsgIsZero

func (z CreatableIndex) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (CreatableIndex) Msgsize

func (z CreatableIndex) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*CreatableIndex) UnmarshalMsg

func (z *CreatableIndex) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type CreatableLocator

type CreatableLocator struct {
	Type    CreatableType
	Creator Address
	Index   CreatableIndex
}

CreatableLocator stores both the creator, whose balance record contains the asset/app parameters, and the creatable index, which is the key into those parameters

type CreatableType

type CreatableType uint64

CreatableType is an enum representing whether or not a given creatable is an application or an asset

const (
	// AssetCreatable is the CreatableType corresponding to assets
	// This value must be 0 to align with the applications database
	// upgrade. At migration time, we set the default 'ctype' column of the
	// creators table to 0 so that existing assets have the correct type.
	AssetCreatable CreatableType = 0

	// AppCreatable is the CreatableType corresponds to apps
	AppCreatable CreatableType = 1
)

func (CreatableType) CanMarshalMsg

func (_ CreatableType) CanMarshalMsg(z interface{}) bool

func (*CreatableType) CanUnmarshalMsg

func (_ *CreatableType) CanUnmarshalMsg(z interface{}) bool

func (CreatableType) MarshalMsg

func (z CreatableType) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (CreatableType) MsgIsZero

func (z CreatableType) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (CreatableType) Msgsize

func (z CreatableType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*CreatableType) UnmarshalMsg

func (z *CreatableType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type DeltaAction

type DeltaAction uint64

DeltaAction is an enum of actions that may be performed when applying a delta to a TEAL key/value store

const (
	// SetBytesAction indicates that a TEAL byte slice should be stored at a key
	SetBytesAction DeltaAction = 1

	// SetUintAction indicates that a Uint should be stored at a key
	SetUintAction DeltaAction = 2

	// DeleteAction indicates that the value for a particular key should be deleted
	DeleteAction DeltaAction = 3
)

func (DeltaAction) CanMarshalMsg

func (_ DeltaAction) CanMarshalMsg(z interface{}) bool

func (*DeltaAction) CanUnmarshalMsg

func (_ *DeltaAction) CanUnmarshalMsg(z interface{}) bool

func (DeltaAction) MarshalMsg

func (z DeltaAction) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (DeltaAction) MsgIsZero

func (z DeltaAction) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (DeltaAction) Msgsize

func (z DeltaAction) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*DeltaAction) UnmarshalMsg

func (z *DeltaAction) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type EvalDelta

type EvalDelta struct {
	GlobalDelta StateDelta `codec:"gd"`

	// When decoding EvalDeltas, the integer key represents an offset into
	// [txn.Sender, txn.Accounts[0], txn.Accounts[1], ...]
	LocalDeltas map[uint64]StateDelta `codec:"ld,allocbound=config.MaxEvalDeltaAccounts"`
	// contains filtered or unexported fields
}

EvalDelta stores StateDeltas for an application's global key/value store, as well as StateDeltas for some number of accounts holding local state for that application

func (*EvalDelta) CanMarshalMsg

func (_ *EvalDelta) CanMarshalMsg(z interface{}) bool

func (*EvalDelta) CanUnmarshalMsg

func (_ *EvalDelta) CanUnmarshalMsg(z interface{}) bool

func (EvalDelta) Equal

func (ed EvalDelta) Equal(o EvalDelta) bool

Equal compares two EvalDeltas and returns whether or not they are equivalent. It does not care about nilness equality of LocalDeltas, because the msgpack codec will encode/decode an empty map as nil, and we want an empty generated EvalDelta to equal an empty one we decode off the wire.

func (*EvalDelta) MarshalMsg

func (z *EvalDelta) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*EvalDelta) MsgIsZero

func (z *EvalDelta) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*EvalDelta) Msgsize

func (z *EvalDelta) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*EvalDelta) UnmarshalMsg

func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type InputAddress

type InputAddress struct {
	Ticker  string `codec:"tck"`
	Address string `codec:"addr"`
	// contains filtered or unexported fields
}

An InputAddress represents an account in another public ledger.

func (InputAddress) Account

func (ia InputAddress) Account() Address

func (*InputAddress) CanMarshalMsg

func (_ *InputAddress) CanMarshalMsg(z interface{}) bool

func (*InputAddress) CanUnmarshalMsg

func (_ *InputAddress) CanUnmarshalMsg(z interface{}) bool

func (InputAddress) Empty

func (ia InputAddress) Empty() bool

func (*InputAddress) MarshalMsg

func (z *InputAddress) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*InputAddress) MsgIsZero

func (z *InputAddress) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*InputAddress) Msgsize

func (z *InputAddress) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*InputAddress) UnmarshalMsg

func (z *InputAddress) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MicroAlgos

type MicroAlgos struct {
	Raw uint64
}

MicroAlgos is our unit of currency. It is wrapped in a struct to nudge developers to use an overflow-checking library for any arithmetic.

func MulAIntSaturate

func MulAIntSaturate(a MicroAlgos, b int) MicroAlgos

MulAIntSaturate uses MulSaturate to multiply b (int) with a (MicroAlgos)

func OAddA

func OAddA(a MicroAlgos, b MicroAlgos) (res MicroAlgos, overflowed bool)

OAddA adds 2 MicroAlgos values with overflow tracking

func OSubA

func OSubA(a MicroAlgos, b MicroAlgos) (res MicroAlgos, overflowed bool)

OSubA subtracts b from a with overflow tracking

func PendingRewards

func PendingRewards(ot *OverflowTracker, proto config.ConsensusParams, microAlgos MicroAlgos, rewardsBase uint64, rewardsLevel uint64) MicroAlgos

PendingRewards computes the amount of rewards (in microalgos) that have yet to be added to the account balance.

func (MicroAlgos) CanMarshalMsg

func (MicroAlgos) CanMarshalMsg(z interface{}) bool

CanMarshalMsg implements msgp.Marshaler

func (*MicroAlgos) CanUnmarshalMsg

func (*MicroAlgos) CanUnmarshalMsg(z interface{}) bool

CanUnmarshalMsg implements msgp.Unmarshaler

func (*MicroAlgos) CodecDecodeSelf

func (a *MicroAlgos) CodecDecodeSelf(dec *codec.Decoder)

CodecDecodeSelf implements codec.Selfer to decode MicroAlgos as a simple int

func (MicroAlgos) CodecEncodeSelf

func (a MicroAlgos) CodecEncodeSelf(enc *codec.Encoder)

CodecEncodeSelf implements codec.Selfer to encode MicroAlgos as a simple int

func (MicroAlgos) GreaterThan

func (a MicroAlgos) GreaterThan(b MicroAlgos) bool

GreaterThan implements arithmetic comparison for MicroAlgos

func (MicroAlgos) IsZero

func (a MicroAlgos) IsZero() bool

IsZero implements arithmetic comparison for MicroAlgos

func (MicroAlgos) LessThan

func (a MicroAlgos) LessThan(b MicroAlgos) bool

LessThan implements arithmetic comparison for MicroAlgos

func (MicroAlgos) MarshalMsg

func (a MicroAlgos) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (MicroAlgos) MsgIsZero

func (a MicroAlgos) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (MicroAlgos) Msgsize

func (a MicroAlgos) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (MicroAlgos) RewardUnits

func (a MicroAlgos) RewardUnits(proto config.ConsensusParams) uint64

RewardUnits returns the number of reward units in some number of algos

func (MicroAlgos) ToUint64

func (a MicroAlgos) ToUint64() uint64

ToUint64 converts the amount of algos to uint64

func (*MicroAlgos) UnmarshalMsg

func (a *MicroAlgos) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OverflowTracker

type OverflowTracker struct {
	Overflowed bool
}

OverflowTracker is used to track when an operation causes an overflow

func (*OverflowTracker) Add

func (t *OverflowTracker) Add(a uint64, b uint64) uint64

Add adds 2 values with overflow detection

func (*OverflowTracker) Add16

func (t *OverflowTracker) Add16(a uint16, b uint16) uint16

Add16 adds 2 uint16 values with overflow detection

func (*OverflowTracker) AddA

AddA adds 2 MicroAlgos values with overflow tracking

func (*OverflowTracker) AddR

func (t *OverflowTracker) AddR(a Round, b Round) Round

AddR adds 2 Round values with overflow tracking

func (*OverflowTracker) Mul

func (t *OverflowTracker) Mul(a uint64, b uint64) uint64

Mul multiplies b from a with overflow detection

func (*OverflowTracker) ScalarMulA

func (t *OverflowTracker) ScalarMulA(a MicroAlgos, b uint64) MicroAlgos

ScalarMulA multiplies an Algo amount by a scalar

func (*OverflowTracker) Sub

func (t *OverflowTracker) Sub(a uint64, b uint64) uint64

Sub subtracts b from a with overflow detection

func (*OverflowTracker) SubA

SubA subtracts b from a with overflow tracking

func (*OverflowTracker) SubR

func (t *OverflowTracker) SubR(a Round, b Round) Round

SubR subtracts b from a with overflow tracking

type Round

type Round uint64

Round represents a protocol round index

func (Round) CanMarshalMsg

func (_ Round) CanMarshalMsg(z interface{}) bool

func (*Round) CanUnmarshalMsg

func (_ *Round) CanUnmarshalMsg(z interface{}) bool

func (Round) MarshalMsg

func (z Round) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (Round) MsgIsZero

func (z Round) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (Round) Msgsize

func (z Round) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Round) RoundUpToMultipleOf

func (round Round) RoundUpToMultipleOf(n Round) Round

RoundUpToMultipleOf rounds up round to the next multiple of n.

func (Round) SubSaturate

func (round Round) SubSaturate(x Round) Round

SubSaturate subtracts x rounds with saturation arithmetic that does not wrap around past zero, and instead returns 0 on underflow.

func (*Round) UnmarshalMsg

func (z *Round) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type RoundInterval

type RoundInterval uint64

RoundInterval is a number of rounds

func (RoundInterval) CanMarshalMsg

func (_ RoundInterval) CanMarshalMsg(z interface{}) bool

func (*RoundInterval) CanUnmarshalMsg

func (_ *RoundInterval) CanUnmarshalMsg(z interface{}) bool

func (RoundInterval) MarshalMsg

func (z RoundInterval) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (RoundInterval) MsgIsZero

func (z RoundInterval) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (RoundInterval) Msgsize

func (z RoundInterval) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*RoundInterval) UnmarshalMsg

func (z *RoundInterval) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SortAddress

type SortAddress []Address

SortAddress implements sorting by Address keys for canonical encoding of maps in msgpack format.

func (SortAddress) Len

func (a SortAddress) Len() int

func (SortAddress) Less

func (a SortAddress) Less(i, j int) bool

func (SortAddress) Swap

func (a SortAddress) Swap(i, j int)

type SortAppIndex

type SortAppIndex []AppIndex

SortAppIndex implements sorting by AppIndex keys for canonical encoding of maps in msgpack format.

func (SortAppIndex) Len

func (a SortAppIndex) Len() int

func (SortAppIndex) Less

func (a SortAppIndex) Less(i, j int) bool

func (SortAppIndex) Swap

func (a SortAppIndex) Swap(i, j int)

type SortAssetIndex

type SortAssetIndex []AssetIndex

SortAssetIndex implements sorting by AssetIndex keys for canonical encoding of maps in msgpack format.

func (SortAssetIndex) Len

func (a SortAssetIndex) Len() int

func (SortAssetIndex) Less

func (a SortAssetIndex) Less(i, j int) bool

func (SortAssetIndex) Swap

func (a SortAssetIndex) Swap(i, j int)

type SortString

type SortString []string

SortString implements sorting by string keys for canonical encoding of maps in msgpack format.

func (SortString) Len

func (a SortString) Len() int

func (SortString) Less

func (a SortString) Less(i, j int) bool

func (SortString) Swap

func (a SortString) Swap(i, j int)

type SortUint64

type SortUint64 []uint64

SortUint64 implements sorting by uint64 keys for canonical encoding of maps in msgpack format.

func (SortUint64) Len

func (a SortUint64) Len() int

func (SortUint64) Less

func (a SortUint64) Less(i, j int) bool

func (SortUint64) Swap

func (a SortUint64) Swap(i, j int)

type StateDelta

type StateDelta map[string]ValueDelta

StateDelta is a map from key/value store keys to ValueDeltas, indicating what should happen for that key

func (StateDelta) CanMarshalMsg

func (_ StateDelta) CanMarshalMsg(z interface{}) bool

func (*StateDelta) CanUnmarshalMsg

func (_ *StateDelta) CanUnmarshalMsg(z interface{}) bool

func (StateDelta) Equal

func (sd StateDelta) Equal(o StateDelta) bool

Equal checks whether two StateDeltas are equal. We don't check for nilness equality because an empty map will encode/decode as nil. So if our generated map is empty but not nil, we want to equal a decoded nil off the wire.

func (StateDelta) MarshalMsg

func (z StateDelta) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (StateDelta) MsgIsZero

func (z StateDelta) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (StateDelta) Msgsize

func (z StateDelta) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*StateDelta) UnmarshalMsg

func (z *StateDelta) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (StateDelta) Valid

func (sd StateDelta) Valid(proto *config.ConsensusParams) error

Valid checks whether the keys and values in a StateDelta conform to the consensus parameters' maximum lengths

type StateSchema

type StateSchema struct {
	NumUint      uint64 `codec:"nui"`
	NumByteSlice uint64 `codec:"nbs"`
	// contains filtered or unexported fields
}

StateSchema sets maximums on the number of each type that may be stored

func (StateSchema) AddSchema

func (sm StateSchema) AddSchema(osm StateSchema) (out StateSchema)

AddSchema adds two StateSchemas together

func (*StateSchema) CanMarshalMsg

func (_ *StateSchema) CanMarshalMsg(z interface{}) bool

func (*StateSchema) CanUnmarshalMsg

func (_ *StateSchema) CanUnmarshalMsg(z interface{}) bool

func (*StateSchema) MarshalMsg

func (z *StateSchema) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (StateSchema) MinBalance

func (sm StateSchema) MinBalance(proto *config.ConsensusParams) (res MicroAlgos)

MinBalance computes the MinBalance requirements for a StateSchema based on the consensus parameters

func (*StateSchema) MsgIsZero

func (z *StateSchema) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*StateSchema) Msgsize

func (z *StateSchema) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (StateSchema) NumEntries

func (sm StateSchema) NumEntries() (tot uint64)

NumEntries counts the total number of values that may be stored for particular schema

func (StateSchema) SubSchema

func (sm StateSchema) SubSchema(osm StateSchema) (out StateSchema)

SubSchema subtracts one StateSchema from another

func (*StateSchema) UnmarshalMsg

func (z *StateSchema) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type StateSchemas

type StateSchemas struct {
	LocalStateSchema  StateSchema `codec:"lsch"`
	GlobalStateSchema StateSchema `codec:"gsch"`
	// contains filtered or unexported fields
}

StateSchemas is a thin wrapper around the LocalStateSchema and the GlobalStateSchema, since they are often needed together

func (*StateSchemas) CanMarshalMsg

func (_ *StateSchemas) CanMarshalMsg(z interface{}) bool

func (*StateSchemas) CanUnmarshalMsg

func (_ *StateSchemas) CanUnmarshalMsg(z interface{}) bool

func (*StateSchemas) MarshalMsg

func (z *StateSchemas) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*StateSchemas) MsgIsZero

func (z *StateSchemas) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*StateSchemas) Msgsize

func (z *StateSchemas) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*StateSchemas) UnmarshalMsg

func (z *StateSchemas) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Status

type Status byte

Status is the delegation status of an account's MicroAlgos

func UnmarshalStatus

func UnmarshalStatus(value string) (s Status, err error)

UnmarshalStatus decodes string status value back to Status constant

func (Status) CanMarshalMsg

func (_ Status) CanMarshalMsg(z interface{}) bool

func (*Status) CanUnmarshalMsg

func (_ *Status) CanUnmarshalMsg(z interface{}) bool

func (Status) MarshalMsg

func (z Status) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (Status) MsgIsZero

func (z Status) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (Status) Msgsize

func (z Status) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalMsg

func (z *Status) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SupplyDetail

type SupplyDetail struct {
	Round       Round
	TotalMoney  MicroAlgos
	OnlineMoney MicroAlgos
}

SupplyDetail encapsulates meaningful details about the ledger's current token supply

type TealKeyValue

type TealKeyValue map[string]TealValue

TealKeyValue represents a key/value store for use in an application's LocalState or GlobalState

func (TealKeyValue) CanMarshalMsg

func (_ TealKeyValue) CanMarshalMsg(z interface{}) bool

func (*TealKeyValue) CanUnmarshalMsg

func (_ *TealKeyValue) CanUnmarshalMsg(z interface{}) bool

func (TealKeyValue) Clone

func (tk TealKeyValue) Clone() TealKeyValue

Clone returns a copy of a TealKeyValue that may be modified without affecting the original

func (TealKeyValue) MarshalMsg

func (z TealKeyValue) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (TealKeyValue) MsgIsZero

func (z TealKeyValue) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (TealKeyValue) Msgsize

func (z TealKeyValue) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (TealKeyValue) ToStateSchema

func (tk TealKeyValue) ToStateSchema() (schema StateSchema, err error)

ToStateSchema calculates the number of each value type in a TealKeyValue and represents the result as a StateSchema

func (*TealKeyValue) UnmarshalMsg

func (z *TealKeyValue) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TealType

type TealType uint64

TealType is an enum of the types in a TEAL program: Bytes and Uint

const (
	// TealBytesType represents the type of a byte slice in a TEAL program
	TealBytesType TealType = 1

	// TealUintType represents the type of a uint in a TEAL program
	TealUintType TealType = 2
)

func (TealType) CanMarshalMsg

func (_ TealType) CanMarshalMsg(z interface{}) bool

func (*TealType) CanUnmarshalMsg

func (_ *TealType) CanUnmarshalMsg(z interface{}) bool

func (TealType) MarshalMsg

func (z TealType) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (TealType) MsgIsZero

func (z TealType) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (TealType) Msgsize

func (z TealType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (TealType) String

func (tt TealType) String() string

func (*TealType) UnmarshalMsg

func (z *TealType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TealValue

type TealValue struct {
	Type  TealType `codec:"tt"`
	Bytes string   `codec:"tb"`
	Uint  uint64   `codec:"ui"`
	// contains filtered or unexported fields
}

TealValue contains type information and a value, representing a value in a TEAL program

func (*TealValue) CanMarshalMsg

func (_ *TealValue) CanMarshalMsg(z interface{}) bool

func (*TealValue) CanUnmarshalMsg

func (_ *TealValue) CanUnmarshalMsg(z interface{}) bool

func (*TealValue) MarshalMsg

func (z *TealValue) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*TealValue) MsgIsZero

func (z *TealValue) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*TealValue) Msgsize

func (z *TealValue) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TealValue) String

func (tv *TealValue) String() string

func (*TealValue) ToValueDelta

func (tv *TealValue) ToValueDelta() (vd ValueDelta)

ToValueDelta creates ValueDelta from TealValue

func (*TealValue) UnmarshalMsg

func (z *TealValue) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ValueDelta

type ValueDelta struct {
	Action DeltaAction `codec:"at"`
	Bytes  string      `codec:"bs"`
	Uint   uint64      `codec:"ui"`
	// contains filtered or unexported fields
}

ValueDelta links a DeltaAction with a value to be set

func (*ValueDelta) CanMarshalMsg

func (_ *ValueDelta) CanMarshalMsg(z interface{}) bool

func (*ValueDelta) CanUnmarshalMsg

func (_ *ValueDelta) CanUnmarshalMsg(z interface{}) bool

func (*ValueDelta) MarshalMsg

func (z *ValueDelta) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*ValueDelta) MsgIsZero

func (z *ValueDelta) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*ValueDelta) Msgsize

func (z *ValueDelta) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ValueDelta) ToTealValue

func (vd *ValueDelta) ToTealValue() (value TealValue, ok bool)

ToTealValue converts a ValueDelta into a TealValue if possible, and returns ok = false if the conversion is not possible.

func (*ValueDelta) UnmarshalMsg

func (z *ValueDelta) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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