types

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2019 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = `"2006-01-02T15:04:05"`
View Source
const (
	TxExpirationDefault = 30 * time.Second
)

Variables

View Source
var (
	ErrInvalidCurve               = fmt.Errorf("invalid elliptic curve")
	ErrSharedKeyTooBig            = fmt.Errorf("shared key params are too big")
	ErrSharedKeyIsPointAtInfinity = fmt.Errorf("shared key is point at infinity")
)
View Source
var (
	ErrRPCClientNotInitialized      = fmt.Errorf("RPC client is not initialized")
	ErrNotImplemented               = fmt.Errorf("not implemented")
	ErrInvalidInputType             = fmt.Errorf("invalid input type")
	ErrInvalidInputLength           = fmt.Errorf("invalid input length")
	ErrInvalidPublicKey             = fmt.Errorf("invalid PublicKey")
	ErrInvalidAddress               = fmt.Errorf("invalid Address")
	ErrPublicKeyChainPrefixMismatch = fmt.Errorf("PublicKey chain prefix mismatch")
	ErrAddressChainPrefixMismatch   = fmt.Errorf("Address chain prefix mismatch")
	ErrInvalidChecksum              = fmt.Errorf("invalid checksum")
	ErrNoSigningKeyFound            = fmt.Errorf("no signing key found")
	ErrNoVerifyingKeyFound          = fmt.Errorf("no verifying key found")
	ErrInvalidDigestLength          = fmt.Errorf("invalid digest length")
	ErrInvalidPrivateKeyCurve       = fmt.Errorf("invalid PrivateKey curve")
	ErrCurrentChainConfigIsNotSet   = fmt.Errorf("current chain config is not set")
)
View Source
var (
	EmptyBuffer = []byte{}
	EmptyParams = []interface{}{}
)
View Source
var (
	OperationMap = make(map[OperationType]GetOpFunc)
)

Functions

This section is empty.

Types

type Account

type Account struct {
	ID                            GrapheneID             `json:"id"`
	Name                          string                 `json:"name"`
	Statistics                    GrapheneID             `json:"statistics"`
	MembershipExpirationDate      Time                   `json:"membership_expiration_date"`
	NetworkFeePercentage          UInt64                 `json:"network_fee_percentage"`
	LifetimeReferrerFeePercentage UInt64                 `json:"lifetime_referrer_fee_percentage"`
	ReferrerRewardsPercentage     UInt64                 `json:"referrer_rewards_percentage"`
	TopNControlFlags              UInt64                 `json:"top_n_control_flags"`
	WhitelistingAccounts          GrapheneIDs            `json:"whitelisting_accounts"`
	BlacklistingAccounts          GrapheneIDs            `json:"blacklisting_accounts"`
	WhitelistedAccounts           GrapheneIDs            `json:"whitelisted_accounts"`
	BlacklistedAccounts           GrapheneIDs            `json:"blacklisted_accounts"`
	Options                       AccountOptions         `json:"options"`
	Registrar                     GrapheneID             `json:"registrar"`
	Referrer                      GrapheneID             `json:"referrer"`
	LifetimeReferrer              GrapheneID             `json:"lifetime_referrer"`
	CashbackVB                    GrapheneID             `json:"cashback_vb"`
	Owner                         Authority              `json:"owner"`
	Active                        Authority              `json:"active"`
	OwnerSpecialAuthority         OwnerSpecialAuthority  `json:"owner_special_authority"`
	ActiveSpecialAuthority        ActiveSpecialAuthority `json:"active_special_authority"`
}

func NewAccount

func NewAccount(id GrapheneID) *Account

NewAccount creates a new Account object

func (*Account) MarshalJSON

func (j *Account) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Account) MarshalJSONBuf

func (j *Account) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Account) UnmarshalJSON

func (j *Account) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Account) UnmarshalJSONFFLexer

func (j *Account) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AccountAuthsMap

type AccountAuthsMap map[GrapheneID]UInt16

func (AccountAuthsMap) Marshal

func (p AccountAuthsMap) Marshal(enc *util.TypeEncoder) error

func (AccountAuthsMap) MarshalJSON

func (p AccountAuthsMap) MarshalJSON() ([]byte, error)

func (*AccountAuthsMap) UnmarshalJSON

func (p *AccountAuthsMap) UnmarshalJSON(data []byte) error

type AccountBalance

type AccountBalance struct {
	ID              GrapheneID `json:"id"`
	Owner           GrapheneID `json:"owner"`
	AssetType       GrapheneID `json:"asset_type"`
	Balance         UInt64     `json:"balance"`
	MaintenanceFlag bool       `json:"maintenance_flag"`
}

func (*AccountBalance) MarshalJSON

func (j *AccountBalance) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AccountBalance) MarshalJSONBuf

func (j *AccountBalance) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AccountBalance) UnmarshalJSON

func (j *AccountBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AccountBalance) UnmarshalJSONFFLexer

func (j *AccountBalance) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AccountBalances

type AccountBalances []AccountBalance

type AccountCreateExtensions

type AccountCreateExtensions struct {
	NullExt                *NullExtension          `json:"null_ext,omitempty"`
	OwnerSpecialAuthority  *OwnerSpecialAuthority  `json:"owner_special_authority,omitempty"`
	ActiveSpecialAuthority *ActiveSpecialAuthority `json:"active_special_authority,omitempty"`
	BuybackOptions         *BuybackOptions         `json:"buyback_options,omitempty"`
}

func (AccountCreateExtensions) Length

func (p AccountCreateExtensions) Length() int

func (AccountCreateExtensions) Marshal

func (*AccountCreateExtensions) MarshalJSON

func (j *AccountCreateExtensions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AccountCreateExtensions) MarshalJSONBuf

func (j *AccountCreateExtensions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AccountCreateExtensions) UnmarshalJSON

func (j *AccountCreateExtensions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AccountCreateExtensions) UnmarshalJSONFFLexer

func (j *AccountCreateExtensions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AccountCreateExtensionsType

type AccountCreateExtensionsType UInt8
const (
	AccountCreateExtensionsNullExt AccountCreateExtensionsType = iota
	AccountCreateExtensionsOwnerSpecial
	AccountCreateExtensionsActiveSpecial
	AccountCreateExtensionsBuyback
)

type AccountInfo

type AccountInfo struct {
	Account              Account           `json:"account"`
	RegistrarName        string            `json:"registrar_name"`
	ReferrerName         string            `json:"referrer_name"`
	LifetimeReferrerName string            `json:"lifetime_referrer_name"`
	CashbackBalance      VestingBalance    `json:"cashback_balance"`
	Balances             AccountBalances   `json:"balances"`
	VestingBalances      VestingBalances   `json:"vesting_balances"`
	LimitOrders          LimitOrders       `json:"limit_orders"`
	CallOrders           CallOrders        `json:"call_orders"`
	SettleOrders         SettleOrders      `json:"settle_orders"`
	Statistics           AccountStatistics `json:"statistics"`
	Assets               GrapheneIDs       `json:"assets"`
}

func (*AccountInfo) MarshalJSON

func (j *AccountInfo) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AccountInfo) MarshalJSONBuf

func (j *AccountInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AccountInfo) UnmarshalJSON

func (j *AccountInfo) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AccountInfo) UnmarshalJSONFFLexer

