Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertAmountToDecimal(amount string, precision int) (decimal.Decimal, error)
- func FillNai(nai string) string
- func IsSupportSymbol(symbol string) bool
- func Marshal(asset *Asset) string
- type Account
- type Amount
- type Asset
- type Buffer
- type ObjectID
- type Op
- type OpType
- type Operation
- type OperationSerialization
- type Operations
- type Options
- type Permission
- type Suint32
- type Suint64
- type Time
- type Transaction
- type TransferOperation
- type TransferSerialization
- type UnknownOperation
- type V
- type Value
Constants ¶
View Source
const Layout = `"2006-01-02T15:04:05"`
Variables ¶
View Source
var OpreationTypes = []string{
"vote",
"comment",
"transfer",
"transfer_to_vesting",
"withdraw_vesting",
"limit_order_create",
"limit_order_cancel",
"feed_publish",
"convert",
"account_create",
"account_update",
"witness_update",
"account_witness_vote",
"account_witness_proxy",
"pow",
"custom",
"report_over_production",
"delete_comment",
"custom_json",
"comment_options",
"set_withdraw_vesting_route",
"limit_order_create2",
"challenge_authority",
"prove_authority",
"request_account_recovery",
"recover_account",
"change_recovery_account",
"escrow_transfer",
"escrow_dispute",
"escrow_release",
"pow2",
"escrow_approve",
"transfer_to_savings",
"transfer_from_savings",
"cancel_transfer_from_savings",
"custom_binary",
"decline_voting_rights",
"reset_account",
"set_reset_account",
"claim_reward_balance",
"delegate_vesting_shares",
"account_create_with_delegation",
"witness_set_properties",
"fill_convert_request",
"author_reward",
"curation_reward",
"comment_reward",
"liquidity_reward",
"interest",
"fill_vesting_withdraw",
"fill_order",
"shutdown_witness",
"fill_transfer_from_savings",
"hardfork",
"comment_payout_update",
"return_vesting_delegation",
"comment_benefactor_reward",
}
Functions ¶
func ConvertAmountToDecimal ¶ added in v1.0.2
func IsSupportSymbol ¶ added in v1.0.2
Types ¶
type Account ¶
type Account struct { Id int `json:"id"` Name string `json:"name"` Owner Permission `json:"owner"` Active Permission `json:"active"` Posting Permission `json:"posting"` MemoKey string `json:"memo_key"` JsonMetadata string `json:"json_metadata"` Balance string `json:"balance"` SavingsBalance string `json:"savings_balance"` SbdBalance string `json:"sbd_balance"` SavingsSbdBalance string `json:"savings_sbd_balance"` RewardSbdBalance string `json:"reward_sbd_balance"` }
type Amount ¶ added in v1.0.1
type Amount struct { Amount uint64 `json:"amount"` Asset string `json:"asset"` Precision uint8 `json:"precision"` Nai string `json:"nai"` }
func (*Amount) UnmarshalJSON ¶ added in v1.0.2
type Asset ¶ added in v1.0.2
type Asset struct { Amount string `json:"amount"` Symbol string `json:"symbol"` Nai string `json:"nai"` Precision uint `json:"precision"` }
func (*Asset) GetPrecision ¶ added in v1.0.2
func (a *Asset) GetPrecision()
type Buffer ¶
type Buffer []byte
func (*Buffer) FromString ¶
func (Buffer) MarshalJSON ¶
func (*Buffer) UnmarshalJSON ¶
type ObjectID ¶
On the BitShares blockchains there are no addresses, but objects identified by a unique id, an type and a space in the form: space.type.id
func MustParseObjectID ¶
func ParseObjectID ¶
func (*ObjectID) MarshalJSON ¶
func (*ObjectID) UnmarshalJSON ¶
type OperationSerialization ¶ added in v1.0.2
type Operations ¶
type Operations []Operation
func (Operations) MarshalJSON ¶
func (ops Operations) MarshalJSON() ([]byte, error)
func (*Operations) UnmarshalJSON ¶
func (ops *Operations) UnmarshalJSON(b string) (err error)
type Permission ¶
type Permission struct { WeightThreshold uint32 `json:"weight_threshold"` AccountAuths []interface{} `json:"account_auths"` KeyAuths []interface{} `json:"key_auths"` AddressAuths []interface{} `json:"address_auths"` }
type Suint32 ¶
type Suint32 uint32
Suint32 uint32 with redeclared JSON unmarshal; Can be parsed from uint32 either string
func (*Suint32) UnmarshalJSON ¶
type Suint64 ¶
type Suint64 uint64
Suint64 uint64 with redeclared JSON unmarshal; Can be parsed from uint64 either string
func (*Suint64) UnmarshalJSON ¶
type Transaction ¶
type Transaction struct { RefBlockNum uint16 `json:"ref_block_num"` RefBlockPrefix uint32 `json:"ref_block_prefix"` Expiration Time `json:"expiration"` Operations []*Op `json:"operations"` Signatures []string `json:"signatures"` Extensions []string `json:"extensions"` TransactionID string }
func (*Transaction) Marshal ¶
func (tx *Transaction) Marshal(encoder *encoding.Encoder) error
Marshal implements encoding_.Marshaller interface.
func (*Transaction) PushOperation ¶
func (tx *Transaction) PushOperation(op Op)
PushOperation can be used to add an operation into the encoding_.
type TransferOperation ¶
type TransferOperation struct {
Value Value `json:"value"`
}
TransferOperation
func NewTransferOperation ¶
func NewTransferOperation(from, to, memo string, amount Amount) *TransferOperation
NewTransferOperation returns a new instance of TransferOperation
func (*TransferOperation) Marshal ¶
func (op *TransferOperation) Marshal(encoder *encoding.Encoder) error
func (*TransferOperation) Type ¶
func (op *TransferOperation) Type() string
type TransferSerialization ¶ added in v1.0.2
func (*TransferSerialization) Marshal ¶ added in v1.0.2
func (tx *TransferSerialization) Marshal() (ret []byte, err error)
func (*TransferSerialization) Unmarshal ¶ added in v1.0.2
func (tx *TransferSerialization) Unmarshal([]byte) error
type UnknownOperation ¶
type UnknownOperation struct { Data json.RawMessage // contains filtered or unexported fields }
UnknownOperation
func (*UnknownOperation) Type ¶
func (op *UnknownOperation) Type() string
Click to show internal directories.
Click to hide internal directories.