Documentation ¶
Index ¶
- Constants
- Variables
- type AccountAuthority
- type AccountAuthorityMap
- func (m *AccountAuthorityMap) Get(key PublicKey) (uint16, bool)
- func (m AccountAuthorityMap) MarshalJSON() ([]byte, error)
- func (m *AccountAuthorityMap) MarshalTransaction(encoder *transaction.Encoder) error
- func (m *AccountAuthorityMap) Set(key PublicKey, w uint16) bool
- func (m *AccountAuthorityMap) UnmarshalJSON(data []byte) error
- type AccountCreateByCommitteeOperation
- type AccountCreateOperation
- type AccountCreateWithDelegationOperation
- type AccountUpdateOperation
- type AccountWitnessVoteOperation
- type Asset
- type Authority
- type BetCancelKind
- type BetCancelledOperation
- type BetResolveKind
- type BetResolvedOperation
- type BetsMatchedVirtualOperation
- type Block
- type BlockHeader
- type CancelGameOperation
- type CancelPendingBetsOperation
- type CommentOperation
- type CommentOptionsOperation
- type CreateGameOperation
- type CreateGameRoundOperation
- type CreateNFTOperation
- type DelegateSPFromRegPoolOperation
- type DelegateScorumpowerOperation
- type DeleteCommentOperation
- type GameStatus
- type GameStatusChangedVirtualOperation
- type GameType
- type KeyAuthority
- type KeyAuthorityMap
- func (m *KeyAuthorityMap) Get(key PublicKey) (uint16, bool)
- func (m KeyAuthorityMap) MarshalJSON() ([]byte, error)
- func (m *KeyAuthorityMap) MarshalTransaction(encoder *transaction.Encoder) error
- func (m *KeyAuthorityMap) Set(key PublicKey, w uint16) bool
- func (m *KeyAuthorityMap) UnmarshalJSON(data []byte) error
- type Market
- type MarketID
- type MarketInterface
- type Odds
- type OpType
- type Operation
- type OperationInfo
- type OperationObject
- type OperationsArray
- type OperationsBlock
- type OperationsFlat
- type OverUnderMarket
- type OverUnderWincase
- type PostBetOperation
- type PostGameResultsOperation
- type ProducerRewardOperation
- type PublicKey
- type ScoreYesNoMarket
- type ScoreYesNoWincase
- type StringInt64Map
- type Time
- type Transaction
- type TransferOperation
- type TransferToScorumpowerOperation
- type UnknownOperation
- type UpdateGameRoundResultOperation
- type UpdateGameStartTimeOperation
- type UpdateNFTMetadataOperation
- type VoteOperation
- type Wincase
- type WincaseID
- type WincaseInterface
- type WithdrawScorumpowerOperation
- type WitnessUpdateOperation
- type WitnessUpdateOperationProps
- type YesNoMarket
- type YesNoWincase
Constants ¶
const ( SoccerGameType = 0 HockeyGameType = 1 )
const Layout = `"2006-01-02T15:04:05"`
const Symbol = "SCR"
Variables ¶
var GameTypeNames = map[GameType]string{ SoccerGameType: "soccer_game", HockeyGameType: "hockey_game", }
var MarketNames = map[MarketID]string{ MarketResultHome: "result_home", MarketResultDraw: "result_draw", MarketResultAway: "result_away", MarketRoundHome: "round_home", MarketHandicap: "handicap", MarketCorrectScoreHome: "correct_score_home", MarketCorrectScoreDraw: "correct_score_draw", MarketCorrectScoreAway: "correct_score_away", MarketCorrectScore: "correct_score", MarketGoalHome: "goal_home", MarketGoalBoth: "goal_both", MarketGoalAway: "goal_away", MarketTotal: "total", MarketTotalGoalsHome: "total_goals_home", MarketTotalGoalsAway: "total_goals_away", }
var WincaseNames = map[WincaseID]string{ WincaseResultHomeYes: "result_home::yes", WincaseResultHomeNo: "result_home::no", WincaseResultDrawYes: "result_draw::yes", WincaseResultDrawNo: "result_draw::no", WincaseResultAwayYes: "result_away::yes", WincaseResultAwayNo: "result_away::no", WincaseRoundHomeYes: "round_home::yes", WincaseRoundHomeNo: "round_home::no", WincaseHandicapOver: "handicap::over", WincaseHandicapUnder: "handicap::under", WincaseCorrectScoreHomeYes: "correct_score_home::yes", WincaseCorrectScoreHomeNo: "correct_score_home::no", WincaseCorrectScoreDrawYes: "correct_score_draw::yes", WincaseCorrectScoreDrawNo: "correct_score_draw::no", WincaseCorrectScoreAwayYes: "correct_score_away::yes", WincaseCorrectScoreAwayNo: "correct_score_away::no", WincaseCorrectScoreYes: "correct_score::yes", WincaseCorrectScoreNo: "correct_score::no", WincaseGoalHomeYes: "goal_home::yes", WincaseGoalHomeNo: "goal_home::no", WincaseGoalBothYes: "goal_both::yes", WincaseGoalBothNo: "goal_both::no", WincaseGoalAwayYes: "goal_away::yes", WincaseGoalAwayNo: "goal_away::no", WincaseTotalOver: "total::over", WincaseTotalUnder: "total::under", }
Functions ¶
This section is empty.
Types ¶
type AccountAuthority ¶ added in v0.5.1
type AccountAuthorityMap ¶ added in v0.5.1
type AccountAuthorityMap orderedmap.OrderedMap
func NewAccountAuthorityMap ¶ added in v0.5.1
func NewAccountAuthorityMap(items ...AccountAuthority) *AccountAuthorityMap
func (*AccountAuthorityMap) Get ¶ added in v0.5.1
func (m *AccountAuthorityMap) Get(key PublicKey) (uint16, bool)
func (AccountAuthorityMap) MarshalJSON ¶ added in v0.5.1
func (m AccountAuthorityMap) MarshalJSON() ([]byte, error)
func (*AccountAuthorityMap) MarshalTransaction ¶ added in v0.5.1
func (m *AccountAuthorityMap) MarshalTransaction(encoder *transaction.Encoder) error
func (*AccountAuthorityMap) Set ¶ added in v0.5.1
func (m *AccountAuthorityMap) Set(key PublicKey, w uint16) bool
func (*AccountAuthorityMap) UnmarshalJSON ¶ added in v0.5.1
func (m *AccountAuthorityMap) UnmarshalJSON(data []byte) error
type AccountCreateByCommitteeOperation ¶
type AccountCreateByCommitteeOperation struct { Creator string `json:"creator"` NewAccountName string `json:"new_account_name"` Owner Authority `json:"owner"` Active Authority `json:"active"` Posting Authority `json:"posting"` MemoKey PublicKey `json:"memo_key"` JsonMetadata string `json:"json_metadata"` }
func (*AccountCreateByCommitteeOperation) MarshalTransaction ¶ added in v0.5.1
func (op *AccountCreateByCommitteeOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*AccountCreateByCommitteeOperation) Type ¶
func (op *AccountCreateByCommitteeOperation) Type() OpType
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) Type ¶
func (op *AccountCreateOperation) Type() OpType
type AccountCreateWithDelegationOperation ¶
type AccountCreateWithDelegationOperation 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"` Extensions []json.RawMessage `json:"extensions"` }
func (*AccountCreateWithDelegationOperation) Type ¶
func (op *AccountCreateWithDelegationOperation) Type() OpType
type AccountUpdateOperation ¶ added in v0.0.2
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) Type ¶ added in v0.0.2
func (op *AccountUpdateOperation) Type() OpType
type AccountWitnessVoteOperation ¶
type AccountWitnessVoteOperation struct { Account string `json:"account"` Witness string `json:"witness"` Approve bool `json:"approve"` }
func (*AccountWitnessVoteOperation) MarshalTransaction ¶
func (op *AccountWitnessVoteOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*AccountWitnessVoteOperation) Type ¶
func (op *AccountWitnessVoteOperation) Type() OpType
type Asset ¶
type Asset struct {
// contains filtered or unexported fields
}
func AssetFromDecimal ¶ added in v0.2.2
func AssetFromFloat ¶
func AssetFromString ¶
func (Asset) MarshalJSON ¶
func (Asset) MarshalTransaction ¶
func (as Asset) MarshalTransaction(encoder *transaction.Encoder) error
func (*Asset) UnmarshalJSON ¶
type Authority ¶
type Authority struct { WeightThreshold uint32 `json:"weight_threshold"` AccountAuths *AccountAuthorityMap `json:"account_auths"` KeyAuths *KeyAuthorityMap `json:"key_auths"` }
func (Authority) MarshalTransaction ¶ added in v0.5.1
func (m Authority) MarshalTransaction(encoder *transaction.Encoder) error
type BetCancelKind ¶ added in v0.2.1
type BetCancelKind string
const ( PendingBetKind BetCancelKind = "pending" MatchedBetKind BetCancelKind = "matched" )
type BetCancelledOperation ¶ added in v0.2.1
type BetCancelledOperation struct { GameUUID uuid.UUID `json:"game_uuid"` Better string `json:"better"` BetUUID uuid.UUID `json:"bet_uuid"` Stake Asset `json:"stake"` Kind BetCancelKind `json:"kind"` }
func (*BetCancelledOperation) Type ¶ added in v0.2.1
func (op *BetCancelledOperation) Type() OpType
type BetResolveKind ¶ added in v0.2.1
type BetResolveKind string
const ( WinBetResolveKind BetResolveKind = "win" DrawBetResolveKind BetResolveKind = "draw" )
type BetResolvedOperation ¶ added in v0.2.1
type BetResolvedOperation struct { GameUUID uuid.UUID `json:"game_uuid"` Better string `json:"better"` BetUUID uuid.UUID `json:"bet_uuid"` Income Asset `json:"income"` Kind BetResolveKind `json:"kind"` }
func (*BetResolvedOperation) Type ¶ added in v0.2.1
func (op *BetResolvedOperation) Type() OpType
type BetsMatchedVirtualOperation ¶ added in v0.2.1
type BetsMatchedVirtualOperation struct { Bet1UUID uuid.UUID `json:"bet1_uuid"` Bet2UUID uuid.UUID `json:"bet2_uuid"` Better1 string `json:"better1"` Better2 string `json:"better2"` MatchedStake1 Asset `json:"matched_stake1"` MatchedStake2 Asset `json:"matched_stake2"` MatchedBetID int64 `json:"matched_bet_id"` }
func (*BetsMatchedVirtualOperation) Type ¶ added in v0.2.1
func (op *BetsMatchedVirtualOperation) Type() OpType
type Block ¶ added in v0.0.2
type Block struct { Previous string `json:"previous"` BlockID string `json:"block_id"` WitnessSignature string `json:"witness_signature"` SigningKey string `json:"signing_key"` TransactionIDs []string `json:"transaction_ids"` Timestamp string `json:"timestamp"` Witness string `json:"witness"` TransactionMerkleRoot string `json:"transaction_merkle_root"` Transactions []Transaction `json:"transactions"` Extensions []json.RawMessage `json:"extensions"` Signatures []string `json:"signatures"` }
type BlockHeader ¶ added in v0.0.2
type CancelGameOperation ¶ added in v0.2.1
type CancelGameOperation struct { UUID uuid.UUID `json:"uuid"` Moderator string `json:"moderator"` }
func (*CancelGameOperation) MarshalTransaction ¶ added in v0.2.1
func (op *CancelGameOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*CancelGameOperation) Type ¶ added in v0.2.1
func (op *CancelGameOperation) Type() OpType
type CancelPendingBetsOperation ¶ added in v0.2.1
type CancelPendingBetsOperation struct { BetIDs []uuid.UUID `json:"bet_uuids"` Better string `json:"better"` }
func (*CancelPendingBetsOperation) MarshalTransaction ¶ added in v0.2.2
func (op *CancelPendingBetsOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*CancelPendingBetsOperation) Type ¶ added in v0.2.1
func (op *CancelPendingBetsOperation) Type() OpType
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 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) 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"` PercentSCRs uint16 `json:"percent_scrs"` AllowVotes bool `json:"allow_votes"` AllowCurationRewards bool `json:"allow_curation_rewards"` Extensions []interface{} `json:"extensions"` }
CommentOptionsOperation operation allows authors to update properties associated with their post. Authors of posts may not want all the benefits that come from creating a post.
The max_accepted_payout may be decreased, but never increased. The percent_scrs may be decreased, but never increased
func (*CommentOptionsOperation) Type ¶
func (op *CommentOptionsOperation) Type() OpType
type CreateGameOperation ¶ added in v0.2.1
type CreateGameOperation struct { UUID uuid.UUID `json:"uuid"` Moderator string `json:"moderator"` JsonMetadata string `json:"json_metadata"` GameType GameType `json:"game"` StartTime Time `json:"start_time"` AutoResolveDelaySec uint32 `json:"auto_resolve_delay_sec"` Markets []Market `json:"markets"` }
func (*CreateGameOperation) MarshalTransaction ¶ added in v0.2.1
func (op *CreateGameOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*CreateGameOperation) Type ¶ added in v0.2.1
func (op *CreateGameOperation) Type() OpType
type CreateGameRoundOperation ¶ added in v0.3.1
type CreateGameRoundOperation struct { Owner string `json:"owner"` UUID uuid.UUID `json:"uuid"` VerificationKey string `json:"verification_key"` Seed string `json:"seed"` }
func (*CreateGameRoundOperation) MarshalTransaction ¶ added in v0.3.1
func (op *CreateGameRoundOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*CreateGameRoundOperation) Type ¶ added in v0.3.1
func (op *CreateGameRoundOperation) Type() OpType
type CreateNFTOperation ¶ added in v0.3.1
type CreateNFTOperation struct { OwnerAccount string `json:"owner"` UUID uuid.UUID `json:"uuid"` Name string `json:"name"` JSONMetadata string `json:"json_metadata"` InitialPower int32 `json:"initial_power"` }
func (*CreateNFTOperation) MarshalTransaction ¶ added in v0.3.1
func (op *CreateNFTOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*CreateNFTOperation) Type ¶ added in v0.3.1
func (op *CreateNFTOperation) Type() OpType
type DelegateSPFromRegPoolOperation ¶ added in v0.5.1
type DelegateSPFromRegPoolOperation struct { RegCommitteeMember string `json:"reg_committee_member"` Delegatee string `json:"delegatee"` Scorumpower string `json:"scorumpower"` }
func (*DelegateSPFromRegPoolOperation) MarshalTransaction ¶ added in v0.5.1
func (op *DelegateSPFromRegPoolOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*DelegateSPFromRegPoolOperation) Type ¶ added in v0.5.1
func (op *DelegateSPFromRegPoolOperation) Type() OpType
type DelegateScorumpowerOperation ¶ added in v0.0.2
type DelegateScorumpowerOperation struct { Delegator string `json:"delegator"` Delegatee string `json:"delegatee"` Scorumpower string `json:"scorumpower"` }
func (*DelegateScorumpowerOperation) MarshalTransaction ¶ added in v0.5.1
func (op *DelegateScorumpowerOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*DelegateScorumpowerOperation) Type ¶ added in v0.0.2
func (op *DelegateScorumpowerOperation) Type() OpType
type DeleteCommentOperation ¶
type DeleteCommentOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` }
func (*DeleteCommentOperation) Type ¶
func (op *DeleteCommentOperation) Type() OpType
type GameStatus ¶ added in v0.2.1
type GameStatus string
const ( GameStatusCreated GameStatus = "created" GameStatusStarted GameStatus = "started" GameStatusFinished GameStatus = "finished" GameStatusResolved GameStatus = "resolved" GameStatusExpired GameStatus = "expired" )
type GameStatusChangedVirtualOperation ¶ added in v0.2.1
type GameStatusChangedVirtualOperation struct { GameUUID uuid.UUID `json:"game_uuid"` OldStatus GameStatus `json:"old_status"` NewStatus GameStatus `json:"new_status"` }
func (*GameStatusChangedVirtualOperation) Type ¶ added in v0.2.1
func (op *GameStatusChangedVirtualOperation) Type() OpType
type GameType ¶ added in v0.2.1
type GameType uint8
func (GameType) MarshalJSON ¶ added in v0.2.1
func (*GameType) UnmarshalJSON ¶ added in v0.2.1
type KeyAuthority ¶ added in v0.5.1
type KeyAuthorityMap ¶ added in v0.5.1
type KeyAuthorityMap orderedmap.OrderedMap
func NewKeyAuthorityMap ¶ added in v0.5.1
func NewKeyAuthorityMap(items ...KeyAuthority) *KeyAuthorityMap
func (*KeyAuthorityMap) Get ¶ added in v0.5.1
func (m *KeyAuthorityMap) Get(key PublicKey) (uint16, bool)
func (KeyAuthorityMap) MarshalJSON ¶ added in v0.5.1
func (m KeyAuthorityMap) MarshalJSON() ([]byte, error)
func (*KeyAuthorityMap) MarshalTransaction ¶ added in v0.5.1
func (m *KeyAuthorityMap) MarshalTransaction(encoder *transaction.Encoder) error
func (*KeyAuthorityMap) Set ¶ added in v0.5.1
func (m *KeyAuthorityMap) Set(key PublicKey, w uint16) bool
func (*KeyAuthorityMap) UnmarshalJSON ¶ added in v0.5.1
func (m *KeyAuthorityMap) UnmarshalJSON(data []byte) error
type Market ¶ added in v0.2.1
type Market struct {
MarketInterface
}
func (Market) MarshalJSON ¶ added in v0.2.1
func (*Market) UnmarshalJSON ¶ added in v0.2.1
type MarketInterface ¶ added in v0.2.1
type MarketInterface interface { transaction.TransactionMarshaller GetName() string GetID() int8 GetMeta() (json.RawMessage, error) }
type Odds ¶ added in v0.2.1
func (Odds) MarshalTransaction ¶ added in v0.2.2
func (o Odds) MarshalTransaction(encoder *transaction.Encoder) error
type OpType ¶
type OpType string
const ( VoteOpType OpType = "vote" CommentOpType OpType = "comment" TransferOpType OpType = "transfer" TransferToScorumpowerOpType OpType = "transfer_to_scorumpower" WithdrawScorumpowerOpType OpType = "withdraw_scorumpower" AccountCreateByCommitteeOpType OpType = "account_create_by_committee" AccountCreateOpType OpType = "account_create" AccountCreateWithDelegationOpType OpType = "account_create_with_delegation" AccountUpdateOpType OpType = "account_update" WitnessUpdateOpType OpType = "witness_update" AccountWitnessVoteOpType OpType = "account_witness_vote" AccountWitnessProxyOpType OpType = "account_witness_proxy" DeleteCommentOpType OpType = "delete_comment" CommentOptionsOpType OpType = "comment_options" SetWithdrawScorumpowerRouteToAccount OpType = "set_withdraw_scorumpower_route_to_account" SetWithdrawScorumpowerRouteToDevPool OpType = "set_withdraw_scorumpower_route_to_dev_pool" ProveAuthority OpType = "prove_authority" RequestAccountRecovery OpType = "request_account_recovery" RecoverAccount OpType = "recover_account" ChangeRecoveryAccount OpType = "change_recovery_account" EscrowApprove OpType = "escrow_approve" EscrowDispute OpType = "escrow_dispute" EscrowRelease OpType = "escrow_release" EscrowTransfer OpType = "escrow_transfer" DeclineVotingRights OpType = "decline_voting_rights" DelegateScorumpower OpType = "delegate_scorumpower" CreateBudget OpType = "create_budget" CloseBudget OpType = "close_budget" ProposalVoteOperation OpType = "proposal_vote_operation" ProposalCreateOperation OpType = "proposal_create_operation" AtomicswapInitiateOperation OpType = "atomicswap_initiate_operation" AtomicswapRedeemOperation OpType = "atomicswap_redeem_operation" AtomicswapRefundOperation OpType = "atomicswap_refund_operation" CloseBudgetByAdvertisingModeratorOperation OpType = "close_budget_by_advertising_moderator" UpdateBudgetOperation OpType = "update_budget" CreateGame OpType = "create_game" CancelGame OpType = "cancel_game" UpdateGameMarkets OpType = "update_game_markets" UpdateGameStartTime OpType = "update_game_start_time" PostGameResults OpType = "post_game_results" PostBet OpType = "post_bet" CancelPendingBets OpType = "cancel_pending_bets" DelegateSPFromRegPool OpType = "delegate_sp_from_reg_pool" CreateNFT OpType = "create_nft" UpdateNFTMetadata OpType = "update_nft_meta" CreateGameRound OpType = "create_game_round" UpdateGameRoundResult OpType = "update_game_round_result" // virtual operations AuthorReward OpType = "author_reward" CommentBenefactorReward OpType = "comment_benefactor_reward" CommentPayoutUpdate OpType = "comment_payout_update" CommentReward OpType = "comment_reward" CurationReward OpType = "curation_reward" FillScorumpowerWithdraw OpType = "fill_scorumpower_withdraw" Hardfork OpType = "hardfork" ProducerRewardOpType OpType = "producer_reward" ReturnScorumpowerDelegation OpType = "return_scorumpower_delegation" ShutdownWitness OpType = "shutdown_witness" WitnessMissBlock OpType = "witness_miss_block" ExpiredContractRefund OpType = "expired_contract_refund" AccFinishedVestingWithdraw OpType = "acc_finished_vesting_withdraw" DevpoolFinishedVestingWithdraw OpType = "devpool_finished_vesting_withdraw" AccToAccVestingWithdraw OpType = "acc_to_acc_vesting_withdraw" DevpoolToAccVestingWithdraw OpType = "devpool_to_acc_vesting_withdraw" AccToDevpoolVestingWithdraw OpType = "acc_to_devpool_vesting_withdraw" DevpoolToDevpoolVesting OpType = "devpool_to_devpool_vesting_withdraw" ProposalVirtual OpType = "proposal_virtual" ActiveSpHoldersRewardLegacy OpType = "active_sp_holders_reward_legacy" AllocateCashFromAdvertisingBudget OpType = "allocate_cash_from_advertising_budget" CashBackFromAdvertisingBudgetToOwner OpType = "cash_back_from_advertising_budget_to_owner" ClosingBudget OpType = "closing_budget" BetsMatched OpType = "bets_matched" GameStatusChanged OpType = "game_status_changed" BetResolved OpType = "bet_resolved" BetCancelled OpType = "bet_cancelled" BetRestored OpType = "bet_restored" BetUpdated OpType = "bet_updated" )
type OperationInfo ¶ added in v0.2.1
func (*OperationInfo) UnmarshalJSON ¶ added in v0.2.1
func (oi *OperationInfo) UnmarshalJSON(b []byte) error
type OperationObject ¶
type OperationObject struct { BlockNumber uint32 `json:"block"` TransactionID string `json:"trx_id"` TransactionsInBlock uint32 `json:"trx_in_block"` OperationsInTransaction uint32 `json:"op_in_trx"` VirtualOperations uint32 `json:"virtual_op"` Timestamp Time `json:"timestamp"` Operations OperationsFlat `json:"op"` }
type OperationsArray ¶
type OperationsArray []Operation
OperationsArray coming from the Api in the following form: [["op1", {}], ["op2", {}], ...]
func (OperationsArray) MarshalJSON ¶
func (ops OperationsArray) MarshalJSON() ([]byte, error)
func (*OperationsArray) UnmarshalJSON ¶
func (ops *OperationsArray) UnmarshalJSON(b []byte) (err error)
type OperationsBlock ¶ added in v0.2.1
type OperationsBlock struct { BlockNum uint32 `json:"block_num"` Previous string `json:"previous"` WitnessSignature string `json:"witness_signature"` Timestamp string `json:"timestamp"` Witness string `json:"witness"` TransactionMerkleRoot string `json:"transaction_merkle_root"` Operations []OperationInfo `json:"operations"` Extensions []json.RawMessage `json:"extensions"` }
type OperationsFlat ¶
type OperationsFlat []Operation
OperationsFlat coming from the Api in the following form: ["op1", {}, "op2", {}, ...]
func (*OperationsFlat) UnmarshalJSON ¶
func (t *OperationsFlat) UnmarshalJSON(b []byte) (err error)
type OverUnderMarket ¶ added in v0.2.1
func (*OverUnderMarket) GetID ¶ added in v0.2.1
func (op *OverUnderMarket) GetID() int8
func (*OverUnderMarket) GetMeta ¶ added in v0.2.1
func (op *OverUnderMarket) GetMeta() (json.RawMessage, error)
func (*OverUnderMarket) GetName ¶ added in v0.2.1
func (op *OverUnderMarket) GetName() string
func (OverUnderMarket) MarshalJSON ¶ added in v0.2.1
func (m OverUnderMarket) MarshalJSON() ([]byte, error)
func (*OverUnderMarket) MarshalTransaction ¶ added in v0.2.1
func (op *OverUnderMarket) MarshalTransaction(encoder *transaction.Encoder) error
type OverUnderWincase ¶ added in v0.2.1
func (*OverUnderWincase) GetID ¶ added in v0.2.1
func (op *OverUnderWincase) GetID() int8
func (*OverUnderWincase) GetMeta ¶ added in v0.2.1
func (op *OverUnderWincase) GetMeta() (json.RawMessage, error)
func (*OverUnderWincase) GetName ¶ added in v0.2.1
func (op *OverUnderWincase) GetName() string
func (OverUnderWincase) MarshalJSON ¶ added in v0.2.1
func (w OverUnderWincase) MarshalJSON() ([]byte, error)
func (*OverUnderWincase) MarshalTransaction ¶ added in v0.2.1
func (op *OverUnderWincase) MarshalTransaction(encoder *transaction.Encoder) error
type PostBetOperation ¶ added in v0.2.1
type PostBetOperation struct { UUID uuid.UUID `json:"uuid"` Better string `json:"better"` GameUUID uuid.UUID `json:"game_uuid"` Wincase Wincase `json:"wincase"` Odds Odds `json:"odds"` Stake Asset `json:"stake"` Live bool `json:"live"` }
func (*PostBetOperation) MarshalTransaction ¶ added in v0.2.2
func (op *PostBetOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*PostBetOperation) Type ¶ added in v0.2.1
func (op *PostBetOperation) Type() OpType
type PostGameResultsOperation ¶ added in v0.2.1
type PostGameResultsOperation struct { UUID uuid.UUID `json:"uuid"` Moderator string `json:"moderator"` Wincases []Wincase `json:"wincases"` }
func (*PostGameResultsOperation) MarshalTransaction ¶ added in v0.2.1
func (op *PostGameResultsOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*PostGameResultsOperation) Type ¶ added in v0.2.1
func (op *PostGameResultsOperation) Type() OpType
type ProducerRewardOperation ¶
type ProducerRewardOperation struct { Producer string `json:"producer"` Scorumpower string `json:"reward"` }
func (*ProducerRewardOperation) Type ¶
func (op *ProducerRewardOperation) Type() OpType
type PublicKey ¶ added in v0.5.1
type PublicKey string
func (PublicKey) MarshalTransaction ¶ added in v0.5.1
func (k PublicKey) MarshalTransaction(encoder *transaction.Encoder) error
type ScoreYesNoMarket ¶ added in v0.2.1
func (*ScoreYesNoMarket) GetID ¶ added in v0.2.1
func (op *ScoreYesNoMarket) GetID() int8
func (*ScoreYesNoMarket) GetMeta ¶ added in v0.2.1
func (op *ScoreYesNoMarket) GetMeta() (json.RawMessage, error)
func (*ScoreYesNoMarket) GetName ¶ added in v0.2.1
func (op *ScoreYesNoMarket) GetName() string
func (ScoreYesNoMarket) MarshalJSON ¶ added in v0.2.1
func (m ScoreYesNoMarket) MarshalJSON() ([]byte, error)
func (*ScoreYesNoMarket) MarshalTransaction ¶ added in v0.2.1
func (op *ScoreYesNoMarket) MarshalTransaction(encoder *transaction.Encoder) error
type ScoreYesNoWincase ¶ added in v0.2.1
func (*ScoreYesNoWincase) GetID ¶ added in v0.2.1
func (op *ScoreYesNoWincase) GetID() int8
func (*ScoreYesNoWincase) GetMeta ¶ added in v0.2.1
func (op *ScoreYesNoWincase) GetMeta() (json.RawMessage, error)
func (*ScoreYesNoWincase) GetName ¶ added in v0.2.1
func (op *ScoreYesNoWincase) GetName() string
func (ScoreYesNoWincase) MarshalJSON ¶ added in v0.2.1
func (w ScoreYesNoWincase) MarshalJSON() ([]byte, error)
func (*ScoreYesNoWincase) MarshalTransaction ¶ added in v0.2.1
func (op *ScoreYesNoWincase) MarshalTransaction(encoder *transaction.Encoder) error
type StringInt64Map ¶
func (StringInt64Map) MarshalJSON ¶
func (m StringInt64Map) MarshalJSON() ([]byte, error)
func (*StringInt64Map) UnmarshalJSON ¶
func (m *StringInt64Map) 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 OperationsArray `json:"operations"` Signatures []string `json:"signatures"` }
func (*Transaction) ID ¶ added in v0.5.1
func (tx *Transaction) ID() ([]byte, error)
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 Asset `json:"amount"` Memo string `json:"memo"` }
func (TransferOperation) Equals ¶
func (op TransferOperation) Equals(t2 TransferOperation) bool
Equals returns whether the numbers represented by d and d2 are equal.
func (*TransferOperation) MarshalTransaction ¶
func (op *TransferOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*TransferOperation) Type ¶
func (op *TransferOperation) Type() OpType
type TransferToScorumpowerOperation ¶
type TransferToScorumpowerOperation struct { From string `json:"from"` To string `json:"to"` Amount string `json:"amount"` }
func (*TransferToScorumpowerOperation) MarshalTransaction ¶ added in v0.5.1
func (op *TransferToScorumpowerOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*TransferToScorumpowerOperation) Type ¶
func (op *TransferToScorumpowerOperation) Type() OpType
type UnknownOperation ¶
type UnknownOperation struct { Data json.RawMessage // contains filtered or unexported fields }
func (*UnknownOperation) Type ¶
func (op *UnknownOperation) Type() OpType
type UpdateGameRoundResultOperation ¶ added in v0.4.1
type UpdateGameRoundResultOperation struct { Owner string `json:"owner"` UUID uuid.UUID `json:"uuid"` Proof string `json:"proof"` Vrf string `json:"vrf"` Result int32 `json:"result"` }
func (*UpdateGameRoundResultOperation) MarshalTransaction ¶ added in v0.4.1
func (op *UpdateGameRoundResultOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*UpdateGameRoundResultOperation) Type ¶ added in v0.4.1
func (op *UpdateGameRoundResultOperation) Type() OpType
type UpdateGameStartTimeOperation ¶ added in v0.2.1
type UpdateGameStartTimeOperation struct { UUID uuid.UUID `json:"uuid"` Moderator string `json:"moderator"` StartTime Time `json:"start_time"` }
func (*UpdateGameStartTimeOperation) MarshalTransaction ¶ added in v0.2.1
func (op *UpdateGameStartTimeOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*UpdateGameStartTimeOperation) Type ¶ added in v0.2.1
func (op *UpdateGameStartTimeOperation) Type() OpType
type UpdateNFTMetadataOperation ¶ added in v0.3.1
type UpdateNFTMetadataOperation struct { Moderator string `json:"moderator"` UUID uuid.UUID `json:"uuid"` JSONMetadata string `json:"json_metadata"` }
func (*UpdateNFTMetadataOperation) MarshalTransaction ¶ added in v0.3.1
func (op *UpdateNFTMetadataOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*UpdateNFTMetadataOperation) Type ¶ added in v0.3.1
func (op *UpdateNFTMetadataOperation) 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) MarshalTransaction ¶
func (op *VoteOperation) MarshalTransaction(encoder *transaction.Encoder) error
func (*VoteOperation) Type ¶
func (op *VoteOperation) Type() OpType
type Wincase ¶ added in v0.2.1
type Wincase struct {
WincaseInterface
}
func (Wincase) MarshalJSON ¶ added in v0.2.1
func (*Wincase) UnmarshalJSON ¶ added in v0.2.1
type WincaseID ¶ added in v0.2.1
type WincaseID int8
const ( WincaseResultHomeYes WincaseID = iota WincaseResultHomeNo WincaseResultDrawYes WincaseResultDrawNo WincaseResultAwayYes WincaseResultAwayNo WincaseRoundHomeYes WincaseRoundHomeNo WincaseHandicapOver WincaseHandicapUnder WincaseCorrectScoreHomeYes WincaseCorrectScoreHomeNo WincaseCorrectScoreDrawYes WincaseCorrectScoreDrawNo WincaseCorrectScoreAwayYes WincaseCorrectScoreAwayNo WincaseCorrectScoreYes WincaseCorrectScoreNo WincaseGoalHomeYes WincaseGoalHomeNo WincaseGoalBothYes WincaseGoalBothNo WincaseGoalAwayYes WincaseGoalAwayNo WincaseTotalOver WincaseTotalUnder )
type WincaseInterface ¶ added in v0.2.1
type WincaseInterface interface { transaction.TransactionMarshaller GetName() string GetID() int8 GetMeta() (json.RawMessage, error) }
type WithdrawScorumpowerOperation ¶ added in v0.0.2
type WithdrawScorumpowerOperation struct { Account string `json:"account"` Scorumpower string `json:"scorumpower"` }
func (*WithdrawScorumpowerOperation) Type ¶ added in v0.0.2
func (op *WithdrawScorumpowerOperation) Type() OpType
type WitnessUpdateOperation ¶
type WitnessUpdateOperation struct { Owner string `json:"owner"` Url string `json:"url"` BlockSigningKey string `json:"block_signing_key"` Props WitnessUpdateOperationProps `json:"props"` Fee string `json:"fee"` }
func (*WitnessUpdateOperation) Type ¶
func (op *WitnessUpdateOperation) Type() OpType
type YesNoMarket ¶ added in v0.2.1
type YesNoMarket struct {
ID MarketID
}
func (*YesNoMarket) GetID ¶ added in v0.2.1
func (op *YesNoMarket) GetID() int8
func (*YesNoMarket) GetMeta ¶ added in v0.2.1
func (op *YesNoMarket) GetMeta() (json.RawMessage, error)
func (*YesNoMarket) GetName ¶ added in v0.2.1
func (op *YesNoMarket) GetName() string
func (YesNoMarket) MarshalJSON ¶ added in v0.2.1
func (m YesNoMarket) MarshalJSON() ([]byte, error)
func (*YesNoMarket) MarshalTransaction ¶ added in v0.2.1
func (op *YesNoMarket) MarshalTransaction(encoder *transaction.Encoder) error
type YesNoWincase ¶ added in v0.2.1
type YesNoWincase struct {
ID WincaseID
}
func (*YesNoWincase) GetID ¶ added in v0.2.1
func (op *YesNoWincase) GetID() int8
func (*YesNoWincase) GetMeta ¶ added in v0.2.1
func (op *YesNoWincase) GetMeta() (json.RawMessage, error)
func (*YesNoWincase) GetName ¶ added in v0.2.1
func (op *YesNoWincase) GetName() string
func (YesNoWincase) MarshalJSON ¶ added in v0.2.1
func (w YesNoWincase) MarshalJSON() ([]byte, error)
func (*YesNoWincase) MarshalTransaction ¶ added in v0.2.1
func (op *YesNoWincase) MarshalTransaction(encoder *transaction.Encoder) error