func (j *AccountInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AccountOptions

type AccountOptions struct {
	MemoKey       PublicKey  `json:"memo_key"`
	VotingAccount GrapheneID `json:"voting_account"`
	NumWitness    UInt16     `json:"num_witness"`
	NumCommittee  UInt16     `json:"num_committee"`
	Votes         Votes      `json:"votes"`
	Extensions    Extensions `json:"extensions"`
}

func (AccountOptions) Marshal

func (p AccountOptions) Marshal(enc *util.TypeEncoder) error

func (*AccountOptions) MarshalJSON

func (j *AccountOptions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AccountOptions) MarshalJSONBuf

func (j *AccountOptions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AccountOptions) UnmarshalJSON

func (j *AccountOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AccountOptions) UnmarshalJSONFFLexer

func (j *AccountOptions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AccountStatistics

type AccountStatistics struct {
	ID                GrapheneID `json:"id"`
	MostRecentOp      GrapheneID `json:"most_recent_op"`
	Owner             GrapheneID `json:"owner"`
	LifetimeFeesPaid  UInt64     `json:"lifetime_fees_paid"`
	PendingFees       UInt64     `json:"pending_fees"`
	PendingVestedFees UInt64     `json:"pending_vested_fees"`
	RemovedOps        UInt64     `json:"removed_ops"`
	TotalOps          UInt64     `json:"total_ops"`
	TotalCoreInOrders UInt64     `json:"total_core_in_orders"`
}

func (*AccountStatistics) MarshalJSON

func (j *AccountStatistics) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AccountStatistics) MarshalJSONBuf

func (j *AccountStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AccountStatistics) UnmarshalJSON

func (j *AccountStatistics) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AccountStatistics) UnmarshalJSONFFLexer

func (j *AccountStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AccountUpdateExtensions

type AccountUpdateExtensions struct {
	NullExt                *NullExtension          `json:"null_ext,omitempty"`
	OwnerSpecialAuthority  *OwnerSpecialAuthority  `json:"owner_special_authority,omitempty"`
	ActiveSpecialAuthority *ActiveSpecialAuthority `json:"active_special_authority,omitempty"`
}

func (AccountUpdateExtensions) Length

func (p AccountUpdateExtensions) Length() int

func (AccountUpdateExtensions) Marshal

func (*AccountUpdateExtensions) MarshalJSON

func (j *AccountUpdateExtensions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AccountUpdateExtensions) MarshalJSONBuf

func (j *AccountUpdateExtensions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AccountUpdateExtensions) UnmarshalJSON

func (j *AccountUpdateExtensions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AccountUpdateExtensions) UnmarshalJSONFFLexer

func (j *AccountUpdateExtensions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Accounts

type Accounts []Account

type ActiveSpecialAuthority

type ActiveSpecialAuthority struct {
	SpecialAuth
}

func (ActiveSpecialAuthority) Marshal

func (p ActiveSpecialAuthority) Marshal(enc *util.TypeEncoder) error

type Address

type Address struct {
	// contains filtered or unexported fields
}

func NewAddress

func NewAddress(pub *PublicKey) (*Address, error)

func NewAddressFromString

func NewAddressFromString(add string) (*Address, error)

NewAddress creates a new Address from string e.g.("BTSFN9r6VYzBK8EKtMewfNbfiGCr56pHDBFi")

func (Address) Bytes

func (p Address) Bytes() []byte

func (Address) Marshal

func (p Address) Marshal(enc *util.TypeEncoder) error

func (Address) MarshalJSON

func (p Address) MarshalJSON() ([]byte, error)

func (Address) String

func (p Address) String() string

func (*Address) UnmarshalJSON

func (p *Address) UnmarshalJSON(data []byte) error

type AddressAuthsMap

type AddressAuthsMap map[*Address]UInt16

func (AddressAuthsMap) Marshal

func (p AddressAuthsMap) Marshal(enc *util.TypeEncoder) error

func (AddressAuthsMap) MarshalJSON

func (p AddressAuthsMap) MarshalJSON() ([]byte, error)

func (*AddressAuthsMap) UnmarshalJSON

func (p *AddressAuthsMap) UnmarshalJSON(data []byte) error

type Asset

type Asset struct {
	ID                 GrapheneID   `json:"id"`
	Symbol             string       `json:"symbol"`
	Precision          int          `json:"precision"`
	Issuer             GrapheneID   `json:"issuer"`
	DynamicAssetDataID GrapheneID   `json:"dynamic_asset_data_id"`
	BitassetDataID     GrapheneID   `json:"bitasset_data_id"`
	Options            AssetOptions `json:"options"`
}

func NewAsset

func NewAsset(id GrapheneID) *Asset

NewAsset creates a new Asset object

func (*Asset) MarshalJSON

func (j *Asset) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Asset) MarshalJSONBuf

func (j *Asset) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Asset) UnmarshalJSON

func (j *Asset) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Asset) UnmarshalJSONFFLexer

func (j *Asset) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AssetAmount

type AssetAmount struct {
	Amount Int64      `json:"amount"`
	Asset  GrapheneID `json:"asset_id"`
}

func (AssetAmount) Marshal

func (p AssetAmount) Marshal(enc *util.TypeEncoder) error

func (*AssetAmount) MarshalJSON

func (j *AssetAmount) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AssetAmount) MarshalJSONBuf

func (j *AssetAmount) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AssetAmount) Rate

func (p *AssetAmount) Rate(prec float64) float64

func (*AssetAmount) UnmarshalJSON

func (j *AssetAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AssetAmount) UnmarshalJSONFFLexer

func (j *AssetAmount) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

func (AssetAmount) Valid

func (p AssetAmount) Valid() bool

type AssetAmounts

type AssetAmounts []AssetAmount

type AssetFeed

type AssetFeed struct {
	ProviderID GrapheneID
	DateTime   Time
	FeedInfo   PriceFeed
}

func (AssetFeed) MarshalJSON

func (p AssetFeed) MarshalJSON() ([]byte, error)

func (*AssetFeed) UnmarshalJSON

func (p *AssetFeed) UnmarshalJSON(data []byte) error

type AssetFeeds

type AssetFeeds []AssetFeed

type AssetOptions

type AssetOptions struct {
	MaxSupply            Int64       `json:"max_supply"`
	MaxMarketFee         Int64       `json:"max_market_fee"`
	MarketFeePercent     UInt16      `json:"market_fee_percent"`
	Flags                UInt16      `json:"flags"`
	Description          string      `json:"description"`
	CoreExchangeRate     Price       `json:"core_exchange_rate"`
	IssuerPermissions    UInt16      `json:"issuer_permissions"`
	BlacklistAuthorities GrapheneIDs `json:"blacklist_authorities"`
	WhitelistAuthorities GrapheneIDs `json:"whitelist_authorities"`
	BlacklistMarkets     GrapheneIDs `json:"blacklist_markets"`
	WhitelistMarkets     GrapheneIDs `json:"whitelist_markets"`
	Extensions           Extensions  `json:"extensions"`
}

func (AssetOptions) Marshal

func (p AssetOptions) Marshal(enc *util.TypeEncoder) error

func (*AssetOptions) MarshalJSON

func (j *AssetOptions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*AssetOptions) MarshalJSONBuf

func (j *AssetOptions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*AssetOptions) UnmarshalJSON

