@pezkuwi/api 16.5.5 → 16.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +12 -12
- package/augment.d.ts +1 -0
- package/augment.js +1 -0
- package/base/Decorate.d.ts +143 -0
- package/base/Decorate.js +752 -0
- package/base/Events.d.ts +67 -0
- package/base/Events.js +78 -0
- package/base/Getters.d.ts +163 -0
- package/base/Getters.js +207 -0
- package/base/Init.d.ts +44 -0
- package/base/Init.js +400 -0
- package/base/find.d.ts +3 -0
- package/base/find.js +7 -0
- package/base/index.d.ts +47 -0
- package/base/index.js +57 -0
- package/base/types.d.ts +15 -0
- package/base/types.js +1 -0
- package/build/LICENSE +201 -0
- package/build/README.md +100 -0
- package/build/augment.js +1 -0
- package/build/base/Decorate.js +752 -0
- package/build/base/Events.js +78 -0
- package/build/base/Getters.js +207 -0
- package/build/base/Init.js +400 -0
- package/build/base/find.js +7 -0
- package/build/base/index.d.ts +1 -1
- package/build/base/index.js +57 -0
- package/build/base/types.js +1 -0
- package/build/bundle-pezkuwi-api.js +26247 -0
- package/build/bundle.js +7 -0
- package/build/cjs/augment.d.ts +1 -0
- package/build/cjs/augment.js +3 -0
- package/build/cjs/base/Decorate.d.ts +143 -0
- package/build/cjs/base/Decorate.js +756 -0
- package/build/cjs/base/Events.d.ts +67 -0
- package/build/cjs/base/Events.js +82 -0
- package/build/cjs/base/Getters.d.ts +163 -0
- package/build/cjs/base/Getters.js +211 -0
- package/build/cjs/base/Init.d.ts +44 -0
- package/build/cjs/base/Init.js +404 -0
- package/build/cjs/base/find.d.ts +3 -0
- package/build/cjs/base/find.js +11 -0
- package/build/cjs/base/index.d.ts +47 -0
- package/build/cjs/base/index.js +61 -0
- package/build/cjs/base/types.d.ts +15 -0
- package/build/cjs/base/types.js +2 -0
- package/build/cjs/bundle.d.ts +7 -0
- package/build/cjs/bundle.js +17 -0
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.js +5 -0
- package/build/cjs/package.json +3 -0
- package/build/cjs/packageDetect.d.ts +1 -0
- package/build/cjs/packageDetect.js +10 -0
- package/build/cjs/packageInfo.d.ts +6 -0
- package/build/cjs/packageInfo.js +4 -0
- package/build/cjs/promise/Api.d.ts +158 -0
- package/build/cjs/promise/Api.js +195 -0
- package/build/cjs/promise/Combinator.d.ts +12 -0
- package/build/cjs/promise/Combinator.js +72 -0
- package/build/cjs/promise/decorateMethod.d.ts +14 -0
- package/build/cjs/promise/decorateMethod.js +75 -0
- package/build/cjs/promise/index.d.ts +2 -0
- package/build/cjs/promise/index.js +7 -0
- package/build/cjs/promise/types.d.ts +5 -0
- package/build/cjs/promise/types.js +2 -0
- package/build/cjs/rx/Api.d.ts +155 -0
- package/build/cjs/rx/Api.js +173 -0
- package/build/cjs/rx/decorateMethod.d.ts +3 -0
- package/build/cjs/rx/decorateMethod.js +6 -0
- package/build/cjs/rx/index.d.ts +2 -0
- package/build/cjs/rx/index.js +7 -0
- package/build/cjs/submittable/Result.d.ts +31 -0
- package/build/cjs/submittable/Result.js +84 -0
- package/build/cjs/submittable/createClass.d.ts +12 -0
- package/build/cjs/submittable/createClass.js +277 -0
- package/build/cjs/submittable/createSubmittable.d.ts +8 -0
- package/build/cjs/submittable/createSubmittable.js +8 -0
- package/build/cjs/submittable/index.d.ts +2 -0
- package/build/cjs/submittable/index.js +7 -0
- package/build/cjs/submittable/types.d.ts +1 -0
- package/build/cjs/submittable/types.js +2 -0
- package/build/cjs/types/calls.d.ts +1 -0
- package/build/cjs/types/calls.js +4 -0
- package/build/cjs/types/consts.d.ts +1 -0
- package/build/cjs/types/consts.js +4 -0
- package/build/cjs/types/errors.d.ts +1 -0
- package/build/cjs/types/errors.js +4 -0
- package/build/cjs/types/events.d.ts +1 -0
- package/build/cjs/types/events.js +4 -0
- package/build/cjs/types/index.d.ts +114 -0
- package/build/cjs/types/index.js +13 -0
- package/build/cjs/types/storage.d.ts +1 -0
- package/build/cjs/types/storage.js +4 -0
- package/build/cjs/types/submittable.d.ts +1 -0
- package/build/cjs/types/submittable.js +4 -0
- package/build/cjs/util/augmentObject.d.ts +9 -0
- package/build/cjs/util/augmentObject.js +84 -0
- package/build/cjs/util/decorate.d.ts +16 -0
- package/build/cjs/util/decorate.js +17 -0
- package/build/cjs/util/filterEvents.d.ts +6 -0
- package/build/cjs/util/filterEvents.js +25 -0
- package/build/cjs/util/index.d.ts +4 -0
- package/build/cjs/util/index.js +11 -0
- package/build/cjs/util/isKeyringPair.d.ts +3 -0
- package/build/cjs/util/isKeyringPair.js +7 -0
- package/build/cjs/util/logging.d.ts +1 -0
- package/build/cjs/util/logging.js +5 -0
- package/build/cjs/util/validate.d.ts +3 -0
- package/build/cjs/util/validate.js +26 -0
- package/build/index.js +2 -0
- package/build/package.json +612 -0
- package/build/packageDetect.js +8 -0
- package/build/packageInfo.js +1 -0
- package/build/promise/Api.d.ts +2 -2
- package/build/promise/Api.js +191 -0
- package/build/promise/Combinator.js +68 -0
- package/build/promise/decorateMethod.js +71 -0
- package/build/promise/index.js +2 -0
- package/build/promise/types.js +1 -0
- package/build/rx/Api.d.ts +2 -2
- package/build/rx/Api.js +169 -0
- package/build/rx/decorateMethod.js +3 -0
- package/build/rx/index.js +2 -0
- package/build/submittable/Result.js +80 -0
- package/build/submittable/createClass.js +274 -0
- package/build/submittable/createSubmittable.js +5 -0
- package/build/submittable/index.js +2 -0
- package/build/submittable/types.js +1 -0
- package/build/types/calls.js +1 -0
- package/build/types/consts.js +1 -0
- package/build/types/errors.js +1 -0
- package/build/types/events.js +1 -0
- package/build/types/index.js +8 -0
- package/build/types/storage.js +1 -0
- package/build/types/submittable.js +1 -0
- package/build/util/augmentObject.js +81 -0
- package/build/util/decorate.js +14 -0
- package/build/util/filterEvents.js +22 -0
- package/build/util/index.js +4 -0
- package/build/util/isKeyringPair.js +4 -0
- package/build/util/logging.js +2 -0
- package/build/util/validate.js +23 -0
- package/build-deno/README.md +95 -0
- package/build-deno/augment.ts +2 -0
- package/build-deno/base/Decorate.ts +1100 -0
- package/build-deno/base/Events.ts +89 -0
- package/build-deno/base/Getters.ts +243 -0
- package/build-deno/base/Init.ts +523 -0
- package/build-deno/base/find.ts +12 -0
- package/build-deno/base/index.ts +83 -0
- package/build-deno/base/types.ts +17 -0
- package/build-deno/bundle.ts +11 -0
- package/build-deno/checkTypes.manual.ts +320 -0
- package/build-deno/index.ts +4 -0
- package/build-deno/mod.ts +2 -0
- package/build-deno/packageDetect.ts +12 -0
- package/build-deno/packageInfo.ts +3 -0
- package/build-deno/promise/Api.ts +212 -0
- package/build-deno/promise/Combinator.ts +89 -0
- package/build-deno/promise/decorateMethod.ts +111 -0
- package/build-deno/promise/index.ts +3 -0
- package/build-deno/promise/types.ts +7 -0
- package/build-deno/rx/Api.ts +184 -0
- package/build-deno/rx/decorateMethod.ts +7 -0
- package/build-deno/rx/index.ts +3 -0
- package/build-deno/submittable/Result.ts +109 -0
- package/build-deno/submittable/createClass.ts +436 -0
- package/build-deno/submittable/createSubmittable.ts +17 -0
- package/build-deno/submittable/index.ts +3 -0
- package/build-deno/submittable/types.ts +2 -0
- package/build-deno/test/SingleAccountSigner.ts +51 -0
- package/build-deno/test/index.ts +3 -0
- package/build-deno/test/logEvents.ts +21 -0
- package/build-deno/types/calls.ts +2 -0
- package/build-deno/types/consts.ts +2 -0
- package/build-deno/types/errors.ts +2 -0
- package/build-deno/types/events.ts +2 -0
- package/build-deno/types/index.ts +124 -0
- package/build-deno/types/storage.ts +2 -0
- package/build-deno/types/submittable.ts +2 -0
- package/build-deno/util/augmentObject.ts +109 -0
- package/build-deno/util/decorate.ts +38 -0
- package/build-deno/util/filterEvents.ts +32 -0
- package/build-deno/util/index.ts +6 -0
- package/build-deno/util/isKeyringPair.ts +9 -0
- package/build-deno/util/logging.ts +4 -0
- package/build-deno/util/validate.ts +32 -0
- package/build-tsc/augment.d.ts +1 -0
- package/build-tsc/base/Decorate.d.ts +143 -0
- package/build-tsc/base/Events.d.ts +67 -0
- package/build-tsc/base/Getters.d.ts +163 -0
- package/build-tsc/base/Init.d.ts +44 -0
- package/build-tsc/base/find.d.ts +3 -0
- package/build-tsc/base/index.d.ts +47 -0
- package/build-tsc/base/types.d.ts +15 -0
- package/build-tsc/bundle.d.ts +7 -0
- package/build-tsc/index.d.ts +2 -0
- package/build-tsc/packageDetect.d.ts +1 -0
- package/build-tsc/packageInfo.d.ts +6 -0
- package/build-tsc/promise/Api.d.ts +158 -0
- package/build-tsc/promise/Combinator.d.ts +12 -0
- package/build-tsc/promise/decorateMethod.d.ts +14 -0
- package/build-tsc/promise/index.d.ts +2 -0
- package/build-tsc/promise/types.d.ts +5 -0
- package/build-tsc/rx/Api.d.ts +155 -0
- package/build-tsc/rx/decorateMethod.d.ts +3 -0
- package/build-tsc/rx/index.d.ts +2 -0
- package/build-tsc/submittable/Result.d.ts +31 -0
- package/build-tsc/submittable/createClass.d.ts +12 -0
- package/build-tsc/submittable/createSubmittable.d.ts +8 -0
- package/build-tsc/submittable/index.d.ts +2 -0
- package/build-tsc/submittable/types.d.ts +1 -0
- package/build-tsc/types/calls.d.ts +1 -0
- package/build-tsc/types/consts.d.ts +1 -0
- package/build-tsc/types/errors.d.ts +1 -0
- package/build-tsc/types/events.d.ts +1 -0
- package/build-tsc/types/index.d.ts +114 -0
- package/build-tsc/types/storage.d.ts +1 -0
- package/build-tsc/types/submittable.d.ts +1 -0
- package/build-tsc/util/augmentObject.d.ts +9 -0
- package/build-tsc/util/decorate.d.ts +16 -0
- package/build-tsc/util/filterEvents.d.ts +6 -0
- package/build-tsc/util/index.d.ts +4 -0
- package/build-tsc/util/isKeyringPair.d.ts +3 -0
- package/build-tsc/util/logging.d.ts +1 -0
- package/build-tsc/util/validate.d.ts +3 -0
- package/build-tsc-cjs/augment.js +3 -0
- package/build-tsc-cjs/base/Decorate.js +756 -0
- package/build-tsc-cjs/base/Events.js +82 -0
- package/build-tsc-cjs/base/Getters.js +211 -0
- package/build-tsc-cjs/base/Init.js +404 -0
- package/build-tsc-cjs/base/find.js +11 -0
- package/build-tsc-cjs/base/index.js +61 -0
- package/build-tsc-cjs/base/types.js +2 -0
- package/build-tsc-cjs/bundle.js +17 -0
- package/build-tsc-cjs/index.js +5 -0
- package/build-tsc-cjs/packageDetect.js +10 -0
- package/build-tsc-cjs/packageInfo.js +4 -0
- package/build-tsc-cjs/promise/Api.js +195 -0
- package/build-tsc-cjs/promise/Combinator.js +72 -0
- package/build-tsc-cjs/promise/decorateMethod.js +75 -0
- package/build-tsc-cjs/promise/index.js +7 -0
- package/build-tsc-cjs/promise/types.js +2 -0
- package/build-tsc-cjs/rx/Api.js +173 -0
- package/build-tsc-cjs/rx/decorateMethod.js +6 -0
- package/build-tsc-cjs/rx/index.js +7 -0
- package/build-tsc-cjs/submittable/Result.js +84 -0
- package/build-tsc-cjs/submittable/createClass.js +277 -0
- package/build-tsc-cjs/submittable/createSubmittable.js +8 -0
- package/build-tsc-cjs/submittable/index.js +7 -0
- package/build-tsc-cjs/submittable/types.js +2 -0
- package/build-tsc-cjs/types/calls.js +4 -0
- package/build-tsc-cjs/types/consts.js +4 -0
- package/build-tsc-cjs/types/errors.js +4 -0
- package/build-tsc-cjs/types/events.js +4 -0
- package/build-tsc-cjs/types/index.js +13 -0
- package/build-tsc-cjs/types/storage.js +4 -0
- package/build-tsc-cjs/types/submittable.js +4 -0
- package/build-tsc-cjs/util/augmentObject.js +84 -0
- package/build-tsc-cjs/util/decorate.js +17 -0
- package/build-tsc-cjs/util/filterEvents.js +25 -0
- package/build-tsc-cjs/util/index.js +11 -0
- package/build-tsc-cjs/util/isKeyringPair.js +7 -0
- package/build-tsc-cjs/util/logging.js +5 -0
- package/build-tsc-cjs/util/validate.js +26 -0
- package/build-tsc-esm/augment.js +1 -0
- package/build-tsc-esm/base/Decorate.js +752 -0
- package/build-tsc-esm/base/Events.js +78 -0
- package/build-tsc-esm/base/Getters.js +207 -0
- package/build-tsc-esm/base/Init.js +400 -0
- package/build-tsc-esm/base/find.js +7 -0
- package/build-tsc-esm/base/index.js +57 -0
- package/build-tsc-esm/base/types.js +1 -0
- package/build-tsc-esm/bundle.js +7 -0
- package/build-tsc-esm/index.js +2 -0
- package/build-tsc-esm/packageDetect.js +8 -0
- package/build-tsc-esm/packageInfo.js +1 -0
- package/build-tsc-esm/promise/Api.js +191 -0
- package/build-tsc-esm/promise/Combinator.js +68 -0
- package/build-tsc-esm/promise/decorateMethod.js +71 -0
- package/build-tsc-esm/promise/index.js +2 -0
- package/build-tsc-esm/promise/types.js +1 -0
- package/build-tsc-esm/rx/Api.js +169 -0
- package/build-tsc-esm/rx/decorateMethod.js +3 -0
- package/build-tsc-esm/rx/index.js +2 -0
- package/build-tsc-esm/submittable/Result.js +80 -0
- package/build-tsc-esm/submittable/createClass.js +274 -0
- package/build-tsc-esm/submittable/createSubmittable.js +5 -0
- package/build-tsc-esm/submittable/index.js +2 -0
- package/build-tsc-esm/submittable/types.js +1 -0
- package/build-tsc-esm/types/calls.js +1 -0
- package/build-tsc-esm/types/consts.js +1 -0
- package/build-tsc-esm/types/errors.js +1 -0
- package/build-tsc-esm/types/events.js +1 -0
- package/build-tsc-esm/types/index.js +8 -0
- package/build-tsc-esm/types/storage.js +1 -0
- package/build-tsc-esm/types/submittable.js +1 -0
- package/build-tsc-esm/util/augmentObject.js +81 -0
- package/build-tsc-esm/util/decorate.js +14 -0
- package/build-tsc-esm/util/filterEvents.js +22 -0
- package/build-tsc-esm/util/index.js +4 -0
- package/build-tsc-esm/util/isKeyringPair.js +4 -0
- package/build-tsc-esm/util/logging.js +2 -0
- package/build-tsc-esm/util/validate.js +23 -0
- package/bundle-pezkuwi-api.js +26247 -0
- package/bundle.d.ts +7 -0
- package/bundle.js +7 -0
- package/cjs/augment.d.ts +1 -0
- package/cjs/augment.js +3 -0
- package/cjs/base/Decorate.d.ts +143 -0
- package/cjs/base/Decorate.js +756 -0
- package/cjs/base/Events.d.ts +67 -0
- package/cjs/base/Events.js +82 -0
- package/cjs/base/Getters.d.ts +163 -0
- package/cjs/base/Getters.js +211 -0
- package/cjs/base/Init.d.ts +44 -0
- package/cjs/base/Init.js +404 -0
- package/cjs/base/find.d.ts +3 -0
- package/cjs/base/find.js +11 -0
- package/cjs/base/index.d.ts +47 -0
- package/cjs/base/index.js +61 -0
- package/cjs/base/types.d.ts +15 -0
- package/cjs/base/types.js +2 -0
- package/cjs/bundle.d.ts +7 -0
- package/cjs/bundle.js +17 -0
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +5 -0
- package/cjs/package.json +3 -0
- package/cjs/packageDetect.d.ts +1 -0
- package/cjs/packageDetect.js +10 -0
- package/cjs/packageInfo.d.ts +6 -0
- package/cjs/packageInfo.js +4 -0
- package/cjs/promise/Api.d.ts +158 -0
- package/cjs/promise/Api.js +195 -0
- package/cjs/promise/Combinator.d.ts +12 -0
- package/cjs/promise/Combinator.js +72 -0
- package/cjs/promise/decorateMethod.d.ts +14 -0
- package/cjs/promise/decorateMethod.js +75 -0
- package/cjs/promise/index.d.ts +2 -0
- package/cjs/promise/index.js +7 -0
- package/cjs/promise/types.d.ts +5 -0
- package/cjs/promise/types.js +2 -0
- package/cjs/rx/Api.d.ts +155 -0
- package/cjs/rx/Api.js +173 -0
- package/cjs/rx/decorateMethod.d.ts +3 -0
- package/cjs/rx/decorateMethod.js +6 -0
- package/cjs/rx/index.d.ts +2 -0
- package/cjs/rx/index.js +7 -0
- package/cjs/submittable/Result.d.ts +31 -0
- package/cjs/submittable/Result.js +84 -0
- package/cjs/submittable/createClass.d.ts +12 -0
- package/cjs/submittable/createClass.js +277 -0
- package/cjs/submittable/createSubmittable.d.ts +8 -0
- package/cjs/submittable/createSubmittable.js +8 -0
- package/cjs/submittable/index.d.ts +2 -0
- package/cjs/submittable/index.js +7 -0
- package/cjs/submittable/types.d.ts +1 -0
- package/cjs/submittable/types.js +2 -0
- package/cjs/types/calls.d.ts +1 -0
- package/cjs/types/calls.js +4 -0
- package/cjs/types/consts.d.ts +1 -0
- package/cjs/types/consts.js +4 -0
- package/cjs/types/errors.d.ts +1 -0
- package/cjs/types/errors.js +4 -0
- package/cjs/types/events.d.ts +1 -0
- package/cjs/types/events.js +4 -0
- package/cjs/types/index.d.ts +114 -0
- package/cjs/types/index.js +13 -0
- package/cjs/types/storage.d.ts +1 -0
- package/cjs/types/storage.js +4 -0
- package/cjs/types/submittable.d.ts +1 -0
- package/cjs/types/submittable.js +4 -0
- package/cjs/util/augmentObject.d.ts +9 -0
- package/cjs/util/augmentObject.js +84 -0
- package/cjs/util/decorate.d.ts +16 -0
- package/cjs/util/decorate.js +17 -0
- package/cjs/util/filterEvents.d.ts +6 -0
- package/cjs/util/filterEvents.js +25 -0
- package/cjs/util/index.d.ts +4 -0
- package/cjs/util/index.js +11 -0
- package/cjs/util/isKeyringPair.d.ts +3 -0
- package/cjs/util/isKeyringPair.js +7 -0
- package/cjs/util/logging.d.ts +1 -0
- package/cjs/util/logging.js +5 -0
- package/cjs/util/validate.d.ts +3 -0
- package/cjs/util/validate.js +26 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +588 -22
- package/packageDetect.d.ts +1 -0
- package/packageDetect.js +8 -0
- package/packageInfo.d.ts +6 -0
- package/packageInfo.js +1 -0
- package/promise/Api.d.ts +158 -0
- package/promise/Api.js +191 -0
- package/promise/Combinator.d.ts +12 -0
- package/promise/Combinator.js +68 -0
- package/promise/decorateMethod.d.ts +14 -0
- package/promise/decorateMethod.js +71 -0
- package/promise/index.d.ts +2 -0
- package/promise/index.js +2 -0
- package/promise/types.d.ts +5 -0
- package/promise/types.js +1 -0
- package/rx/Api.d.ts +155 -0
- package/rx/Api.js +169 -0
- package/rx/decorateMethod.d.ts +3 -0
- package/rx/decorateMethod.js +3 -0
- package/rx/index.d.ts +2 -0
- package/rx/index.js +2 -0
- package/src/augment.ts +1 -1
- package/src/base/Decorate.ts +1 -1
- package/src/base/Events.ts +1 -1
- package/src/base/Getters.ts +1 -1
- package/src/base/Init.ts +1 -1
- package/src/base/find.ts +1 -1
- package/src/base/index.ts +1 -1
- package/src/base/types.ts +1 -1
- package/src/bundle.ts +1 -1
- package/src/checkTypes.manual.ts +7 -7
- package/src/index.ts +1 -1
- package/src/mod.ts +1 -1
- package/src/packageDetect.ts +2 -2
- package/src/packageInfo.ts +3 -3
- package/src/promise/Api.ts +3 -3
- package/src/promise/Combinator.ts +1 -1
- package/src/promise/Combinators.spec.ts +1 -1
- package/src/promise/decorateMethod.ts +1 -1
- package/src/promise/index.spec.ts +1 -1
- package/src/promise/index.ts +1 -1
- package/src/promise/types.ts +1 -1
- package/src/rx/Api.ts +3 -3
- package/src/rx/decorateMethod.ts +1 -1
- package/src/rx/index.ts +1 -1
- package/src/submittable/Result.ts +1 -1
- package/src/submittable/createClass.ts +1 -1
- package/src/submittable/createSubmittable.ts +1 -1
- package/src/submittable/index.ts +1 -1
- package/src/submittable/types.ts +1 -1
- package/src/test/SingleAccountSigner.ts +1 -1
- package/src/test/index.ts +1 -1
- package/src/test/logEvents.ts +1 -1
- package/src/types/calls.ts +1 -1
- package/src/types/consts.ts +1 -1
- package/src/types/errors.ts +1 -1
- package/src/types/events.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/storage.ts +1 -1
- package/src/types/submittable.ts +1 -1
- package/src/util/augmentObject.spec.ts +1 -1
- package/src/util/augmentObject.ts +1 -1
- package/src/util/decorate.ts +1 -1
- package/src/util/filterEvents.ts +1 -1
- package/src/util/index.ts +1 -1
- package/src/util/isKeyringPair.ts +1 -1
- package/src/util/logging.ts +1 -1
- package/src/util/validate.spec.ts +2 -2
- package/src/util/validate.ts +1 -1
- package/submittable/Result.d.ts +31 -0
- package/submittable/Result.js +80 -0
- package/submittable/createClass.d.ts +12 -0
- package/submittable/createClass.js +274 -0
- package/submittable/createSubmittable.d.ts +8 -0
- package/submittable/createSubmittable.js +5 -0
- package/submittable/index.d.ts +2 -0
- package/submittable/index.js +2 -0
- package/submittable/types.d.ts +1 -0
- package/submittable/types.js +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.spec.tsbuildinfo +1 -0
- package/types/calls.d.ts +1 -0
- package/types/calls.js +1 -0
- package/types/consts.d.ts +1 -0
- package/types/consts.js +1 -0
- package/types/errors.d.ts +1 -0
- package/types/errors.js +1 -0
- package/types/events.d.ts +1 -0
- package/types/events.js +1 -0
- package/types/index.d.ts +114 -0
- package/types/index.js +8 -0
- package/types/storage.d.ts +1 -0
- package/types/storage.js +1 -0
- package/types/submittable.d.ts +1 -0
- package/types/submittable.js +1 -0
- package/util/augmentObject.d.ts +9 -0
- package/util/augmentObject.js +81 -0
- package/util/decorate.d.ts +16 -0
- package/util/decorate.js +14 -0
- package/util/filterEvents.d.ts +6 -0
- package/util/filterEvents.js +22 -0
- package/util/index.d.ts +4 -0
- package/util/index.js +4 -0
- package/util/isKeyringPair.d.ts +3 -0
- package/util/isKeyringPair.js +4 -0
- package/util/logging.d.ts +1 -0
- package/util/logging.js +2 -0
- package/util/validate.d.ts +3 -0
- package/util/validate.js +23 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ApiInterfaceEvents } from '../types/index.js';
|
|
2
|
+
export declare class Events {
|
|
3
|
+
#private;
|
|
4
|
+
protected emit(type: ApiInterfaceEvents, ...args: unknown[]): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* @description Attach an eventemitter handler to listen to a specific event
|
|
7
|
+
*
|
|
8
|
+
* @param type The type of event to listen to. Available events are `connected`, `disconnected`, `ready` and `error`
|
|
9
|
+
* @param handler The callback to be called when the event fires. Depending on the event type, it could fire with additional arguments.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <BR>
|
|
13
|
+
*
|
|
14
|
+
* ```javascript
|
|
15
|
+
* api.on('connected', (): void => {
|
|
16
|
+
* console.log('API has been connected to the endpoint');
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* api.on('disconnected', (): void => {
|
|
20
|
+
* console.log('API has been disconnected from the endpoint');
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
on(type: ApiInterfaceEvents, handler: (...args: any[]) => any): this;
|
|
25
|
+
/**
|
|
26
|
+
* @description Remove the given eventemitter handler
|
|
27
|
+
*
|
|
28
|
+
* @param type The type of event the callback was attached to. Available events are `connected`, `disconnected`, `ready` and `error`
|
|
29
|
+
* @param handler The callback to unregister.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <BR>
|
|
33
|
+
*
|
|
34
|
+
* ```javascript
|
|
35
|
+
* const handler = (): void => {
|
|
36
|
+
* console.log('Connected !);
|
|
37
|
+
* };
|
|
38
|
+
*
|
|
39
|
+
* // Start listening
|
|
40
|
+
* api.on('connected', handler);
|
|
41
|
+
*
|
|
42
|
+
* // Stop listening
|
|
43
|
+
* api.off('connected', handler);
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
off(type: ApiInterfaceEvents, handler: (...args: any[]) => any): this;
|
|
47
|
+
/**
|
|
48
|
+
* @description Attach an one-time eventemitter handler to listen to a specific event
|
|
49
|
+
*
|
|
50
|
+
* @param type The type of event to listen to. Available events are `connected`, `disconnected`, `ready` and `error`
|
|
51
|
+
* @param handler The callback to be called when the event fires. Depending on the event type, it could fire with additional arguments.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* <BR>
|
|
55
|
+
*
|
|
56
|
+
* ```javascript
|
|
57
|
+
* api.once('connected', (): void => {
|
|
58
|
+
* console.log('API has been connected to the endpoint');
|
|
59
|
+
* });
|
|
60
|
+
*
|
|
61
|
+
* api.once('disconnected', (): void => {
|
|
62
|
+
* console.log('API has been disconnected from the endpoint');
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
once(type: ApiInterfaceEvents, handler: (...args: any[]) => any): this;
|
|
67
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Events = void 0;
|
|
4
|
+
const eventemitter3_1 = require("eventemitter3");
|
|
5
|
+
class Events {
|
|
6
|
+
#eventemitter = new eventemitter3_1.EventEmitter();
|
|
7
|
+
emit(type, ...args) {
|
|
8
|
+
return this.#eventemitter.emit(type, ...args);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @description Attach an eventemitter handler to listen to a specific event
|
|
12
|
+
*
|
|
13
|
+
* @param type The type of event to listen to. Available events are `connected`, `disconnected`, `ready` and `error`
|
|
14
|
+
* @param handler The callback to be called when the event fires. Depending on the event type, it could fire with additional arguments.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <BR>
|
|
18
|
+
*
|
|
19
|
+
* ```javascript
|
|
20
|
+
* api.on('connected', (): void => {
|
|
21
|
+
* console.log('API has been connected to the endpoint');
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* api.on('disconnected', (): void => {
|
|
25
|
+
* console.log('API has been disconnected from the endpoint');
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
on(type, handler) {
|
|
30
|
+
this.#eventemitter.on(type, handler);
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @description Remove the given eventemitter handler
|
|
35
|
+
*
|
|
36
|
+
* @param type The type of event the callback was attached to. Available events are `connected`, `disconnected`, `ready` and `error`
|
|
37
|
+
* @param handler The callback to unregister.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* <BR>
|
|
41
|
+
*
|
|
42
|
+
* ```javascript
|
|
43
|
+
* const handler = (): void => {
|
|
44
|
+
* console.log('Connected !);
|
|
45
|
+
* };
|
|
46
|
+
*
|
|
47
|
+
* // Start listening
|
|
48
|
+
* api.on('connected', handler);
|
|
49
|
+
*
|
|
50
|
+
* // Stop listening
|
|
51
|
+
* api.off('connected', handler);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
off(type, handler) {
|
|
55
|
+
this.#eventemitter.removeListener(type, handler);
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @description Attach an one-time eventemitter handler to listen to a specific event
|
|
60
|
+
*
|
|
61
|
+
* @param type The type of event to listen to. Available events are `connected`, `disconnected`, `ready` and `error`
|
|
62
|
+
* @param handler The callback to be called when the event fires. Depending on the event type, it could fire with additional arguments.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* <BR>
|
|
66
|
+
*
|
|
67
|
+
* ```javascript
|
|
68
|
+
* api.once('connected', (): void => {
|
|
69
|
+
* console.log('API has been connected to the endpoint');
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* api.once('disconnected', (): void => {
|
|
73
|
+
* console.log('API has been disconnected from the endpoint');
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
once(type, handler) {
|
|
78
|
+
this.#eventemitter.once(type, handler);
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.Events = Events;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { RpcCoreStats, RpcInterface } from '@pezkuwi/rpc-core/types';
|
|
2
|
+
import type { Text } from '@pezkuwi/types';
|
|
3
|
+
import type { Hash, RuntimeVersion } from '@pezkuwi/types/interfaces';
|
|
4
|
+
import type { Metadata } from '@pezkuwi/types/metadata';
|
|
5
|
+
import type { CallFunction, RegistryError } from '@pezkuwi/types/types';
|
|
6
|
+
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableCalls, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types/index.js';
|
|
7
|
+
import { Init } from './Init.js';
|
|
8
|
+
export declare abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> implements ApiDecoration<ApiType> {
|
|
9
|
+
/**
|
|
10
|
+
* @description Runtime call interfaces (currently untyped, only decorated via API options)
|
|
11
|
+
*/
|
|
12
|
+
get call(): QueryableCalls<ApiType>;
|
|
13
|
+
/**
|
|
14
|
+
* @description Contains the parameter types (constants) of all modules.
|
|
15
|
+
*
|
|
16
|
+
* The values are instances of the appropriate type and are accessible using `section`.`constantName`,
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <BR>
|
|
20
|
+
*
|
|
21
|
+
* ```javascript
|
|
22
|
+
* console.log(api.consts.democracy.enactmentPeriod.toString())
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
get consts(): QueryableConsts<ApiType>;
|
|
26
|
+
/**
|
|
27
|
+
* @description Derived results that are injected into the API, allowing for combinations of various query results.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <BR>
|
|
31
|
+
*
|
|
32
|
+
* ```javascript
|
|
33
|
+
* api.derive.chain.bestNumber((number) => {
|
|
34
|
+
* console.log('best number', number);
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
get derive(): ReturnType<Getters<ApiType>['_decorateDerive']>;
|
|
39
|
+
/**
|
|
40
|
+
* @description Errors from metadata
|
|
41
|
+
*/
|
|
42
|
+
get errors(): DecoratedErrors<ApiType>;
|
|
43
|
+
/**
|
|
44
|
+
* @description Events from metadata
|
|
45
|
+
*/
|
|
46
|
+
get events(): DecoratedEvents<ApiType>;
|
|
47
|
+
/**
|
|
48
|
+
* @description Returns the version of extrinsics in-use on this chain
|
|
49
|
+
*/
|
|
50
|
+
get extrinsicVersion(): number;
|
|
51
|
+
/**
|
|
52
|
+
* @description Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
|
53
|
+
*/
|
|
54
|
+
get genesisHash(): Hash;
|
|
55
|
+
/**
|
|
56
|
+
* @description true is the underlying provider is connected
|
|
57
|
+
*/
|
|
58
|
+
get isConnected(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @description The library information name & version (from package.json)
|
|
61
|
+
*/
|
|
62
|
+
get libraryInfo(): string;
|
|
63
|
+
/**
|
|
64
|
+
* @description Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
|
65
|
+
*
|
|
66
|
+
* All calls inside the namespace, is denoted by `section`.`method` and may take an optional query parameter. As an example, `api.query.timestamp.now()` (current block timestamp) does not take parameters, while `api.query.system.account(<accountId>)` (retrieving the associated nonce & balances for an account), takes the `AccountId` as a parameter.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* <BR>
|
|
70
|
+
*
|
|
71
|
+
* ```javascript
|
|
72
|
+
* api.query.system.account(<accountId>, ([nonce, balance]) => {
|
|
73
|
+
* console.log('new free balance', balance.free, 'new nonce', nonce);
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
get query(): QueryableStorage<ApiType>;
|
|
78
|
+
/**
|
|
79
|
+
* @description Allows for the querying of multiple storage entries and the combination thereof into a single result. This is a very optimal way to make multiple queries since it only makes a single connection to the node and retrieves the data over one subscription.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* <BR>
|
|
83
|
+
*
|
|
84
|
+
* ```javascript
|
|
85
|
+
* const unsub = await api.queryMulti(
|
|
86
|
+
* [
|
|
87
|
+
* // you can include the storage without any parameters
|
|
88
|
+
* api.query.balances.totalIssuance,
|
|
89
|
+
* // or you can pass parameters to the storage query
|
|
90
|
+
* [api.query.system.account, '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY']
|
|
91
|
+
* ],
|
|
92
|
+
* ([existential, [, { free }]]) => {
|
|
93
|
+
* console.log(`You have ${free.sub(existential)} more than the existential deposit`);
|
|
94
|
+
*
|
|
95
|
+
* unsub();
|
|
96
|
+
* }
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
get queryMulti(): QueryableStorageMulti<ApiType>;
|
|
101
|
+
/**
|
|
102
|
+
* @description Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
|
103
|
+
*
|
|
104
|
+
* RPC endpoints available here allow for the query of chain, node and system information, in addition to providing interfaces for the raw queries of state (using known keys) and the submission of transactions.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* <BR>
|
|
108
|
+
*
|
|
109
|
+
* ```javascript
|
|
110
|
+
* api.rpc.chain.subscribeNewHeads((header) => {
|
|
111
|
+
* console.log('new header', header);
|
|
112
|
+
* });
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
get rpc(): DecoratedRpc<ApiType, RpcInterface>;
|
|
116
|
+
/**
|
|
117
|
+
* @description Contains the chain information for the current node.
|
|
118
|
+
*/
|
|
119
|
+
get runtimeChain(): Text;
|
|
120
|
+
/**
|
|
121
|
+
* @description Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
|
122
|
+
*/
|
|
123
|
+
get runtimeMetadata(): Metadata;
|
|
124
|
+
/**
|
|
125
|
+
* @description Contains the version information for the current runtime.
|
|
126
|
+
*/
|
|
127
|
+
get runtimeVersion(): RuntimeVersion;
|
|
128
|
+
/**
|
|
129
|
+
* @description The underlying Rx API interface
|
|
130
|
+
*/
|
|
131
|
+
get rx(): Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query' | 'call'>;
|
|
132
|
+
/**
|
|
133
|
+
* @description Returns the underlying provider stats
|
|
134
|
+
*/
|
|
135
|
+
get stats(): RpcCoreStats | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* @description The type of this API instance, either 'rxjs' or 'promise'
|
|
138
|
+
*/
|
|
139
|
+
get type(): ApiTypes;
|
|
140
|
+
/**
|
|
141
|
+
* @description Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* <BR>
|
|
145
|
+
*
|
|
146
|
+
* ```javascript
|
|
147
|
+
* api.tx.balances
|
|
148
|
+
* .transferAllowDeath(<recipientId>, <balance>)
|
|
149
|
+
* .signAndSend(<keyPair>, ({status}) => {
|
|
150
|
+
* console.log('tx status', status.asFinalized.toHex());
|
|
151
|
+
* });
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
get tx(): SubmittableExtrinsics<ApiType>;
|
|
155
|
+
/**
|
|
156
|
+
* @description Finds the definition for a specific [[CallFunction]] based on the index supplied
|
|
157
|
+
*/
|
|
158
|
+
findCall(callIndex: Uint8Array | string): CallFunction;
|
|
159
|
+
/**
|
|
160
|
+
* @description Finds the definition for a specific [[RegistryError]] based on the index supplied
|
|
161
|
+
*/
|
|
162
|
+
findError(errorIndex: Uint8Array | string): RegistryError;
|
|
163
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Getters = void 0;
|
|
4
|
+
const packageInfo_js_1 = require("../packageInfo.js");
|
|
5
|
+
const find_js_1 = require("./find.js");
|
|
6
|
+
const Init_js_1 = require("./Init.js");
|
|
7
|
+
function assertResult(value) {
|
|
8
|
+
if (value === undefined) {
|
|
9
|
+
throw new Error("Api interfaces needs to be initialized before using, wait for 'isReady'");
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
class Getters extends Init_js_1.Init {
|
|
14
|
+
/**
|
|
15
|
+
* @description Runtime call interfaces (currently untyped, only decorated via API options)
|
|
16
|
+
*/
|
|
17
|
+
get call() {
|
|
18
|
+
return assertResult(this._call);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @description Contains the parameter types (constants) of all modules.
|
|
22
|
+
*
|
|
23
|
+
* The values are instances of the appropriate type and are accessible using `section`.`constantName`,
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <BR>
|
|
27
|
+
*
|
|
28
|
+
* ```javascript
|
|
29
|
+
* console.log(api.consts.democracy.enactmentPeriod.toString())
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
get consts() {
|
|
33
|
+
return assertResult(this._consts);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @description Derived results that are injected into the API, allowing for combinations of various query results.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* <BR>
|
|
40
|
+
*
|
|
41
|
+
* ```javascript
|
|
42
|
+
* api.derive.chain.bestNumber((number) => {
|
|
43
|
+
* console.log('best number', number);
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
get derive() {
|
|
48
|
+
return assertResult(this._derive);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @description Errors from metadata
|
|
52
|
+
*/
|
|
53
|
+
get errors() {
|
|
54
|
+
return assertResult(this._errors);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @description Events from metadata
|
|
58
|
+
*/
|
|
59
|
+
get events() {
|
|
60
|
+
return assertResult(this._events);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @description Returns the version of extrinsics in-use on this chain
|
|
64
|
+
*/
|
|
65
|
+
get extrinsicVersion() {
|
|
66
|
+
return this._extrinsicType;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @description Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
|
70
|
+
*/
|
|
71
|
+
get genesisHash() {
|
|
72
|
+
return assertResult(this._genesisHash);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @description true is the underlying provider is connected
|
|
76
|
+
*/
|
|
77
|
+
get isConnected() {
|
|
78
|
+
return this._isConnected.getValue();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @description The library information name & version (from package.json)
|
|
82
|
+
*/
|
|
83
|
+
get libraryInfo() {
|
|
84
|
+
return `${packageInfo_js_1.packageInfo.name} v${packageInfo_js_1.packageInfo.version}`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @description Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
|
88
|
+
*
|
|
89
|
+
* All calls inside the namespace, is denoted by `section`.`method` and may take an optional query parameter. As an example, `api.query.timestamp.now()` (current block timestamp) does not take parameters, while `api.query.system.account(<accountId>)` (retrieving the associated nonce & balances for an account), takes the `AccountId` as a parameter.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* <BR>
|
|
93
|
+
*
|
|
94
|
+
* ```javascript
|
|
95
|
+
* api.query.system.account(<accountId>, ([nonce, balance]) => {
|
|
96
|
+
* console.log('new free balance', balance.free, 'new nonce', nonce);
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
get query() {
|
|
101
|
+
return assertResult(this._query);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @description Allows for the querying of multiple storage entries and the combination thereof into a single result. This is a very optimal way to make multiple queries since it only makes a single connection to the node and retrieves the data over one subscription.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* <BR>
|
|
108
|
+
*
|
|
109
|
+
* ```javascript
|
|
110
|
+
* const unsub = await api.queryMulti(
|
|
111
|
+
* [
|
|
112
|
+
* // you can include the storage without any parameters
|
|
113
|
+
* api.query.balances.totalIssuance,
|
|
114
|
+
* // or you can pass parameters to the storage query
|
|
115
|
+
* [api.query.system.account, '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY']
|
|
116
|
+
* ],
|
|
117
|
+
* ([existential, [, { free }]]) => {
|
|
118
|
+
* console.log(`You have ${free.sub(existential)} more than the existential deposit`);
|
|
119
|
+
*
|
|
120
|
+
* unsub();
|
|
121
|
+
* }
|
|
122
|
+
* );
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
get queryMulti() {
|
|
126
|
+
return assertResult(this._queryMulti);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @description Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
|
130
|
+
*
|
|
131
|
+
* RPC endpoints available here allow for the query of chain, node and system information, in addition to providing interfaces for the raw queries of state (using known keys) and the submission of transactions.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* <BR>
|
|
135
|
+
*
|
|
136
|
+
* ```javascript
|
|
137
|
+
* api.rpc.chain.subscribeNewHeads((header) => {
|
|
138
|
+
* console.log('new header', header);
|
|
139
|
+
* });
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
get rpc() {
|
|
143
|
+
return assertResult(this._rpc);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @description Contains the chain information for the current node.
|
|
147
|
+
*/
|
|
148
|
+
get runtimeChain() {
|
|
149
|
+
return assertResult(this._runtimeChain);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @description Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
|
153
|
+
*/
|
|
154
|
+
get runtimeMetadata() {
|
|
155
|
+
return assertResult(this._runtimeMetadata);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @description Contains the version information for the current runtime.
|
|
159
|
+
*/
|
|
160
|
+
get runtimeVersion() {
|
|
161
|
+
return assertResult(this._runtimeVersion);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @description The underlying Rx API interface
|
|
165
|
+
*/
|
|
166
|
+
get rx() {
|
|
167
|
+
return assertResult(this._rx);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @description Returns the underlying provider stats
|
|
171
|
+
*/
|
|
172
|
+
get stats() {
|
|
173
|
+
return this._rpcCore.stats;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* @description The type of this API instance, either 'rxjs' or 'promise'
|
|
177
|
+
*/
|
|
178
|
+
get type() {
|
|
179
|
+
return this._type;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @description Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* <BR>
|
|
186
|
+
*
|
|
187
|
+
* ```javascript
|
|
188
|
+
* api.tx.balances
|
|
189
|
+
* .transferAllowDeath(<recipientId>, <balance>)
|
|
190
|
+
* .signAndSend(<keyPair>, ({status}) => {
|
|
191
|
+
* console.log('tx status', status.asFinalized.toHex());
|
|
192
|
+
* });
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
get tx() {
|
|
196
|
+
return assertResult(this._extrinsics);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @description Finds the definition for a specific [[CallFunction]] based on the index supplied
|
|
200
|
+
*/
|
|
201
|
+
findCall(callIndex) {
|
|
202
|
+
return (0, find_js_1.findCall)(this.registry, callIndex);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @description Finds the definition for a specific [[RegistryError]] based on the index supplied
|
|
206
|
+
*/
|
|
207
|
+
findError(errorIndex) {
|
|
208
|
+
return (0, find_js_1.findError)(this.registry, errorIndex);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
exports.Getters = Getters;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RuntimeVersion } from '@pezkuwi/types/interfaces';
|
|
2
|
+
import type { ApiDecoration, ApiOptions, ApiTypes, DecorateMethod } from '../types/index.js';
|
|
3
|
+
import type { VersionedRegistry } from './types.js';
|
|
4
|
+
import { Decorate } from './Decorate.js';
|
|
5
|
+
export declare abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>);
|
|
8
|
+
/**
|
|
9
|
+
* @description Decorates a registry based on the runtime version
|
|
10
|
+
*/
|
|
11
|
+
private _initRegistry;
|
|
12
|
+
/**
|
|
13
|
+
* @description Returns the default versioned registry
|
|
14
|
+
*/
|
|
15
|
+
private _getDefaultRegistry;
|
|
16
|
+
/**
|
|
17
|
+
* @description Returns a decorated API instance at a specific point in time
|
|
18
|
+
*/
|
|
19
|
+
at(blockHash: Uint8Array | string, knownVersion?: RuntimeVersion): Promise<ApiDecoration<ApiType>>;
|
|
20
|
+
private _createBlockRegistry;
|
|
21
|
+
private _cacheBlockRegistryProgress;
|
|
22
|
+
private _getBlockRegistryViaVersion;
|
|
23
|
+
private _getBlockRegistryViaHash;
|
|
24
|
+
/**
|
|
25
|
+
* @description Sets up a registry based on the block hash defined
|
|
26
|
+
*/
|
|
27
|
+
getBlockRegistry(blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>>;
|
|
28
|
+
protected _loadMeta(): Promise<boolean>;
|
|
29
|
+
private _metaFromSource;
|
|
30
|
+
private _subscribeUpdates;
|
|
31
|
+
private _metaFromChain;
|
|
32
|
+
private _initFromMeta;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*
|
|
36
|
+
* Tries to use runtime api calls to retrieve metadata. This ensures the api initializes with the latest metadata.
|
|
37
|
+
* If the runtime call is not there it will use the rpc method.
|
|
38
|
+
*/
|
|
39
|
+
private _retrieveMetadata;
|
|
40
|
+
private _subscribeHealth;
|
|
41
|
+
private _unsubscribeHealth;
|
|
42
|
+
private _unsubscribeUpdates;
|
|
43
|
+
protected _unsubscribe(): void;
|
|
44
|
+
}
|