Contains the most generic definitions common to most blockchain ecosystems I’ve worked with. However, by itself, it is probably mostly uninteresting to you.
NetworkConfig
signals
pubkey
factory and PublicKey
typemv
subsystemTxBase
and Signer<Tx extends TxBase>
NetworkConfig
s. These are used to configure the
SDK for a specific blockchain, including which RPC to use. Most of the SDK is built on
NetworkConfig
s. Importantly, each NetworkConfig
is referenced by instance. If your custom systems
require generalization or persistence, it should generally refer to the network’s name
or
chainId
instead.
While both are unique identifiers for a chain, the name
refers to the current canonical name of
the chain, while chainId
uniquely identifies a specific hard fork of a chain. For example,
“cosmoshub” refers to the latest version of the Cosmos Hub as agreed upon by its active validator
set, while “cosmoshub-4” refers to a specific version of the Hub. But generally, you are likely fine
just using name
for most purposes.
signals
object contains the following signals:
signer
(signal) for the currently connected signer,network
(signal) for the currently connected network,chainId
(computed) for the chain ID of the currently connected network,publicKey
(computed) for the public key of the currently connected address,address
(computed) for the currently connected address,bech32prefix
(computed) for the Bech32 prefix of the currently connected network, if applicable.pubkey
wraps the different types of public keys, but has otherwise no knowledge of how to
serialize or encode them; this is provided by other packages like @apophis/cosmos
through the
middleware system.
As a consumer of the SDK, you will likely only need the pubkey
factory.