func (j *AssetOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*AssetOptions) UnmarshalJSONFFLexer

func (j *AssetOptions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type AssetPermission

type AssetPermission Int16
const (
	AssetPermissionChargeMarketFee     AssetPermission = 0x01
	AssetPermissionWhiteList           AssetPermission = 0x02
	AssetPermissionOverrideAuthority   AssetPermission = 0x04
	AssetPermissionTransferRestricted  AssetPermission = 0x08
	AssetPermissionDisableForceSettle  AssetPermission = 0x10
	AssetPermissionGlobalSettle        AssetPermission = 0x20
	AssetPermissionDisableConfidential AssetPermission = 0x40
	AssetPermissionWitnessFedAsset     AssetPermission = 0x80
	AssetPermissionComiteeFedAsset     AssetPermission = 0x100
)

func (AssetPermission) String

func (i AssetPermission) String() string

type AssetType

type AssetType Int8
const (
	AssetTypeUndefined AssetType = -1
	AssetTypeCoreAsset AssetType = iota
	AssetTypeUIA
	AssetTypeSmartCoin
	AssetTypePredictionMarket
)

func (AssetType) String

func (i AssetType) String() string

type Assets

type Assets []Asset

type Authority

type Authority struct {
	WeightThreshold UInt32          `json:"weight_threshold"`
	AccountAuths    AccountAuthsMap `json:"account_auths"`
	KeyAuths        KeyAuthsMap     `json:"key_auths"`
	AddressAuths    AddressAuthsMap `json:"address_auths"`
	Extensions      Extensions      `json:"extensions"`
}

func (Authority) Marshal

func (p Authority) Marshal(enc *util.TypeEncoder) error

func (*Authority) MarshalJSON

func (j *Authority) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Authority) MarshalJSONBuf

func (j *Authority) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Authority) UnmarshalJSON

func (j *Authority) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Authority) UnmarshalJSONFFLexer

func (j *Authority) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Balance

type Balance struct {
	ID            GrapheneID  `json:"id"`
	Balance       AssetAmount `json:"balance"`
	LastClaimDate Time        `json:"last_claim_date"`
	Owner         Address     `json:"owner"`
}

func (*Balance) MarshalJSON

func (j *Balance) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Balance) MarshalJSONBuf

func (j *Balance) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Balance) UnmarshalJSON

func (j *Balance) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Balance) UnmarshalJSONFFLexer

func (j *Balance) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type BitAssetData

type BitAssetData struct {
	ID                       GrapheneID      `json:"id"`
	MembershipExpirationDate Time            `json:"current_feed_publication_time"`
	IsPredictionMarket       bool            `json:"is_prediction_market"`
	SettlementPrice          Price           `json:"settlement_price"`
	Feeds                    AssetFeeds      `json:"feeds"`
	Options                  BitassetOptions `json:"options"`
	CurrentFeed              PriceFeed       `json:"current_feed"`
	ForcedSettledVolume      UInt64          `json:"force_settled_volume"`
	SettlementFund           UInt64          `json:"settlement_fund"`
}

func (*BitAssetData) MarshalJSON

func (j *BitAssetData) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*BitAssetData) MarshalJSONBuf

func (j *BitAssetData) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*BitAssetData) UnmarshalJSON

func (j *BitAssetData) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*BitAssetData) UnmarshalJSONFFLexer

func (j *BitAssetData) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type BitassetOptions

type BitassetOptions struct {
	FeedLifetimeSec              UInt32     `json:"feed_lifetime_sec"`
	MinimumFeeds                 UInt8      `json:"minimum_feeds"`
	ForceSettlementDelaySec      UInt32     `json:"force_settlement_delay_sec"`
	ForceSettlementOffsetPercent UInt16     `json:"force_settlement_offset_percent"`
	MaximumForceSettlementVolume UInt16     `json:"maximum_force_settlement_volume"`
	ShortBackingAsset            GrapheneID `json:"short_backing_asset"`
	Extensions                   Extensions `json:"extensions"`
}

func (BitassetOptions) Marshal

func (p BitassetOptions) Marshal(enc *util.TypeEncoder) error

func (*BitassetOptions) MarshalJSON

func (j *BitassetOptions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*BitassetOptions) MarshalJSONBuf

func (j *BitassetOptions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*BitassetOptions) UnmarshalJSON

func (j *BitassetOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*BitassetOptions) UnmarshalJSONFFLexer

func (j *BitassetOptions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Block

type Block struct {
	Witness               GrapheneID         `json:"witness"`
	TransactionMerkleRoot Buffer             `json:"transaction_merkle_root"`
	WitnessSignature      Buffer             `json:"witness_signature"`
	Previous              Buffer             `json:"previous"`
	BlockID               Buffer             `json:"block_id"`
	TimeStamp             Time               `json:"timestamp"`
	SigningKey            *PublicKey         `json:"signing_key,omitempty"`
	Transactions          SignedTransactions `json:"transactions"`
	TransactionIDs        Buffers            `json:"transaction_ids"`
	Extensions            Extensions         `json:"extensions"`
}

func (*Block) MarshalJSON

func (j *Block) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Block) MarshalJSONBuf

func (j *Block) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Block) UnmarshalJSON

func (j *Block) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Block) UnmarshalJSONFFLexer

func (j *Block) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Buffer

type Buffer []byte

func BufferFromString

func BufferFromString(data string) (b Buffer, err error)

func (Buffer) Bytes

func (p Buffer) Bytes() []byte

func (*Buffer) Decrypt

func (p *Buffer) Decrypt(cipherKey []byte) ([]byte, error)

Decrypt AES decrypts the buffer content

func (*Buffer) Encrypt

func (p *Buffer) Encrypt(cipherKey []byte) ([]byte, error)

Encrypt AES-encrypts the buffer content

func (*Buffer) FromString

func (p *Buffer) FromString(data string) error

func (Buffer) Length

func (p Buffer) Length() int

func (Buffer) Marshal

func (p Buffer) Marshal(enc *util.TypeEncoder) error

func (Buffer) MarshalJSON

func (p Buffer) MarshalJSON() ([]byte, error)

func (Buffer) String

func (p Buffer) String() string

func (*Buffer) Unmarshal

func (p *Buffer) Unmarshal(dec *util.TypeDecoder) error

func (*Buffer) UnmarshalJSON

func (p *Buffer) UnmarshalJSON(data []byte) error

type Buffers

type Buffers []Buffer

type BurnWorkerInitializer

type BurnWorkerInitializer struct {
}

func (BurnWorkerInitializer) Marshal

func (p BurnWorkerInitializer) Marshal(enc *util.TypeEncoder) error

type BuybackOptions

type BuybackOptions struct {
	AssetToBuy       GrapheneID  `json:"asset_to_buy"`
	AssetToBuyIssuer GrapheneID  `json:"asset_to_buy_issuer"`
	Markets          GrapheneIDs `json:"markets"`
}

func (BuybackOptions) Marshal

func (p BuybackOptions) Marshal(enc *util.TypeEncoder) error

func (*BuybackOptions) MarshalJSON

func (j *BuybackOptions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*BuybackOptions) MarshalJSONBuf

func (j *BuybackOptions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*BuybackOptions) UnmarshalJSON

func (j *BuybackOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*BuybackOptions) UnmarshalJSONFFLexer

