Documentation ¶
Index ¶
- Constants
- func ClearDirectoryContents(p string)
- func CopyInlineRow(obj *KeyValueObject, data *[]byte)
- func GetAbi(db *chain.Controller, account common.Name) abi_serializer.AbiDef
- func GetTableType(abi *abi_serializer.AbiDef, tableName common.TableName) string
- type AbiBinToJsonParams
- type AbiBinToJsonResult
- type AbiJsonToBinParams
- type AbiJsonToBinReuslt
- type Blob
- type ChainPlugin
- func (c *ChainPlugin) AcceptBlock(block *types.SignedBlock)
- func (c *ChainPlugin) AcceptTransaction(trx *types.PackedTransaction, next chain_interface.NextFunction)
- func (c *ChainPlugin) Chain() *chain.Controller
- func (c *ChainPlugin) ExportReversibleBlocks(reversibleDir string, reversibleBlocksFile string) bool
- func (c *ChainPlugin) GetAbiSerializerMaxTime() Microseconds
- func (c *ChainPlugin) GetChainId() ChainIdType
- func (c *ChainPlugin) GetReadOnlyApi() *ReadOnly
- func (c *ChainPlugin) GetReadWriteApi() *ReadWrite
- func (c *ChainPlugin) HandleDbExhaustion()
- func (c *ChainPlugin) HandleGuardException(e GuardExceptions)
- func (c *ChainPlugin) ImportReversibleBlocks(reversibleDir string, cacheSize uint32, reversibleBlocksFile string) bool
- func (c *ChainPlugin) PluginInitialize(options *cli.Context)
- func (c *ChainPlugin) PluginShutdown()
- func (c *ChainPlugin) PluginStartup()
- func (c *ChainPlugin) RecoverReversibleBlocks(dbDir string, cacheSize uint32, newDbDir string, truncateAtBlock uint32) bool
- func (c *ChainPlugin) SetProgramOptions(options *[]cli.Flag)
- type ChainPluginImpl
- type GetAbiParams
- type GetAbiResult
- type GetAccountParams
- type GetAccountResult
- type GetBlockHeaderStateParams
- type GetBlockHeaderStateResult
- type GetBlockParams
- type GetBlockResult
- type GetCodeHashParams
- type GetCodeHashResults
- type GetCodeParams
- type GetCodeResult
- type GetCurrencyBalanceParams
- type GetCurrencyBalanceResult
- type GetCurrencyStatsParams
- type GetCurrencyStatsResult
- type GetInfoResult
- type GetProducerScheduleParams
- type GetProducerScheduleResult
- type GetProducersParams
- type GetProducersResult
- type GetRawAbiParams
- type GetRawAbiResult
- type GetRawCodeAndAbiParams
- type GetRawCodeAndAbiResults
- type GetRequiredKeysParams
- type GetRequiredKeysResult
- type GetScheduleTransactionReuslt
- type GetScheduledTransactionParams
- type GetTableByScopeParams
- type GetTableByScopeResult
- type GetTableByScopeResultRow
- type GetTableRowsParams
- type GetTableRowsResult
- type Permission
- type PushBlockParams
- type PushTransactionParams
- type PushTransactionResult
- type RamMarketExchangeState
- type ReadOnly
- func (ro *ReadOnly) ExtractCoreSymbol() common.Symbol
- func (ro *ReadOnly) GetAbi(params GetAbiParams) GetAbiResult
- func (ro *ReadOnly) GetAccount(params GetAccountParams) GetAccountResult
- func (ro *ReadOnly) GetBlock(params GetBlockParams) *GetBlockResult
- func (ro *ReadOnly) GetBlockHeaderState(params GetBlockHeaderStateParams) GetBlockHeaderStateResult
- func (ro *ReadOnly) GetCode(params GetCodeParams) GetCodeResult
- func (ro *ReadOnly) GetCurrencyBalance(params GetCurrencyBalanceParams) GetCurrencyBalanceResult
- func (ro *ReadOnly) GetCurrencyStats(params GetCurrencyStatsParams) map[string]GetCurrencyStatsResult
- func (ro *ReadOnly) GetInfo() *GetInfoResult
- func (ro *ReadOnly) GetProducerSchedule() GetProducerScheduleResult
- func (ro *ReadOnly) GetRequiredKeys(params GetRequiredKeysParams) GetRequiredKeysResult
- func (ro *ReadOnly) GetTableByScope(p GetTableByScopeParams) GetTableByScopeResult
- func (ro *ReadOnly) GetTableIndexName(p GetTableRowsParams, primary *bool) uint64
- func (ro *ReadOnly) GetTableRows(p GetTableRowsParams) GetTableRowsResult
- func (ro *ReadOnly) GetTableRowsEx(p GetTableRowsParams, abi *abi_serializer.AbiDef) GetTableRowsResult
- func (ro *ReadOnly) SetShortenAbiErrors(f bool)
- func (ro *ReadOnly) WalkKeyValueTable(code, scope, table common.Name, f func(KeyValueObject) bool)
- type ReadWrite
Constants ¶
View Source
const ChainPlug = PluginTypeName("ChainPlugin")
View Source
const (
KEYi64 = "i64"
)
View Source
const SizeofGetCurrencyStatsResult int = 40
Variables ¶
This section is empty.
Functions ¶
func ClearDirectoryContents ¶
func ClearDirectoryContents(p string)
func CopyInlineRow ¶
func CopyInlineRow(obj *KeyValueObject, data *[]byte)
func GetAbi ¶
func GetAbi(db *chain.Controller, account common.Name) abi_serializer.AbiDef
func GetTableType ¶
func GetTableType(abi *abi_serializer.AbiDef, tableName common.TableName) string
Types ¶
type AbiBinToJsonParams ¶
type AbiBinToJsonResult ¶
type AbiJsonToBinParams ¶
type AbiJsonToBinReuslt ¶
type AbiJsonToBinReuslt struct {
Binargs []byte `json:"binargs"`
}
type ChainPlugin ¶
type ChainPlugin struct { AbstractPlugin // contains filtered or unexported fields }
func NewChainPlugin ¶
func NewChainPlugin() *ChainPlugin
func (*ChainPlugin) AcceptBlock ¶
func (c *ChainPlugin) AcceptBlock(block *types.SignedBlock)
func (*ChainPlugin) AcceptTransaction ¶
func (c *ChainPlugin) AcceptTransaction(trx *types.PackedTransaction, next chain_interface.NextFunction)
func (*ChainPlugin) Chain ¶
func (c *ChainPlugin) Chain() *chain.Controller
func (*ChainPlugin) ExportReversibleBlocks ¶
func (c *ChainPlugin) ExportReversibleBlocks(reversibleDir string, reversibleBlocksFile string) bool
func (*ChainPlugin) GetAbiSerializerMaxTime ¶
func (c *ChainPlugin) GetAbiSerializerMaxTime() Microseconds
func (*ChainPlugin) GetChainId ¶
func (c *ChainPlugin) GetChainId() ChainIdType
func (*ChainPlugin) GetReadOnlyApi ¶
func (c *ChainPlugin) GetReadOnlyApi() *ReadOnly
func (*ChainPlugin) GetReadWriteApi ¶
func (c *ChainPlugin) GetReadWriteApi() *ReadWrite
func (*ChainPlugin) HandleDbExhaustion ¶
func (c *ChainPlugin) HandleDbExhaustion()
func (*ChainPlugin) HandleGuardException ¶
func (c *ChainPlugin) HandleGuardException(e GuardExceptions)
func (*ChainPlugin) ImportReversibleBlocks ¶
func (c *ChainPlugin) ImportReversibleBlocks(reversibleDir string, cacheSize uint32, reversibleBlocksFile string) bool
func (*ChainPlugin) PluginInitialize ¶
func (c *ChainPlugin) PluginInitialize(options *cli.Context)
func (*ChainPlugin) PluginShutdown ¶
func (c *ChainPlugin) PluginShutdown()
func (*ChainPlugin) PluginStartup ¶
func (c *ChainPlugin) PluginStartup()
func (*ChainPlugin) RecoverReversibleBlocks ¶
func (*ChainPlugin) SetProgramOptions ¶
func (c *ChainPlugin) SetProgramOptions(options *[]cli.Flag)
type ChainPluginImpl ¶
type ChainPluginImpl struct { BlockDir asio.Path Readonly bool ForkDB *chain.ForkDatabase BlockLogger *chain.BlockLog ChainConfig *chain.Config Chain *chain.Controller ChainId common.ChainIdType //fc::optional<vm_type> wasm_runtime; AbiSerializerMaxTimeMs common.Microseconds // retained references to channels for easy publication PreAcceptedBlockChannel include.Channel AcceptedBlockHeaderChannel include.Channel AcceptedBlockChannel include.Channel IrreversibleBlockChannel include.Channel AcceptedTransactionChannel include.Channel AppliedTransactionChannel include.Channel AcceptedConfirmationChannel include.Channel IncomingBlockChannel include.Channel // retained references to methods for easy calling IncomingBlockSyncMethod *include.Method IncomingTransactionAsyncMethod *include.Method // method provider handles GetBlockByNumberProvider *include.Method GetBlockByIdProvider *include.Method GetHeadBlockIdProvider *include.Method GetLastIrreversibleBlockNumberProvider *include.Method }
func NewChainPluginImpl ¶
func NewChainPluginImpl() *ChainPluginImpl
type GetAbiParams ¶
type GetAbiResult ¶
type GetAbiResult struct { AccountName common.Name `json:"account_name"` Abi abi_serializer.AbiDef `json:"abi"` }
type GetAccountParams ¶
type GetAccountParams struct { AccountName common.AccountName `json:"account_name"` ExpectedCoreSymbol *common.Symbol `json:"expected_core_symbol"` }
type GetAccountResult ¶
type GetAccountResult struct { AccountName common.AccountName `json:"account_name"` HeadBlockNum uint32 `json:"head_block_num"` HeadBlockTime common.TimePoint `json:"head_block_time"` Privileged bool `json:"privileged"` LastCodeUpdate common.TimePoint `json:"last_code_update"` Created common.TimePoint `json:"created"` CoreLiquidBalance common.Asset `json:"core_liquid_balance"` RAMQuota int64 `json:"ram_quota"` NetWeight int64 `json:"net_weight"` CPUWeight int64 `json:"cpu_weight"` NetLimit types.AccountResourceLimit `json:"net_limit"` CpuLimit types.AccountResourceLimit `json:"cpu_limit"` RAMUsage int64 `json:"ram_usage"` Permissions []Permission `json:"permissions"` TotalResources common.Variant `json:"total_resources"` SelfDelegatedBandwidth common.Variant `json:"self_delegated_bandwidth"` RefundRequest common.Variant `json:"refund_request"` VoterInfo common.Variant `json:"voter_info"` }
type GetBlockHeaderStateParams ¶
type GetBlockHeaderStateParams struct {
BlockNumOrID string `json:"block_num_or_id"`
}
type GetBlockHeaderStateResult ¶
type GetBlockHeaderStateResult = types.BlockHeaderState
type GetBlockParams ¶
type GetBlockParams struct {
BlockNumOrID string `json:"block_num_or_id"`
}
type GetBlockResult ¶
type GetBlockResult struct { SignedBlock *types.SignedBlock `json:"signed_block"` ID common.BlockIdType `json:"id"` BlockNum uint32 `json:"block_num"` RefBlockPrefix uint32 `json:"ref_block_prefix"` }
type GetCodeHashParams ¶
type GetCodeHashParams struct {
AccountName common.AccountName `json:"account_name"`
}
type GetCodeHashResults ¶
type GetCodeParams ¶
type GetCodeResult ¶
type GetCurrencyStatsParams ¶
type GetCurrencyStatsResult ¶
type GetInfoResult ¶
type GetInfoResult struct { ServerVersion string `json:"server_version"` ChainID common.ChainIdType `json:"chain_id"` HeadBlockNum uint32 `json:"head_block_num"` LastIrreversibleBlockNum uint32 `json:"last_irreversible_block_num"` LastIrreversibleBlockID common.BlockIdType `json:"last_irreversible_block_id"` HeadBlockID common.BlockIdType `json:"head_block_id"` HeadBlockTime common.TimePoint `json:"head_block_time"` HeadBlockProducer common.AccountName `json:"head_block_producer"` VirtualBlockCPULimit uint64 `json:"virtual_block_cpu_limit"` VirtualBlockNetLimit uint64 `json:"virtual_block_net_limit"` BlockCPULimit uint64 `json:"block_cpu_limit"` BlockNetLimit uint64 `json:"block_net_limit"` ServerVersionString string `json:"server_version_string"` }
type GetProducerScheduleParams ¶
type GetProducerScheduleParams struct { }
type GetProducersParams ¶
type GetProducersResult ¶
type GetProducersResult struct { Rows []common.Variant `json:"rows"` //one row per item, either encoded as hex string or JSON object TotalProducerVoteWeight float64 `json:"total_producer_vote_weight"` //TODO C++ double More string `json:"more"` //fill lower_bound with this value to fetch more rows }
type GetRawAbiParams ¶
type GetRawAbiResult ¶
type GetRawCodeAndAbiParams ¶
type GetRawCodeAndAbiResults ¶
type GetRequiredKeysParams ¶
type GetRequiredKeysResult ¶
type GetRequiredKeysResult struct {
RequiredKeys PublicKeySet `json:"required_keys"`
}
type GetTableByScopeParams ¶
type GetTableByScopeParams struct { Code common.Name `json:"code"` // mandatory Table common.Name `json:"table"` // optional, act as filter =0 LowerBound string `json:"lower_bound"` // lower bound of scope, optional UpperBound string `json:"upper_bound"` // upper bound of scope, optional Limit uint32 `json:"limit"` //=10 }
type GetTableByScopeResult ¶
type GetTableByScopeResult struct { Rows []GetTableByScopeResultRow More string //< fill lower_bound with this value to fetch more rows }
type GetTableRowsParams ¶
type GetTableRowsParams struct { JSON bool `json:"json"` Code common.Name `json:"code"` Scope string `json:"scope"` Table common.Name `json:"table"` TableKey string `json:"table_key"` LowerBound string `json:"lower_bound"` UpperBound string `json:"upper_bound"` Limit uint32 `json:"limit,omitempty"` // defaults to 10 => chain_plugin.hpp:struct get_table_rows_params KeyType string `json:"key_type"` // type of key specified by index_position IndexPosition string `json:"index_position"` // 1 - primary (first), 2 - secondary index (in order defined by multi_index), 3 - third index, etc EncodeType string `json:"encode_type"` //dec, hex , default=dec }
type GetTableRowsResult ¶
type Permission ¶
type PushBlockParams ¶
type PushBlockParams = types.SignedBlock
type PushTransactionParams ¶
type PushTransactionParams = map[string]interface{}
type PushTransactionResult ¶
type PushTransactionResult struct { TransactionId common.TransactionIdType Processed map[string]interface{} }
type RamMarketExchangeState ¶
type ReadOnly ¶
type ReadOnly struct {
// contains filtered or unexported fields
}
func NewReadOnly ¶
func NewReadOnly(db *chain.Controller, abiSerializerMaxTime common.Microseconds) *ReadOnly
func (*ReadOnly) ExtractCoreSymbol ¶
func (*ReadOnly) GetAbi ¶
func (ro *ReadOnly) GetAbi(params GetAbiParams) GetAbiResult
func (*ReadOnly) GetAccount ¶
func (ro *ReadOnly) GetAccount(params GetAccountParams) GetAccountResult
func (*ReadOnly) GetBlock ¶
func (ro *ReadOnly) GetBlock(params GetBlockParams) *GetBlockResult
func (*ReadOnly) GetBlockHeaderState ¶
func (ro *ReadOnly) GetBlockHeaderState(params GetBlockHeaderStateParams) GetBlockHeaderStateResult
func (*ReadOnly) GetCode ¶
func (ro *ReadOnly) GetCode(params GetCodeParams) GetCodeResult
func (*ReadOnly) GetCurrencyBalance ¶
func (ro *ReadOnly) GetCurrencyBalance(params GetCurrencyBalanceParams) GetCurrencyBalanceResult
func (*ReadOnly) GetCurrencyStats ¶
func (ro *ReadOnly) GetCurrencyStats(params GetCurrencyStatsParams) map[string]GetCurrencyStatsResult
func (*ReadOnly) GetInfo ¶
func (ro *ReadOnly) GetInfo() *GetInfoResult
func (*ReadOnly) GetProducerSchedule ¶
func (ro *ReadOnly) GetProducerSchedule() GetProducerScheduleResult
func (*ReadOnly) GetRequiredKeys ¶
func (ro *ReadOnly) GetRequiredKeys(params GetRequiredKeysParams) GetRequiredKeysResult
func (*ReadOnly) GetTableByScope ¶
func (ro *ReadOnly) GetTableByScope(p GetTableByScopeParams) GetTableByScopeResult
func (*ReadOnly) GetTableIndexName ¶
func (ro *ReadOnly) GetTableIndexName(p GetTableRowsParams, primary *bool) uint64
func (*ReadOnly) GetTableRows ¶
func (ro *ReadOnly) GetTableRows(p GetTableRowsParams) GetTableRowsResult
func (*ReadOnly) GetTableRowsEx ¶
func (ro *ReadOnly) GetTableRowsEx(p GetTableRowsParams, abi *abi_serializer.AbiDef) GetTableRowsResult
func (*ReadOnly) SetShortenAbiErrors ¶
type ReadWrite ¶
type ReadWrite struct {
// contains filtered or unexported fields
}
func NewReadWrite ¶
func NewReadWrite(db *chain.Controller, abiSerializerMaxTime common.Microseconds) *ReadWrite
func (*ReadWrite) PushBlock ¶
func (rw *ReadWrite) PushBlock(params PushBlockParams, next NextFunction)
func (*ReadWrite) PushTransaction ¶
func (rw *ReadWrite) PushTransaction(params PushTransactionParams, next NextFunction)
Click to show internal directories.
Click to hide internal directories.