api

package
v0.0.0-...-8e4544a Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 6 Imported by: 0

README

API

This package adds support for golos api.

State

ID Command Name Version
account_by_key
1 get_key_references DONE
account_history
1 get_account_history DONE
database_api
1 get_account_bandwidth DONE
2 get_account_count DONE
3 get_accounts DONE
4 get_block DONE
5 get_block_header DONE
6 get_chain_properties DONE
7 get_config DONE
8 get_conversion_requests DONE
9 get_database_info DONE
10 get_dynamic_global_properties DONE
11 get_escrow DONE
12 get_expiring_vesting_delegations DONE
13 get_hardfork_version DONE
14 get_next_scheduled_hardfork DONE
15 get_owner_history DONE
16 get_potential_signatures DONE
17 get_proposed_transaction DONE
18 get_recovery_request DONE
19 get_required_signatures DONE
20 get_savings_withdraw_from DONE
21 get_savings_withdraw_to DONE
22 get_transaction_hex DONE
23 get_vesting_delegations DONE
24 get_withdraw_routes DONE
25 lookup_account_names DONE
26 lookup_accounts DONE
27 verify_account_authority DONE
28 verify_authority DONE
follow
1 get_account_reputations DONE
2 get_blog DONE
3 get_blog_authors DONE
4 get_blog_entries DONE
5 get_feed DONE
6 get_feed_entries DONE
7 get_follow_count DONE
8 get_followers DONE
9 get_following DONE
10 get_reblogged_by DONE
market_history
1 get_market_history DONE
2 get_market_history_buckets DONE
3 get_open_orders DONE
4 get_order_book DONE
5 get_order_book_extended NONE
6 get_recent_trades DONE
7 get_ticker DONE
8 get_trade_history DONE
9 get_volume DONE
network_broadcast_api
1 broadcast_block NONE
2 broadcast_transaction DONE
3 broadcast_transaction_synchronous DONE
4 broadcast_transaction_with_callback NONE
operation_history
1 get_ops_in_block DONE
2 get_transaction DONE
operation_history
1 get_inbox DONE
2 get_outbox DONE
3 get_thread DONE
4 get_settings DONE
5 get_contacts_size RAW
6 get_contact_info DONE
7 get_contacts DONE
social_network
1 get_account_votes DONE
2 get_active_votes DONE
3 get_all_content_replies DONE
4 get_content DONE
5 get_content_replies DONE
6 get_replies_by_last_update DONE
tags
1 get_discussions_by_active DONE
2 get_discussions_by_author_before_date DONE
3 get_discussions_by_blog DONE
4 get_discussions_by_cashout DONE
5 get_discussions_by_children DONE
6 get_discussions_by_comments DONE
7 get_discussions_by_created DONE
8 get_discussions_by_feed DONE
9 get_discussions_by_hot DONE
10 get_discussions_by_payout DONE
11 get_discussions_by_promoted DONE
12 get_discussions_by_trending DONE
13 get_discussions_by_votes DONE
14 get_languages DONE
15 get_tags_used_by_author RAW
16 get_trending_tags DONE
witness_api
1 get_active_witnesses DONE
2 get_current_median_history_price DONE
3 get_feed_history DONE
4 get_miner_queue DONE
5 get_witness_by_account DONE
6 get_witness_count DONE
7 get_witness_schedule DONE
8 get_witnesses DONE
9 get_witnesses_by_vote DONE
10 lookup_witness_accounts DONE

License

MIT, see the LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyParams = []struct{}{}
)

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

API plug-in structure

func NewAPI

func NewAPI(caller transports.Caller) *API

NewAPI plug-in initialization

func (*API) BroadcastTransaction

func (api *API) BroadcastTransaction(tx *operations.Transaction) error

BroadcastTransaction api request broadcast_transaction

func (*API) BroadcastTransactionSynchronous

func (api *API) BroadcastTransactionSynchronous(tx *operations.Transaction, maxBlockAge ...uint32) (*BroadcastResponse, error)

BroadcastTransactionSynchronous api request broadcast_transaction_synchronous

func (*API) GetAccountCount

func (api *API) GetAccountCount() (*uint64, error)

GetAccountCount returns the number of registered users.

func (*API) GetAccountHistory

func (api *API) GetAccountHistory(account string, from uint64, limit uint32) ([]*operations.OperationObject, error)

GetAccountHistory the history of all user actions on the network in the form of transactions. If from = -1, the last {limit + 1} elements of the history will be shown. The limit parameter must not exceed from (exception from = -1), since the previous {from} elements of the history are displayed.

func (*API) GetAccounts

func (api *API) GetAccounts(accountNames ...string) ([]*Account, error)