func (j *BuybackOptions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type CCDVestingPolicy

type CCDVestingPolicy struct {
	StartClaim                  Time   `json:"start_claim"`
	CoinSecondsEarnedLastUpdate Time   `json:"coin_seconds_earned_last_update"`
	VestingSeconds              UInt32 `json:"vesting_seconds"`
	CoinSecondsEarned           UInt64 `json:"coin_seconds_earned"` //UInt128!!
}

TODO: CoinSecondsEarned is UInt128! Since golang has no 128 bit uint, check marshal and implement this later.

func (CCDVestingPolicy) Marshal

func (p CCDVestingPolicy) Marshal(enc *util.TypeEncoder) error

TODO: check order!

func (*CCDVestingPolicy) MarshalJSON

func (j *CCDVestingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*CCDVestingPolicy) MarshalJSONBuf

func (j *CCDVestingPolicy) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*CCDVestingPolicy) UnmarshalJSON

func (j *CCDVestingPolicy) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*CCDVestingPolicy) UnmarshalJSONFFLexer

func (j *CCDVestingPolicy) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type CallOrder

type CallOrder struct {
	ID         GrapheneID `json:"id"`
	Borrower   GrapheneID `json:"borrower"`
	Collateral Int64      `json:"collateral"`
	Debt       Int64      `json:"debt"`
	CallPrice  Price      `json:"call_price"`
}

func (*CallOrder) MarshalJSON

func (j *CallOrder) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*CallOrder) MarshalJSONBuf

func (j *CallOrder) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*CallOrder) UnmarshalJSON

func (j *CallOrder) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*CallOrder) UnmarshalJSONFFLexer

func (j *CallOrder) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type CallOrderUpdateExtensions

type CallOrderUpdateExtensions struct {
	TargetCollateralRatio *TargetCollRatio `json:"target_collateral_ratio,omitempty"`
}

func (CallOrderUpdateExtensions) Length

func (p CallOrderUpdateExtensions) Length() int

func (CallOrderUpdateExtensions) Marshal

func (*CallOrderUpdateExtensions) MarshalJSON

func (j *CallOrderUpdateExtensions) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*CallOrderUpdateExtensions) MarshalJSONBuf

func (j *CallOrderUpdateExtensions) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*CallOrderUpdateExtensions) UnmarshalJSON

func (j *CallOrderUpdateExtensions) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*CallOrderUpdateExtensions) UnmarshalJSONFFLexer

func (j *CallOrderUpdateExtensions) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type CallOrderUpdateExtensionsType

type CallOrderUpdateExtensionsType UInt8
const (
	CallOrderUpdateExtensionsTypeTargetRatio CallOrderUpdateExtensionsType = iota
)

type CallOrders

type CallOrders []CallOrder

type CommiteeMember

type CommiteeMember struct {
	ID                    GrapheneID `json:"id"`
	CommiteeMemberAccount GrapheneID `json:"committee_member_account"`
	TotalVotes            UInt64     `json:"total_votes"`
	URL                   string     `json:"url"`
	VoteID                VoteID     `json:"vote_id"`
}

func (*CommiteeMember) MarshalJSON

func (j *CommiteeMember) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*CommiteeMember) MarshalJSONBuf

func (j *CommiteeMember) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*CommiteeMember) UnmarshalJSON

func (j *CommiteeMember) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*CommiteeMember) UnmarshalJSONFFLexer

func (j *CommiteeMember) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type DynamicGlobalProperties

type DynamicGlobalProperties struct {
	ID                             GrapheneID `json:"id"`
	CurrentWitness                 GrapheneID `json:"current_witness"`
	LastBudgetTime                 Time       `json:"last_budget_time"`
	Time                           Time       `json:"time"`
	NextMaintenanceTime            Time       `json:"next_maintenance_time"`
	AccountsRegisteredThisInterval int        `json:"accounts_registered_this_interval"`
	DynamicFlags                   int        `json:"dynamic_flags"`
	HeadBlockID                    string     `json:"head_block_id"`
	RecentSlotsFilled              string     `json:"recent_slots_filled"`
	HeadBlockNumber                UInt32     `json:"head_block_number"`
	LastIrreversibleBlockNum       UInt32     `json:"last_irreversible_block_num"`
	CurrentAslot                   int64      `json:"current_aslot"`
	WitnessBudget                  int64      `json:"witness_budget"`
	RecentlyMissedCount            int64      `json:"recently_missed_count"`
}

func (*DynamicGlobalProperties) MarshalJSON

func (j *DynamicGlobalProperties) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*DynamicGlobalProperties) MarshalJSONBuf

func (j *DynamicGlobalProperties) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (DynamicGlobalProperties) RefBlockNum

func (p DynamicGlobalProperties) RefBlockNum() UInt16

func (DynamicGlobalProperties) RefBlockPrefix

func (p DynamicGlobalProperties) RefBlockPrefix() (UInt32, error)

func (*DynamicGlobalProperties) UnmarshalJSON

func (j *DynamicGlobalProperties) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*DynamicGlobalProperties) UnmarshalJSONFFLexer

func (j *DynamicGlobalProperties) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Extensions

type Extensions []interface{}

func (Extensions) Marshal

func (p Extensions) Marshal(enc *util.TypeEncoder) error

type Float32

type Float32 float32

func (Float32) Marshal

func (num Float32) Marshal(enc *util.TypeEncoder) error

func (*Float32) UnmarshalJSON

func (num *Float32) UnmarshalJSON(data []byte) error

type Float64

type Float64 float64

func (Float64) Marshal

func (num Float64) Marshal(enc *util.TypeEncoder) error

func (*Float64) UnmarshalJSON

func (num *Float64) UnmarshalJSON(data []byte) error

type FullAccountInfo

type FullAccountInfo struct {
	ID          GrapheneID
	AccountInfo AccountInfo
}

func (FullAccountInfo) MarshalJSON

func (p FullAccountInfo) MarshalJSON() ([]byte, error)

func (*FullAccountInfo) UnmarshalJSON

func (p *FullAccountInfo) UnmarshalJSON(data []byte) error

type FullAccountInfos

type FullAccountInfos []FullAccountInfo

type GetOpFunc

type GetOpFunc func() Operation

type GrapheneID

type GrapheneID struct {
	// contains filtered or unexported fields
}

func NewGrapheneID

func NewGrapheneID(id string) *GrapheneID

NewGrapheneID creates an new GrapheneID object

func (GrapheneID) Equals

func (p GrapheneID) Equals(o GrapheneObject) bool

func (*GrapheneID) FromRawData

func (p *GrapheneID) FromRawData(in interface{}) error

func (*GrapheneID) FromString

func (p *GrapheneID) FromString(in string) error

func (GrapheneID) ID

func (p GrapheneID) ID() string

ID returns the objects ID

func (GrapheneID) Marshal

func (p GrapheneID) Marshal(enc *util.TypeEncoder) error

func (GrapheneID) MarshalJSON

func (p GrapheneID) MarshalJSON() ([]byte, error)

func (GrapheneID) Space

func (p GrapheneID) Space() SpaceType

Space returns the objects SpaceType

func (GrapheneID) String

func (p GrapheneID) String() string

String, GrapheneID implements Stringer

func (GrapheneID) Type

func (p GrapheneID) Type() ObjectType

