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).

Endpoint methods taking callbacks

RPC methods used by EosioTransaction. These force conformance only to the protocols, not the entire response structs.

Endpoint methods returning Promises.