GetAccounts api request get_accounts

func (*API) GetAccountsOnSale

func (api *API) GetAccountsOnSale(from, limit uint32) ([]*AccountOnSale, error)

GetAccountsOnSale api request get_accounts_on_sale

func (*API) GetActivePaidSubscriptions

func (api *API) GetActivePaidSubscriptions(subscriber string) ([]*string, error)

GetActivePaidSubscriptions api request get_active_paid_subscriptions

func (*API) GetActiveWitnesses

func (api *API) GetActiveWitnesses() ([]*string, error)

GetActiveWitnesses api request get_active_witnesses

func (*API) GetBlock

func (api *API) GetBlock(blockNum uint32) (*Block, error)

GetBlock api request get_block

func (*API) GetBlockHeader

func (api *API) GetBlockHeader(blockNum uint32) (*BlockHeader, error)

GetBlockHeader api request get_block_header

func (*API) GetChainProperties

func (api *API) GetChainProperties() (*types.ChainProperties, error)

GetChainProperties api request get_chain_properties

func (*API) GetCommitteeRequest

func (api *API) GetCommitteeRequest(id uint32, count int32) (*CommitteeObject, error)

GetCommitteeRequest api request get_committee_request

func (*API) GetCommitteeRequestVotes

func (api *API) GetCommitteeRequestVotes(id uint32) ([]*CommitteeVoteState, error)

GetCommitteeRequestVotes api request get_committee_request_votes

func (*API) GetCommitteeRequestsList

func (api *API) GetCommitteeRequestsList(status uint16) ([]*uint16, error)

GetCommitteeRequestsList api request get_committee_requests_list

func (*API) GetConfig

func (api *API) GetConfig() (*Config, error)

GetConfig api request get_config

func (*API) GetDatabaseInfo

func (api *API) GetDatabaseInfo() (*DatabaseInfo, error)

GetDatabaseInfo api request get_database_info

func (*API) GetDynamicGlobalProperties

func (api *API) GetDynamicGlobalProperties() (*DynamicGlobalProperties, error)

GetDynamicGlobalProperties api request get_dynamic_global_properties

func (*API) GetEscrow

func (api *API) GetEscrow(from string, escrowID uint32) (*Escrow, error)

GetEscrow api request get_escrow

func (*API) GetExpiringVestingDelegations

func (api *API) GetExpiringVestingDelegations(account string, from types.Time, limit ...uint32) ([]*VestingDelegationExpiration, error)

GetExpiringVestingDelegations api request get_expiring_vesting_delegations

func (*API) GetHardforkVersion

func (api *API) GetHardforkVersion() (*string, error)

GetHardforkVersion api request get_hardfork_version

func (*API) GetInactivePaidSubscriptions

func (api *API) GetInactivePaidSubscriptions(subscriber string) ([]*string, error)

GetInactivePaidSubscriptions api request get_inactive_paid_subscriptions

func (*API) GetInviteById

func (api *API) GetInviteById(id int64) (*InviteObject, error)

GetInviteById api request get_invite_by_id

func (*API) GetInviteByKey

func (api *API) GetInviteByKey(key string) (*InviteObject, error)

GetInviteByKey api request get_invite_by_key

func (*API) GetInvitesList

func (api *API) GetInvitesList(status uint16) ([]*int64, error)

GetInvitesList api request get_invites_list

func (*API) GetKeyReferences

func (api *API) GetKeyReferences(pubkey ...string) ([]*string, error)

GetKeyReferences returns a list of accounts by a list of public keys

func (*API) GetMasterHistory

func (api *API) GetMasterHistory(accountName string) ([]*MasterHistory, error)

GetMasterHistory api request get_master_history

func (*API) GetNextScheduledHardfork

func (api *API) GetNextScheduledHardfork() (*NextScheduledHardfork, error)

GetNextScheduledHardfork api request get_next_scheduled_hardfork

func (*API) GetOpsInBlock

func (api *API) GetOpsInBlock(blockNum uint32, onlyVirtual bool) ([]*operations.OperationObject, error)

GetOpsInBlock api request get_ops_in_block

func (*API) GetPaidSubscriptionOptions

func (api *API) GetPaidSubscriptionOptions(account string) (*PaidSubscriptionState, error)

GetPaidSubscriptionOptions api request get_paid_subscription_options

func (*API) GetPaidSubscriptionStatus

func (api *API) GetPaidSubscriptionStatus(subscriber, account string) (*PaidSubscribeState, error)

GetPaidSubscriptionStatus api request get_paid_subscription_status

func (*API) GetPaidSubscriptions