Type returns the objects ObjectType

func (*GrapheneID) Unmarshal

func (p *GrapheneID) Unmarshal(dec *util.TypeDecoder) error

func (*GrapheneID) UnmarshalJSON

func (p *GrapheneID) UnmarshalJSON(s []byte) error

func (GrapheneID) Valid

func (p GrapheneID) Valid() bool

type GrapheneIDs

type GrapheneIDs []GrapheneID

func (GrapheneIDs) Marshal

func (p GrapheneIDs) Marshal(enc *util.TypeEncoder) error

type GrapheneObject

type GrapheneObject interface {
	util.TypeMarshaller
	ID() string
	String() string
	Type() ObjectType
	Space() SpaceType
	Equals(id GrapheneObject) bool
	Valid() bool
}

type GrapheneObjects

type GrapheneObjects []GrapheneObject

func (GrapheneObjects) String

func (p GrapheneObjects) String() string

func (GrapheneObjects) ToStrings

func (p GrapheneObjects) ToStrings() []string

type Int16

type Int16 int16

func (Int16) Marshal

func (num Int16) Marshal(enc *util.TypeEncoder) error

func (*Int16) UnmarshalJSON

func (num *Int16) UnmarshalJSON(data []byte) error

type Int32

type Int32 int32

func (Int32) Marshal

func (num Int32) Marshal(enc *util.TypeEncoder) error

func (*Int32) UnmarshalJSON

func (num *Int32) UnmarshalJSON(data []byte) error

type Int64

type Int64 int64

func (Int64) Marshal

func (num Int64) Marshal(enc *util.TypeEncoder) error

func (*Int64) UnmarshalJSON

func (num *Int64) UnmarshalJSON(data []byte) error

type Int8

type Int8 int8

func (Int8) Marshal

func (num Int8) Marshal(enc *util.TypeEncoder) error

func (*Int8) UnmarshalJSON

func (num *Int8) UnmarshalJSON(data []byte) error

type KeyAuthsMap

type KeyAuthsMap map[*PublicKey]UInt16

func (KeyAuthsMap) Marshal

func (p KeyAuthsMap) Marshal(enc *util.TypeEncoder) error

func (KeyAuthsMap) MarshalJSON

func (p KeyAuthsMap) MarshalJSON() ([]byte, error)

func (*KeyAuthsMap) UnmarshalJSON

func (p *KeyAuthsMap) UnmarshalJSON(data []byte) error

type LimitOrder

type LimitOrder struct {
	ID          GrapheneID `json:"id"`
	Seller      GrapheneID `json:"seller"`
	Expiration  Time       `json:"expiration"`
	ForSale     UInt64     `json:"for_sale"`
	DeferredFee UInt64     `json:"deferred_fee"`
	SellPrice   Price      `json:"sell_price"`
}

func (*LimitOrder) MarshalJSON

func (j *LimitOrder) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*LimitOrder) MarshalJSONBuf

func (j *LimitOrder) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*LimitOrder) UnmarshalJSON

func (j *LimitOrder) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*LimitOrder) UnmarshalJSONFFLexer

func (j *LimitOrder) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type LimitOrders

type LimitOrders []LimitOrder

type LinearVestingPolicy

type LinearVestingPolicy struct {
	BeginTimestamp         Time   `json:"begin_timestamp"`
	VestingCliffSeconds    UInt32 `json:"vesting_cliff_seconds"`
	VestingDurationSeconds UInt32 `json:"vesting_duration_seconds"`
}

func (LinearVestingPolicy) Marshal

func (p LinearVestingPolicy) Marshal(enc *util.TypeEncoder) error

func (*LinearVestingPolicy) MarshalJSON

func (j *LinearVestingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*LinearVestingPolicy) MarshalJSONBuf

func (j *LinearVestingPolicy) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*LinearVestingPolicy) UnmarshalJSON

func (j *LinearVestingPolicy) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*LinearVestingPolicy) UnmarshalJSONFFLexer

func (j *LinearVestingPolicy) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type MarketTrade

type MarketTrade struct {
	DateTime Time    `json:"date"`
	Price    Float64 `json:"price"`
	Amount   Float64 `json:"amount"`
	Value    Float64 `json:"value"`
}

func (*MarketTrade) MarshalJSON

func (j *MarketTrade) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*MarketTrade) MarshalJSONBuf

func (j *MarketTrade) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*MarketTrade) UnmarshalJSON

func (j *MarketTrade) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*MarketTrade) UnmarshalJSONFFLexer

func (j *MarketTrade) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type MarketTrades

type MarketTrades []MarketTrade

type Memo

type Memo struct {
	From    PublicKey `json:"from"`
	To      PublicKey `json:"to"`
	Nonce   UInt64    `json:"nonce"`
	Message Buffer    `json:"message"`
}

func (Memo) Decrypt

func (p Memo) Decrypt(priv *PrivateKey) (string, error)

Decrypt calculates a shared secret by the receivers private key and the senders public key, then decrypts the given memo message.

func (*Memo) Encrypt

func (p *Memo) Encrypt(priv *PrivateKey, msg string) error

Encrypt calculates a shared secret by the senders private key and the recipients public key, then encrypts the given memo message.

func (Memo) Marshal

func (p Memo) Marshal(enc *util.TypeEncoder) error

func (*Memo) MarshalJSON

func (j *Memo) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Memo) MarshalJSONBuf

func (j *Memo) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Memo) UnmarshalJSON

func (j *Memo) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Memo) UnmarshalJSONFFLexer

func (j *Memo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type NoSpecialAuthority

type NoSpecialAuthority struct{}

func (*NoSpecialAuthority) MarshalJSON

func (j *NoSpecialAuthority) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*NoSpecialAuthority) MarshalJSONBuf

func (j *NoSpecialAuthority) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*NoSpecialAuthority) UnmarshalJSON

func (j *NoSpecialAuthority) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*NoSpecialAuthority) UnmarshalJSONFFLexer

func (j *NoSpecialAuthority) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type NullExtension

type NullExtension struct{}

func (NullExtension) Marshal

func (p NullExtension) Marshal(enc *util.TypeEncoder) error

func (*NullExtension) MarshalJSON

func (j *NullExtension) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*NullExtension) MarshalJSONBuf

func (j *NullExtension) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*NullExtension) UnmarshalJSON

func (j *NullExtension) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*NullExtension) UnmarshalJSONFFLexer

func (j *NullExtension) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type ObjectType

type ObjectType Int8
const (
	ObjectTypeBase ObjectType = iota + 1
	ObjectTypeAccount
	ObjectTypeAsset
	ObjectTypeForceSettlement
	ObjectTypeCommiteeMember
	ObjectTypeWitness
	ObjectTypeLimitOrder
	ObjectTypeCallOrder
	ObjectTypeCustom
	ObjectTypeProposal
	ObjectTypeOperationHistory
	ObjectTypeWithdrawPermission
	ObjectTypeVestingBalance
	ObjectTypeWorker
	ObjectTypeBalance
)

for SpaceTypeProtocol

