types

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtCodes map[ExtType]uint16

Functions

func GetExtCodes

func GetExtCodes(s string) uint16

func JSONMarshal

func JSONMarshal(t interface{}) ([]byte, error)

JSONMarshal the function of packing with the processing of HTML tags.

Types

type AccountCreateOperation

type AccountCreateOperation struct {
	Fee            string           `json:"fee"`
	Creator        string           `json:"creator"`
	NewAccountName string           `json:"new_account_name"`
	Owner          *Authority       `json:"owner"`
	JSONMetadata   *AccountMetadata `json:"json_metadata"`
}

AccountCreateOperation represents account_create operation data.

func (*AccountCreateOperation) Data

func (op *AccountCreateOperation) Data() interface{}

Data returns the operation data AccountCreateOperation.

func (*AccountCreateOperation) MarshalTransaction

func (op *AccountCreateOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type AccountCreateOperation to bytes.

func (*AccountCreateOperation) Type

func (op *AccountCreateOperation) Type() OpType

Type function that defines the type of operation AccountCreateOperation.

type AccountMetadata

type AccountMetadata struct {
	Profile ProfileJSON `json:"profile,omitempty"`
}

func (*AccountMetadata) MarshalJSON

func (op *AccountMetadata) MarshalJSON() ([]byte, error)

func (*AccountMetadata) MarshalTransaction

func (op *AccountMetadata) MarshalTransaction(encoder *transaction.Encoder) error

func (*AccountMetadata) UnmarshalJSON

func (op *AccountMetadata) UnmarshalJSON(p []byte) error

type AccountSupernodeVoteOperation

type AccountSupernodeVoteOperation struct {
	Account   string `json:"account"`
	Supernode string `json:"supernode"`
	Approve   bool   `json:"approve"`
	Votes     int64  `json:"votes"`
	Fee       string `json:"fee"`
}

AccountSupernodeVoteOperation represents account_supernode_vote operation data.

func (*AccountSupernodeVoteOperation) Data

func (op *AccountSupernodeVoteOperation) Data() interface{}

Data returns the operation data AccountSupernodeVoteOperation.

func (*AccountSupernodeVoteOperation) MarshalTransaction

func (op *AccountSupernodeVoteOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type AccountSupernodeVoteOperation to bytes.

func (*AccountSupernodeVoteOperation) Type

Type function that defines the type of operation AccountSupernodeVoteOperation.

type AccountUpdateOperation

type AccountUpdateOperation struct {
	Account      string           `json:"account"`
	Owner        *Authority       `json:"owner,omitempty"`
	JSONMetadata *AccountMetadata `json:"json_metadata"`
	Fee          string           `json:"fee"`
}

AccountUpdateOperation represents account_update operation data.

func (*AccountUpdateOperation) Data

func (op *AccountUpdateOperation) Data() interface{}

Data returns the operation data AccountUpdateOperation.

func (*AccountUpdateOperation) MarshalTransaction

func (op *AccountUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type AccountUpdateOperation to bytes.

func (*AccountUpdateOperation) Type

func (op *AccountUpdateOperation) Type() OpType

Type function that defines the type of operation AccountUpdateOperation.

type Asset

type Asset struct {
	Amount float64
	Symbol string
}

Asset type from parameter JSON

func (*Asset) MarshalJSON

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

MarshalJSON function for packing the Asset type in JSON.

func (*Asset) MarshalTransaction

func (op *Asset) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Asset to bytes.

func (*Asset) String

func (op *Asset) String() string

String function convert type Asset to string.

func (*Asset) StringAmount

func (op *Asset) StringAmount() string

StringAmount function convert type Asset.Amount to string.

func (*Asset) UnmarshalJSON

func (op *Asset) UnmarshalJSON(data []byte) error

UnmarshalJSON unpacking the JSON parameter in the Asset type.

type AssetSymbol

type AssetSymbol struct {
	Decimals  uint8  `json:"decimals"`
	AssetName string `json:"name"`
}

func (*AssetSymbol) MarshalTransaction

func (op *AssetSymbol) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type AssetSymbol to bytes.

type Authority

type Authority struct {
	AccountAuths    StringInt64Map `json:"account_auths"`
	KeyAuths        StringInt64Map `json:"key_auths"`
	WeightThreshold uint32         `json:"weight_threshold"`
}

Authority is an additional structure used by other structures.

func (*Authority) MarshalTransaction

func (auth *Authority) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Authority to bytes.

type ClearNullAccountBalanceOperation

type ClearNullAccountBalanceOperation struct {
	TotalCleared []*Asset `json:"total_cleared"`
}

ReturnVestingDelegationOperation represents return_vesting_delegation operation data.

func (*ClearNullAccountBalanceOperation) Data

func (op *ClearNullAccountBalanceOperation) Data() interface{}

Data returns the operation data ReturnVestingDelegationOperation.

func (*ClearNullAccountBalanceOperation) Type

Type function that defines the type of operation ReturnVestingDelegationOperation.

type ExtType

type ExtType string
const (
	Void        ExtType = "void_t"
	ExtJsonType ExtType = "extension_json_type"
)

func (ExtType) Code

func (kind ExtType) Code() uint16

type ExtensionJsonType

type ExtensionJsonType struct {
	Data string `json:"data"`
}

func (*ExtensionJsonType) MarshalJSON

func (ext *ExtensionJsonType) MarshalJSON() ([]byte, error)

func (*ExtensionJsonType) MarshalTransaction

func (ext *ExtensionJsonType) MarshalTransaction(encoder *transaction.Encoder) error

func (*ExtensionJsonType) UnmarshalJSON

func (ext *ExtensionJsonType) UnmarshalJSON(data []byte) error

type ExtensionType

type ExtensionType struct {
	Type  uint8             `json:"type"`
	Value ExtensionJsonType `json:"value"`
}

func (*ExtensionType) MarshalTransaction

func (ext *ExtensionType) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type AssetSymbol to bytes.

type FillVestingWithdrawOperation

type FillVestingWithdrawOperation struct {
	FromAccount string `json:"from_account"`
	ToAccount   string `json:"to_account"`
	Withdrawn   *Asset `json:"withdrawn"`
	Deposited   *Asset `json:"deposited"`
}

FillVestingWithdrawOperation represents fill_vesting_withdraw operation data.

func (*FillVestingWithdrawOperation) Data

func (op *FillVestingWithdrawOperation) Data() interface{}

Data returns the operation data FillVestingWithdrawOperation.

func (*FillVestingWithdrawOperation) Type

Type function that defines the type of operation FillVestingWithdrawOperation.

type HardforkOperation

type HardforkOperation struct {
	HardforkID uint32 `json:"hardfork_id"`
}

HardforkOperation represents hardfork operation data.

func (*HardforkOperation) Data

func (op *HardforkOperation) Data() interface{}

Data returns the operation data HardforkOperation.

func (*HardforkOperation) Type

func (op *HardforkOperation) Type() OpType

Type function that defines the type of operation HardforkOperation.

type ID

type ID struct {
	ValueInt    *Int
	ValueString string
}

ID type from parameter JSON

func (*ID) UnmarshalJSON

func (id *ID) UnmarshalJSON(data []byte) error

UnmarshalJSON unpacking the JSON parameter in the ID type.

type Int

type Int struct {
	*big.Int
}

Int type from parameter JSON

func (*Int) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Int type.

type Int16

type Int16 int16

Int16 type from parameter JSON

func (Int16) MarshalTransaction

func (num Int16) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Int16 to bytes.

func (*Int16) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Int16 type.

type Int32

type Int32 int32

Int32 type from parameter JSON

func (Int32) MarshalTransaction

func (num Int32) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Int32 to bytes.

func (*Int32) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Int32 type.

type Int64

type Int64 int64

Int64 type from parameter JSON

func (Int64) MarshalTransaction

func (num Int64) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Int64 to bytes.

func (*Int64) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Int64 type.

type Int8

type Int8 int8

Int8 type from parameter JSON

func (Int8) MarshalTransaction

func (num Int8) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Int8 to bytes.

func (*Int8) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Int8 type.

type OpType

type OpType string

OpType represents a Golos operation type, i.e. vote, comment, pow and so on.

const (
	TypeTransfer                OpType = "transfer"
	TypeTransferToVesting       OpType = "transfer_to_vesting"
	TypeWithdrawVesting         OpType = "withdraw_vesting"
	TypeAccountCreate           OpType = "account_create"
	TypeAccountUpdate           OpType = "account_update"
	TypeSupernodeUpdate         OpType = "supernode_update"
	TypeAccountSupernodeVote    OpType = "account_supernode_vote"
	TypeSmtCreate               OpType = "smt_create"
	TypeSmartContract           OpType = "smart_contract"
	TypeFillVestingWithdraw     OpType = "fill_vesting_withdraw"      //Virtual Operation
	TypeShutdownSupernode       OpType = "shutdown_supernode"         //Virtual Operation
	TypeHardfork                OpType = "hardfork"                   //Virtual Operation
	TypeProducerReward          OpType = "producer_reward"            //Virtual Operation
	TypeClearNullAccountBalance OpType = "clear_null_account_balance" //Virtual Operation
	TypeScbValidate             OpType = "scb_validate"
)

func (OpType) Code

func (kind OpType) Code() uint16

Code returns the operation code associated with the given operation type.

type Operation

type Operation interface {
	// Type returns the operation type as present in the operation object, element [0].
	Type() OpType

	// Data returns the operation data as present in the operation object, element [1].
	//
	// When the operation type is known to this package, this field contains
	// the operation data object associated with the given operation type,
	// e.g. Type is TypeVote -> Data contains *VoteOperation.
	// Otherwise this field contains raw JSON (type *json.RawMessage).
	Data() interface{}
}

Operation represents an operation stored in a transaction.

type OperationObject

type OperationObject struct {
	TransactionID          string    `json:"trx_id"`
	BlockNumber            uint32    `json:"block"`
	TransactionInBlock     uint32    `json:"trx_in_block"`
	OperationInTransaction uint32    `json:"op_in_trx"`
	VirtualOperation       uint32    `json:"virtual_op"`
	Timestamp              *Time     `json:"timestamp"`
	Operation              Operation `json:"op"`
	OperationType          OpType    `json:"-"`
}

OperationObject type from parameter JSON

func (*OperationObject) MarshalJSON

func (op *OperationObject) MarshalJSON() ([]byte, error)

MarshalJSON function for packing the OperationObject type in JSON.

func (*OperationObject) UnmarshalJSON

func (op *OperationObject) UnmarshalJSON(p []byte) error

UnmarshalJSON unpacking the JSON parameter in the OperationObject type.

type Operations

type Operations []Operation

Operations structure from the set Operation.

func (Operations) MarshalJSON

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

MarshalJSON function for packing the Operations type in JSON.

func (*Operations) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Operations type.

type ProducerRewardOperation

type ProducerRewardOperation struct {
	Producer      string `json:"producer"`
	VestingShares *Asset `json:"vesting_shares"`
}

LiquidityRewardOperation represents liquidity_reward operation data.

func (*ProducerRewardOperation) Data

func (op *ProducerRewardOperation) Data() interface{}

Data returns the operation data LiquidityRewardOperation.

func (*ProducerRewardOperation) Type

func (op *ProducerRewardOperation) Type() OpType

Type function that defines the type of operation LiquidityRewardOperation.

type ProfileJSON

type ProfileJSON struct {
	Name         string `json:"name,omitempty"`
	ProfileImage string `json:"profile_image,omitempty"`
	CoverImage   string `json:"cover_image,omitempty"`
	Gender       string `json:"gender,omitempty"`
	About        string `json:"about,omitempty"`
	Location     string `json:"location,omitempty"`
	Website      string `json:"website,omitempty"`
}

type RPCError

type RPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    struct {
		Code    int    `json:"code"`
		Name    string `json:"name"`
		Message string `json:"message"`
		Stack   []struct {
			Context struct {
				Level      string `json:"level"`
				File       string `json:"file"`
				Line       int    `json:"line"`
				Method     string `json:"method"`
				Hostname   string `json:"hostname"`
				ThreadName string `json:"thread_name"`
				Timestamp  string `json:"timestamp"`
			} `json:"context"`
			Format string      `json:"format"`
			Data   interface{} `json:"data"`
		} `json:"stack"`
	} `json:"data"`
}

func (*RPCError) Error

func (e *RPCError) Error() string

type RPCIncoming

type RPCIncoming struct {
	ID     uint64          `json:"id"`
	JSON   string          `json:"jsonrpc"`
	Result json.RawMessage `json:"result"`
}

type RPCRequest

type RPCRequest struct {
	Method string      `json:"method"`
	Params interface{} `json:"params,omitempty"`
	JSON   string      `json:"jsonrpc"`
	ID     uint64      `json:"id"`
}

type RPCResponse

type RPCResponse struct {
	Result *json.RawMessage `json:"result,omitempty"`
	Error  *RPCError        `json:"error,omitempty"`
	JSON   string           `json:"jsonrpc,omitempty"`
	ID     uint64           `json:"id"`
}

type ScbValidateOperation added in v1.0.2

type ScbValidateOperation struct {
	Committer   string `json:"committer"`
	Supernode   string `json:"supernode"`
	Scid        string `json:"scid"`
	ScOperation string `json:"sc_operation"`
	TimeCommit  UInt32 `json:"time_commit"`
	Fee         string `json:"fee"`
}

SmartContractOperation represents transfer operation data.

func (*ScbValidateOperation) Data added in v1.0.2

func (op *ScbValidateOperation) Data() interface{}

Data returns the operation data SmartContractOperation.

func (*ScbValidateOperation) MarshalTransaction added in v1.0.2

func (op *ScbValidateOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type SmtCreateOperation to bytes.

func (*ScbValidateOperation) Type added in v1.0.2

func (op *ScbValidateOperation) Type() OpType

Type function that defines the type of operation SmartContractOperation.

type ShutdownSupernodeOperation

type ShutdownSupernodeOperation struct {
	Owner string `json:"owner"`
}

ShutdownSupernodeOperation represents shutdown_supernode operation data.

func (*ShutdownSupernodeOperation) Data

func (op *ShutdownSupernodeOperation) Data() interface{}

Data returns the operation data ShutdownSupernodeOperation.

func (*ShutdownSupernodeOperation) Type

Type function that defines the type of operation ShutdownSupernodeOperation.

type SmartContractOperation added in v1.0.2

type SmartContractOperation struct {
	RequiredOwners StringSlice `json:"required_owners"`
	Scid           string      `json:"scid"`
	ScOperation    string      `json:"sc_operation"`
	Fee            string      `json:"fee"`
}

SmartContractOperation represents transfer operation data.

func (*SmartContractOperation) Data added in v1.0.2

func (op *SmartContractOperation) Data() interface{}

Data returns the operation data SmartContractOperation.

func (*SmartContractOperation) MarshalTransaction added in v1.0.2

func (op *SmartContractOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type SmtCreateOperation to bytes.

func (*SmartContractOperation) Type added in v1.0.2

func (op *SmartContractOperation) Type() OpType

Type function that defines the type of operation SmartContractOperation.

type SmtCreateOperation

type SmtCreateOperation struct {
	SmtCreationFee string          `json:"smt_creation_fee"`
	Precision      uint8           `json:"precision"`
	Extensions     [][]interface{} `json:"extensions"`
	ControlAccount string          `json:"control_account"`
	Symbol         *AssetSymbol    `json:"symbol"`
	MaxSupply      uint64          `json:"max_supply"`
	Creator        string          `json:"creator"`
}

SmtCreateOperation represents transfer operation data.

func (*SmtCreateOperation) Data

func (op *SmtCreateOperation) Data() interface{}

Data returns the operation data SmtCreateOperation.

func (*SmtCreateOperation) MarshalTransaction

func (op *SmtCreateOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type SmtCreateOperation to bytes.

func (*SmtCreateOperation) Type

func (op *SmtCreateOperation) Type() OpType

Type function that defines the type of operation SmtCreateOperation.

type StringInt64Map

type StringInt64Map map[string]int64

StringInt64Map type from parameter JSON

func (StringInt64Map) MarshalJSON

func (m StringInt64Map) MarshalJSON() ([]byte, error)

MarshalJSON function for packing the StringInt64Map type in JSON.

func (*StringInt64Map) UnmarshalJSON

func (m *StringInt64Map) UnmarshalJSON(data []byte) error

UnmarshalJSON unpacking the JSON parameter in the StringInt64Map type.

type StringSlice

type StringSlice []string

StringSlice type from parameter JSON

func (StringSlice) MarshalJSON added in v1.0.2

func (m StringSlice) MarshalJSON() ([]byte, error)

MarshalJSON function for packing the StringInt64Map type in JSON.

func (*StringSlice) UnmarshalJSON

func (ss *StringSlice) UnmarshalJSON(data []byte) error

UnmarshalJSON unpacking the JSON parameter in the StringSlice type.

type SupernodeUpdateOperation

type SupernodeUpdateOperation struct {
	Owner           string `json:"owner"`
	BlockSigningKey string `json:"block_signing_key"`
	Fee             string `json:"fee"`
}

SupernodeUpdateOperation represents supernode_update operation data.

func (*SupernodeUpdateOperation) Data

func (op *SupernodeUpdateOperation) Data() interface{}

Data returns the operation data SupernodeUpdateOperation.

func (*SupernodeUpdateOperation) MarshalTransaction

func (op *SupernodeUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type SupernodeUpdateOperation to bytes.

func (*SupernodeUpdateOperation) Type

func (op *SupernodeUpdateOperation) Type() OpType

Type function that defines the type of operation SupernodeUpdateOperation.

type Time

type Time struct {
	*time.Time
}

Time type from parameter JSON

func (*Time) MarshalJSON

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

MarshalJSON function for packing the Time type in JSON.

func (*Time) MarshalTransaction

func (t *Time) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type Time to bytes.

func (*Time) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the Time type.

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     []interface{} `json:"extensions"`
	CreatedTime    UInt64        `json:"created_time"`
	Signatures     []string      `json:"signatures"`
}

Transaction represents a blockchain transaction.

func (*Transaction) MarshalTransaction

func (tx *Transaction) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction implements transaction.Marshaller interface.

func (*Transaction) PushOperation

func (tx *Transaction) PushOperation(op Operation)

PushOperation can be used to add an operation into the transaction.

type TransferOperation

type TransferOperation struct {
	From   string `json:"from"`
	To     string `json:"to"`
	Amount string `json:"amount"`
	Fee    string `json:"fee"`
	Memo   string `json:"memo"`
}

TransferOperation represents transfer operation data.

func (*TransferOperation) Data

func (op *TransferOperation) Data() interface{}

Data returns the operation data TransferOperation.

func (*TransferOperation) MarshalTransaction

func (op *TransferOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type TransferOperation to bytes.

func (*TransferOperation) Type

func (op *TransferOperation) Type() OpType

Type function that defines the type of operation TransferOperation.

type TransferToVestingOperation

type TransferToVestingOperation struct {
	From   string `json:"from"`
	To     string `json:"to"`
	Amount string `json:"amount"`
	Fee    string `json:"fee"`
}

TransferToVestingOperation represents transfer_to_vesting operation data.

func (*TransferToVestingOperation) Data

func (op *TransferToVestingOperation) Data() interface{}

Data returns the operation data TransferToVestingOperation.

func (*TransferToVestingOperation) MarshalTransaction

func (op *TransferToVestingOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type TransferToVestingOperation to bytes.

func (*TransferToVestingOperation) Type

Type function that defines the type of operation TransferToVestingOperation.

type UInt

type UInt uint

UInt type from parameter JSON

func (UInt) MarshalTransaction

func (num UInt) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type UInt to bytes.

func (*UInt) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the UInt type.

type UInt16

type UInt16 uint16

UInt16 type from parameter JSON

func (UInt16) MarshalTransaction

func (num UInt16) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type UInt16 to bytes.

func (*UInt16) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the UInt16 type.

type UInt32

type UInt32 uint32

UInt32 type from parameter JSON

func (UInt32) MarshalTransaction

func (num UInt32) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type UInt32 to bytes.

func (*UInt32) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the UInt32 type.

type UInt64

type UInt64 uint64

UInt64 type from parameter JSON

func (UInt64) MarshalTransaction

func (num UInt64) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type UInt64 to bytes.

func (*UInt64) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the UInt64 type.

type UInt8

type UInt8 uint8

UInt8 type from parameter JSON

func (UInt8) MarshalTransaction

func (num UInt8) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type UInt8 to bytes.

func (*UInt8) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the UInt8 type.

type UnknownOperation

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

UnknownOperation represents Unknown operation data.

func (*UnknownOperation) Data

func (op *UnknownOperation) Data() interface{}

Data returns the operation data UnknownOperation.

func (*UnknownOperation) Type

func (op *UnknownOperation) Type() OpType

Type function that defines the type of operation UnknownOperation.

type WithdrawVestingOperation

type WithdrawVestingOperation struct {
	Account       string `json:"account"`
	VestingShares string `json:"vesting_shares"`
	Fee           string `json:"fee"`
}

WithdrawVestingOperation represents withdraw_vesting operation data.

func (*WithdrawVestingOperation) Data

func (op *WithdrawVestingOperation) Data() interface{}

Data returns the operation data WithdrawVestingOperation.

func (*WithdrawVestingOperation) MarshalTransaction

func (op *WithdrawVestingOperation) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type WithdrawVestingOperation to bytes.

func (*WithdrawVestingOperation) Type

func (op *WithdrawVestingOperation) Type() OpType

Type function that defines the type of operation WithdrawVestingOperation.

Jump to

Keyboard shortcuts

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