func (api *API) GetPaidSubscriptions(from, limit uint32) ([]*PaidSubscription, error)

GetPaidSubscriptions api request get_paid_subscriptions

func (*API) GetPotentialSignatures

func (api *API) GetPotentialSignatures(trx *operations.Transaction) ([]*string, error)

GetPotentialSignatures api request get_potential_signatures

func (*API) GetProposedTransaction

func (api *API) GetProposedTransaction(account string, from, limit uint32) ([]*ProposalObject, error)

GetProposedTransaction api request get_proposed_transactions

func (*API) GetRecoveryRequest

func (api *API) GetRecoveryRequest(accountName string) (*AccountRecoveryRequest, error)

GetRecoveryRequest api request get_recovery_request

func (*API) GetRequiredSignatures

func (api *API) GetRequiredSignatures(trx *operations.Transaction, keys ...string) ([]*string, error)

GetRequiredSignatures api request get_required_signatures

func (*API) GetSubAccountsOnSale

func (api *API) GetSubAccountsOnSale(from, limit uint32) ([]*SubAccountOnSale, error)

GetSubAccountsOnSale api request get_subaccounts_on_sale

func (*API) GetTransaction

func (api *API) GetTransaction(id string) (*operations.Transaction, error)

GetTransaction api request get_transaction

func (*API) GetTransactionHex

func (api *API) GetTransactionHex(trx *operations.Transaction) (*string, error)

GetTransactionHex api request get_transaction_hex

func (*API) GetVerifyAccountAuthority

func (api *API) GetVerifyAccountAuthority(accountName string, keys ...string) (*bool, error)

GetVerifyAccountAuthority api request verify_account_authority

func (*API) GetVerifyAuthority

func (api *API) GetVerifyAuthority(trx *operations.Transaction) (*bool, error)

GetVerifyAuthority api request verify_authority

func (*API) GetVestingDelegations

func (api *API) GetVestingDelegations(account, from, dtype string, limit ...uint32) ([]*VestingDelegation, error)

GetVestingDelegations api request get_vesting_delegations dtype:

delegated
any other

func (*API) GetWithdrawRoutes

func (api *API) GetWithdrawRoutes(accountName string, withdrawRouteType uint32) ([]*WithdrawVestingRoutes, error)

GetWithdrawRoutes api request get_withdraw_routes

withdrawRouteType: 0 = incoming 1 = outgoing 2 = all

func (*API) GetWitnessByAccount

func (api *API) GetWitnessByAccount(author string) (*Witness, error)

GetWitnessByAccount api request get_witness_by_account

func (*API) GetWitnessByVote

func (api *API) GetWitnessByVote(author string, limit uint32) ([]*Witness, error)

GetWitnessByVote api request get_witnesses_by_vote

func (*API) GetWitnessCount

func (api *API) GetWitnessCount() (*uint64, error)

GetWitnessCount api request get_witness_count

func (*API) GetWitnessSchedule

func (api *API) GetWitnessSchedule() (*WitnessSchedule, error)

GetWitnessSchedule api request get_witness_schedule

func (*API) GetWitnesses

func (api *API) GetWitnesses(id ...uint32) ([]*Witness, error)

GetWitnesses api request get_witnesses

func (*API) GetWitnessesByCountedVote

func (api *API) GetWitnessesByCountedVote(from string, limit uint32) ([]*Witness, error)

GetWitnessesByCountedVote api request lookup_witness_accounts

func (*API) LookupAccountNames

func (api *API) LookupAccountNames(accountNames ...string) ([]*Account, error)

LookupAccountNames api request lookup_account_names

func (*API) LookupAccounts

func (api *API) LookupAccounts(lowerBoundName string, limit uint32) ([]*string, error)

LookupAccounts api request lookup_accounts

func (*API) LookupWitnessAccounts

func (api *API) LookupWitnessAccounts(author string, limit uint32) ([]*string, error)

LookupWitnessAccounts api request lookup_witness_accounts

func (*API) SetBlockAppliedCallback

func (api *API) SetBlockAppliedCallback(notice func(header *CallbackBlockResponse, error error)) (err error)

Set callback to invoke as soon as a new block is applied

type Account