const (
	ObjectTypeGlobalProperty ObjectType = iota + 1
	ObjectTypeDynamicGlobalProperty
	ObjectTypeAssetDynamicData
	ObjectTypeAssetBitAssetData
	ObjectTypeAccountBalance
	ObjectTypeAccountStatistics
	ObjectTypeTransaction
	ObjectTypeBlockSummary
	ObjectTypeAccountTransactionHistory
	ObjectTypeBlindedBalance
	ObjectTypeChainProperty
	ObjectTypeWitnessSchedule
	ObjectTypeBudgetRecord
	ObjectTypeSpecialAuthority
)

for SpaceTypeImplementation

const (
	ObjectTypeUndefined ObjectType = -1
)

func (ObjectType) String

func (i ObjectType) String() string

type Operation

type Operation interface {
	util.TypeMarshaller
	SetFee(fee AssetAmount)
	GetFee() AssetAmount
	Type() OperationType
}

type OperationEnvelope

type OperationEnvelope struct {
	Type      OperationType
	Operation Operation
}

func (OperationEnvelope) Marshal

func (p OperationEnvelope) Marshal(enc *util.TypeEncoder) error

func (OperationEnvelope) MarshalJSON

func (p OperationEnvelope) MarshalJSON() ([]byte, error)

func (*OperationEnvelope) UnmarshalJSON

func (p *OperationEnvelope) UnmarshalJSON(data []byte) error

type OperationEnvelopeHolder

type OperationEnvelopeHolder struct {
	Op OperationEnvelope `json:"op"`
}

type OperationEnvelopeHolders

type OperationEnvelopeHolders []OperationEnvelopeHolder

func (OperationEnvelopeHolders) Marshal

type OperationFee

type OperationFee struct {
	Fee *AssetAmount `json:"fee,omitempty"`
}

func (OperationFee) GetFee

func (p OperationFee) GetFee() AssetAmount

func (*OperationFee) SetFee

func (p *OperationFee) SetFee(fee AssetAmount)

type OperationHistories

type OperationHistories []OperationHistory

type OperationHistory

type OperationHistory struct {
	ID         GrapheneID        `json:"id"`
	BlockNum   UInt32            `json:"block_num"`
	TrxInBlock UInt16            `json:"trx_in_block"`
	OpInTrx    UInt16            `json:"op_in_trx"`
	VirtualOp  UInt16            `json:"virtual_op"`
	Operation  OperationEnvelope `json:"op"`
	Result     OperationResult   `json:"result"`
}

func (*OperationHistory) MarshalJSON

func (j *OperationHistory) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*OperationHistory) MarshalJSONBuf

func (j *OperationHistory) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*OperationHistory) UnmarshalJSON

func (j *OperationHistory) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*OperationHistory) UnmarshalJSONFFLexer

func (j *OperationHistory) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type OperationRelativeHistories

type OperationRelativeHistories []OperationRelativeHistory

type OperationRelativeHistory

type OperationRelativeHistory struct {
	Memo        string           `json:"memo"`
	Description string           `json:"description"`
	Op          OperationHistory `json:"op"`
}

func (*OperationRelativeHistory) MarshalJSON

func (j *OperationRelativeHistory) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*OperationRelativeHistory) MarshalJSONBuf

func (j *OperationRelativeHistory) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*OperationRelativeHistory) UnmarshalJSON

func (j *OperationRelativeHistory) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*OperationRelativeHistory) UnmarshalJSONFFLexer

func (j *OperationRelativeHistory) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type OperationResult

type OperationResult interface {
}

type OperationType

type OperationType Int8
const (
	OperationTypeTransfer OperationType = iota
	OperationTypeLimitOrderCreate
	OperationTypeLimitOrderCancel
	OperationTypeCallOrderUpdate
	OperationTypeFillOrder
	OperationTypeAccountCreate
	OperationTypeAccountUpdate
	OperationTypeAccountWhitelist
	OperationTypeAccountUpgrade
	OperationTypeAccountTransfer ///
	OperationTypeAssetCreate
	OperationTypeAssetUpdate
	OperationTypeAssetUpdateBitasset
	OperationTypeAssetUpdateFeedProducers
	OperationTypeAssetIssue
	OperationTypeAssetReserve
	OperationTypeAssetFundFeePool
	OperationTypeAssetSettle
	OperationTypeAssetGlobalSettle ///
	OperationTypeAssetPublishFeed
	OperationTypeWitnessCreate
	OperationTypeWitnessUpdate
	OperationTypeProposalCreate
	OperationTypeProposalUpdate
	OperationTypeProposalDelete
	OperationTypeWithdrawPermissionCreate              ///
	OperationTypeWithdrawPermissionUpdate              ///
	OperationTypeWithdrawPermissionClaim               ///
	OperationTypeWithdrawPermissionDelete              ///
	OperationTypeCommitteeMemberCreate                 ///
	OperationTypeCommitteeMemberUpdate                 ///
	OperationTypeCommitteeMemberUpdateGlobalParameters ///
	OperationTypeVestingBalanceCreate
	OperationTypeVestingBalanceWithdraw
	OperationTypeWorkerCreate
	OperationTypeCustom ///
	OperationTypeAssert ///
	OperationTypeBalanceClaim
	OperationTypeOverrideTransfer
	OperationTypeTransferToBlind   ///
	OperationTypeBlindTransfer     ///
	OperationTypeTransferFromBlind ///
	OperationTypeAssetSettleCancel ///
	OperationTypeAssetClaimFees    ///
	OperationTypeFBADistribute     ///
	OperationTypeBidCollateral
	OperationTypeExecuteBid ///
)

func (OperationType) OperationName

func (p OperationType) OperationName() string

func (OperationType) String

func (i OperationType) String() string

type Operations

type Operations []Operation

func (Operations) ApplyFees

func (p Operations) ApplyFees(fees AssetAmounts) error

func (Operations) CombinedFees

func (p Operations) CombinedFees() AssetAmounts

func (Operations) Envelopes

func (p Operations) Envelopes() []OperationEnvelope

func (Operations) Marshal

func (p Operations) Marshal(enc *util.TypeEncoder) error

func (Operations) MarshalJSON

func (p Operations) MarshalJSON() ([]byte, error)

func (*Operations) UnmarshalJSON

func (p *Operations) UnmarshalJSON(data []byte) error

type Order

type Order struct {
	Base  Float64 `json:"base"`
	Quote Float64 `json:"quote"`
	Price Float64 `json:"price"`
}

func (*Order) MarshalJSON

func (j *Order) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Order) MarshalJSONBuf

func (j *Order) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Order) UnmarshalJSON

func (j *Order) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Order) UnmarshalJSONFFLexer

func (j *Order) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type OrderBook

type OrderBook struct {
	Base  GrapheneID `json:"base"`
	Asks  []Order    `json:"asks"`
	Quote GrapheneID `json:"quote"`
	Bids  []Order    `json:"bids"`
}

func (*OrderBook) MarshalJSON

func (j *OrderBook) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*OrderBook) MarshalJSONBuf

func (j *OrderBook) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*OrderBook) UnmarshalJSON

func (j *OrderBook) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*OrderBook) UnmarshalJSONFFLexer

func (j *OrderBook) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type OwnerSpecialAuthority

type OwnerSpecialAuthority struct {
	SpecialAuth
}

func (OwnerSpecialAuthority) Marshal

func (p OwnerSpecialAuthority) Marshal(enc *util.TypeEncoder) error

type Price

type Price struct {
	Base  AssetAmount `json:"base"`
	Quote AssetAmount `json:"quote"`
}

