EosBase

Client wrapper to interact with eos blockchains.

Summary

Members
Descriptions

private EosApi Api

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.

public async Task< Abi> GetAbi(string accountName)

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.

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.

Query producers information.

Query producers schedule.

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 EosApi Api

private AbiSerializationProvider AbiSerializer

public EosBase( EosConfiguratorconfig, IHttpHandler httpHandler)

Client wrapper constructor.

Parameters

  • config Configures client parameters

  • httpHandler Http handler implementation

public Task< GetInfoResponse> GetInfo()

Query for blockchain information.

Returns

Blockchain information

public Task< GetAccountResponse> GetAccount(string accountName)

Query for account information.

Parameters

  • accountName account to query information

Returns

account information

public Task< GetCodeResponse> GetCode(string accountName, bool codeAsWasm)

Query for smart contract detailed information.

Parameters

  • accountName smart contract account name

  • codeAsWasm query code as wasm, wast otherwise

Returns

smart contract information

public async Task< Abi> GetAbi(string accountName)

Query for smart contract abi detailed information.

Parameters

  • accountName smart contract account name

Returns

public Task< GetRawAbiResponse> GetRawAbi(string accountName, string abiHash)

Query for smart contract abi detailed information.

Parameters

  • accountName smart contract account name

  • abiHash TODO

Returns

smart contract abi information as Base64FcString

public Task< GetRawCodeAndAbiResponse> GetRawCodeAndAbi(string accountName)

Query for smart contract raw wasm and abi information.

Parameters

  • accountName smart 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

  • code smart contract account name

  • action action name

  • data action

Returns

public async Task< object > AbiBinToJson(string code, string action, string data)

Transform action data as packed binary format to object.

Parameters

  • code

  • action

  • data

Returns

public async Task< List< string > > GetRequiredKeys(List< string > availableKeys, Transaction trx)

Calculate required keys to sign the given transaction.

Parameters

  • availableKeys available public keys list

  • trx transaction requiring signatures

Returns

required public keys

public Task< GetBlockResponse> GetBlock(string blockNumOrId)

Query for blockchain block information.

Parameters

  • blockNumOrId block number or id to query information

Returns

block information

public Task< GetBlockHeaderStateResponse> GetBlockHeaderState(string blockNumOrId)

Query block head state information.

Parameters

  • blockNumOrId block number or id

Returns

TODO

public async Task< GetTableRowsResponse< TRowType > > GetTableRows< TRowType >( GetTableRowsRequest request)

Query for blockchain smart contract table state information.

Parameters

  • TRowType Type used for each row

Parameters

  • request.Json Request rows using json or raw format

  • request.Code accountName of the contract to search for table rows

  • request.Scope scope text segmenting the table set

  • request.Table table name

  • request.TableKey unused so far?

  • request.LowerBound lower bound for the selected index value

  • request.UpperBound upper bound for the selected index value

  • request.KeyType Type of the index choosen, ex: i64

  • request.IndexPosition 1 - 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.Json Request rows using json or raw format

  • request.Code accountName of the contract to search for table rows

  • request.Scope scope text segmenting the table set

  • request.Table table name

  • request.TableKey unused so far?

  • request.LowerBound lower bound for the selected index value

  • request.UpperBound upper bound for the selected index value

  • request.KeyType Type of the index choosen, ex: i64

  • request.IndexPosition 1 - 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

  • code token smart contract account

  • account account name to check

  • symbol token symbol (optional)

Returns

token balances

public async Task< Dictionary< string, CurrencyStat> > GetCurrencyStats(string code, string symbol)

Query token statistics.

Parameters

  • code token smart contract account

  • symbol token symbol (optional)

Returns

currencies statistics

public async Task< GetProducersResponse> GetProducers( GetProducersRequest request)

Query producers information.

Parameters

  • request.json get list as json

  • request.lower_bound lower bound for the selected index value

  • request.limit limit 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.json get list as json

  • request.lower_bound lower bound for the selected index value

  • request.limit limit 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

  • trx Transaction to send

  • requiredKeys Override 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

  • trx Transaction to sign

  • requiredKeys Override required keys to sign transaction

Returns

transaction id

public async Task< string > BroadcastTransaction( SignedTransaction strx)

Broadcast signed transaction to the network.

Parameters

  • strx Signed transaction to send

Returns

public Task< GetActionsResponse> GetActions(string accountName, Int32 pos, Int32 offset)

Query for account actions log.

Parameters

  • accountName account to query information

  • pos Absolute sequence positon -1 is the end/last action

  • offset Number 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

  • transactionId transaction id

Returns

Transaction information

public async Task< List< string > > GetKeyAccounts(string publicKey)

Query public key accounts.

Parameters

  • publicKey public key

Returns

account names

public async Task< List< string > > GetControlledAccounts(string accountName)

Query controlled accounts by a given account.

Parameters

  • accountName account name to search

Returns

controlled account names

Last updated