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 ¶
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 ¶
func (op *AccountCreateOperation) Data() interface{}
func (*AccountCreateOperation) Type ¶
func (op *AccountCreateOperation) Type() OpType
type AccountUpdateOperation ¶
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 ¶
func (op *AccountUpdateOperation) Data() interface{}
func (*AccountUpdateOperation) Type ¶
func (op *AccountUpdateOperation) Type() OpType
type AccountWitnessProxyOperation ¶
type AccountWitnessProxyOperation struct { Account string `json:"account"` Proxy string `json:"proxy"` }
func (*AccountWitnessProxyOperation) Data ¶
func (op *AccountWitnessProxyOperation) Data() interface{}
func (*AccountWitnessProxyOperation) Type ¶
func (op *AccountWitnessProxyOperation) Type() OpType
type AccountWitnessVoteOperation ¶
type AccountWitnessVoteOperation struct { Account string `json:"account"` Witness string `json:"witness"` Approve bool `json:"approve"` }
func (*AccountWitnessVoteOperation) Data ¶
func (op *AccountWitnessVoteOperation) Data() interface{}
func (*AccountWitnessVoteOperation) Type ¶
func (op *AccountWitnessVoteOperation) Type() OpType
type Authority ¶
type Authority struct { AccountAuths StringInt64Map `json:"account_auths"` KeyAuths StringInt64Map `json:"key_auths"` WeightThreshold uint32 `json:"weight_threshold"` }
type ChainProperties ¶
type CommentOperation ¶
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 ¶
func (op *CommentOperation) Data() interface{}
func (*CommentOperation) IsStoryOperation ¶
func (op *CommentOperation) IsStoryOperation() bool
func (*CommentOperation) Type ¶
func (op *CommentOperation) Type() OpType
type CommentOptionsOperation ¶
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 ¶
func (op *CommentOptionsOperation) Data() interface{}
func (*CommentOptionsOperation) Type ¶
func (op *CommentOptionsOperation) Type() OpType
type ConvertOperation ¶
type ConvertOperation struct { Owner string `json:"owner"` RequestID uint32 `json:"requestid"` Amount string `json:"amount"` }
func (*ConvertOperation) Data ¶
func (op *ConvertOperation) Data() interface{}
func (*ConvertOperation) Type ¶
func (op *ConvertOperation) Type() OpType
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{}
func (*CustomJSONOperation) Type ¶
func (op *CustomJSONOperation) Type() OpType
func (*CustomJSONOperation) UnmarshalData ¶
func (op *CustomJSONOperation) UnmarshalData() (interface{}, error)
type DeleteCommentOperation ¶
type DeleteCommentOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` }
func (*DeleteCommentOperation) Data ¶
func (op *DeleteCommentOperation) Data() interface{}
func (*DeleteCommentOperation) Type ¶
func (op *DeleteCommentOperation) Type() OpType
type FeedPublishOperation ¶
type FeedPublishOperation struct { Publisher string `json:"publisher"` ExchangeRate struct { Base string `json:"base"` Quote string `json:"quote"` } `json:"exchange_rate"` }
func (*FeedPublishOperation) Data ¶
func (op *FeedPublishOperation) Data() interface{}
func (*FeedPublishOperation) Type ¶
func (op *FeedPublishOperation) Type() OpType
type FollowOperation ¶
type ID ¶
func (*ID) UnmarshalJSON ¶
type Int ¶
func (*Int) UnmarshalJSON ¶
type Int16 ¶
type Int16 int16
func (Int16) MarshalTransaction ¶
func (num Int16) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int16) UnmarshalJSON ¶
type Int32 ¶
type Int32 int32
func (Int32) MarshalTransaction ¶
func (num Int32) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int32) UnmarshalJSON ¶
type Int64 ¶
type Int64 int64
func (Int64) MarshalTransaction ¶
func (num Int64) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int64) UnmarshalJSON ¶
type Int8 ¶
type Int8 int8
func (Int8) MarshalTransaction ¶
func (num Int8) MarshalTransaction(encoder *transaction.Encoder) error
func (*Int8) UnmarshalJSON ¶
type LimitOrderCancelOperation ¶
type LimitOrderCancelOperation struct { Owner string `json:"owner"` OrderID uint32 `json:"orderid"` }
func (*LimitOrderCancelOperation) Data ¶
func (op *LimitOrderCancelOperation) Data() interface{}
func (*LimitOrderCancelOperation) Type ¶
func (op *LimitOrderCancelOperation) Type() OpType
type LimitOrderCreateOperation ¶
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 ¶
func (op *LimitOrderCreateOperation) Data() interface{}
func (*LimitOrderCreateOperation) Type ¶
func (op *LimitOrderCreateOperation) Type() OpType
type OpType ¶
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 ¶
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"` OperationInTransaction uint16 `json:"op_in_trx"` VirtualOperation uint64 `json:"virtual_op"` Timestamp *Time `json:"timestamp"` }
func (*OperationObject) MarshalJSON ¶
func (op *OperationObject) MarshalJSON() ([]byte, error)
func (*OperationObject) UnmarshalJSON ¶
func (op *OperationObject) UnmarshalJSON(p []byte) error
type Operations ¶
type Operations []Operation
func (Operations) MarshalJSON ¶
func (ops Operations) MarshalJSON() ([]byte, error)
func (*Operations) UnmarshalJSON ¶
func (ops *Operations) UnmarshalJSON(data []byte) error
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"` }
func (*POWOperation) Data ¶
func (op *POWOperation) Data() interface{}
func (*POWOperation) Type ¶
func (op *POWOperation) Type() OpType
type ReportOverProductionOperation ¶
type ReportOverProductionOperation struct {
Reporter string `json:"reporter"`
}
func (*ReportOverProductionOperation) Data ¶
func (op *ReportOverProductionOperation) Data() interface{}
func (*ReportOverProductionOperation) Type ¶
func (op *ReportOverProductionOperation) Type() OpType
type StringInt64Map ¶
func (StringInt64Map) MarshalJSON ¶
func (m StringInt64Map) MarshalJSON() ([]byte, error)
func (*StringInt64Map) UnmarshalJSON ¶
func (m *StringInt64Map) UnmarshalJSON(data []byte) error
type StringSlice ¶
type StringSlice []string
func (*StringSlice) UnmarshalJSON ¶
func (ss *StringSlice) UnmarshalJSON(data []byte) error
type Time ¶
func (*Time) MarshalJSON ¶
func (*Time) MarshalTransaction ¶
func (t *Time) MarshalTransaction(encoder *transaction.Encoder) error
func (*Time) UnmarshalJSON ¶
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 TransferOperation ¶
type TransferOperation struct { From string `json:"from"` To string `json:"to"` Amount string `json:"amount"` Memo string `json:"memo"` }
func (*TransferOperation) Data ¶
func (op *TransferOperation) Data() interface{}
func (*TransferOperation) Type ¶
func (op *TransferOperation) Type() OpType
type TransferToVestingOperation ¶
type TransferToVestingOperation struct { From string `json:"from"` To string `json:"to"` Amount string `json:"amount"` }
func (*TransferToVestingOperation) Data ¶
func (op *TransferToVestingOperation) Data() interface{}
func (*TransferToVestingOperation) Type ¶
func (op *TransferToVestingOperation) Type() OpType
type UInt ¶
type UInt uint
func (UInt) MarshalTransaction ¶
func (num UInt) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt) UnmarshalJSON ¶
type UInt16 ¶
type UInt16 uint16
func (UInt16) MarshalTransaction ¶
func (num UInt16) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt16) UnmarshalJSON ¶
type UInt32 ¶
type UInt32 uint32
func (UInt32) MarshalTransaction ¶
func (num UInt32) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt32) UnmarshalJSON ¶
type UInt64 ¶
type UInt64 uint64
func (UInt64) MarshalTransaction ¶
func (num UInt64) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt64) UnmarshalJSON ¶
type UInt8 ¶
type UInt8 uint8
func (UInt8) MarshalTransaction ¶
func (num UInt8) MarshalTransaction(encoder *transaction.Encoder) error
func (*UInt8) UnmarshalJSON ¶
type UnknownOperation ¶
type UnknownOperation struct {
// contains filtered or unexported fields
}
func (*UnknownOperation) Data ¶
func (op *UnknownOperation) Data() interface{}
func (*UnknownOperation) Type ¶
func (op *UnknownOperation) Type() OpType
type VoteOperation ¶
type VoteOperation struct { Voter string `json:"voter"` Author string `json:"author"` Permlink string `json:"permlink"` Weight Int16 `json:"weight"` }
func (*VoteOperation) Data ¶
func (op *VoteOperation) Data() interface{}
func (*VoteOperation) MarshalTransaction ¶
func (op *VoteOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*VoteOperation) Type ¶
func (op *VoteOperation) Type() OpType
type WithdrawVestingOperation ¶
type WithdrawVestingOperation struct { Account string `json:"account"` }
func (*WithdrawVestingOperation) Data ¶
func (op *WithdrawVestingOperation) Data() interface{}
func (*WithdrawVestingOperation) Type ¶
func (op *WithdrawVestingOperation) Type() OpType
Click to show internal directories.
Click to hide internal directories.