EosBase
Client wrapper to interact with eos blockchains.
Summary
private EosConfigurator EosConfig
public EosBase( EosConfiguratorconfig, IHttpHandler httpHandler)
Client wrapper constructor.
public Task< GetInfoResponse> GetInfo()
Query for blockchain information.
public Task< GetAccountResponse> GetAccount(string accountName)
Query for account information.
public Task< GetCodeResponse> GetCode(string accountName, bool codeAsWasm)
Query for smart contract detailed information.
Query for smart contract abi detailed information.
public Task< GetRawAbiResponse> GetRawAbi(string accountName, string abiHash)
Query for smart contract abi detailed information.
public Task< GetRawCodeAndAbiResponse> GetRawCodeAndAbi(string accountName)
Query for smart contract raw wasm and abi information.
public async Task< string > AbiJsonToBin(string code, string action, object data)
Transform action data to packed binary format.
public async Task< object > AbiBinToJson(string code, string action, string data)
Transform action data as packed binary format to object.
public async Task< List< string > > GetRequiredKeys(List< string > availableKeys, Transaction trx)
Calculate required keys to sign the given transaction.
public Task< GetBlockResponse> GetBlock(string blockNumOrId)
Query for blockchain block information.
public Task< GetBlockHeaderStateResponse> GetBlockHeaderState(string blockNumOrId)
Query block head state information.
public async Task< GetTableRowsResponse< TRowType > > GetTableRows< TRowType >( GetTableRowsRequest request)
Query for blockchain smart contract table state information.
public async Task< GetTableRowsResponse> GetTableRows( GetTableRowsRequest request)
Query for blockchain smart contract table state information.
public async Task< List< string > > GetCurrencyBalance(string code, string account, string symbol)
Query account balance for a given token.
public async Task< Dictionary< string, CurrencyStat> > GetCurrencyStats(string code, string symbol)
Query token statistics.
public async Task< GetProducersResponse> GetProducers( GetProducersRequest request)
Query producers information.
public Task< GetProducerScheduleResponse> GetProducerSchedule()
Query producers schedule.
public async Task< GetScheduledTransactionsResponse> GetScheduledTransactions( GetScheduledTransactionsRequest request)
Query scheduled transactions.
public async Task< string > CreateTransaction( Transaction trx, List< string > requiredKeys)
Creates a signed transaction using the signature provider and broadcasts it to the network.
public async Task< SignedTransaction> SignTransaction( Transaction trx, List< string > requiredKeys)
Creates a signed transaction using the signature provider.
public async Task< string > BroadcastTransaction( SignedTransaction strx)
Broadcast signed transaction to the network.
public Task< GetActionsResponse> GetActions(string accountName, Int32 pos, Int32 offset)
Query for account actions log.
public Task< GetTransactionResponse> GetTransaction(string transactionId, UInt32? blockNumberHint)
Query transaction information.
public async Task< List< string > > GetKeyAccounts(string publicKey)
Query public key accounts.
public async Task< List< string > > GetControlledAccounts(string accountName)
Query controlled accounts by a given account.
Members
private EosConfigurator EosConfig
private AbiSerializationProvider AbiSerializer
public EosBase( EosConfiguratorconfig, IHttpHandler httpHandler)
Client wrapper constructor.
Parameters
configConfigures client parametershttpHandlerHttp handler implementation
public Task< GetInfoResponse> GetInfo()
Query for blockchain information.
Returns
Blockchain information
public Task< GetAccountResponse> GetAccount(string accountName)
Query for account information.
Parameters
accountNameaccount to query information
Returns
account information
public Task< GetCodeResponse> GetCode(string accountName, bool codeAsWasm)
Query for smart contract detailed information.
Parameters
accountNamesmart contract account namecodeAsWasmquery code as wasm, wast otherwise
Returns
smart contract information
public async Task< Abi> GetAbi(string accountName)
Query for smart contract abi detailed information.
Parameters
accountNamesmart contract account name
Returns
public Task< GetRawAbiResponse> GetRawAbi(string accountName, string abiHash)
Query for smart contract abi detailed information.
Parameters
accountNamesmart contract account nameabiHashTODO
Returns
smart contract abi information as Base64FcString
public Task< GetRawCodeAndAbiResponse> GetRawCodeAndAbi(string accountName)
Query for smart contract raw wasm and abi information.
Parameters
accountNamesmart contract account name
Returns
smart contract wasm and abi information
public async Task< string > AbiJsonToBin(string code, string action, object data)
Transform action data to packed binary format.
Parameters
codesmart contract account nameactionaction namedataaction
Returns
public async Task< object > AbiBinToJson(string code, string action, string data)
Transform action data as packed binary format to object.
Parameters
codeactiondata
Returns
public async Task< List< string > > GetRequiredKeys(List< string > availableKeys, Transaction trx)
Calculate required keys to sign the given transaction.
Parameters
availableKeysavailable public keys listtrxtransaction requiring signatures
Returns
required public keys
public Task< GetBlockResponse> GetBlock(string blockNumOrId)
Query for blockchain block information.
Parameters
blockNumOrIdblock number or id to query information
Returns
block information
public Task< GetBlockHeaderStateResponse> GetBlockHeaderState(string blockNumOrId)
Query block head state information.
Parameters
blockNumOrIdblock number or id
Returns
TODO
public async Task< GetTableRowsResponse< TRowType > > GetTableRows< TRowType >( GetTableRowsRequest request)
Query for blockchain smart contract table state information.
Parameters
TRowTypeType used for each row
Parameters
request.JsonRequest rows using json or raw formatrequest.CodeaccountName of the contract to search for table rowsrequest.Scopescope text segmenting the table setrequest.Tabletable namerequest.TableKeyunused so far?request.LowerBoundlower bound for the selected index valuerequest.UpperBoundupper bound for the selected index valuerequest.KeyTypeType of the index choosen, ex: i64request.IndexPosition1 - primary(first), 2 - secondary index(in order defined by multi_index), 3 - third index, etc
Returns
Rows and if is there More rows to be fetched
public async Task< GetTableRowsResponse> GetTableRows( GetTableRowsRequest request)
Query for blockchain smart contract table state information.
Parameters
request.JsonRequest rows using json or raw formatrequest.CodeaccountName of the contract to search for table rowsrequest.Scopescope text segmenting the table setrequest.Tabletable namerequest.TableKeyunused so far?request.LowerBoundlower bound for the selected index valuerequest.UpperBoundupper bound for the selected index valuerequest.KeyTypeType of the index choosen, ex: i64request.IndexPosition1 - primary(first), 2 - secondary index(in order defined by multi_index), 3 - third index, etc
Returns
Rows and if is there More rows to be fetched
public async Task< List< string > > GetCurrencyBalance(string code, string account, string symbol)
Query account balance for a given token.
Parameters
codetoken smart contract accountaccountaccount name to checksymboltoken symbol (optional)
Returns
token balances
public async Task< Dictionary< string, CurrencyStat> > GetCurrencyStats(string code, string symbol)
Query token statistics.
Parameters
codetoken smart contract accountsymboltoken symbol (optional)
Returns
currencies statistics
public async Task< GetProducersResponse> GetProducers( GetProducersRequest request)
Query producers information.
Parameters
request.jsonget list as jsonrequest.lower_boundlower bound for the selected index valuerequest.limitlimit the amount of results. Default 50
Returns
producers information
public Task< GetProducerScheduleResponse> GetProducerSchedule()
Query producers schedule.
Returns
Active, pending and proposed schedule
public async Task< GetScheduledTransactionsResponse> GetScheduledTransactions( GetScheduledTransactionsRequest request)
Query scheduled transactions.
Parameters
request.jsonget list as jsonrequest.lower_boundlower bound for the selected index valuerequest.limitlimit the amount of results. Default 50
Returns
Scheduled transactions
public async Task< string > CreateTransaction( Transaction trx, List< string > requiredKeys)
Creates a signed transaction using the signature provider and broadcasts it to the network.
Parameters
trxTransaction to sendrequiredKeysOverride required keys to sign transaction
Returns
transaction id
public async Task< SignedTransaction> SignTransaction( Transaction trx, List< string > requiredKeys)
Creates a signed transaction using the signature provider.
Parameters
trxTransaction to signrequiredKeysOverride required keys to sign transaction
Returns
transaction id
public async Task< string > BroadcastTransaction( SignedTransaction strx)
Broadcast signed transaction to the network.
Parameters
strxSigned transaction to send
Returns
public Task< GetActionsResponse> GetActions(string accountName, Int32 pos, Int32 offset)
Query for account actions log.
Parameters
accountNameaccount to query informationposAbsolute sequence positon -1 is the end/last actionoffsetNumber of actions relative to pos, negative numbers return [pos-offset,pos), positive numbers return [pos,pos+offset)
Returns
public Task< GetTransactionResponse> GetTransaction(string transactionId, UInt32? blockNumberHint)
Query transaction information.
Parameters
transactionIdtransaction id
Returns
Transaction information
public async Task< List< string > > GetKeyAccounts(string publicKey)
Query public key accounts.
Parameters
publicKeypublic key
Returns
account names
public async Task< List< string > > GetControlledAccounts(string accountName)
Query controlled accounts by a given account.
Parameters
accountNameaccount name to search
Returns
controlled account names
Last updated