EosioRpcProvider
public class EosioRpcProvider
extension EosioRpcProvider: EosioRpcProviderProtocol
Default RPC Provider implementation. Conforms to EosioRpcProviderProtocol
.
RPC Reference: https://developers.eos.io/eosio-nodeos/reference
-
The blockchain ID that all RPC calls for an active instance of EosioRpcProvider should be interacting with.
Declaration
Swift
public var chainId: String?
-
Initialize the default RPC Provider implementation with one RPC node endpoint.
Declaration
Swift
public convenience init(endpoint: URL, retries: Int = 3, delayBeforeRetry: Int = 1)
Parameters
endpoint
A node URL.
retries
Number of times to retry an endpoint before failing (default is 3 tries).
delayBeforeRetry
Number of seconds to wait between each retry (default is 1 second).
-
Initialize the default RPC Provider implementation with a list of RPC node endpoints. Extra endpoints will be used for failover purposes.
Declaration
Swift
public init(endpoints: [URL], retries: Int = 3, delayBeforeRetry: Int = 1)
Parameters
endpoints
A list of node URLs.
retries
Number of times to retry an endpoint before failing over to the next (default is 3 tries).
delayBeforeRetry
Number of seconds to wait between each retry (default is 1 second).
-
Call
chain/get_account
. Fetch an account by account name.Declaration
Swift
public func getAccount(requestParameters: EosioRpcAccountRequest, completion: @escaping (EosioResult<EosioRpcAccountResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcAccountResponse
and an optionalEosioError
. -
Call
chain/get_block
. Get a block by block number or ID.Declaration
Swift
public func getBlock(requestParameters: EosioRpcBlockRequest, completion: @escaping (EosioResult<EosioRpcBlockResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcBlockResponse
and an optionalEosioError
. -
Call
chain/get_block_info
. Get a block by block number or ID.Declaration
Swift
public func getBlockInfo(requestParameters: EosioRpcBlockInfoRequest, completion: @escaping (EosioResult<EosioRpcBlockInfoResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcBlockInfoResponse
and an optionalEosioError
. -
Call
chain/get_info
. Get information about the chain and node.Declaration
Swift
public func getInfo(completion: @escaping (EosioResult<EosioRpcInfoResponse, EosioError>) -> Void)
Parameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcInfoResponse
and an optionalEosioError
. -
Call
chain/push_transaction
. Push a transaction to the blockchain!Declaration
Swift
public func pushTransaction(requestParameters: EosioRpcPushTransactionRequest, completion: @escaping (EosioResult<EosioRpcTransactionResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcTransactionResponse
and an optionalEosioError
. -
Call
chain/push_transactions
. Push multiple transactions to the chain.Declaration
Swift
public func pushTransactions(requestParameters: EosioRpcPushTransactionsRequest, completion: @escaping (EosioResult<EosioRpcPushTransactionsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcPushTransactionsResponse
and an optionalEosioError
. -
Call
chain/send_transaction
. Send a transaction to the blockchain!Declaration
Swift
public func sendTransaction(requestParameters: EosioRpcSendTransactionRequest, completion: @escaping (EosioResult<EosioRpcTransactionResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcTransactionResponse
and an optionalEosioError
. -
Call
chain/send_transactions
. Send multiple transactions to the chain.Declaration
Swift
public func sendTransactions(requestParameters: EosioRpcSendTransactionsRequest, completion: @escaping (EosioResult<EosioRpcSendTransactionsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcSendTransactionsResponse
and an optionalEosioError
. -
Call
chain/get_block_header_state
.Declaration
Swift
public func getBlockHeaderState(requestParameters: EosioRpcBlockHeaderStateRequest, completion: @escaping (EosioResult<EosioRpcBlockHeaderStateResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcBlockHeaderStateResponse
and an optionalEosioError
. -
Call
chain/get_abi
. Fetch an ABI by account/contract name.Declaration
Swift
public func getAbi(requestParameters: EosioRpcAbiRequest, completion: @escaping (EosioResult<EosioRpcAbiResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcAbiResponse
and an optionalEosioError
. -
Call
chain/get_currency_balance
.Declaration
Swift
public func getCurrencyBalance(requestParameters: EosioRpcCurrencyBalanceRequest, completion: @escaping (EosioResult<EosioRpcCurrencyBalanceResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcCurrencyBalanceResponse
and an optionalEosioError
. -
Call
chain/get_currency_stats
.Declaration
Swift
public func getCurrencyStats(requestParameters: EosioRpcCurrencyStatsRequest, completion: @escaping (EosioResult<EosioRpcCurrencyStatsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcCurrencyStatsResponse
and an optionalEosioError
. -
Call
chain/get_required_keys
. Pass in a transaction and an array of available keys. Get back the subset of those keys required for signing the transaction.Declaration
Swift
public func getRequiredKeys(requestParameters: EosioRpcRequiredKeysRequest, completion: @escaping (EosioResult<EosioRpcRequiredKeysResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcRequiredKeysResponse
and an optionalEosioError
. -
Call
chain/get_producers
.Declaration
Swift
public func getProducers(requestParameters: EosioRpcProducersRequest, completion: @escaping (EosioResult<EosioRpcProducersResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcProducersResponse
and an optionalEosioError
. -
Call
chain/get_raw_code_and_abi
.Declaration
Swift
public func getRawCodeAndAbi(requestParameters: EosioRpcRawCodeAndAbiRequest, completion: @escaping (EosioResult<EosioRpcRawCodeAndAbiResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcRawCodeAndAbiResponse
and an optionalEosioError
. -
Call
chain/get_raw_code_and_abi
. Convenience method called with simple account name.Declaration
Swift
public func getRawCodeAndAbi(accountName: String, completion: @escaping (EosioResult<EosioRpcRawCodeAndAbiResponse, EosioError>) -> Void)
Parameters
accountName
The account name, as a String.
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcRawCodeAndAbiResponse
and an optionalEosioError
. -
Call
chain/get_table_by_scope
.Declaration
Swift
public func getTableByScope(requestParameters: EosioRpcTableByScopeRequest, completion: @escaping (EosioResult<EosioRpcTableByScopeResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcTableByScopeResponse
and an optionalEosioError
. -
Call
chain/get_table_rows
. Returns an object containing rows from the specified table.Declaration
Swift
public func getTableRows(requestParameters: EosioRpcTableRowsRequest, completion: @escaping (EosioResult<EosioRpcTableRowsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcTableRowsResponse
and an optionalEosioError
. -
Call
chain/get_kv_table_rows
. Returns an object containing rows from the specified table.Declaration
Swift
public func getKvTableRows(requestParameters: EosioRpcKvTableRowsRequest, completion: @escaping (EosioResult<EosioRpcKvTableRowsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcKvTableRowsResponse
and an optionalEosioError
. -
Call
chain/get_code
.Declaration
Swift
public func getCode(requestParameters: EosioRpcCodeRequest, completion: @escaping (EosioResult<EosioRpcCodeResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcCodeResponse
and an optionalEosioError
. -
Call
chain/get_code
. Convenience method called with simple account name.Declaration
Swift
public func getCode(accountName: String, completion: @escaping (EosioResult<EosioRpcCodeResponse, EosioError>) -> Void)
Parameters
accountName
The account/contract name, as a String.
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcCodeResponse
and an optionalEosioError
. -
Call
chain/get_raw_abi
. Get a raw abi.Declaration
Swift
public func getRawAbi(requestParameters: EosioRpcRawAbiRequest, completion: @escaping (EosioResult<EosioRpcRawAbiResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcRawAbiResponse
and an optionalEosioError
. -
Call
history/get_actions
.Declaration
Swift
public func getActions(requestParameters: EosioRpcHistoryActionsRequest, completion: @escaping (EosioResult<EosioRpcActionsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcActionsResponse
and an optionalEosioError
. -
Call
history/get_transaction
.Declaration
Swift
public func getTransaction(requestParameters: EosioRpcHistoryTransactionRequest, completion: @escaping (EosioResult<EosioRpcGetTransactionResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcGetTransactionResponse
and an optionalEosioError
. -
Call
history/get_key_accounts
.Declaration
Swift
public func getKeyAccounts(requestParameters: EosioRpcHistoryKeyAccountsRequest, completion: @escaping (EosioResult<EosioRpcKeyAccountsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcKeyAccountsResponse
and an optionalEosioError
. -
Call
history/get_controlled_accounts
.Declaration
Swift
public func getControlledAccounts(requestParameters: EosioRpcHistoryControlledAccountsRequest, completion: @escaping (EosioResult<EosioRpcControlledAccountsResponse, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of anEosioRpcControlledAccountsResponse
and an optionalEosioError
. -
Call
chain/get_account
and get a Publisher back. Fetch an account by account name.Declaration
Swift
public func getAccountPublisher(requestParameters: EosioRpcAccountRequest) -> AnyPublisher<EosioRpcAccountResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcAccountResponse
or rejected with anEosioError
. -
Call
chain/get_block
and get a Publisher back. Get a block by block number or ID.Declaration
Swift
public func getBlockPublisher(requestParameters: EosioRpcBlockRequest) -> AnyPublisher<EosioRpcBlockResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcBlockResponse
or rejected with anEosioError
. -
Call
chain/get_block_info
and get a Publisher back. Get a block by block number.Declaration
Swift
public func getBlockInfoPublisher(requestParameters: EosioRpcBlockInfoRequest) -> AnyPublisher<EosioRpcBlockInfoResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcBlockInfoResponse
or rejected with anEosioError
. -
Call
chain/get_info
and get a Publisher back. Get information about the chain and node.Declaration
Swift
public func getInfoPublisher() -> AnyPublisher<EosioRpcInfoResponse, EosioError>
Return Value
A Publisher fulfilled with an
EosioRpcInfoResponse
or rejected with anEosioError
. -
Call
chain/push_transaction
and get a Publisher back. Push a transaction to the blockchain!Declaration
Swift
public func pushTransactionPublisher(requestParameters: EosioRpcPushTransactionRequest) -> AnyPublisher<EosioRpcTransactionResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcTransactionResponse
or rejected with anEosioError
. -
Call
chain/push_transactions
and get a Publisher back. Push multiple transactions to the chain.Declaration
Swift
public func pushTransactionsPublisher(requestParameters: EosioRpcPushTransactionsRequest) -> AnyPublisher<EosioRpcPushTransactionsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcPushTransactionsResponse
or rejected with anEosioError
. -
Call
chain/send_transaction
and get a Publisher back. Send a transaction to the blockchain!Declaration
Swift
public func sendTransactionPublisher(requestParameters: EosioRpcSendTransactionRequest) -> AnyPublisher<EosioRpcTransactionResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcTransactionResponse
or rejected with anEosioError
. -
Call
chain/send_transactions
and get a Publisher back. Send multiple transactions to the chain.Declaration
Swift
public func sendTransactionsPublisher(requestParameters: EosioRpcSendTransactionsRequest) -> AnyPublisher<EosioRpcSendTransactionsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcSendTransactionsResponse
or rejected with anEosioError
. -
Call
chain/get_block_header_state
and get a Publisher back.Declaration
Swift
public func getBlockHeaderStatePublisher(requestParameters: EosioRpcBlockHeaderStateRequest) -> AnyPublisher<EosioRpcBlockHeaderStateResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcBlockHeaderStateResponse
or rejected with anEosioError
. -
Call
chain/get_abi
and get a Publisher back. Fetch an ABI by account/contract name.Declaration
Swift
public func getAbiPublisher(requestParameters: EosioRpcAbiRequest) -> AnyPublisher<EosioRpcAbiResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcAbiResponse
or rejected with anEosioError
. -
Call
chain/get_currency_balance
and get a Publisher back.Declaration
Swift
public func getCurrencyBalancePublisher(requestParameters: EosioRpcCurrencyBalanceRequest) -> AnyPublisher<EosioRpcCurrencyBalanceResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcCurrencyBalanceResponse
or rejected with anEosioError
. -
Call
chain/get_currency_stats
and get a Publisher back.Declaration
Swift
public func getCurrencyStatsPublisher(requestParameters: EosioRpcCurrencyStatsRequest) -> AnyPublisher<EosioRpcCurrencyStatsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcCurrencyStatsResponse
or rejected with anEosioError
. -
Call
chain/get_required_keys
and get a Publisher back. Pass in a transaction and an array of available keys. Get back the subset of those keys required for signing the transaction.Declaration
Swift
public func getRequiredKeysPublisher(requestParameters: EosioRpcRequiredKeysRequest) -> AnyPublisher<EosioRpcRequiredKeysResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcRequiredKeysResponse
or rejected with anEosioError
. -
Call
chain/get_producers
and get a Publisher back.Declaration
Swift
public func getProducersPublisher(requestParameters: EosioRpcProducersRequest) -> AnyPublisher<EosioRpcProducersResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcProducersResponse
or rejected with anEosioError
. -
Call
chain/get_raw_code_and_abi
and get a Publisher back.Declaration
Swift
public func getRawCodeAndAbiPublisher(requestParameters: EosioRpcRawCodeAndAbiRequest) -> AnyPublisher<EosioRpcRawCodeAndAbiResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcRawCodeAndAbiResponse
or rejected with anEosioError
. -
Call
chain/get_raw_code_and_abi
and get a Publisher back. Convenience method called with simple account name.Declaration
Swift
public func getRawCodeAndAbiPublisher(accountName: String) -> AnyPublisher<EosioRpcRawCodeAndAbiResponse, EosioError>
Parameters
accountName
The account/contract name, as a String.
Return Value
A Publisher fulfilled with an
EosioRpcRawCodeAndAbiResponse
or rejected with anEosioError
. -
Call
chain/get_table_by_scope
and get a Publisher back.Declaration
Swift
public func getTableByScopePublisher(requestParameters: EosioRpcTableByScopeRequest) -> AnyPublisher<EosioRpcTableByScopeResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcTableByScopeResponse
or rejected with anEosioError
. -
Call
chain/get_table_rows
and get a Publisher back. Returns an object containing rows from the specified table.Declaration
Swift
public func getTableRowsPublisher(requestParameters: EosioRpcTableRowsRequest) -> AnyPublisher<EosioRpcTableRowsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcTableRowsResponse
or rejected with anEosioError
. -
Call
chain/get_kv_table_rows
and get a Publisher back. Returns an object containing rows from the specified table.Declaration
Swift
public func getKvTableRowsPublisher(requestParameters: EosioRpcKvTableRowsRequest) -> AnyPublisher<EosioRpcKvTableRowsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcKvTableRowsResponse
or rejected with anEosioError
. -
Call
chain/get_code
and get a Publisher back.Declaration
Swift
public func getCodePublisher(requestParameters: EosioRpcCodeRequest) -> AnyPublisher<EosioRpcCodeResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcCodeResponse
or rejected with anEosioError
. -
Call
chain/get_code
and geta Publisher back. Convenience method called with simple account name.Declaration
Swift
public func getCodePublisher(accountName: String) -> AnyPublisher<EosioRpcCodeResponse, EosioError>
Parameters
accountName
The account/contract name, as a String.
Return Value
A Publisher fulfilled with an
EosioRpcCodeResponse
or rejected with anEosioError
. -
Call
chain/get_raw_abi
and get a Publisher back. Get a raw abi.Declaration
Swift
public func getRawAbiPublisher(requestParameters: EosioRpcRawAbiRequest) -> AnyPublisher<EosioRpcRawAbiResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcRawAbiResponse
or rejected with anEosioError
. -
Call
history/get_actions
and get a Publisher back.Declaration
Swift
public func getActionsPublisher(requestParameters: EosioRpcHistoryActionsRequest) -> AnyPublisher<EosioRpcActionsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcActionsResponse
or rejected with anEosioError
. -
Call
history/get_transaction
and get a Publisher back.Declaration
Swift
public func getTransactionPublisher(requestParameters: EosioRpcHistoryTransactionRequest) -> AnyPublisher<EosioRpcGetTransactionResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcGetTransactionResponse
or rejected with anEosioError
. -
Call
history/get_key_accounts
and get a Publisher back.Declaration
Swift
public func getKeyAccountsPublisher(requestParameters: EosioRpcHistoryKeyAccountsRequest) -> AnyPublisher<EosioRpcKeyAccountsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcKeyAccountsResponse
or rejected with anEosioError
. -
Call
history/get_controlled_accounts
and get a Publisher back.Declaration
Swift
public func getControlledAccountsPublisher(requestParameters: EosioRpcHistoryControlledAccountsRequest) -> AnyPublisher<EosioRpcControlledAccountsResponse, EosioError>
Parameters
requestParameters
Return Value
A Publisher fulfilled with an
EosioRpcControlledAccountsResponse
or rejected with anEosioError
.
RPC methods used by EosioTransaction
. These force conformance only to the protocols, not the entire response structs.
-
Call
chain/get_info
. This method is called byEosioTransaction
, as it only enforces the response protocol, not the entire response struct.Declaration
Swift
public func getInfoBase(completion: @escaping (EosioResult<EosioRpcInfoResponseProtocol, EosioError>) -> Void)
Parameters
completion
Called with the response, as an
EosioResult
consisting of a response conforming toEosioRpcInfoResponseProtocol
and an optionalEosioError
. -
Call
chain/get_block_info
. This method is called byEosioTransaction
, as it only enforces the response protocol, not the entire response struct.Declaration
Swift
public func getBlockInfoBase(requestParameters: EosioRpcBlockInfoRequest, completion: @escaping (EosioResult<EosioRpcBlockInfoResponseProtocol, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of a response conforming toEosioRpcBlockResponseProtocol
and an optionalEosioError
. -
Call
chain/get_raw_abi
. This method is called byEosioTransaction
, as it only enforces the response protocol, not the entire response struct.Declaration
Swift
public func getRawAbiBase(requestParameters: EosioRpcRawAbiRequest, completion: @escaping (EosioResult<EosioRpcRawAbiResponseProtocol, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of a response conforming toEosioRpcRawAbiResponseProtocol
and an optionalEosioError
. -
Call
chain/get_required_keys
. This method is called byEosioTransaction
, as it only enforces the response protocol, not the entire response struct.Declaration
Swift
public func getRequiredKeysBase(requestParameters: EosioRpcRequiredKeysRequest, completion: @escaping (EosioResult<EosioRpcRequiredKeysResponseProtocol, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of a response conforming toEosioRpcRequiredKeysResponseProtocol
and an optionalEosioError
. -
Call
chain/push_transaction
. This method is called byEosioTransaction
, as it only enforces the response protocol, not the entire response struct.Declaration
Swift
public func pushTransactionBase(requestParameters: EosioRpcPushTransactionRequest, completion: @escaping (EosioResult<EosioRpcTransactionResponseProtocol, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of a response conforming toEosioRpcTransactionResponseProtocol
and an optionalEosioError
. -
Call
chain/send_transaction
. This method is called byEosioTransaction
, as it only enforces the response protocol, not the entire response struct.Declaration
Swift
public func sendTransactionBase(requestParameters: EosioRpcSendTransactionRequest, completion: @escaping (EosioResult<EosioRpcTransactionResponseProtocol, EosioError>) -> Void)
Parameters
requestParameters
completion
Called with the response, as an
EosioResult
consisting of a response conforming toEosioRpcTransactionResponseProtocol
and an optionalEosioError
.
-
Call
chain/get_account
and get a Promise back. Fetch an account by account name.Declaration
Swift
public func getAccount(_: PMKNamespacer, requestParameters: EosioRpcAccountRequest) -> Promise<EosioRpcAccountResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcAccountResponse
or rejected with anEosioError
. -
Call
chain/get_block
and get a Promise back. Get a block by block number or ID.Declaration
Swift
public func getBlock(_: PMKNamespacer, requestParameters: EosioRpcBlockRequest) -> Promise<EosioRpcBlockResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcBlockResponse
or rejected with anEosioError
. -
Call
chain/get_block_info
and get a Promise back. Get a block by block number.Declaration
Swift
public func getBlockInfo(_: PMKNamespacer, requestParameters: EosioRpcBlockInfoRequest) -> Promise<EosioRpcBlockInfoResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcBlockInfoResponse
or rejected with anEosioError
. -
Call
chain/get_info
and get a Promise back. Get information about the chain and node.Declaration
Swift
public func getInfo(_: PMKNamespacer) -> Promise<EosioRpcInfoResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.Return Value
A Promise fulfilled with an
EosioRpcInfoResponse
or rejected with anEosioError
. -
Call
chain/push_transaction
and get a Promise back. Push a transaction to the blockchain!Declaration
Swift
public func pushTransaction(_: PMKNamespacer, requestParameters: EosioRpcPushTransactionRequest) -> Promise<EosioRpcTransactionResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcTransactionResponse
or rejected with anEosioError
. -
Call
chain/push_transactions
and get a Promise back. Push multiple transactions to the chain.Declaration
Swift
public func pushTransactions(_: PMKNamespacer, requestParameters: EosioRpcPushTransactionsRequest) -> Promise<EosioRpcPushTransactionsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcPushTransactionsResponse
or rejected with anEosioError
. -
Call
chain/send_transaction
and get a Promise back. Send a transaction to the blockchain!Declaration
Swift
public func sendTransaction(_: PMKNamespacer, requestParameters: EosioRpcSendTransactionRequest) -> Promise<EosioRpcTransactionResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcTransactionResponse
or rejected with anEosioError
. -
Call
chain/send_transactions
and get a Promise back. Send multiple transactions to the chain.Declaration
Swift
public func sendTransactions(_: PMKNamespacer, requestParameters: EosioRpcSendTransactionsRequest) -> Promise<EosioRpcSendTransactionsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcSendTransactionsResponse
or rejected with anEosioError
. -
Call
chain/get_block_header_state
and get a Promise back.Declaration
Swift
public func getBlockHeaderState(_: PMKNamespacer, requestParameters: EosioRpcBlockHeaderStateRequest) -> Promise<EosioRpcBlockHeaderStateResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcBlockHeaderStateResponse
or rejected with anEosioError
. -
Call
chain/get_abi
and get a Promise back. Fetch an ABI by account/contract name.Declaration
Swift
public func getAbi(_: PMKNamespacer, requestParameters: EosioRpcAbiRequest) -> Promise<EosioRpcAbiResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcAbiResponse
or rejected with anEosioError
. -
Call
chain/get_currency_balance
and get a Promise back.Declaration
Swift
public func getCurrencyBalance(_: PMKNamespacer, requestParameters: EosioRpcCurrencyBalanceRequest) -> Promise<EosioRpcCurrencyBalanceResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcCurrencyBalanceResponse
or rejected with anEosioError
. -
Call
chain/get_currency_stats
and get a Promise back.Declaration
Swift
public func getCurrencyStats(_: PMKNamespacer, requestParameters: EosioRpcCurrencyStatsRequest) -> Promise<EosioRpcCurrencyStatsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcCurrencyStatsResponse
or rejected with anEosioError
. -
Call
chain/get_required_keys
and get a Promise back. Pass in a transaction and an array of available keys. Get back the subset of those keys required for signing the transaction.Declaration
Swift
public func getRequiredKeys(_: PMKNamespacer, requestParameters: EosioRpcRequiredKeysRequest) -> Promise<EosioRpcRequiredKeysResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcRequiredKeysResponse
or rejected with anEosioError
. -
Call
chain/get_producers
and get a Promise back.Declaration
Swift
public func getProducers(_: PMKNamespacer, requestParameters: EosioRpcProducersRequest) -> Promise<EosioRpcProducersResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcProducersResponse
or rejected with anEosioError
. -
Call
chain/get_raw_code_and_abi
and get a Promise back.Declaration
Swift
public func getRawCodeAndAbi(_: PMKNamespacer, requestParameters: EosioRpcRawCodeAndAbiRequest) -> Promise<EosioRpcRawCodeAndAbiResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcRawCodeAndAbiResponse
or rejected with anEosioError
. -
Call
chain/get_raw_code_and_abi
and get a Promise back. Convenience method called with simple account name.Declaration
Swift
public func getRawCodeAndAbi(_: PMKNamespacer, accountName: String) -> Promise<EosioRpcRawCodeAndAbiResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.accountName
The account/contract name, as a String.
Return Value
A Promise fulfilled with an
EosioRpcRawCodeAndAbiResponse
or rejected with anEosioError
. -
Call
chain/get_table_by_scope
and get a Promise back.Declaration
Swift
public func getTableByScope(_: PMKNamespacer, requestParameters: EosioRpcTableByScopeRequest) -> Promise<EosioRpcTableByScopeResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcTableByScopeResponse
or rejected with anEosioError
. -
Call
chain/get_table_rows
and get a Promise back. Returns an object containing rows from the specified table.Declaration
Swift
public func getTableRows(_: PMKNamespacer, requestParameters: EosioRpcTableRowsRequest) -> Promise<EosioRpcTableRowsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcTableRowsResponse
or rejected with anEosioError
. -
Call
chain/get_kv_table_rows
and get a Promise back. Returns an object containing rows from the specified table.Declaration
Swift
public func getKvTableRows(_: PMKNamespacer, requestParameters: EosioRpcKvTableRowsRequest) -> Promise<EosioRpcKvTableRowsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcKvTableRowsResponse
or rejected with anEosioError
. -
Call
chain/get_code
and get a Promise back.Declaration
Swift
public func getCode(_: PMKNamespacer, requestParameters: EosioRpcCodeRequest) -> Promise<EosioRpcCodeResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcCodeResponse
or rejected with anEosioError
. -
Call
chain/get_code
and geta Promise back. Convenience method called with simple account name.Declaration
Swift
public func getCode(_: PMKNamespacer, accountName: String) -> Promise<EosioRpcCodeResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.accountName
The account/contract name, as a String.
Return Value
A Promise fulfilled with an
EosioRpcCodeResponse
or rejected with anEosioError
. -
Call
chain/get_raw_abi
and get a Promise back. Get a raw abi.Declaration
Swift
public func getRawAbi(_: PMKNamespacer, requestParameters: EosioRpcRawAbiRequest) -> Promise<EosioRpcRawAbiResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcRawAbiResponse
or rejected with anEosioError
. -
Call
history/get_actions
and get a Promise back.Declaration
Swift
public func getActions(_: PMKNamespacer, requestParameters: EosioRpcHistoryActionsRequest) -> Promise<EosioRpcActionsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcActionsResponse
or rejected with anEosioError
. -
Call
history/get_transaction
and get a Promise back.Declaration
Swift
public func getTransaction(_: PMKNamespacer, requestParameters: EosioRpcHistoryTransactionRequest) -> Promise<EosioRpcGetTransactionResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcGetTransactionResponse
or rejected with anEosioError
. -
Call
history/get_key_accounts
and get a Promise back.Declaration
Swift
public func getKeyAccounts(_: PMKNamespacer, requestParameters: EosioRpcHistoryKeyAccountsRequest) -> Promise<EosioRpcKeyAccountsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcKeyAccountsResponse
or rejected with anEosioError
. -
Call
history/get_controlled_accounts
and get a Promise back.Declaration
Swift
public func getControlledAccounts(_: PMKNamespacer, requestParameters: EosioRpcHistoryControlledAccountsRequest) -> Promise<EosioRpcControlledAccountsResponse>
Parameters
_
Differentiates call signature from that of non-promise-returning endpoint method. Pass in
.promise
as the first parameter to call this method.requestParameters
Return Value
A Promise fulfilled with an
EosioRpcControlledAccountsResponse
or rejected with anEosioError
.