type Account struct {
	ID                     types.Int       `json:"id"`
	Name                   string          `json:"name"`
	Master                 types.Authority `json:"master_authority"`
	Active                 types.Authority `json:"active_authority"`
	Regular                types.Authority `json:"regular_authority"`
	MemoKey                string          `json:"memo_key"`
	JSONMetadata           string          `json:"json_metadata"`
	Proxy                  string          `json:"proxy"`
	Referrer               string          `json:"referrer"`
	LastMasterUpdate       types.Time      `json:"last_master_update"`
	LastAccountUpdate      types.Time      `json:"last_account_update"`
	Created                types.Time      `json:"created"`
	RecoveryAccount        string          `json:"recovery_account"`
	LastAccountRecovery    types.Time      `json:"last_account_recovery"`
	SubcontentCount        uint32          `json:"subcontent_count"`
	VoteCount              uint32          `json:"vote_count"`
	ContentCount           uint32          `json:"content_count"`
	AwardedRshares         uint64          `json:"awarded_rshares"`
	CustomSequence         uint64          `json:"custom_sequence"`
	CustomSequenceBlockNum uint64          `json:"custom_sequence_block_num"`
	Energy                 int32           `json:"energy"`
	LastVoteTime           types.Time      `json:"last_vote_time"`
	Balance                types.Asset     `json:"balance"`
	CurationRewards        uint64          `json:"curation_rewards"`
	PostingRewards         uint64          `json:"posting_rewards"`
	ReceiverAwards         uint64          `json:"receiver_awards"`
	BenefactorAwards       uint64          `json:"benefactor_awards"`
	VestingShares          types.Asset     `json:"vesting_shares"`
	DelegatedVestingShares types.Asset     `json:"delegated_vesting_shares"`
	ReceivedVestingShares  types.Asset     `json:"received_vesting_shares"`
	VestingWithdrawRate    types.Asset     `json:"vesting_withdraw_rate"`
	NextVestingWithdrawal  types.Time      `json:"next_vesting_withdrawal"`
	Withdrawn              json.Number     `json:"withdrawn"`
	ToWithdraw             json.Number     `json:"to_withdraw"`
	WithdrawRoutes         uint16          `json:"withdraw_routes"`
	ProxiedVsfVotes        []int64         `json:"proxied_vsf_votes"`
	WitnessesVotedFor      uint16          `json:"witnesses_voted_for"`
	WitnessesVoteWeight    json.Number     `json:"witnesses_vote_weight"`
	LastRootPost           types.Time      `json:"last_root_post"`
	LastPost               types.Time      `json:"last_post"`
	AverageBandwidth       json.Number     `json:"average_bandwidth"`
	LifetimeBandwidth      json.Number     `json:"lifetime_bandwidth"`
	LastBandwidthUpdate    types.Time      `json:"last_bandwidth_update"`
	WitnessVotes           []string        `json:"witness_votes"`
	Valid                  bool            `json:"valid"`
	AccountSeller          string          `json:"account_seller"`
	AccountOfferPrice      types.Asset     `json:"account_offer_price"`
	AccountOnSale          bool            `json:"account_on_sale"`
	SubaccountSeller       string          `json:"subaccount_seller"`
	SubaccountOfferPrice   types.Asset     `json:"subaccount_offer_price"`
	SubaccountOnSale       bool            `json:"subaccount_on_sale"`
}

Account structure for the GetAccounts and LookupAccountNames function

type AccountOnSale

type AccountOnSale struct {
	Account           string      `json:"account"`
	AccountSeller     string      `json:"account_seller"`
	AccountOfferPrice types.Asset `json:"account_offer_price"`
}

AccountOnSale structure for the GetAccountsOnSale function.

type AccountRecoveryRequest

type AccountRecoveryRequest struct {
	ID                 types.Int       `json:"id"`
	AccountToRecover   string          `json:"account_to_recover"`
	NewMasterAuthority types.Authority `json:"new_master_authority"`
	Expires            types.Time      `json:"expires"`
}

AccountRecoveryRequest structure for the GetRecoveryRequest function.

type Block

type Block struct {
	BlockHeader
	WitnessSignature string                   `json:"witness_signature"`
	Transactions     []operations.Transaction `json:"transactions"`
}

Block structure for the GetBlock function

type BlockHeader

type BlockHeader struct {
	Number                uint32        `json:"-"`
	Timestamp             types.Time    `json:"timestamp"`
	Witness               string        `json:"witness"`
	TransactionMerkleRoot string        `json:"transaction_merkle_root"`
	Previous              string        `json:"previous"`
	Extensions            []interface{} `json:"extensions"`
}

BlockHeader structure for the GetBlockHeader function

type BroadcastResponse

type BroadcastResponse struct {
	ID       string `json:"id"`
	BlockNum int32  `json:"block_num"`
	TrxNum   int32  `json:"trx_num"`
	Expired  bool   `json:"expired"`
}

BroadcastResponse structure for the BroadcastTransactionSynchronous function

type CallbackBlockResponse

type CallbackBlockResponse struct {
	BlockNum   int                                  `json:"block_num"`
	Operations []operations.CallbackBlockOperations `json:"operations"`
}

