types

package
v0.0.0-...-f1492f4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypeFollow         = "follow"
	TypeReblog         = "reblog"
	TypeLogin          = "login"
	TypePrivateMessage = "private_message"
)

Functions

func JSONMarshal

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

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

func MarshalCustomJSON

func MarshalCustomJSON(v interface{}) (string, error)

MarshalCustomJSON generate a row from the structure fields.

Types

type AccountCreateOperation

type AccountCreateOperation struct {
	Fee            *Asset     `json:"fee"`
	Creator        string     `json:"creator"`
	NewAccountName string     `json:"new_account_name"`
	Owner          *Authority `json:"owner"`
	Active         *Authority `json:"active"`
	Posting        *Authority `json:"posting"`
	MemoKey        string     `json:"memo_key"`
	JSONMetadata   string     `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 AccountCreateWithDelegationOperation

type AccountCreateWithDelegationOperation struct {
	Fee            *Asset        `json:"fee"`
	Delegation     *Asset        `json:"delegation"`
	Creator        string        `json:"creator"`
	NewAccountName string        `json:"new_account_name"`
	Owner          *Authority    `json:"owner"`
	Active         *Authority    `json:"active"`
	Posting        *Authority    `json:"posting"`
	MemoKey        string        `json:"memo_key"`
	JSONMetadata   string        `json:"json_metadata"`
	Extensions     []interface{} `json:"extensions"`
}

AccountCreateWithDelegationOperation represents account_create_with_delegation operation data.

func (*AccountCreateWithDelegationOperation) Data

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

Data returns the operation data AccountCreateWithDelegationOperation.

func (*AccountCreateWithDelegationOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type AccountCreateWithDelegationOperation to bytes.

func (*AccountCreateWithDelegationOperation) Type

Type function that defines the type of operation AccountCreateWithDelegationOperation.

type AccountUpdateOperation

type AccountUpdateOperation struct {
	Account      string     `json:"account"`
	Owner        *Authority `json:"owner,omitempty"`
	Active       *Authority `json:"active,omitempty"`
	Posting      *Authority `json:"posting,omitempty"`
	MemoKey      string     `json:"memo_key"`
	JSONMetadata string     `json:"json_metadata"`
}

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 AccountWitnessProxyOperation

type AccountWitnessProxyOperation struct {
	Account string `json:"account"`
	Proxy   string `json:"proxy"`
}

AccountWitnessProxyOperation represents account_witness_proxy operation data.

func (*AccountWitnessProxyOperation) Data

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

Data returns the operation data AccountWitnessProxyOperation.

func (*AccountWitnessProxyOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type AccountWitnessProxyOperation to bytes.

func (*AccountWitnessProxyOperation) Type

Type function that defines the type of operation AccountWitnessProxyOperation.

type AccountWitnessVoteOperation

type AccountWitnessVoteOperation struct {
	Account string `json:"account"`
	Witness string `json:"witness"`
	Approve bool   `json:"approve"`
}

AccountWitnessVoteOperation represents account_witness_vote operation data.

func (*AccountWitnessVoteOperation) Data

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

Data returns the operation data AccountWitnessVoteOperation.

func (*AccountWitnessVoteOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type AccountWitnessVoteOperation to bytes.

func (*AccountWitnessVoteOperation) Type

Type function that defines the type of operation AccountWitnessVoteOperation.

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 AuthorRewardOperation

type AuthorRewardOperation struct {
	Author        string `json:"author"`
	Permlink      string `json:"permlink"`
	HbdPayout     *Asset `json:"hbd_payout"`
	HivePayout    *Asset `json:"hive_payout"`
	VestingPayout *Asset `json:"vesting_payout"`
}

AuthorRewardOperation represents author_reward operation data.

func (*AuthorRewardOperation) Data

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

Data returns the operation data AuthorRewardOperation.

func (*AuthorRewardOperation) Type

func (op *AuthorRewardOperation) Type() OpType

Type function that defines the type of operation AuthorRewardOperation.

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 Beneficiary

type Beneficiary struct {
	Account string `json:"account"`
	Weight  uint16 `json:"weight"`
}

Beneficiary is an additional structure used by other structures.

type CancelTransferFromSavingsOperation

type CancelTransferFromSavingsOperation struct {
	From      string `json:"from"`
	RequestID uint32 `json:"request_id"`
}

CancelTransferFromSavingsOperation represents cancel_transfer_from_savings operation data.

func (*CancelTransferFromSavingsOperation) Data

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

Data returns the operation data CancelTransferFromSavingsOperation.

func (*CancelTransferFromSavingsOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type CancelTransferFromSavingsOperation to bytes.

func (*CancelTransferFromSavingsOperation) Type

Type function that defines the type of operation CancelTransferFromSavingsOperation.

type ChainProperties

type ChainProperties struct {
	AccountCreationFee *Asset `json:"account_creation_fee"`
	MaximumBlockSize   uint32 `json:"maximum_block_size"`
	HbdInterestRate    uint16 `json:"hbd_interest_rate"`
}

ChainProperties is an additional structure used by other structures.

func (*ChainProperties) MarshalTransaction

func (cp *ChainProperties) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type ChainProperties to bytes.

type ChangeRecoveryAccountOperation

type ChangeRecoveryAccountOperation struct {
	AccountToRecover   string        `json:"account_to_recover"`
	NewRecoveryAccount string        `json:"new_recovery_account"`
	Extensions         []interface{} `json:"extensions"`
}

ChangeRecoveryAccountOperation represents change_recovery_account operation data.

func (*ChangeRecoveryAccountOperation) Data

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

Data returns the operation data ChangeRecoveryAccountOperation.

func (*ChangeRecoveryAccountOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type ChangeRecoveryAccountOperation to bytes.

func (*ChangeRecoveryAccountOperation) Type

Type function that defines the type of operation ChangeRecoveryAccountOperation.

type ClaimAccountOperation

type ClaimAccountOperation struct {
	Creator    string        `json:"creator"`
	Fee        *Asset        `json:"fee"`
	Extensions []interface{} `json:"extensions"`
}

ClaimAccountOperation represents claim_account operation data.

func (*ClaimAccountOperation) Data

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

Data returns the operation data ClaimAccountOperation.

func (*ClaimAccountOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type ClaimAccountOperation to bytes.

func (*ClaimAccountOperation) Type

func (op *ClaimAccountOperation) Type() OpType

Type function that defines the type of operation ClaimAccountOperation.

type ClaimRewardBalanceOperation

type ClaimRewardBalanceOperation struct {
	Account     string `json:"account"`
	RewardHive  *Asset `json:"reward_hive"`
	RewardHbd   *Asset `json:"reward_hbd"`
	RewardVests *Asset `json:"reward_vests"`
}

ClaimRewardBalanceOperation represents claim_reward_balance operation data.

func (*ClaimRewardBalanceOperation) Data

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

Data returns the operation data ClaimRewardBalanceOperation.

func (*ClaimRewardBalanceOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type ClaimRewardBalanceOperation to bytes.

func (*ClaimRewardBalanceOperation) Type

Type function that defines the type of operation ClaimRewardBalanceOperation.

type CommentBenefactorRewardOperation

type CommentBenefactorRewardOperation struct {
	Benefactor    string `json:"benefactor"`
	Author        string `json:"author"`
	Permlink      string `json:"permlink"`
	HbdPayout     *Asset `json:"hbd_payout"`
	HivePayout    *Asset `json:"hive_payout"`
	VestingPayout *Asset `json:"vesting_payout"`
}

CommentBenefactorRewardOperation represents comment_benefactor_reward operation data.

func (*CommentBenefactorRewardOperation) Data

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

Data returns the operation data CommentBenefactorRewardOperation.

func (*CommentBenefactorRewardOperation) Type

Type function that defines the type of operation CommentBenefactorRewardOperation.

type CommentOperation

type CommentOperation struct {
	ParentAuthor   string `json:"parent_author"`
	ParentPermlink string `json:"parent_permlink"`
	Author         string `json:"author"`
	Permlink       string `json:"permlink"`
	Title          string `json:"title"`
	Body           string `json:"body"`
	JSONMetadata   string `json:"json_metadata"`
}

CommentOperation represents comment operation data.

func (*CommentOperation) Data

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

Data returns the operation data CommentOperation.

func (*CommentOperation) IsStory

func (op *CommentOperation) IsStory() bool

IsStory function specifies the type of publication.

func (*CommentOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type CommentOperation to bytes.

func (*CommentOperation) Type

func (op *CommentOperation) Type() OpType

Type function that defines the type of operation CommentOperation.

type CommentOptionsOperation

type CommentOptionsOperation struct {
	Author               string        `json:"author"`
	Permlink             string        `json:"permlink"`
	MaxAcceptedPayout    *Asset        `json:"max_accepted_payout"`
	PercentHiveDollars   uint16        `json:"percent_hive_dollars"`
	AllowVotes           bool          `json:"allow_votes"`
	AllowCurationRewards bool          `json:"allow_curation_rewards"`
	Extensions           []interface{} `json:"extensions"`
}

CommentOptionsOperation represents comment_options operation data.

Extensions: CommentPayoutBeneficiaries AllowedVoteAssets

func (*CommentOptionsOperation) Data

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

Data returns the operation data CommentOptionsOperation.

func (*CommentOptionsOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type CommentOptionsOperation to bytes.

func (*CommentOptionsOperation) Type

func (op *CommentOptionsOperation) Type() OpType

Type function that defines the type of operation CommentOptionsOperation.

type CommentPayoutBeneficiaries

type CommentPayoutBeneficiaries struct {
	Beneficiaries []Beneficiary `json:"beneficiaries"`
}

CommentPayoutBeneficiaries is an additional structure used by other structures.

func (*CommentPayoutBeneficiaries) MarshalTransaction

func (cp *CommentPayoutBeneficiaries) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type CommentPayoutBeneficiaries to bytes.

type CommentPayoutUpdateOperation

type CommentPayoutUpdateOperation struct {
	Author   string `json:"author"`
	Permlink string `json:"permlink"`
}

CommentPayoutUpdateOperation represents comment_payout_update operation data.

func (*CommentPayoutUpdateOperation) Data

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

Data returns the operation data CommentPayoutUpdateOperation.

func (*CommentPayoutUpdateOperation) Type

Type function that defines the type of operation CommentPayoutUpdateOperation.

type CommentRewardOperation

type CommentRewardOperation struct {
	Author   string `json:"author"`
	Permlink string `json:"permlink"`
	Payout   *Asset `json:"payout"`
}

CommentRewardOperation represents comment_reward operation data.

func (*CommentRewardOperation) Data

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

Data returns the operation data CommentRewardOperation.

func (*CommentRewardOperation) Type

func (op *CommentRewardOperation) Type() OpType

Type function that defines the type of operation CommentRewardOperation.

type ConvertOperation

type ConvertOperation struct {
	Owner     string `json:"owner"`
	RequestID uint32 `json:"requestid"`
	Amount    *Asset `json:"amount"`
}

ConvertOperation represents convert operation data.

func (*ConvertOperation) Data

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

Data returns the operation data ConvertOperation.

func (*ConvertOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type ConvertOperation to bytes.

func (*ConvertOperation) Type

func (op *ConvertOperation) Type() OpType

Type function that defines the type of operation ConvertOperation.

type CreateClaimedAccountOperation

type CreateClaimedAccountOperation struct {
	Creator        string        `json:"creator"`
	NewAccountName string        `json:"new_account_name"`
	Owner          *Authority    `json:"owner"`
	Active         *Authority    `json:"active"`
	Posting        *Authority    `json:"posting"`
	MemoKey        string        `json:"memo_key"`
	JsonMetadata   string        `json:"json_metadata"`
	Extensions     []interface{} `json:"extensions"`
}

CreateClaimedAccountOperation represents create_claimed_account operation data.

func (*CreateClaimedAccountOperation) Data

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

Data returns the operation data CreateClaimedAccountOperation.

func (*CreateClaimedAccountOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type CreateClaimedAccountOperation to bytes.

func (*CreateClaimedAccountOperation) Type

Type function that defines the type of operation CreateClaimedAccountOperation.

type CurationRewardOperation

type CurationRewardOperation struct {
	Curator         string `json:"curator"`
	Reward          *Asset `json:"reward"`
	CommentAuthor   string `json:"comment_author"`
	CommentPermlink string `json:"comment_permlink"`
}

CurationRewardOperation represents curation_reward operation data.

func (*CurationRewardOperation) Data

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

Data returns the operation data CurationRewardOperation.

func (*CurationRewardOperation) Type

func (op *CurationRewardOperation) Type() OpType

Type function that defines the type of operation CurationRewardOperation.

type CustomBinaryOperation

type CustomBinaryOperation struct {
	RequiredOwnerAuths   []string    `json:"required_owner_auths"`
	RequiredActiveAuths  []string    `json:"required_active_auths"`
	RequiredPostingAuths []string    `json:"required_posting_auths"`
	RequiredAuths        []Authority `json:"required_auths"`
	ID                   string      `json:"id"`
	Datas                []byte      `json:"data"`
}

CustomBinaryOperation represents custom_binary operation data.

func (*CustomBinaryOperation) Data

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

Data returns the operation data CustomBinaryOperation.

func (*CustomBinaryOperation) Type

func (op *CustomBinaryOperation) Type() OpType

Type function that defines the type of operation CustomBinaryOperation.

type CustomJSONOperation

type CustomJSONOperation struct {
	RequiredAuths        []string `json:"required_auths"`
	RequiredPostingAuths []string `json:"required_posting_auths"`
	ID                   string   `json:"id"`
	JSON                 string   `json:"json"`
}

CustomJSONOperation represents custom_json operation data.

func (*CustomJSONOperation) Data

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

Data returns the operation data.

func (*CustomJSONOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type CustomJSONOperation to bytes.

func (*CustomJSONOperation) Type

func (op *CustomJSONOperation) Type() OpType

Type function that defines the type of operation.

func (*CustomJSONOperation) UnmarshalData

func (op *CustomJSONOperation) UnmarshalData() (interface{}, error)

UnmarshalData unpacking the JSON parameter in the CustomJSONOperation type.

type CustomOperation

type CustomOperation struct {
	RequiredAuths []string `json:"required_auths"`
	ID            uint16   `json:"id"`
	Datas         []byte   `json:"data"`
}

CustomOperation represents custom operation data.

func (*CustomOperation) Data

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

Data returns the operation data CustomOperation.

func (*CustomOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type CustomOperation to bytes.

func (*CustomOperation) Type

func (op *CustomOperation) Type() OpType

Type function that defines the type of operation CustomOperation.

type DeclineVotingRightsOperation

type DeclineVotingRightsOperation struct {
	Account string `json:"account"`
	Decline bool   `json:"decline"`
}

DeclineVotingRightsOperation represents decline_voting_rights operation data.

func (*DeclineVotingRightsOperation) Data

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

Data returns the operation data DeclineVotingRightsOperation.

func (*DeclineVotingRightsOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type DeclineVotingRightsOperation to bytes.

func (*DeclineVotingRightsOperation) Type

Type function that defines the type of operation DeclineVotingRightsOperation.

type DelegateVestingSharesOperation

type DelegateVestingSharesOperation struct {
	Delegator     string `json:"delegator"`
	Delegatee     string `json:"delegatee"`
	VestingShares *Asset `json:"vesting_shares"`
}

DelegateVestingSharesOperation represents delegate_vesting_shares operation data.

func (*DelegateVestingSharesOperation) Data

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

Data returns the operation data DelegateVestingSharesOperation.

func (*DelegateVestingSharesOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type DelegateVestingSharesOperation to bytes.

func (*DelegateVestingSharesOperation) Type

Type function that defines the type of operation DelegateVestingSharesOperation.

type DeleteCommentOperation

type DeleteCommentOperation struct {
	Author   string `json:"author"`
	Permlink string `json:"permlink"`
}

DeleteCommentOperation represents delete_comment operation data.

func (*DeleteCommentOperation) Data

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

Data returns the operation data DeleteCommentOperation.

func (*DeleteCommentOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type DeleteCommentOperation to bytes.

func (*DeleteCommentOperation) Type

func (op *DeleteCommentOperation) Type() OpType

Type function that defines the type of operation DeleteCommentOperation.

type EscrowApproveOperation

type EscrowApproveOperation struct {
	From     string `json:"from"`
	To       string `json:"to"`
	Agent    string `json:"agent"`
	Who      string `json:"who"`
	EscrowID uint32 `json:"escrow_id"`
	Approve  bool   `json:"approve"`
}

EscrowApproveOperation represents escrow_approve operation data.

func (*EscrowApproveOperation) Data

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

Data returns the operation data EscrowApproveOperation.

func (*EscrowApproveOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type EscrowApproveOperation to bytes.

func (*EscrowApproveOperation) Type

func (op *EscrowApproveOperation) Type() OpType

Type function that defines the type of operation EscrowApproveOperation.

type EscrowDisputeOperation

type EscrowDisputeOperation struct {
	From     string `json:"from"`
	To       string `json:"to"`
	Agent    string `json:"agent"`
	Who      string `json:"who"`
	EscrowID uint32 `json:"escrow_id"`
}

EscrowDisputeOperation represents escrow_dispute operation data.

func (*EscrowDisputeOperation) Data

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

Data returns the operation data EscrowDisputeOperation.

func (*EscrowDisputeOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type EscrowDisputeOperation to bytes.

func (*EscrowDisputeOperation) Type

func (op *EscrowDisputeOperation) Type() OpType

Type function that defines the type of operation EscrowDisputeOperation.

type EscrowReleaseOperation

type EscrowReleaseOperation struct {
	From       string `json:"from"`
	To         string `json:"to"`
	Agent      string `json:"agent"`
	Who        string `json:"who"`
	Receiver   string `json:"receiver"`
	EscrowID   uint32 `json:"escrow_id"`
	HbdAmount  *Asset `json:"hbd_amount"`
	HiveAmount *Asset `json:"hive_amount"`
}

EscrowReleaseOperation represents escrow_release operation data.

func (*EscrowReleaseOperation) Data

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

Data returns the operation data EscrowReleaseOperation.

func (*EscrowReleaseOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type EscrowReleaseOperation to bytes.

func (*EscrowReleaseOperation) Type

func (op *EscrowReleaseOperation) Type() OpType

Type function that defines the type of operation EscrowReleaseOperation.

type EscrowTransferOperation

type EscrowTransferOperation struct {
	From                 string `json:"from"`
	To                   string `json:"to"`
	Agent                string `json:"agent"`
	EscrowID             uint32 `json:"escrow_id"`
	HbdAmount            *Asset `json:"hbd_amount"`
	HiveAmount           *Asset `json:"hive_amount"`
	Fee                  *Asset `json:"fee"`
	RatificationDeadline *Time  `json:"ratification_deadline"`
	EscrowExpiration     *Time  `json:"escrow_expiration"`
	JSONMeta             string `json:"json_meta"`
}

EscrowTransferOperation represents escrow_transfer operation data.

func (*EscrowTransferOperation) Data

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

Data returns the operation data EscrowTransferOperation.

func (*EscrowTransferOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type EscrowTransferOperation to bytes.

func (*EscrowTransferOperation) Type

func (op *EscrowTransferOperation) Type() OpType

Type function that defines the type of operation EscrowTransferOperation.

type ExchRate

type ExchRate struct {
	Base  *Asset `json:"base"`
	Quote *Asset `json:"quote"`
}

ExchRate is an additional structure used by other structures.

func (*ExchRate) MarshalTransaction

func (exch *ExchRate) MarshalTransaction(encoder *transaction.Encoder) error

MarshalTransaction is a function of converting type ExchRate to bytes.

type FeedPublishOperation

type FeedPublishOperation struct {
	Publisher    string    `json:"publisher"`
	ExchangeRate *ExchRate `json:"exchange_rate"`
}

FeedPublishOperation represents feed_publish operation data.

func (*FeedPublishOperation) Data

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

Data returns the operation data FeedPublishOperation.

func (*FeedPublishOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type FeedPublishOperation to bytes.

func (*FeedPublishOperation) Type

func (op *FeedPublishOperation) Type() OpType

Type function that defines the type of operation FeedPublishOperation.

type FillConvertRequestOperation

type FillConvertRequestOperation struct {
	Owner     string `json:"owner"`
	Requestid uint32 `json:"requestid"`
	AmountIn  *Asset `json:"amount_in"`
	AmountOut *Asset `json:"amount_out"`
}

FillConvertRequestOperation represents fill_convert_request operation data.

func (*FillConvertRequestOperation) Data

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

Data returns the operation data FillConvertRequestOperation.

func (*FillConvertRequestOperation) Type

Type function that defines the type of operation FillConvertRequestOperation.

type FillOrderOperation

type FillOrderOperation struct {
	CurrentOwner   string `json:"current_owner"`
	CurrentOrderid uint32 `json:"current_orderid"`
	CurrentPays    *Asset `json:"current_pays"`
	OpenOwner      string `json:"open_owner"`
	OpenOrderid    uint32 `json:"open_orderid"`
	OpenPays       *Asset `json:"open_pays"`
}

FillOrderOperation represents fill_order operation data.

func (*FillOrderOperation) Data

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

Data returns the operation data FillOrderOperation.

func (*FillOrderOperation) Type

func (op *FillOrderOperation) Type() OpType

Type function that defines the type of operation FillOrderOperation.

type FillTransferFromSavingsOperation

type FillTransferFromSavingsOperation struct {
	From      string `json:"from"`
	To        string `json:"to"`
	Amount    *Asset `json:"amount"`
	RequestID uint32 `json:"request_id"`
	Memo      string `json:"memo"`
}

FillTransferFromSavingsOperation represents fill_transfer_from_savings operation data.

func (*FillTransferFromSavingsOperation) Data

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

Data returns the operation data FillTransferFromSavingsOperation.

func (*FillTransferFromSavingsOperation) Type

Type function that defines the type of operation FillTransferFromSavingsOperation.

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 FollowOperation

type FollowOperation struct {
	Follower  string   `json:"follower"`
	Following string   `json:"following"`
	What      []string `json:"what"`
}

FollowOperation the structure for the operation CustomJSONOperation.

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 InterestOperation

type InterestOperation struct {
	Owner    string `json:"owner"`
	Interest *Asset `json:"interest"`
}

InterestOperation represents interest operation data.

func (*InterestOperation) Data

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

Data returns the operation data InterestOperation.

func (*InterestOperation) Type

func (op *InterestOperation) Type() OpType

Type function that defines the type of operation InterestOperation.

type LimitOrderCancelOperation

type LimitOrderCancelOperation struct {
	Owner   string `json:"owner"`
	OrderID uint32 `json:"orderid"`
}

LimitOrderCancelOperation represents limit_order_cancel operation data.

func (*LimitOrderCancelOperation) Data

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

Data returns the operation data LimitOrderCancelOperation.

func (*LimitOrderCancelOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type LimitOrderCancelOperation to bytes.

func (*LimitOrderCancelOperation) Type

func (op *LimitOrderCancelOperation) Type() OpType

Type function that defines the type of operation LimitOrderCancelOperation.

type LimitOrderCreate2Operation

type LimitOrderCreate2Operation struct {
	Owner        string    `json:"owner"`
	OrderID      uint32    `json:"orderid"`
	AmountToSell *Asset    `json:"amount_to_sell"`
	FillOrKill   bool      `json:"fill_or_kill"`
	ExchangeRate *ExchRate `json:"exchange_rate"`
	Expiration   *Time     `json:"expiration"`
}

LimitOrderCreate2Operation represents limit_order_create2 operation data.

func (*LimitOrderCreate2Operation) Data

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

Data returns the operation data LimitOrderCreate2Operation.

func (*LimitOrderCreate2Operation) MarshalTransaction

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

MarshalTransaction is a function of converting type LimitOrderCreate2Operation to bytes.

func (*LimitOrderCreate2Operation) Type

Type function that defines the type of operation LimitOrderCreate2Operation.

type LimitOrderCreateOperation

type LimitOrderCreateOperation struct {
	Owner        string `json:"owner"`
	OrderID      uint32 `json:"orderid"`
	AmountToSell *Asset `json:"amount_to_sell"`
	MinToReceive *Asset `json:"min_to_receive"`
	FillOrKill   bool   `json:"fill_or_kill"`
	Expiration   *Time  `json:"expiration"`
}

LimitOrderCreateOperation represents limit_order_create operation data.

func (*LimitOrderCreateOperation) Data

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

Data returns the operation data LimitOrderCreateOperation.

func (*LimitOrderCreateOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type LimitOrderCreateOperation to bytes.

func (*LimitOrderCreateOperation) Type

func (op *LimitOrderCreateOperation) Type() OpType

Type function that defines the type of operation LimitOrderCreateOperation.

type LiquidityRewardOperation

type LiquidityRewardOperation struct {
	Owner  string `json:"owner"`
	Payout *Asset `json:"payout"`
}

LiquidityRewardOperation represents liquidity_reward operation data.

func (*LiquidityRewardOperation) Data

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

Data returns the operation data LiquidityRewardOperation.

func (*LiquidityRewardOperation) Type

func (op *LiquidityRewardOperation) Type() OpType

Type function that defines the type of operation LiquidityRewardOperation.

type LoginOperation

type LoginOperation struct {
	Account string `json:"account"`
}

LoginOperation the structure for the operation CustomJSONOperation.

type OpType

type OpType string

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

const (
	TypeVote                        OpType = "vote"
	TypeComment                     OpType = "comment"
	TypeTransfer                    OpType = "transfer"
	TypeTransferToVesting           OpType = "transfer_to_vesting"
	TypeWithdrawVesting             OpType = "withdraw_vesting"
	TypeLimitOrderCreate            OpType = "limit_order_create"
	TypeLimitOrderCancel            OpType = "limit_order_cancel"
	TypeFeedPublish                 OpType = "feed_publish"
	TypeConvert                     OpType = "convert"
	TypeAccountCreate               OpType = "account_create"
	TypeAccountUpdate               OpType = "account_update"
	TypeWitnessUpdate               OpType = "witness_update"
	TypeAccountWitnessVote          OpType = "account_witness_vote"
	TypeAccountWitnessProxy         OpType = "account_witness_proxy"
	TypePOW                         OpType = "pow"
	TypeCustom                      OpType = "custom"
	TypeReportOverProduction        OpType = "report_over_production"
	TypeDeleteComment               OpType = "delete_comment"
	TypeCustomJSON                  OpType = "custom_json"
	TypeCommentOptions              OpType = "comment_options"
	TypeSetWithdrawVestingRoute     OpType = "set_withdraw_vesting_route"
	TypeLimitOrderCreate2           OpType = "limit_order_create2"
	TypeClaimAccount                OpType = "claim_account"
	TypeCreateClaimedAccount        OpType = "create_claimed_account"
	TypeRequestAccountRecovery      OpType = "request_account_recovery"
	TypeRecoverAccount              OpType = "recover_account"
	TypeChangeRecoveryAccount       OpType = "change_recovery_account"
	TypeEscrowTransfer              OpType = "escrow_transfer"
	TypeEscrowDispute               OpType = "escrow_dispute"
	TypeEscrowRelease               OpType = "escrow_release"
	TypePOW2                        OpType = "pow2"
	TypeEscrowApprove               OpType = "escrow_approve"
	TypeTransferToSavings           OpType = "transfer_to_savings"
	TypeTransferFromSavings         OpType = "transfer_from_savings"
	TypeCancelTransferFromSavings   OpType = "cancel_transfer_from_savings"
	TypeCustomBinary                OpType = "custom_binary"
	TypeDeclineVotingRights         OpType = "decline_voting_rights"
	TypeResetAccount                OpType = "reset_account"
	TypeSetResetAccount             OpType = "set_reset_account"
	TypeClaimRewardBalance          OpType = "claim_reward_balance"
	TypeDelegateVestingShares       OpType = "delegate_vesting_shares"
	TypeAccountCreateWithDelegation OpType = "account_create_with_delegation"
	TypeFillConvertRequest          OpType = "fill_convert_request"       //Virtual Operation
	TypeAuthorReward                OpType = "author_reward"              //Virtual Operation
	TypeCurationReward              OpType = "curation_reward"            //Virtual Operation
	TypeCommentReward               OpType = "comment_reward"             //Virtual Operation
	TypeLiquidityReward             OpType = "liquidity_reward"           //Virtual Operation
	TypeInterest                    OpType = "interest"                   //Virtual Operation
	TypeFillVestingWithdraw         OpType = "fill_vesting_withdraw"      //Virtual Operation
	TypeFillOrder                   OpType = "fill_order"                 //Virtual Operation
	TypeShutdownWitness             OpType = "shutdown_witness"           //Virtual Operation
	TypeFillTransferFromSavings     OpType = "fill_transfer_from_savings" //Virtual Operation
	TypeHardfork                    OpType = "hardfork"                   //Virtual Operation
	TypeCommentPayoutUpdate         OpType = "comment_payout_update"      //Virtual Operation
	TypeReturnVestingDelegation     OpType = "return_vesting_delegation"  //Virtual Operation
	TypeCommentBenefactorReward     OpType = "comment_benefactor_reward"  //Virtual Operation
)

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 {
	BlockNumber            uint32    `json:"block"`
	TransactionID          string    `json:"trx_id"`
	TransactionInBlock     uint32    `json:"trx_in_block"`
	Operation              Operation `json:"op"`
	OperationType          OpType    `json:"-"`
	OperationInTransaction uint16    `json:"op_in_trx"`
	VirtualOperation       uint64    `json:"virtual_op"`
	Timestamp              *Time     `json:"timestamp"`
}

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 POW

type POW struct {
	Worker    string `json:"worker"`
	Input     string `json:"input"`
	Signature string `json:"signature"`
	Work      string `json:"work"`
}

POW is an additional structure used by other structures.

type POW2Input

type POW2Input struct {
	WorkerAccount string `json:"worker_account"`
	PrevBlock     []byte `json:"prev_block"`
	Nonce         uint64 `json:"nonce"`
}

POW2Input is an additional structure used by other structures.

type POW2Operation

type POW2Operation struct {
	Input      *POW2Input `json:"input"`
	PowSummary uint32     `json:"pow_summary"`
}

POW2Operation represents pow2 operation data.

func (*POW2Operation) Data

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

Data returns the operation data POW2Operation.

func (*POW2Operation) Type

func (op *POW2Operation) Type() OpType

Type function that defines the type of operation POW2Operation.

type POWOperation

type POWOperation struct {
	WorkerAccount string           `json:"worker_account"`
	BlockID       string           `json:"block_id"`
	Nonce         *Int             `json:"nonce"`
	Work          *POW             `json:"work"`
	Props         *ChainProperties `json:"props"`
}

POWOperation represents pow operation data.

func (*POWOperation) Data

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

Data returns the operation data POWOperation.

func (*POWOperation) Type

func (op *POWOperation) Type() OpType

Type function that defines the type of operation POWOperation.

type PrivateMessageOperation

type PrivateMessageOperation struct {
	From             string `json:"from"`
	To               string `json:"to"`
	FromMemoKey      string `json:"from_memo_key"`
	ToMemoKey        string `json:"to_memo_key"`
	SentTime         uint64 `json:"sent_time"`
	Checksum         uint32 `json:"checksum"`
	EncryptedMessage string `json:"encrypted_message"`
}

PrivateMessageOperation the structure for the operation CustomJSONOperation.

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 ReblogOperation

type ReblogOperation struct {
	Account  string `json:"account"`
	Author   string `json:"author"`
	Permlink string `json:"permlink"`
}

ReblogOperation the structure for the operation CustomJSONOperation.

type RecoverAccountOperation

type RecoverAccountOperation struct {
	AccountToRecover     string        `json:"account_to_recover"`
	NewOwnerAuthority    *Authority    `json:"new_owner_authority"`
	RecentOwnerAuthority *Authority    `json:"recent_owner_authority"`
	Extensions           []interface{} `json:"extensions"`
}

RecoverAccountOperation represents recover_account operation data.

func (*RecoverAccountOperation) Data

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

Data returns the operation data RecoverAccountOperation.

func (*RecoverAccountOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type RecoverAccountOperation to bytes.

func (*RecoverAccountOperation) Type

func (op *RecoverAccountOperation) Type() OpType

Type function that defines the type of operation RecoverAccountOperation.

type ReportOverProductionOperation

type ReportOverProductionOperation struct {
	Reporter string `json:"reporter"`
}

ReportOverProductionOperation represents report_over_production operation data.

func (*ReportOverProductionOperation) Data

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

Data returns the operation data ReportOverProductionOperation.

func (*ReportOverProductionOperation) Type

Type function that defines the type of operation ReportOverProductionOperation.

type RequestAccountRecoveryOperation

type RequestAccountRecoveryOperation struct {
	RecoveryAccount   string        `json:"recovery_account"`
	AccountToRecover  string        `json:"account_to_recover"`
	NewOwnerAuthority *Authority    `json:"new_owner_authority"`
	Extensions        []interface{} `json:"extensions"`
}

RequestAccountRecoveryOperation represents request_account_recovery operation data.

func (*RequestAccountRecoveryOperation) Data

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

Data returns the operation data RequestAccountRecoveryOperation.

func (*RequestAccountRecoveryOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type RequestAccountRecoveryOperation to bytes.

func (*RequestAccountRecoveryOperation) Type

Type function that defines the type of operation RequestAccountRecoveryOperation.

type ResetAccountOperation

type ResetAccountOperation struct {
	ResetAccount      string     `json:"reset_account"`
	AccountToReset    string     `json:"account_to_reset"`
	NewOwnerAuthority *Authority `json:"new_owner_authority"`
}

ResetAccountOperation represents reset_account operation data.

func (*ResetAccountOperation) Data

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

Data returns the operation data ResetAccountOperation.

func (*ResetAccountOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type ResetAccountOperation to bytes.

func (*ResetAccountOperation) Type

func (op *ResetAccountOperation) Type() OpType

Type function that defines the type of operation ResetAccountOperation.

type ReturnVestingDelegationOperation

type ReturnVestingDelegationOperation struct {
	Account       string `json:"account"`
	VestingShares *Asset `json:"vesting_shares"`
}

ReturnVestingDelegationOperation represents return_vesting_delegation operation data.

func (*ReturnVestingDelegationOperation) Data

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

Data returns the operation data ReturnVestingDelegationOperation.

func (*ReturnVestingDelegationOperation) Type

Type function that defines the type of operation ReturnVestingDelegationOperation.

type SetResetAccountOperation

type SetResetAccountOperation struct {
	Account             string `json:"account"`
	CurrentResetAccount string `json:"current_reset_account"`
	ResetAccount        string `json:"reset_account"`
}

SetResetAccountOperation represents set_reset_account operation data.

func (*SetResetAccountOperation) Data

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

Data returns the operation data SetResetAccountOperation.

func (*SetResetAccountOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type SetResetAccountOperation to bytes.

func (*SetResetAccountOperation) Type

func (op *SetResetAccountOperation) Type() OpType

Type function that defines the type of operation SetResetAccountOperation.

type SetWithdrawVestingRouteOperation

type SetWithdrawVestingRouteOperation struct {
	FromAccount string `json:"from_account"`
	ToAccount   string `json:"to_account"`
	Percent     uint16 `json:"percent"`
	AutoVest    bool   `json:"auto_vest"`
}

SetWithdrawVestingRouteOperation represents set_withdraw_vesting_route operation data.

func (*SetWithdrawVestingRouteOperation) Data

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

Data returns the operation data SetWithdrawVestingRouteOperation.

func (*SetWithdrawVestingRouteOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type SetWithdrawVestingRouteOperation to bytes.

func (*SetWithdrawVestingRouteOperation) Type

Type function that defines the type of operation SetWithdrawVestingRouteOperation.

type ShutdownWitnessOperation

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

ShutdownWitnessOperation represents shutdown_witness operation data.

func (*ShutdownWitnessOperation) Data

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

Data returns the operation data ShutdownWitnessOperation.

func (*ShutdownWitnessOperation) Type

func (op *ShutdownWitnessOperation) Type() OpType

Type function that defines the type of operation ShutdownWitnessOperation.

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) UnmarshalJSON

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

UnmarshalJSON unpacking the JSON parameter in the StringSlice type.

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"`
	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 TransferFromSavingsOperation

type TransferFromSavingsOperation struct {
	From      string `json:"from"`
	RequestID uint32 `json:"request_id"`
	To        string `json:"to"`
	Amount    *Asset `json:"amount"`
	Memo      string `json:"memo"`
}

TransferFromSavingsOperation represents transfer_from_savings operation data.

func (*TransferFromSavingsOperation) Data

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

Data returns the operation data TransferFromSavingsOperation.

func (*TransferFromSavingsOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type TransferFromSavingsOperation to bytes.

func (*TransferFromSavingsOperation) Type

Type function that defines the type of operation TransferFromSavingsOperation.

type TransferOperation

type TransferOperation struct {
	From   string `json:"from"`
	To     string `json:"to"`
	Amount *Asset `json:"amount"`
	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 TransferToSavingsOperation

type TransferToSavingsOperation struct {
	From   string `json:"from"`
	To     string `json:"to"`
	Amount *Asset `json:"amount"`
	Memo   string `json:"memo"`
}

TransferToSavingsOperation represents transfer_to_savings operation data.

func (*TransferToSavingsOperation) Data

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

Data returns the operation data TransferToSavingsOperation.

func (*TransferToSavingsOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type TransferToSavingsOperation to bytes.

func (*TransferToSavingsOperation) Type

Type function that defines the type of operation TransferToSavingsOperation.

type TransferToVestingOperation

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

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 VoteOperation

type VoteOperation struct {
	Voter    string `json:"voter"`
	Author   string `json:"author"`
	Permlink string `json:"permlink"`
	Weight   int16  `json:"weight"`
}

VoteOperation represents vote operation data.

func (*VoteOperation) Data

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

Data returns the operation data VoteOperation.

func (*VoteOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type VoteOperation to bytes.

func (*VoteOperation) Type

func (op *VoteOperation) Type() OpType

Type function that defines the type of operation VoteOperation.

type WithdrawVestingOperation

type WithdrawVestingOperation struct {
	Account       string `json:"account"`
	VestingShares *Asset `json:"vesting_shares"`
}

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.

type WitnessUpdateOperation

type WitnessUpdateOperation struct {
	Owner           string           `json:"owner"`
	URL             string           `json:"url"`
	BlockSigningKey string           `json:"block_signing_key"`
	Props           *ChainProperties `json:"props"`
	Fee             *Asset           `json:"fee"`
}

WitnessUpdateOperation represents witness_update operation data.

func (*WitnessUpdateOperation) Data

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

Data returns the operation data WitnessUpdateOperation.

func (*WitnessUpdateOperation) MarshalTransaction

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

MarshalTransaction is a function of converting type WitnessUpdateOperation to bytes.

func (*WitnessUpdateOperation) Type

func (op *WitnessUpdateOperation) Type() OpType

Type function that defines the type of operation WitnessUpdateOperation.

Source Files

Jump to

Keyboard shortcuts

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