func (Price) Marshal

func (p Price) Marshal(enc *util.TypeEncoder) error

func (*Price) MarshalJSON

func (j *Price) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Price) MarshalJSONBuf

func (j *Price) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (Price) Rate

func (p Price) Rate(precBase, precQuote float64) Rate

func (*Price) UnmarshalJSON

func (j *Price) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Price) UnmarshalJSONFFLexer

func (j *Price) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

func (Price) Valid

func (p Price) Valid() bool

type PriceFeed

type PriceFeed struct {
	MaintenanceCollateralRatio UInt16 `json:"maintenance_collateral_ratio"`
	MaximumShortSqueezeRatio   UInt16 `json:"maximum_short_squeeze_ratio"`
	SettlementPrice            Price  `json:"settlement_price"`
	CoreExchangeRate           Price  `json:"core_exchange_rate"`
}

func (PriceFeed) Marshal

func (p PriceFeed) Marshal(enc *util.TypeEncoder) error

func (*PriceFeed) MarshalJSON

func (j *PriceFeed) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*PriceFeed) MarshalJSONBuf

func (j *PriceFeed) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*PriceFeed) UnmarshalJSON

func (j *PriceFeed) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*PriceFeed) UnmarshalJSONFFLexer

func (j *PriceFeed) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields
}

func NewPrivateKeyFromWif

func NewPrivateKeyFromWif(wifPrivateKey string) (*PrivateKey, error)

func (PrivateKey) Bytes

func (p PrivateKey) Bytes() []byte

func (PrivateKey) ECPrivateKey

func (p PrivateKey) ECPrivateKey() *btcec.PrivateKey

func (PrivateKey) Marshal

func (p PrivateKey) Marshal(enc *util.TypeEncoder) error

func (PrivateKey) PublicKey

func (p PrivateKey) PublicKey() *PublicKey

func (PrivateKey) SharedSecret

func (p PrivateKey) SharedSecret(pub *PublicKey, skLen, macLen int) (sk []byte, err error)

func (PrivateKey) SignCompact

func (p PrivateKey) SignCompact(hash []byte) (sig []byte, err error)

func (PrivateKey) ToECDSA

func (p PrivateKey) ToECDSA() *ecdsa.PrivateKey

func (PrivateKey) ToHex

func (p PrivateKey) ToHex() string

func (PrivateKey) ToWIF

func (p PrivateKey) ToWIF() string

func (*PrivateKey) Unmarshal

func (p *PrivateKey) Unmarshal(dec *util.TypeDecoder) error

type PrivateKeys

type PrivateKeys []PrivateKey

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

func NewPublicKey

func NewPublicKey(pub *btcec.PublicKey) (*PublicKey, error)

func NewPublicKeyFromString

func NewPublicKeyFromString(key string) (*PublicKey, error)

NewPublicKey creates a new PublicKey from string e.g.("BTS6K35Bajw29N4fjP4XADHtJ7bEj2xHJ8CoY2P2s1igXTB5oMBhR")

func (PublicKey) Bytes

func (p PublicKey) Bytes() []byte

func (PublicKey) Equal

func (p PublicKey) Equal(pub *PublicKey) bool

func (PublicKey) Marshal

func (p PublicKey) Marshal(enc *util.TypeEncoder) error

func (PublicKey) MarshalJSON

func (p PublicKey) MarshalJSON() ([]byte, error)

func (PublicKey) MaxSharedKeyLength

func (p PublicKey) MaxSharedKeyLength() int

MaxSharedKeyLength returns the maximum length of the shared key the public key can produce.

func (PublicKey) String

func (p PublicKey) String() string

func (*PublicKey) ToAddress

func (p *PublicKey) ToAddress() (*Address, error)

func (PublicKey) ToECDSA

func (p PublicKey) ToECDSA() *ecdsa.PublicKey

func (*PublicKey) UnmarshalJSON

func (p *PublicKey) UnmarshalJSON(data []byte) error

type PublicKeys

type PublicKeys []PublicKey

type Rate

type Rate float64

func (Rate) Inverse

func (p Rate) Inverse() Rate

func (Rate) Value

func (p Rate) Value() float64

type RefundWorkerInitializer

type RefundWorkerInitializer struct {
}

func (RefundWorkerInitializer) Marshal

type SettleOrder

type SettleOrder struct {
	ID             GrapheneID  `json:"id"`
	Owner          GrapheneID  `json:"owner"`
	SettlementDate Time        `json:"settlement_date"`
	Balance        AssetAmount `json:"balance"`
}

func (*SettleOrder) MarshalJSON

func (j *SettleOrder) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*SettleOrder) MarshalJSONBuf

func (j *SettleOrder) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*SettleOrder) UnmarshalJSON

func (j *SettleOrder) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*SettleOrder) UnmarshalJSONFFLexer

func (j *SettleOrder) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type SettleOrders

type SettleOrders []SettleOrder

type Signatures

type Signatures []Buffer

func (Signatures) Marshal

func (p Signatures) Marshal(enc *util.TypeEncoder) error

func (*Signatures) Reset

func (p *Signatures) Reset()

type SignedTransaction

type SignedTransaction struct {
	Transaction
	Signatures Signatures `json:"signatures"`
}

func NewSignedTransaction

func NewSignedTransaction() *SignedTransaction

NewSignedTransaction creates an new SignedTransaction

func NewSignedTransactionWithBlockData

func NewSignedTransactionWithBlockData(props *DynamicGlobalProperties) (*SignedTransaction, error)

NewSignedTransactionWithBlockData creates a new SignedTransaction and initializes relevant Blockdata fields and expiration.

func (SignedTransaction) Digest

func (tx SignedTransaction) Digest(chain *config.ChainConfig) ([]byte, error)

Digest calculates ths sha256 hash of the transaction.

func (SignedTransaction) Marshal

func (p SignedTransaction) Marshal(enc *util.TypeEncoder) error

func (*SignedTransaction) MarshalJSON

func (j *SignedTransaction) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*SignedTransaction) MarshalJSONBuf

func (j *SignedTransaction) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (SignedTransaction) SerializeTrx

func (p SignedTransaction) SerializeTrx() ([]byte, error)

SerializeTrx serializes the transaction wihout signatures.

func (SignedTransaction) ToHex

func (p SignedTransaction) ToHex() (string, error)

ToHex returns th hex representation of the underlying transaction + signatures.

func (*SignedTransaction) UnmarshalJSON

func (j *SignedTransaction) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*SignedTransaction) UnmarshalJSONFFLexer

func (j *SignedTransaction) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type SignedTransactionWithTransactionId

type SignedTransactionWithTransactionId struct {
	TransactionId     string
	SignedTransaction SignedTransaction
}

func (SignedTransactionWithTransactionId) Marshal

func (SignedTransactionWithTransactionId) MarshalJSON

func (p SignedTransactionWithTransactionId) MarshalJSON() ([]byte, error)

func (*SignedTransactionWithTransactionId) UnmarshalJSON

func (p *SignedTransactionWithTransactionId) UnmarshalJSON(data []byte) error

type SignedTransactions

type SignedTransactions []SignedTransaction

type SpaceType

type SpaceType Int8
const (
	SpaceTypeUndefined SpaceType = -1
	SpaceTypeProtocol  SpaceType = iota
	SpaceTypeImplementation
)