type CommitteeObject

type CommitteeObject struct {
	ID                     types.Int            `json:"id"`
	RequestID              uint32               `json:"request_id"`
	URL                    string               `json:"url"`
	Creator                string               `json:"creator"`
	Worker                 string               `json:"worker"`
	RequiredAmountMin      types.Asset          `json:"required_amount_min"`
	RequiredAmountMax      types.Asset          `json:"required_amount_max"`
	StartTime              types.Time           `json:"start_time"`
	Duration               uint32               `json:"duration"`
	EndTime                types.Time           `json:"end_time"`
	Status                 uint16               `json:"status"`
	VotesCount             uint32               `json:"votes_count"`
	ConclusionTime         types.Time           `json:"conclusion_time"`
	ConclusionPayoutAmount types.Asset          `json:"conclusion_payout_amount"`
	PayoutAmount           types.Asset          `json:"payout_amount"`
	RemainPayoutAmount     types.Asset          `json:"remain_payout_amount"`
	LastPayoutTime         types.Time           `json:"last_payout_time"`
	PayoutTime             types.Time           `json:"payout_time"`
	Votes                  []CommitteeVoteState `json:"votes"`
}

CommitteeObject structure for the GetCommitteeRequest function.

type CommitteeVoteState

type CommitteeVoteState struct {
	Voter       string     `json:"voter"`
	VotePercent int16      `json:"vote_percent"`
	LastUpdate  types.Time `json:"last_update"`
}

CommitteeVoteState structure for the GetCommitteeRequest function.

type Config

type Config struct {
	Percent100                       uint16 `json:"CHAIN_100_PERCENT"`
	Percent1                         uint16 `json:"CHAIN_1_PERCENT"`
	AddressPrefix                    string `json:"CHAIN_ADDRESS_PREFIX"`
	BandwidthAverageWindowSeconds    uint32 `json:"CHAIN_BANDWIDTH_AVERAGE_WINDOW_SECONDS"`
	BandwidthPrecision               uint32 `json:"CHAIN_BANDWIDTH_PRECISION"`
	ConsensusBandwidthReservePercent uint16 `json:"CONSENSUS_BANDWIDTH_RESERVE_PERCENT"`
	ConsensusBandwidthReserveBelow   uint32 `json:"CONSENSUS_BANDWIDTH_RESERVE_BELOW"`
	HardforkVersion                  string `json:"CHAIN_HARDFORK_VERSION"`
	Version                          string `json:"CHAIN_VERSION"`
	BlockInterval                    uint8  `json:"CHAIN_BLOCK_INTERVAL"`
	BlocksPerDay                     uint16 `json:"CHAIN_BLOCKS_PER_DAY"`
	BlocksPerYear                    uint32 `json:"CHAIN_BLOCKS_PER_YEAR"`
	CashoutWindowSeconds             uint32 `json:"CHAIN_CASHOUT_WINDOW_SECONDS"`
	ChainID                          string `json:"CHAIN_ID"`
	HardforkRequiredWitnesses        uint8  `json:"CHAIN_HARDFORK_REQUIRED_WITNESSES"`
	InitiatorName                    string `json:"CHAIN_INITIATOR_NAME"`
	InitiatorPublicKeyStr            string `json:"CHAIN_INITIATOR_PUBLIC_KEY_STR"`
	InitSupply                       string `json:"CHAIN_INIT_SUPPLY"`
	CommitteeAccount                 string `json:"CHAIN_COMMITTEE_ACCOUNT"`
	CommitteePublicKeyStr            string `json:"CHAIN_COMMITTEE_PUBLIC_KEY_STR"`
	IrreversibleThreshold            uint16 `json:"CHAIN_IRREVERSIBLE_THRESHOLD"`
	IrreversibleSupportMinRun        uint8  `json:"CHAIN_IRREVERSIBLE_SUPPORT_MIN_RUN"`
	MaxAccountNameLength             uint8  `json:"CHAIN_MAX_ACCOUNT_NAME_LENGTH"`
	MaxAccountWitnessVotes           uint8  `json:"CHAIN_MAX_ACCOUNT_WITNESS_VOTES"`
	BlockSize                        uint32 `json:"CHAIN_BLOCK_SIZE"`
	MaxCommentDepth                  uint32 `json:"CHAIN_MAX_COMMENT_DEPTH"`
	MaxMemoLength                    uint16 `json:"CHAIN_MAX_MEMO_LENGTH"`
	MaxWitnesses                     uint8  `json:"CHAIN_MAX_WITNESSES"`
	MaxProxyRecursionDepth           uint8  `json:"CHAIN_MAX_PROXY_RECURSION_DEPTH"`
	MaxReserveRatio                  uint16 `json:"CHAIN_MAX_RESERVE_RATIO"`
	MaxSupportWitnesses              uint8  `json:"CHAIN_MAX_SUPPORT_WITNESSES"`
	MaxShareSupply                   string `json:"CHAIN_MAX_SHARE_SUPPLY"`
	MaxSigCheckDepth                 uint8  `json:"CHAIN_MAX_SIG_CHECK_DEPTH"`
	MaxTimeUntilExpiration           uint16 `json:"CHAIN_MAX_TIME_UNTIL_EXPIRATION"`
	MaxTransactionSize               uint32 `json:"CHAIN_MAX_TRANSACTION_SIZE"`
	MaxUndoHistory                   uint16 `json:"CHAIN_MAX_UNDO_HISTORY"`
	MaxVoteChanges                   uint8  `json:"CHAIN_MAX_VOTE_CHANGES"`
	MaxTopWitnesses                  uint8  `json:"CHAIN_MAX_TOP_WITNESSES"`
	MaxWithdrawRoutes                uint8  `json:"CHAIN_MAX_WITHDRAW_ROUTES"`
	MaxWitnessURLLength              uint16 `json:"CHAIN_MAX_WITNESS_URL_LENGTH"`
	MinAccountCreationFee            uint16 `json:"CHAIN_MIN_ACCOUNT_CREATION_FEE"`
	MinAccountNameLength             uint8  `json:"CHAIN_MIN_ACCOUNT_NAME_LENGTH"`
	MinBlockSizeLimit                uint32 `json:"CHAIN_MIN_BLOCK_SIZE_LIMIT"`
	MaxBlockSizeLimit                uint32 `json:"CHAIN_MAX_BLOCK_SIZE_LIMIT"`
	NullAccount                      string `json:"CHAIN_NULL_ACCOUNT"`
	NumInitiators                    uint8  `json:"CHAIN_NUM_INITIATORS"`
	ProxyToSelfAccount               string `json:"CHAIN_PROXY_TO_SELF_ACCOUNT"`
	SecondsPerYear                   uint32 `json:"CHAIN_SECONDS_PER_YEAR"`
	VestingWithdrawIntervals         uint8  `json:"CHAIN_VESTING_WITHDRAW_INTERVALS"`
	VestingWithdrawIntervalSeconds   uint32 `json:"CHAIN_VESTING_WITHDRAW_INTERVAL_SECONDS"`
	EnergyRegenerationSeconds        uint32 `json:"CHAIN_ENERGY_REGENERATION_SECONDS"`
	TokenSymbol                      uint32 `json:"TOKEN_SYMBOL"`
	SharesSymbol                     string `json:"SHARES_SYMBOL"`
	ChainName                        string `json:"CHAIN_NAME"`
	BlockGenerationPostponedTxLimit  uint8  `json:"CHAIN_BLOCK_GENERATION_POSTPONED_TX_LIMIT"`
	PendingTransactionExecutionLimit uint32 `json:"CHAIN_PENDING_TRANSACTION_EXECUTION_LIMIT"`
}

