OperationManager
class Ditch.EOS.OperationManager
https://eosio.github.io/eos/group__eosiorpc.html
Methods
- Task<OperationResult<GetInfoResult>> GetInfo (CancellationToken token)
- Task<OperationResult<SignedBlock>> GetBlock (String blockNumOrId, CancellationToken token)
Get information related to a block.
curl http://127.0.0.1:8888/v1/chain/get_block -X POST -d '{"block_num_or_id":5}' curl http://127.0.0.1:8888/v1/chain/get_block -X POST -d '{"block_num_or_id":0000000445a9f27898383fd7de32835d5d6a978cc14ce40d9f327b5329de796b}'
- Task<OperationResult<GetAccountResults>> GetAccount (GetAccountParams accountParams, CancellationToken token)
Get information related to an account.
curl http://127.0.0.1:8888/v1/chain/get_account -X POST -d '{"account_name":"inita"}'
- Task<OperationResult<GetCodeResults>> GetCode (GetCodeParams codeParams, CancellationToken token)
Fetch smart contract code.
curl http://127.0.0.1:8888/v1/chain/get_code -X POST -d '{"account_name":"currency"}'
- Task<OperationResult<GetTableRowsResult>> GetTableRows (GetTableRowsParams tableRowsParams, CancellationToken token)
Fetch smart contract data from an account.
curl http://127.0.0.1:8888/v1/chain/get_table_rows -X POST -d '{"scope":"inita", "code":"currency", "table":"account", "json": true}' curl http://127.0.0.1:8888/v1/chain/get_table_rows -X POST -d '{"scope":"inita", "code":"currency", "table":"account", "json": true, "lower_bound":0, "upper_bound":-1, "limit":10}'
- Task<OperationResult<AbiJsonToBinResult>> AbiJsonToBin (AbiJsonToBinParams abiJsonToBinParams, CancellationToken token)
Serialize json to binary hex. The resulting binary hex is usually used for the data field in push_transaction.
curl http://127.0.0.1:8888/v1/chain/abi_json_to_bin -X POST -d '{"code":"currency", "action":"transfer", "args":{"from":"initb", "to":"initc", "quantity":1000}}'
- Task<OperationResult<AbiBinToJsonResult>> AbiBinToJson (AbiBinToJsonParams abiBinToJsonParams, CancellationToken token)
Serialize back binary hex to json.
curl http://127.0.0.1:8888/v1/chain/abi_bin_to_json -X POST -d '{"code":"currency", "action":"transfer", "binargs":"000000008093dd74000000000094dd74e803000000000000"}'
- Task<OperationResult<PushTransactionResults>> PushTransaction (Object pushTransactionParams, CancellationToken token)
This method expects a transaction in JSON format and will attempt to apply it to the blockchain
curl http://localhost:8888/v1/chain/push_transaction -X POST -d '{"ref_block_num":"100","ref_block_prefix":"137469861","expiration":"2017-09-25T06:28:49","scope":["initb","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["initb","initc"],"authorization":[{"account":"initb","permission":"active"}],"data":"000000000041934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}'
- Task<OperationResult<PushTransactionResults[]>> PushTransactions (Object[] pushTransactionParams, CancellationToken token)
This method push multiple transactions at once.
curl http://localhost:8888/v1/chain/push_transaction -X POST -d '[{"ref_block_num":"101","ref_block_prefix":"4159312339","expiration":"2017-09-25T06:28:49","scope":["initb","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["initb","initc"],"authorization":[{"account":"initb","permission":"active"}],"data":"000000000041934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}, {"ref_block_num":"101","ref_block_prefix":"4159312339","expiration":"2017-09-25T06:28:49","scope":["inita","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["inita","initc"],"authorization":[{"account":"inita","permission":"active"}],"data":"000000008040934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}]'
- Task<OperationResult<GetRequiredKeysResult>> GetRequiredKeys (GetRequiredKeysParams getRequiredKeysParams, CancellationToken token)
/v1/chain/get_required_keys {"transaction":{"expiration":"2018-04-10T12:26:15","region":0,"ref_block_num":44,"ref_block_prefix":104196284,"max_net_usage_words":0,"max_kcpu_usage":0,"delay_sec":0,"context_free_actions":[],"actions":[{"account":"currency","name":"transfer","authorization":[{"actor":"currency","permission":"active"}],"data":"0000001e4d75af46000000008090b1ca4015e73b000000000456494d00000000"}]},"available_keys":["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","EOS7drQWvc7Mn7NK2PivjbAqLXMyBpvSNnZWnZC3CS61g1dhVK57o","EOS8KLWY5tcczw6tTkk4UhfeZJrES7ECiFZAkChcR2mwsFcArURn7"]}
- String TryConnectTo (List<String> urls, CancellationToken token)
- Task<OperationResult<T>> CustomGetRequest (String endpoint, Dictionary<String, Object> parameters, CancellationToken token)
- Task<OperationResult<T>> CustomGetRequest (String endpoint, CancellationToken token)
- Task<OperationResult<T>> CustomPostRequest (String endpoint, Object data, CancellationToken token)
- Task<OperationResult<String>> WalletCreate (String name, CancellationToken token)
WalletCreate a new wallet with the given name
- Task<OperationResult<VoidResponse>> WalletOpen (String name, CancellationToken token)
Open an existing wallet of the given name
curl http://localhost:8889/v1/wallet/open -X POST -d '"default"'
- Task<OperationResult<VoidResponse>> WalletLock (String name, CancellationToken token)
Lock a wallet of the given name
curl http://localhost:8889/v1/wallet/lock -X POST -d '"default"'
- Task<OperationResult<VoidResponse>> WalletLockAll (CancellationToken token)
Lock a wallets
curl http://localhost:8889/v1/wallet/lock_all
- Task<OperationResult<VoidResponse>> WalletUnlock (String name, String password, CancellationToken token)
Unlock a wallet with the given name and password
curl http://localhost:8889/v1/wallet/unlock -X POST -d '["default", "PW5KFWYKqvt63d4iNvedfDEPVZL227D3RQ1zpVFzuUwhMAJmRAYyX"]'
- Task<OperationResult<VoidResponse>> WalletImportKey (String name, String password, CancellationToken token)
Import a private key to the wallet of the given name
curl http://localhost:8889/v1/wallet/import_key -X POST -d '["default","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]'
- Task<OperationResult<String[]>> WalletList (CancellationToken token)
List all wallets
curl http://localhost:8889/v1/wallet/list_wallets
- Task<OperationResult<String[][]>> WalletListKeys (CancellationToken token)
List all key pairs across all wallets
curl http://localhost:8889/v1/wallet/list_keys
- Task<OperationResult<String[]>> WalletGetPublicKeys (CancellationToken token)
List all public keys across all wallets
curl http://localhost:8889/v1/wallet/get_public_keys
- Task<OperationResult<VoidResponse>> WalletSetTimeout (Int64 seconds, CancellationToken token)
Set wallet auto lock timeout(in seconds)
curl http://localhost:8889/v1/wallet/set_timeout -X POST -d '10'
- Task<OperationResult<SignedTransaction>> WalletSignTrx (SignedTransaction trx, String[] publicKeys, String chainId, CancellationToken token)
Sign transaction given an array of transaction, require public keys, and chain id
curl http://localhost:8889/v1/wallet/sign_transaction -X POST -d '[{"ref_block_num":21453,"ref_block_prefix":3165644999,"expiration":"2017-12-08T10:28:49","scope":["initb","initc"],"read_scope":[],"messages":[{"code":"currency","type":"transfer","authorization":[{"account":"initb","permission":"active"}],"data":"000000008093dd74000000000094dd74e803000000000000"}],"signatures":[]}, ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"], ""]'
AbiDef
class Ditch.EOS.Models.AbiDef
abi_def libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- TypeDef[] Types
API name: types
- StructDef[] Structs
API name: structs
- ActionDef[] Actions
API name: actions
- TableDef[] Tables
API name: tables
- ClausePair[] RicardianClauses
API name: ricardian_clauses
Action
class Ditch.EOS.Models.Action
action contracts\eosiolib\action.hpp
Properties and Fields
- String Account
API name: account
- String Name
API name: name
- PermissionLevel[] Authorization
API name: authorization
- String Data
API name: data
ActionDef
class Ditch.EOS.Models.ActionDef
action_def libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- String Name
API name: name
- String Type
API name: type
- String RicardianContract
API name: ricardian_contract
Authority
class Ditch.EOS.Models.Authority
authority contracts\eosio.system\native.hpp
Properties and Fields
- UInt32 Threshold
API name: threshold
- KeyWeight[] Keys
API name: keys
- PermissionLevelWeight[] Accounts
API name: accounts
BlockHeader
class Ditch.EOS.Models.BlockHeader
block_header contracts\eosio.system\eosio.system.hpp
Properties and Fields
- UInt32 BlockNum
API name: block_num
- String Previous
API name: previous
- DateTime Timestamp
API name: timestamp
- String TransactionMroot
API name: transaction_mroot
- String ActionMroot
API name: action_mroot
- String BlockMroot
API name: block_mroot
- String Producer
API name: producer
- UInt32 ScheduleVersion
API name: schedule_version
- ProducerSchedule NewProducers
API name: new_producers
ClausePair
class Ditch.EOS.Models.ClausePair
clause_pair libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- String Id
API name: id
- String Body
API name: body
FieldDef
class Ditch.EOS.Models.FieldDef
field_def libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- String Name
API name: name
- String Type
API name: type
KeyWeight
class Ditch.EOS.Models.KeyWeight
key_weight contracts\eosio.system\native.hpp
Properties and Fields
- PublicKey Key
API name: key
- UInt16 Weight
API name: weight
PackedTransaction
class Ditch.EOS.Models.PackedTransaction
packed_transaction libraries\chain\include\eosio\chain\transaction.hpp
Properties and Fields
- Object[] Signatures
API name: signatures
- CompressionType Compression
API name: compression
- Char PackedContextFreeData
API name: packed_context_free_data
- Char PackedTrx
API name: packed_trx
Permission
class Ditch.EOS.Models.Permission
permission plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String PermName
API name: perm_name
- String Parent
API name: parent
- Authority RequiredAuth
API name: required_auth
PermissionLevel
class Ditch.EOS.Models.PermissionLevel
permission_level contracts\eosiolib\action.hpp
Properties and Fields
- String Actor
API name: actor
- String Permission
API name: permission
PermissionLevelWeight
class Ditch.EOS.Models.PermissionLevelWeight
permission_level_weight contracts\eosio.system\native.hpp
Properties and Fields
- PermissionLevel Permission
API name: permission
- UInt16 Weight
API name: weight
ProducerKey
class Ditch.EOS.Models.ProducerKey
producer_key contracts\eosiolib\privileged.hpp
Properties and Fields
- String ProducerName
API name: producer_name
- PublicKey BlockSigningKey
API name: block_signing_key
ProducerSchedule
class Ditch.EOS.Models.ProducerSchedule
producer_schedule contracts\eosiolib\privileged.hpp
Properties and Fields
- UInt32 Version
API name: version = 0; ///< sequentially incrementing version number
- ProducerKey[] Producers
API name: producers
PublicKey
class Ditch.EOS.Models.PublicKey
public_key contracts\eosiolib\public_key.hpp
Properties and Fields
- UInt32 Type
API name: type
- Char[] Data
API name: data
RegionSummary
class Ditch.EOS.Models.RegionSummary
region_summary libraries\chain\include\eosio\chain\block.hpp
Properties and Fields
- UInt16 Region
API name: region = 0;
- ShardSummary[][] CyclesSummary
API name: cycles_summary
ShardLock
class Ditch.EOS.Models.ShardLock
shard_lock libraries\chain\include\eosio\chain\block.hpp
Properties and Fields
- String Account
API name: account
- String Scope
API name: scope
ShardSummary
class Ditch.EOS.Models.ShardSummary
shard_summary libraries\chain\include\eosio\chain\block.hpp
Properties and Fields
- ShardLock[] ReadLocks
API name: read_locks
- ShardLock[] WriteLocks
API name: write_locks
- TransactionReceipt[] Transactions
API name: transactions new or generated transactions
SignedBlock
class Ditch.EOS.Models.SignedBlock: Ditch.EOS.Models.SignedBlockSummary
signed_block libraries\chain\include\eosio\chain\block.hpp
Properties and Fields
- PackedTransaction[] InputTransactions
SignedBlockHeader
class Ditch.EOS.Models.SignedBlockHeader: Ditch.EOS.Models.BlockHeader
signed_block_header libraries\chain\include\eosio\chain\block.hpp
Properties and Fields
- String Id
API name: block_id_type
- UInt32 RefBlockPrefix
API name: block_id_type
- String ProducerSignature
API name: producer_signature
SignedBlockSummary
class Ditch.EOS.Models.SignedBlockSummary: Ditch.EOS.Models.SignedBlockHeader
signed_block_summary libraries\chain\include\eosio\chain\block.hpp
Properties and Fields
- RegionSummary[] Regions
API name: regions
SignedTransaction
class Ditch.EOS.Models.SignedTransaction: Ditch.EOS.Models.Transaction
signed_transaction transaction.hpp
Properties and Fields
- String[] Signatures
API name: signatures
- Byte[] ContextFreeData
API name: context_free_data for each context-free action, there is an entry here
StructDef
class Ditch.EOS.Models.StructDef
struct_def libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- String Name
API name: name
- String Base
API name: base
- FieldDef[] Fields
API name: fields
TableDef
class Ditch.EOS.Models.TableDef
table_def libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- String Name
API name: name the name of the table
- String IndexType
API name: index_type the kind of index, i64, i128i128, etc
- String[] KeyNames
API name: key_names names for the keys defined by key_types
- String[] KeyTypes
API name: key_types the type of key parameters
- String Type
API name: type type of binary data stored in this table
Transaction
class Ditch.EOS.Models.Transaction: Ditch.EOS.Models.TransactionHeader
transaction libraries\chain\include\eosio\chain\transaction.hpp
Properties and Fields
- Action[] ContextFreeActions
API name: context_free_actions
- Action[] Actions
API name: actions
TransactionHeader
class Ditch.EOS.Models.TransactionHeader
transaction_header libraries\chain\include\eosio\chain\transaction.hpp
Properties and Fields
- DateTime Expiration
API name: expiration the time at which a transaction expires
- UInt16 Region
API name: region = 0U; ///< the computational memory region this transaction applies to.
- UInt16 RefBlockNum
API name: ref_block_num = 0U; ///< specifies a block num in the last 2^16 blocks.
- UInt32 RefBlockPrefix
API name: ref_block_prefix = 0UL; ///< specifies the lower 32 bits of the blockid at get_ref_blocknum
- UInt32 MaxNetUsageWords
API name: max_net_usage_words = 0UL; /// upper limit on total network bandwidth (in 8 byte words) billed for this transaction
- UInt32 MaxKcpuUsage
API name: max_kcpu_usage = 0UL; /// upper limit on the total number of kilo CPU usage units billed for this transaction
- UInt32 DelaySec
API name: delay_sec = 0UL; /// number of seconds to delay this transaction for during which it may be canceled.
TransactionReceipt
class Ditch.EOS.Models.TransactionReceipt
transaction_receipt libraries\chain\include\eosio\chain\transaction.hpp
Properties and Fields
- StatusEnum Status
API name: status
- UInt32 KcpuUsage
API name: kcpu_usage
- UInt32 NetUsageWords
API name: net_usage_words
- String Id
API name: id
TypeDef
class Ditch.EOS.Models.TypeDef
type_def libraries\chain\include\eosio\chain\contracts\types.hpp
Properties and Fields
- String NewTypeName
API name: new_type_name
- String Type
API name: type
AbiBinToJsonResult
class Ditch.EOS.Models.Results.AbiBinToJsonResult
abi_bin_to_json_result plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- Object Args
API name: args
- String[] RequiredScope
API name: required_scope
- String[] RequiredAuth
API name: required_auth
AbiJsonToBinResult
class Ditch.EOS.Models.Results.AbiJsonToBinResult
abi_json_to_bin_result plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String Binargs
API name: binargs
- String[] RequiredScope
API name: required_scope
- String[] RequiredAuth
API name: required_auth
GetAccountResults
class Ditch.EOS.Models.Results.GetAccountResults
get_account_results plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String AccountName
API name: account_name
- Permission[] Permissions
API name: permissions
GetBlockResult
class Ditch.EOS.Models.Results.GetBlockResult
https://eosio.github.io/eos/group__eosiorpc.html
Properties and Fields
- String Previous
- DateTime Timestamp
- String TransactionMerkleRoot
- String ActionMerkleRoot
- String BlockMerkleRoot
- UInt32 ScheduleVersion
- String Producer
- Object[] ProducerChanges
- String ProducerSignature
- Object[] Cycles
- String Id
- UInt32 BlockNum
- UInt32 RefBlockPrefix
GetCodeResults
class Ditch.EOS.Models.Results.GetCodeResults
get_code_results plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String AccountName
API name: account_name
- String Wast
API name: wast
- Object CodeHash
API name: code_hash
- AbiDef Abi
API name: abi
GetRequiredKeysResult
class Ditch.EOS.Models.Results.GetRequiredKeysResult
get_required_keys_result plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String[] RequiredKeys
API name: required_keys
GetTableRowsResult
class Ditch.EOS.Models.Results.GetTableRowsResult
get_table_rows_result plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- Object[] Rows
API name: rows one row per item, either encoded as hex String or JSON object
- Boolean More
API name: more = false; ///< true if last element in data is not the end and sizeof data()< limit
PushTransactionResults
class Ditch.EOS.Models.Results.PushTransactionResults
push_transaction_results plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String TransactionId
API name: transaction_id
- Object Processed
API name: processed
AbiBinToJsonParams
class Ditch.EOS.Models.Params.AbiBinToJsonParams
abi_bin_to_json_params plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String Code
API name: code
- String Action
API name: action
- String Binargs
API name: binargs
AbiJsonToBinParams
class Ditch.EOS.Models.Params.AbiJsonToBinParams
abi_json_to_bin_params plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String Code
API name: code
- String Action
API name: action
- Object Args
API name: args
GetAccountParams
class Ditch.EOS.Models.Params.GetAccountParams
get_account_params plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String AccountName
API name: account_name
GetCodeParams
class Ditch.EOS.Models.Params.GetCodeParams
get_code_params plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- String AccountName
API name: account_name
GetRequiredKeysParams
class Ditch.EOS.Models.Params.GetRequiredKeysParams
get_required_keys_params plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- Object Transaction
API name: transaction
- String[] AvailableKeys
API name: available_keys
GetTableRowsParams
class Ditch.EOS.Models.Params.GetTableRowsParams
get_table_rows_params plugins\chain_plugin\include\eosio\chain_plugin\chain_plugin.hpp
Properties and Fields
- Boolean Json
API name: json = false;
- String Code
API name: code
- String Scope
API name: scope
- String Table
API name: table
- String TableKey
API name: table_key
- String LowerBound
API name: lower_bound
- String UpperBound
API name: upper_bound
- UInt32 Limit
API name: limit = 10;
CompressionType
enum Ditch.EOS.Models.Enums.CompressionType
compression_type libraries\chain\include\eosio\chain\transaction.hpp
Enum Values
- None
- Zlib
StatusEnum
enum Ditch.EOS.Models.Enums.StatusEnum
status_enum libraries\chain\include\eosio\chain\transaction.hpp
Enum Values
- Executed
- SoftFail
- HardFail
- Delayed