Documentation ¶
Index ¶
- Constants
- type AccountCreateOperation
- type AccountUpdateOperation
- type AccountWitnessProxyOperation
- type AccountWitnessVoteOperation
- type Authority
- type ChainProperties
- type CommentOperation
- type CommentOptionsOperation
- type ConvertOperation
- type CustomJSONOperation
- type DeleteCommentOperation
- type FeedPublishOperation
- type FollowOperation
- type ID
- type Int
- type Int16
- type Int32
- type Int64
- type Int8
- type LimitOrderCancelOperation
- type LimitOrderCreateOperation
- type OpType
- type Operation
- type OperationObject
- type Operations
- type POW
- type POWOperation
- type ReportOverProductionOperation
- type StringInt64Map
- type StringSlice
- type Time
- type Transaction
- type TransferOperation
- type TransferToVestingOperation
- type UInt
- type UInt16
- type UInt32
- type UInt64
- type UInt8
- type UnknownOperation
- type VoteOperation
- type WithdrawVestingOperation
Constants ¶
View Source
const Layout = `"2006-01-02T15:04:05"`
View Source
const (
TypeFollow = "follow"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCreateOperation ¶ added in v0.4.0
type AccountCreateOperation struct { Fee string `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"` }
func (*AccountCreateOperation) Data ¶ added in v0.4.0
func (op *AccountCreateOperation) Data() interface{}
func (*AccountCreateOperation) Type ¶ added in v0.4.0
func (op *AccountCreateOperation) Type() OpType
type AccountUpdateOperation ¶ added in v0.4.0
type AccountUpdateOperation struct { Account string `json:"account"` Owner *Authority `json:"owner"` Active *Authority `json:"active"` Posting *Authority `json:"posting"` MemoKey string `json:"memo_key"` JsonMetadata string `json:"json_metadata"` }
func (*AccountUpdateOperation) Data ¶ added in v0.4.0
func (op *AccountUpdateOperation) Data() interface{}
func (*AccountUpdateOperation) Type ¶ added in v0.4.0
func (op *AccountUpdateOperation) Type() OpType
type AccountWitnessProxyOperation ¶ added in v0.4.0
type AccountWitnessProxyOperation struct { Account string `json:"account"` Proxy string `json:"proxy"` }
func (*AccountWitnessProxyOperation) Data ¶ added in v0.4.0
func (op *AccountWitnessProxyOperation) Data() interface{}
func (*AccountWitnessProxyOperation) Type ¶ added in v0.4.0
func (op *AccountWitnessProxyOperation) Type() OpType
type AccountWitnessVoteOperation ¶ added in v0.4.0
type AccountWitnessVoteOperation struct { Account string `json:"account"` Witness string `json:"witness"` Approve bool `json:"approve"` }
func (*AccountWitnessVoteOperation) Data ¶ added in v0.4.0
func (op *AccountWitnessVoteOperation) Data() interface{}
func (*AccountWitnessVoteOperation) Type ¶ added in v0.4.0
func (op *AccountWitnessVoteOperation) Type() OpType
type Authority ¶ added in v0.4.0
type Authority struct { AccountAuths StringInt64Map `json:"account_auths"` KeyAuths StringInt64Map `json:"key_auths"` WeightThreshold uint32 `json:"weight_threshold"` }
type ChainProperties ¶ added in v0.4.0
type CommentOperation ¶ added in v0.4.0
type CommentOperation struct { Author string `json:"author"` Title string `json:"title"` Permlink string `json:"permlink"` ParentAuthor string `json:"parent_author"` ParentPermlink string `json:"parent_permlink"` Body string `json:"body"` JsonMetadata string `json:"json_metadata"` }
CommentOperation represents either a new post or a comment.
In case Title is filled in and ParentAuthor is empty, it is a new post. The post category can be read from ParentPermlink.
func (*CommentOperation) Data ¶ added in v0.4.0
func (op *CommentOperation) Data() interface{}
func (*CommentOperation) IsStoryOperation ¶ added in v0.4.0
func (op *CommentOperation) IsStoryOperation() bool
func (*CommentOperation) Type ¶ added in v0.4.0
func (op *CommentOperation) Type() OpType
type CommentOptionsOperation ¶ added in v0.4.0
type CommentOptionsOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` MaxAcceptedPayout string `json:"max_accepted_payout"` PercentSteemDollars uint16 `json:"percent_steem_dollars"` AllowVotes bool `json:"allow_votes"` AllowCurationRewards bool `json:"allow_curation_rewards"` Extensions []interface{} `json:"extensions"` }
func (*CommentOptionsOperation) Data ¶ added in v0.4.0
func (op *CommentOptionsOperation) Data() interface{}
func (*CommentOptionsOperation) Type ¶ added in v0.4.0
func (op *CommentOptionsOperation) Type() OpType
type ConvertOperation ¶ added in v0.4.0
type ConvertOperation struct { Owner string `json:"owner"` RequestID uint32 `json:"requestid"` Amount string `json:"amount"` }
func (*ConvertOperation) Data ¶ added in v0.4.0
func (op *ConvertOperation) Data() interface{}
func (*ConvertOperation) Type ¶ added in v0.4.0
func (op *ConvertOperation) Type() OpType
type CustomJSONOperation ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (op *CustomJSONOperation) Data() interface{}
func (*CustomJSONOperation) Type ¶ added in v0.4.0
func (op *CustomJSONOperation) Type() OpType
func (*CustomJSONOperation) UnmarshalData ¶ added in v0.4.0
func (op *CustomJSONOperation) UnmarshalData() (interface{}, error)
type DeleteCommentOperation ¶ added in v0.4.0
type DeleteCommentOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` }
func (*DeleteCommentOperation) Data ¶ added in v0.4.0
func (op *DeleteCommentOperation) Data() interface{}
func (*DeleteCommentOperation) Type ¶ added in v0.4.0
func (op *DeleteCommentOperation) Type() OpType
type FeedPublishOperation ¶ added in v0.4.0
type FeedPublishOperation struct { Publisher string `json:"publisher"` ExchangeRate struct { Base string `json:"base"` Quote string `json:"quote"` } `json:"exchange_rate"` }
func (*FeedPublishOperation) Data ¶ added in v0.4.0
func (op *FeedPublishOperation) Data() interface{}
func (*FeedPublishOperation) Type ¶ added in v0.4.0
func (op *FeedPublishOperation) Type() OpType
type FollowOperation ¶ added in v0.4.0
type ID ¶
func (*ID) UnmarshalJSON ¶
type Int ¶
func (*Int) UnmarshalJSON ¶
type Int16 ¶ added in v0.4.0
type Int16 int16
func (Int16) MarshalTransaction ¶ added in v0.4.0
func (num Int16) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int16) UnmarshalJSON ¶ added in v0.4.0
type Int32 ¶ added in v0.4.0
type Int32 int32
func (Int32) MarshalTransaction ¶ added in v0.4.0
func (num Int32) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int32) UnmarshalJSON ¶ added in v0.4.0
type Int64 ¶ added in v0.4.0
type Int64 int64
func (Int64) MarshalTransaction ¶ added in v0.4.0
func (num Int64) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int64) UnmarshalJSON ¶ added in v0.4.0
type Int8 ¶ added in v0.4.0
type Int8 int8
func (Int8) MarshalTransaction ¶ added in v0.4.0
func (num Int8) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int8) UnmarshalJSON ¶ added in v0.4.0
type LimitOrderCancelOperation ¶ added in v0.4.0
type LimitOrderCancelOperation struct { Owner string `json:"owner"` OrderID uint32 `json:"orderid"` }
func (*LimitOrderCancelOperation) Data ¶ added in v0.4.0
func (op *LimitOrderCancelOperation) Data() interface{}
func (*LimitOrderCancelOperation) Type ¶ added in v0.4.0
func (op *LimitOrderCancelOperation) Type() OpType
type LimitOrderCreateOperation ¶ added in v0.4.0
type LimitOrderCreateOperation struct { Owner string `json:"owner"` OrderID uint32 `json:"orderid"` AmountToSell string `json:"amount_to_sell"` MinToReceive string `json:"min_to_receive"` FillOrKill bool `json:"fill_or_kill"` Expiration *Time `json:"expiration"` }
func (*LimitOrderCreateOperation) Data ¶ added in v0.4.0
func (op *LimitOrderCreateOperation) Data() interface{}
func (*LimitOrderCreateOperation) Type ¶ added in v0.4.0
func (op *LimitOrderCreateOperation) Type() OpType
type OpType ¶ added in v0.4.0
type OpType string
OpType represents a Steem 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" TypeChallengeAuthority OpType = "challenge_authority" TypeProveAuthority OpType = "prove_authority" TypeRequestAccountRecoverty OpType = "request_account_recovery" TypeRecoverAccount OpType = "recover_account" TypeChangeRecoveryAccount OpType = "change_recover_account" TypeEscrowTransfer OpType = "escrow_transfer" TypeEscrowDispute OpType = "escrow_dispute" TypeEscrowRelease OpType = "escrow_release" TypePOW2 OpType = "pow2" )
type Operation ¶ added in v0.4.0
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 ¶ added in v0.5.0
type OperationObject struct { BlockNumber uint32 `json:"block"` TransactionID string `json:"trx_id"` TransactionInBlock uint32 `json:"trx_in_block"` Operation Operation `json:"op"` OperationInTransaction uint16 `json:"op_in_trx"` VirtualOperation uint64 `json:"virtual_op"` Timestamp *Time `json:"timestamp"` }
func (*OperationObject) MarshalJSON ¶ added in v0.5.0
func (op *OperationObject) MarshalJSON() ([]byte, error)
func (*OperationObject) UnmarshalJSON ¶ added in v0.5.0
func (op *OperationObject) UnmarshalJSON(p []byte) error
type Operations ¶ added in v0.4.0
type Operations []Operation
func (Operations) MarshalJSON ¶ added in v0.4.0
func (ops Operations) MarshalJSON() ([]byte, error)
func (*Operations) UnmarshalJSON ¶ added in v0.4.0
func (ops *Operations) UnmarshalJSON(data []byte) error
type POWOperation ¶ added in v0.4.0
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"` }
func (*POWOperation) Data ¶ added in v0.4.0
func (op *POWOperation) Data() interface{}
func (*POWOperation) Type ¶ added in v0.4.0
func (op *POWOperation) Type() OpType
type ReportOverProductionOperation ¶ added in v0.4.0
type ReportOverProductionOperation struct {
Reporter string `json:"reporter"`
}
func (*ReportOverProductionOperation) Data ¶ added in v0.4.0
func (op *ReportOverProductionOperation) Data() interface{}
func (*ReportOverProductionOperation) Type ¶ added in v0.4.0
func (op *ReportOverProductionOperation) Type() OpType
type StringInt64Map ¶ added in v0.8.0
func (StringInt64Map) MarshalJSON ¶ added in v0.8.0
func (m StringInt64Map) MarshalJSON() ([]byte, error)
func (*StringInt64Map) UnmarshalJSON ¶ added in v0.8.0
func (m *StringInt64Map) UnmarshalJSON(data []byte) error
type StringSlice ¶ added in v0.4.0
type StringSlice []string
func (*StringSlice) UnmarshalJSON ¶ added in v0.4.0
func (ss *StringSlice) UnmarshalJSON(data []byte) error
type Time ¶
func (*Time) MarshalJSON ¶ added in v0.4.0
func (*Time) MarshalTransaction ¶ added in v0.4.0
func (t *Time) MarshalTransaction(encoder *transaction.Encoder) error
func (*Time) UnmarshalJSON ¶
type Transaction ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (tx *Transaction) MarshalTransaction(encoder *transaction.Encoder) error
MarshalTransaction implements transaction.Marshaller interface.
func (*Transaction) PushOperation ¶ added in v0.4.0
func (tx *Transaction) PushOperation(op Operation)
PushOperation can be used to add an operation into the transaction.
type TransferOperation ¶ added in v0.4.0
type TransferOperation struct { From string `json:"from"` To string `json:"to"` Amount string `json:"amount"` Memo string `json:"memo"` }
func (*TransferOperation) Data ¶ added in v0.4.0
func (op *TransferOperation) Data() interface{}
func (*TransferOperation) Type ¶ added in v0.4.0
func (op *TransferOperation) Type() OpType
type TransferToVestingOperation ¶ added in v0.4.0
type TransferToVestingOperation struct { From string `json:"from"` To string `json:"to"` Amount string `json:"amount"` }
func (*TransferToVestingOperation) Data ¶ added in v0.4.0
func (op *TransferToVestingOperation) Data() interface{}
func (*TransferToVestingOperation) Type ¶ added in v0.4.0
func (op *TransferToVestingOperation) Type() OpType
type UInt ¶ added in v0.4.0
type UInt uint
func (UInt) MarshalTransaction ¶ added in v0.4.0
func (num UInt) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt) UnmarshalJSON ¶ added in v0.4.0
type UInt16 ¶ added in v0.4.0
type UInt16 uint16
func (UInt16) MarshalTransaction ¶ added in v0.4.0
func (num UInt16) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt16) UnmarshalJSON ¶ added in v0.4.0
type UInt32 ¶ added in v0.4.0
type UInt32 uint32
func (UInt32) MarshalTransaction ¶ added in v0.4.0
func (num UInt32) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt32) UnmarshalJSON ¶ added in v0.4.0
type UInt64 ¶ added in v0.4.0
type UInt64 uint64
func (UInt64) MarshalTransaction ¶ added in v0.4.0
func (num UInt64) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt64) UnmarshalJSON ¶ added in v0.4.0
type UInt8 ¶ added in v0.4.0
type UInt8 uint8
func (UInt8) MarshalTransaction ¶ added in v0.4.0
func (num UInt8) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt8) UnmarshalJSON ¶ added in v0.4.0
type UnknownOperation ¶ added in v0.4.0
type UnknownOperation struct {
// contains filtered or unexported fields
}
func (*UnknownOperation) Data ¶ added in v0.4.0
func (op *UnknownOperation) Data() interface{}
func (*UnknownOperation) Type ¶ added in v0.4.0
func (op *UnknownOperation) Type() OpType
type VoteOperation ¶ added in v0.4.0
type VoteOperation struct { Voter string `json:"voter"` Author string `json:"author"` Permlink string `json:"permlink"` Weight Int16 `json:"weight"` }
func (*VoteOperation) Data ¶ added in v0.4.0
func (op *VoteOperation) Data() interface{}
func (*VoteOperation) MarshalTransaction ¶ added in v0.4.0
func (op *VoteOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*VoteOperation) Type ¶ added in v0.4.0
func (op *VoteOperation) Type() OpType
type WithdrawVestingOperation ¶ added in v0.4.0
type WithdrawVestingOperation struct { Account string `json:"account"` }
func (*WithdrawVestingOperation) Data ¶ added in v0.4.0
func (op *WithdrawVestingOperation) Data() interface{}
func (*WithdrawVestingOperation) Type ¶ added in v0.4.0
func (op *WithdrawVestingOperation) Type() OpType
Click to show internal directories.
Click to hide internal directories.