Config structure for the GetConfig function.

type DatabaseInfo

type DatabaseInfo struct {
	TotalSize    string              `json:"total_size"`
	FreeSize     uint64              `json:"free_size"`
	ReservedSize uint64              `json:"reserved_size"`
	UsedSize     string              `json:"used_size"`
	IndexList    []DatabaseInfoIndex `json:"index_list"`
}

DatabaseInfo structure for the GetDatabaseInfo function.

type DatabaseInfoIndex

type DatabaseInfoIndex struct {
	Name        string `json:"name"`
	RecordCount uint64 `json:"record_count"`
}

DatabaseInfoIndex additional structure for the function GetDatabaseInfo.

type DynamicGlobalProperties

type DynamicGlobalProperties struct {
	ID                         types.Int   `json:"id"`
	HeadBlockNumber            uint32      `json:"head_block_number"`
	HeadBlockID                string      `json:"head_block_id"`
	GenesisTime                types.Time  `json:"genesis_time"`
	Time                       types.Time  `json:"time"`
	CurrentWitness             string      `json:"current_witness"`
	CommitteeFund              types.Asset `json:"committee_fund"`
	CommitteeRequests          uint32      `json:"committee_requests"`
	CurrentSupply              types.Asset `json:"current_supply"`
	TotalVersingFund           types.Asset `json:"total_vesting_fund"`
	TotalVestingShares         types.Asset `json:"total_vesting_shares"`
	TotalRewardFund            types.Asset `json:"total_reward_fund"`
	TotalRewardShares          string      `json:"total_reward_shares"`
	InflationCalcBlockNum      uint32      `json:"inflation_calc_block_num"`
	InflationWitnessPercent    int16       `json:"inflation_witness_percent"`
	InflationRatio             int16       `json:"inflation_ratio"`
	AverageBlockSize           uint32      `json:"average_block_size"`
	MaximumBlockSize           uint32      `json:"maximum_block_size"`
	CurrentAslot               uint64      `json:"current_aslot"`
	RecentSlotsFilled          string      `json:"recent_slots_filled"`
	ParticipationCount         uint8       `json:"participation_count"`
	LastIrreversibleBlockNum   uint32      `json:"last_irreversible_block_num"`
	MaxVirtualBandwidth        string      `json:"max_virtual_bandwidth"`
	CurrentReserveRatio        uint64      `json:"current_reserve_ratio"`
	VoteRegenerationPerDay     uint32      `json:"vote_regeneration_per_day"`
	BandwidthReserveCandidates uint32      `json:"bandwidth_reserve_candidates"`
}