func (SpaceType) String

func (i SpaceType) String() string

type SpecialAuth

type SpecialAuth struct {
	Type SpecialAuthorityType
	Auth interface{}
}

func (SpecialAuth) Marshal

func (p SpecialAuth) Marshal(enc *util.TypeEncoder) error

func (SpecialAuth) MarshalJSON

func (p SpecialAuth) MarshalJSON() ([]byte, error)

func (*SpecialAuth) UnmarshalJSON

func (p *SpecialAuth) UnmarshalJSON(data []byte) error

type SpecialAuthorityType

type SpecialAuthorityType UInt8
const (
	SpecialAuthorityTypeNoSpecial SpecialAuthorityType = iota
	SpecialAuthorityTypeTopHolders
)

type TargetCollRatio

type TargetCollRatio UInt16

func (TargetCollRatio) Marshal

func (p TargetCollRatio) Marshal(enc *util.TypeEncoder) error

type Time

type Time struct {
	time.Time
}

func (Time) Add

func (t Time) Add(dur time.Duration) Time

func (*Time) FromTime

func (t *Time) FromTime(tm time.Time)

func (Time) IsZero

func (t Time) IsZero() bool

func (Time) Marshal

func (t Time) Marshal(enc *util.TypeEncoder) error

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (*Time) Set

func (t *Time) Set(dur time.Duration)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

type TopHoldersSpecialAuthority

type TopHoldersSpecialAuthority struct {
	Asset         GrapheneID `json:"asset"`
	NumTopHolders UInt8      `json:"num_top_holders"`
}

func (TopHoldersSpecialAuthority) Marshal

func (*TopHoldersSpecialAuthority) MarshalJSON

func (j *TopHoldersSpecialAuthority) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*TopHoldersSpecialAuthority) MarshalJSONBuf

func (j *TopHoldersSpecialAuthority) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*TopHoldersSpecialAuthority) UnmarshalJSON

func (j *TopHoldersSpecialAuthority) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*TopHoldersSpecialAuthority) UnmarshalJSONFFLexer

func (j *TopHoldersSpecialAuthority) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Transaction

type Transaction struct {
	RefBlockNum    UInt16     `json:"ref_block_num"`
	RefBlockPrefix UInt32     `json:"ref_block_prefix"`
	Expiration     Time       `json:"expiration"`
	Operations     Operations `json:"operations"`
	Extensions     Extensions `json:"extensions"`
}

func (*Transaction) AdjustExpiration

func (p *Transaction) AdjustExpiration(dur time.Duration)

AdjustExpiration extends expiration by given duration.

func (Transaction) Marshal

func (p Transaction) Marshal(enc *util.TypeEncoder) error

type UInt

type UInt uint

func (UInt) Marshal

func (num UInt) Marshal(enc *util.TypeEncoder) error

func (*UInt) UnmarshalJSON

func (num *UInt) UnmarshalJSON(data []byte) error

type UInt16

type UInt16 uint16

func (UInt16) Marshal

func (num UInt16) Marshal(enc *util.TypeEncoder) error

func (*UInt16) UnmarshalJSON

func (num *UInt16) UnmarshalJSON(data []byte) error

type UInt32

type UInt32 uint32

func (UInt32) Marshal

func (num UInt32) Marshal(enc *util.TypeEncoder) error

func (*UInt32) UnmarshalJSON

func (num *UInt32) UnmarshalJSON(data []byte) error

type UInt64

type UInt64 uint64

func (UInt64) Marshal

func (num UInt64) Marshal(enc *util.TypeEncoder) error

func (*UInt64) UnmarshalJSON

func (num *UInt64) UnmarshalJSON(data []byte) error

type UInt8

type UInt8 uint8

func (UInt8) Marshal

func (num UInt8) Marshal(enc *util.TypeEncoder) error

func (*UInt8) UnmarshalJSON

func (num *UInt8) UnmarshalJSON(data []byte) error

type VestingBalance

type VestingBalance struct {
	ID      GrapheneID    `json:"id"`
	Balance AssetAmount   `json:"balance"`
	Owner   GrapheneID    `json:"owner"`
	Policy  VestingPolicy `json:"policy"`
}

func (*VestingBalance) MarshalJSON

func (j *VestingBalance) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*VestingBalance) MarshalJSONBuf

func (j *VestingBalance) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*VestingBalance) UnmarshalJSON

func (j *VestingBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*VestingBalance) UnmarshalJSONFFLexer

func (j *VestingBalance) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type VestingBalanceWorkerInitializer

type VestingBalanceWorkerInitializer struct {
	PayVestingPeriodDays UInt16 `json:"pay_vesting_period_days"`
}

func (VestingBalanceWorkerInitializer) Marshal

type VestingBalances

type VestingBalances []VestingBalance

type VestingPolicy

type VestingPolicy struct {
	// contains filtered or unexported fields
}

func (VestingPolicy) Marshal

func (p VestingPolicy) Marshal(enc *util.TypeEncoder) error

func (VestingPolicy) MarshalJSON

func (p VestingPolicy) MarshalJSON() ([]byte, error)

func (*VestingPolicy) UnmarshalJSON

func (p *VestingPolicy) UnmarshalJSON(data []byte) error

type VestingPolicyType

type VestingPolicyType UInt8
const (
	VestingPolicyTypeLinear VestingPolicyType = iota
	VestingPolicyTypeCCD
)

type Volume24

type Volume24 struct {
	Base        GrapheneID `json:"base"`
	BaseVolume  Float64    `json:"base_volume"`
	Quote       GrapheneID `json:"quote"`
	QuoteVolume Float64    `json:"quote_volume"`
	Time        Time       `json:"time"`
}

func (*Volume24) MarshalJSON

func (j *Volume24) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Volume24) MarshalJSONBuf

func (j *Volume24) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Volume24) UnmarshalJSON

func (j *Volume24) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Volume24) UnmarshalJSONFFLexer

func (j *Volume24) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type VoteID

type VoteID struct {
	// contains filtered or unexported fields
}

func NewVoteID

func NewVoteID(id string) *VoteID

func (VoteID) Marshal

func (p VoteID) Marshal(enc *util.TypeEncoder) error

TODO: define this

func (VoteID) MarshalJSON

func (p VoteID) MarshalJSON() ([]byte, error)

func (*VoteID) UnmarshalJSON

func (p *VoteID) UnmarshalJSON(data []byte) error

type Votes

type Votes []VoteID

func (Votes) Marshal

func (p Votes) Marshal(enc *util.TypeEncoder) error

TODO: define this

type WorkerInitializer

type WorkerInitializer struct {
	Type        WorkerInitializerType
	Initializer interface{}
}

func (WorkerInitializer) Marshal

func (p WorkerInitializer) Marshal(enc *util.TypeEncoder) error

func (WorkerInitializer) MarshalJSON

func (p WorkerInitializer) MarshalJSON() ([]byte, error)

func (*WorkerInitializer) UnmarshalJSON

func (p *WorkerInitializer) UnmarshalJSON(data []byte) error

type WorkerInitializerType

type WorkerInitializerType UInt8
const (
	WorkerInitializerTypeRefund WorkerInitializerType = iota
	WorkerInitializerTypeVestingBalance
	WorkerInitializerTypeBurn
)

Jump to

Keyboard shortcuts

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