[x] Pull out ethers dependencies from SDK core logic
[x] Make top-level Session and Client multi-chain ready:
[X] Create ErdstallClient interface (top-level Erdstall client interface used with multiple backends)
[X] Create ErdstallSession interface (top-level Erdstall session interface used with multiple backends)
[ ] Create ErdstallBackendClient interface:
[X] Implement for ethereum backend
[ ] Implement for substrate backend
[ ] Create ErdstallBackendSession interface:
[X] Implement for ethereum backend
[ ] Implement for substrate backend
[X] Redo creation and initialization of Session and Client
[X] Aid type-inference for top-level API (The whole point of using generic/template args is to narrow down interesting callbacks to aid SDK users in handling all relevant cases)
[x] Update JSON en-/decoding for all message types:
[X] Use canocial JSON
[X] ClientConfig
[x] BalanceProofs
[x] TxReceipts
[x] Subscriptions
[x] TxAccepted
[x] Phaseshift
[x] Account
[X] Assets
[X] Update Assets to work in multi-chain context
[x] Create Signer abstraction which can be used with any backend:
[x] TODO: How are signatures for Erdstall generated?
[X] Decide how to call backend specific implementations (statically or dynamically)
[X] Adapt event-based callbacks to listen to all supported backends:
[X] Expose source of origin in event callback handlers
Adapt Erdstall TS SDK for multichain
Implementation
ethers
dependencies from SDK core logicSession
andClient
multi-chain ready:ErdstallClient
interface (top-level Erdstall client interface used with multiple backends)ErdstallSession
interface (top-level Erdstall session interface used with multiple backends)ErdstallBackendClient
interface:ethereum
backendsubstrate
backendErdstallBackendSession
interface:ethereum
backendsubstrate
backendSession
andClient
ClientConfig
BalanceProofs
TxReceipts
Subscriptions
TxAccepted
Phaseshift
Account
Assets
Assets
to work in multi-chain contextSigner
abstraction which can be used with any backend:Address
to new Erdstall spec:Address
typeAddress
backend typeAddress
type for EthereumAddress
type for SubstrateTesting
env.ts
to handle multiple ChainProviders