DynamicGlobalProperties structure for the GetDynamicGlobalProperties function.

type Escrow

type Escrow struct {
	ID                   types.Int   `json:"id"`
	EscrowID             uint32      `json:"escrow_id"`
	From                 string      `json:"from"`
	To                   string      `json:"to"`
	Agent                string      `json:"agent"`
	RatificationDeadline types.Time  `json:"ratification_deadline"`
	EscrowExpiration     types.Time  `json:"escrow_expiration"`
	TokenBalance         types.Asset `json:"token_balance"`
	Fee                  types.Asset `json:"pending_fee"`
	ToApproved           bool        `json:"to_approved"`
	AgentApproved        bool        `json:"agent_approved"`
	Disputed             bool        `json:"disputed"`
	IsApproved           bool        `json:"is_approved"`
}

Escrow structure for the GetEscrow function.

type InviteObject

type InviteObject struct {
	ID             types.Int   `json:"id"`
	Creator        string      `json:"creator"`
	Receiver       string      `json:"receiver"`
	InviteKey      string      `json:"invite_key"`
	InviteSecret   string      `json:"invite_secret"`
	Balance        types.Asset `json:"balance"`
	ClaimedBalance types.Asset `json:"claimed_balance"`
	CreateTime     types.Time  `json:"create_time"`
	ClaimTime      types.Time  `json:"claim_time"`
	Status         uint16      `json:"status"`
}

InviteObject structure for the GetInviteById and GetInviteByKey function.

type MasterHistory

type MasterHistory struct {
	ID                      types.Int       `json:"id"`
	Account                 string          `json:"account"`
	PreviousMasterAuthority types.Authority `json:"previous_master_authority"`
	LastValidTime           string          `json:"last_valid_time"`
}

MasterHistory structure for the GetMasterHistory function.

type NextScheduledHardfork

type NextScheduledHardfork struct {
	HfVersion string     `json:"hf_version"`
	LiveTime  types.Time `json:"live_time"`
}

NextScheduledHardfork structure for the GetNextScheduledHardfork function.

type PaidSubscribeState

type PaidSubscribeState struct {
	ID          types.Int  `json:"id"`
	Subscriber  string     `json:"subscriber"`
	Creator     string     `json:"creator"`
	Level       uint16     `json:"level"`
	Amount      int64      `json:"amount"`
	Period      uint16     `json:"period"`
	StartTime   types.Time `json:"start_time"`
	NextTime    types.Time `json:"next_time"`
	EndTime     types.Time `json:"end_time"`
	Active      bool       `json:"active"`
	AutoRenewal bool       `json:"auto_renewal"`
}

PaidSubscribeState structure for the GetPaidSubscriptions function.

type PaidSubscription

type PaidSubscription struct {
	ID         types.Int  `json:"id"`
	Creator    string     `json:"creator"`
	URL        string     `json:"url"`
	Levels     uint16     `json:"levels"`
	Amount     int64      `json:"amount"`
	Period     uint16     `json:"period"`
	UpdateTime types.Time `json:"update_time"`
}

PaidSubscription structure for the GetPaidSubscriptions function.

type PaidSubscriptionState

