Lazily create registry types (also solves resolution order) (#1291)
* Lazily create registry types (also solves resolution order) * Typo in comment * Alphabetical definitions (ordering detected) * Make fallback & SessionKeys work as expected * Cleanup registration, user-types takes priority * typo * Api constructors only take options * Cleanup typos * Don't create classes while validating metadata * Adjust badges... well, waiting for CI, so... * typo
This commit is contained in:
@@ -9,7 +9,7 @@ function main () {
|
||||
const provider = new WsProvider('ws://127.0.0.1:9944');
|
||||
|
||||
// Create the API and wait until ready
|
||||
const api = await ApiRx.create(provider).toPromise();
|
||||
const api = await ApiRx.create({ provider }).toPromise();
|
||||
|
||||
// We're using RxJs 'zip()' combination operator to get the emitted values
|
||||
// of multiple observables as an array
|
||||
|
||||
@@ -10,7 +10,7 @@ async function main () {
|
||||
const provider = new WsProvider('ws://127.0.0.1:9944');
|
||||
|
||||
// Create the API and wait until ready (optional provider passed through)
|
||||
const api = await ApiRx.create(provider).toPromise();
|
||||
const api = await ApiRx.create({ provider }).toPromise();
|
||||
|
||||
// retrieve the upgrade key from the chain state
|
||||
const adminId = await api.query.sudo.key().toPromise();
|
||||
|
||||
Reference in New Issue
Block a user