type PaidSubscriptionState struct {
	ID                                            types.Int  `json:"id"`
	Creator                                       string     `json:"creator"`
	URL                                           string     `json:"url"`
	Levels                                        uint16     `json:"levels"`
	Amount                                        int64      `json:"amount"`
	Period                                        uint16     `json:"period"`
	UpdateTime                                    types.Time `json:"update_time"`
	ActiveSubscribers                             []string   `json:"active_subscribers"`
	ActiveSubscribersCount                        uint32     `json:"active_subscribers_count"`
	ActiveSubscribersSummaryAmount                int64      `json:"active_subscribers_summary_amount"`
	ActiveSubscribersWithAutoRenewal              []string   `json:"active_subscribers_with_auto_renewal"`
	ActiveSubscribersWithAutoRenewalCount         uint32     `json:"active_subscribers_with_auto_renewal_count"`
	ActiveSubscribersWithAutoRenewalSummaryAmount int64      `json:"active_subscribers_with_auto_renewal_summary_amount"`
}

PaidSubscriptionState structure for the GetPaidSubscriptionOptions function.

type ProposalObject

type ProposalObject struct {
	Author                    string                `json:"author"`
	Title                     string                `json:"title"`
	Memo                      string                `json:"memo"`
	ExpirationTime            types.Time            `json:"expiration_time"`
	ReviewPeriodTime          types.Time            `json:"review_period_time,omitempty"`
	ProposedOperations        operations.Operations `json:"proposed_operations"`
	RequiredActiveApprovals   []string              `json:"required_active_approvals"`
	AvailableActiveApprovals  []string              `json:"available_active_approvals"`
	RequiredOwnerApprovals    []string              `json:"required_owner_approvals"`
	AvailableOwnerApprovals   []string              `json:"available_owner_approvals"`
	RequiredPostingApprovals  []string              `json:"required_posting_approvals"`
	AvailablePostingApprovals []string              `json:"available_posting_approvals"`
	AvailableKeyApprovals     []string              `json:"available_key_approvals"`
}

ProposalObject structure for the GetProposedTransaction function.

type SubAccountOnSale

type SubAccountOnSale struct {
	Account           string      `json:"account"`
	AccountSeller     string      `json:"account_seller"`
	AccountOfferPrice types.Asset `json:"account_offer_price"`
}

SubAccountOnSale structure for the GetSubAccountsOnSale function.

type VestingDelegation

type VestingDelegation struct {
	ID                types.Int   `json:"id"`
	Delegator         string      `json:"delegator"`
	Delegatee         string      `json:"delegatee"`
	VestingShares     types.Asset `json:"vesting_shares"`
	MinDelegationTime types.Time  `json:"min_delegation_time"`
}

VestingDelegation structure for the GetVestingDelegations function.

type VestingDelegationExpiration

type VestingDelegationExpiration struct {
	ID            types.Int   `json:"id"`
	Delegator     string      `json:"delegator"`
	VestingShares types.Asset `json:"vesting_shares"`
	Expiration    types.Time  `json:"expiration"`
}

VestingDelegationExpiration structure for the GetExpiringVestingDelegations function.

type WithdrawVestingRoutes

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

WithdrawVestingRoutes structure for the GetWithdrawRoutes function.

type Witness

type Witness struct {
	ID                    types.Int             `json:"id"`
	Owner                 string                `json:"owner"`
	Created               types.Time            `json:"created"`
	URL                   string                `json:"url"`
	TotalMissed           uint32                `json:"total_missed"`
	LastAslot             uint64                `json:"last_aslot"`
	LastConfirmedBlockNum uint64                `json:"last_confirmed_block_num"`
	SigningKey            string                `json:"signing_key"`
	Props                 types.ChainProperties `json:"props"`
	Votes                 string                `json:"votes"`
	PenaltyPercent        uint32                `json:"penalty_percent"`
	CountedVotes          string                `json:"counted_votes"`
	VirtualLastUpdate     string                `json:"virtual_last_update"`
	VirtualPosition       string                `json:"virtual_position"`
	VirtualScheduledTime  string                `json:"virtual_scheduled_time"`
	LastWork              string                `json:"last_work"`
	RunningVersion        string                `json:"running_version"`
	HardforkVersionVote   string                `json:"hardfork_version_vote"`
	HardforkTimeVote      types.Time            `json:"hardfork_time_vote"`
}

Witness structure for the GetWitnessByAccount, GetWitnesses and GetWitnessByVote function.

type WitnessSchedule

type WitnessSchedule struct {
	ID                       types.Int             `json:"id"`
	CurrentVirtualTime       string                `json:"current_virtual_time"`
	NextShuffleBlockNum      uint32                `json:"next_shuffle_block_num"`
	CurrentShuffledWitnesses string                `json:"current_shuffled_witnesses"`
	NumScheduledWitnesses    uint8                 `json:"num_scheduled_witnesses"`
	MedianProps              types.ChainProperties `json:"median_props"`
	MajorityVersion          string                `json:"majority_version"`
}

WitnessSchedule structure for the GetWitnessSchedule function.

Jump to

Keyboard shortcuts

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