@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
package/cjs/rx/Api.d.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { Observable } from 'rxjs';
|
|
2
|
+
import type { ApiOptions } from '../types/index.js';
|
|
3
|
+
import { ApiBase } from '../base/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* # @pezkuwi/api/rx
|
|
6
|
+
*
|
|
7
|
+
* ## Overview
|
|
8
|
+
*
|
|
9
|
+
* @name ApiRx
|
|
10
|
+
*
|
|
11
|
+
* @description
|
|
12
|
+
* ApiRx is a powerful RxJS Observable wrapper around the RPC and interfaces on the Pezkuwi network. As a full Observable API, all interface calls return RxJS Observables, including the static `.create(...)`. In the same fashion and subscription-based methods return long-running Observables that update with the latest values.
|
|
13
|
+
*
|
|
14
|
+
* The API is well suited to real-time applications where the latest state is needed, unlocking the subscription-based features of Pezkuwi (and Bizinikiwi) clients. Some familiarity with RxJS is a requirement to use the API, however just understanding `.subscribe` and `.pipe` on Observables will unlock full-scale use thereof.
|
|
15
|
+
*
|
|
16
|
+
* @see [[ApiPromise]]
|
|
17
|
+
*
|
|
18
|
+
* ## Usage
|
|
19
|
+
*
|
|
20
|
+
* Making rpc calls -
|
|
21
|
+
* <BR>
|
|
22
|
+
*
|
|
23
|
+
* ```javascript
|
|
24
|
+
* import ApiRx from '@pezkuwi/api/rx';
|
|
25
|
+
*
|
|
26
|
+
* // initialize via Promise & static create
|
|
27
|
+
* const api = await ApiRx.create().toPromise();
|
|
28
|
+
*
|
|
29
|
+
* // make a call to retrieve the current network head
|
|
30
|
+
* api.rpc.chain.subscribeNewHeads().subscribe((header) => {
|
|
31
|
+
* console.log(`Chain is at #${header.number}`);
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
* <BR>
|
|
35
|
+
*
|
|
36
|
+
* Subscribing to chain state -
|
|
37
|
+
* <BR>
|
|
38
|
+
*
|
|
39
|
+
* ```javascript
|
|
40
|
+
* import { combineLatest, pairwise, switchMap } from 'rxjs';
|
|
41
|
+
* import { ApiRx, WsProvider } from '@pezkuwi/api';
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* // initialize a provider with a specific endpoint
|
|
45
|
+
* const provider = new WsProvider('wss://example.com:9944')
|
|
46
|
+
*
|
|
47
|
+
* // initialize via isReady & new with specific provider
|
|
48
|
+
* new ApiRx({ provider })
|
|
49
|
+
* .isReady
|
|
50
|
+
* .pipe(
|
|
51
|
+
* switchMap((api) =>
|
|
52
|
+
* combineLatest([
|
|
53
|
+
* api.query.timestamp.blockPeriod(),
|
|
54
|
+
* api.query.timestamp.now().pipe(pairwise())
|
|
55
|
+
* ])
|
|
56
|
+
* )
|
|
57
|
+
* )
|
|
58
|
+
* .subscribe(([blockPeriod, timestamp]) => {
|
|
59
|
+
* const elapsed = timestamp[1].toNumber() - timestamp[0].toNumber();
|
|
60
|
+
* console.log(`timestamp ${timestamp[1]} \nelapsed ${elapsed} \n(${blockPeriod}s target)`);
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
* <BR>
|
|
64
|
+
*
|
|
65
|
+
* Submitting a transaction -
|
|
66
|
+
* <BR>
|
|
67
|
+
*
|
|
68
|
+
* ```javascript
|
|
69
|
+
* import { first, switchMap } from 'rxjs';
|
|
70
|
+
* import ApiRx from '@pezkuwi/api/rx';
|
|
71
|
+
*
|
|
72
|
+
* // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
|
|
73
|
+
* import testingPairs from '@pezkuwi/keyring/testingPairs';
|
|
74
|
+
* const keyring = testingPairs();
|
|
75
|
+
*
|
|
76
|
+
* // get api via Promise
|
|
77
|
+
* const api = await ApiRx.create().toPromise();
|
|
78
|
+
*
|
|
79
|
+
* // retrieve nonce for the account
|
|
80
|
+
* api.query.system
|
|
81
|
+
* .account(keyring.alice.address)
|
|
82
|
+
* .pipe(
|
|
83
|
+
* first(),
|
|
84
|
+
* // pipe nonce into transfer
|
|
85
|
+
* switchMap(([nonce]) =>
|
|
86
|
+
* api.tx.balances
|
|
87
|
+
* // create transfer
|
|
88
|
+
* .transferAllowDeath(keyring.bob.address, 12345)
|
|
89
|
+
* // sign the transaction
|
|
90
|
+
* .sign(keyring.alice, { nonce })
|
|
91
|
+
* // send the transaction
|
|
92
|
+
* .send()
|
|
93
|
+
* )
|
|
94
|
+
* )
|
|
95
|
+
* // subscribe to overall result
|
|
96
|
+
* .subscribe(({ status }) => {
|
|
97
|
+
* if (status.isInBlock) {
|
|
98
|
+
* console.log('Completed at block hash', status.asFinalized.toHex());
|
|
99
|
+
* }
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare class ApiRx extends ApiBase<'rxjs'> {
|
|
104
|
+
#private;
|
|
105
|
+
/**
|
|
106
|
+
* @description Create an instance of the ApiRx class
|
|
107
|
+
* @param options Options to create an instance. Can be either [[ApiOptions]] or [[WsProvider]]
|
|
108
|
+
* @example
|
|
109
|
+
* <BR>
|
|
110
|
+
*
|
|
111
|
+
* ```javascript
|
|
112
|
+
* import { switchMap } from 'rxjs';
|
|
113
|
+
* import Api from '@pezkuwi/api/rx';
|
|
114
|
+
*
|
|
115
|
+
* new Api().isReady
|
|
116
|
+
* .pipe(
|
|
117
|
+
* switchMap((api) =>
|
|
118
|
+
* api.rpc.chain.subscribeNewHeads()
|
|
119
|
+
* ))
|
|
120
|
+
* .subscribe((header) => {
|
|
121
|
+
* console.log(`new block #${header.number.toNumber()}`);
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
constructor(options?: ApiOptions);
|
|
126
|
+
/**
|
|
127
|
+
* @description Creates an ApiRx instance using the supplied provider. Returns an Observable containing the actual Api instance.
|
|
128
|
+
* @param options options that is passed to the class constructor. Can be either [[ApiOptions]] or [[WsProvider]]
|
|
129
|
+
* @example
|
|
130
|
+
* <BR>
|
|
131
|
+
*
|
|
132
|
+
* ```javascript
|
|
133
|
+
* import { switchMap } from 'rxjs';
|
|
134
|
+
* import Api from '@pezkuwi/api/rx';
|
|
135
|
+
*
|
|
136
|
+
* Api.create()
|
|
137
|
+
* .pipe(
|
|
138
|
+
* switchMap((api) =>
|
|
139
|
+
* api.rpc.chain.subscribeNewHeads()
|
|
140
|
+
* ))
|
|
141
|
+
* .subscribe((header) => {
|
|
142
|
+
* console.log(`new block #${header.number.toNumber()}`);
|
|
143
|
+
* });
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
static create(options?: ApiOptions): Observable<ApiRx>;
|
|
147
|
+
/**
|
|
148
|
+
* @description Observable that returns the first time we are connected and loaded
|
|
149
|
+
*/
|
|
150
|
+
get isReady(): Observable<ApiRx>;
|
|
151
|
+
/**
|
|
152
|
+
* @description Returns a clone of this ApiRx instance (new underlying provider connection)
|
|
153
|
+
*/
|
|
154
|
+
clone(): ApiRx;
|
|
155
|
+
}
|
package/cjs/rx/Api.js
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiRx = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const util_1 = require("@pezkuwi/util");
|
|
6
|
+
const index_js_1 = require("../base/index.js");
|
|
7
|
+
const decorateMethod_js_1 = require("./decorateMethod.js");
|
|
8
|
+
/**
|
|
9
|
+
* # @pezkuwi/api/rx
|
|
10
|
+
*
|
|
11
|
+
* ## Overview
|
|
12
|
+
*
|
|
13
|
+
* @name ApiRx
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* ApiRx is a powerful RxJS Observable wrapper around the RPC and interfaces on the Pezkuwi network. As a full Observable API, all interface calls return RxJS Observables, including the static `.create(...)`. In the same fashion and subscription-based methods return long-running Observables that update with the latest values.
|
|
17
|
+
*
|
|
18
|
+
* The API is well suited to real-time applications where the latest state is needed, unlocking the subscription-based features of Pezkuwi (and Bizinikiwi) clients. Some familiarity with RxJS is a requirement to use the API, however just understanding `.subscribe` and `.pipe` on Observables will unlock full-scale use thereof.
|
|
19
|
+
*
|
|
20
|
+
* @see [[ApiPromise]]
|
|
21
|
+
*
|
|
22
|
+
* ## Usage
|
|
23
|
+
*
|
|
24
|
+
* Making rpc calls -
|
|
25
|
+
* <BR>
|
|
26
|
+
*
|
|
27
|
+
* ```javascript
|
|
28
|
+
* import ApiRx from '@pezkuwi/api/rx';
|
|
29
|
+
*
|
|
30
|
+
* // initialize via Promise & static create
|
|
31
|
+
* const api = await ApiRx.create().toPromise();
|
|
32
|
+
*
|
|
33
|
+
* // make a call to retrieve the current network head
|
|
34
|
+
* api.rpc.chain.subscribeNewHeads().subscribe((header) => {
|
|
35
|
+
* console.log(`Chain is at #${header.number}`);
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
* <BR>
|
|
39
|
+
*
|
|
40
|
+
* Subscribing to chain state -
|
|
41
|
+
* <BR>
|
|
42
|
+
*
|
|
43
|
+
* ```javascript
|
|
44
|
+
* import { combineLatest, pairwise, switchMap } from 'rxjs';
|
|
45
|
+
* import { ApiRx, WsProvider } from '@pezkuwi/api';
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* // initialize a provider with a specific endpoint
|
|
49
|
+
* const provider = new WsProvider('wss://example.com:9944')
|
|
50
|
+
*
|
|
51
|
+
* // initialize via isReady & new with specific provider
|
|
52
|
+
* new ApiRx({ provider })
|
|
53
|
+
* .isReady
|
|
54
|
+
* .pipe(
|
|
55
|
+
* switchMap((api) =>
|
|
56
|
+
* combineLatest([
|
|
57
|
+
* api.query.timestamp.blockPeriod(),
|
|
58
|
+
* api.query.timestamp.now().pipe(pairwise())
|
|
59
|
+
* ])
|
|
60
|
+
* )
|
|
61
|
+
* )
|
|
62
|
+
* .subscribe(([blockPeriod, timestamp]) => {
|
|
63
|
+
* const elapsed = timestamp[1].toNumber() - timestamp[0].toNumber();
|
|
64
|
+
* console.log(`timestamp ${timestamp[1]} \nelapsed ${elapsed} \n(${blockPeriod}s target)`);
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
* <BR>
|
|
68
|
+
*
|
|
69
|
+
* Submitting a transaction -
|
|
70
|
+
* <BR>
|
|
71
|
+
*
|
|
72
|
+
* ```javascript
|
|
73
|
+
* import { first, switchMap } from 'rxjs';
|
|
74
|
+
* import ApiRx from '@pezkuwi/api/rx';
|
|
75
|
+
*
|
|
76
|
+
* // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
|
|
77
|
+
* import testingPairs from '@pezkuwi/keyring/testingPairs';
|
|
78
|
+
* const keyring = testingPairs();
|
|
79
|
+
*
|
|
80
|
+
* // get api via Promise
|
|
81
|
+
* const api = await ApiRx.create().toPromise();
|
|
82
|
+
*
|
|
83
|
+
* // retrieve nonce for the account
|
|
84
|
+
* api.query.system
|
|
85
|
+
* .account(keyring.alice.address)
|
|
86
|
+
* .pipe(
|
|
87
|
+
* first(),
|
|
88
|
+
* // pipe nonce into transfer
|
|
89
|
+
* switchMap(([nonce]) =>
|
|
90
|
+
* api.tx.balances
|
|
91
|
+
* // create transfer
|
|
92
|
+
* .transferAllowDeath(keyring.bob.address, 12345)
|
|
93
|
+
* // sign the transaction
|
|
94
|
+
* .sign(keyring.alice, { nonce })
|
|
95
|
+
* // send the transaction
|
|
96
|
+
* .send()
|
|
97
|
+
* )
|
|
98
|
+
* )
|
|
99
|
+
* // subscribe to overall result
|
|
100
|
+
* .subscribe(({ status }) => {
|
|
101
|
+
* if (status.isInBlock) {
|
|
102
|
+
* console.log('Completed at block hash', status.asFinalized.toHex());
|
|
103
|
+
* }
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
class ApiRx extends index_js_1.ApiBase {
|
|
108
|
+
#isReadyRx;
|
|
109
|
+
/**
|
|
110
|
+
* @description Create an instance of the ApiRx class
|
|
111
|
+
* @param options Options to create an instance. Can be either [[ApiOptions]] or [[WsProvider]]
|
|
112
|
+
* @example
|
|
113
|
+
* <BR>
|
|
114
|
+
*
|
|
115
|
+
* ```javascript
|
|
116
|
+
* import { switchMap } from 'rxjs';
|
|
117
|
+
* import Api from '@pezkuwi/api/rx';
|
|
118
|
+
*
|
|
119
|
+
* new Api().isReady
|
|
120
|
+
* .pipe(
|
|
121
|
+
* switchMap((api) =>
|
|
122
|
+
* api.rpc.chain.subscribeNewHeads()
|
|
123
|
+
* ))
|
|
124
|
+
* .subscribe((header) => {
|
|
125
|
+
* console.log(`new block #${header.number.toNumber()}`);
|
|
126
|
+
* });
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
constructor(options) {
|
|
130
|
+
super(options, 'rxjs', decorateMethod_js_1.toRxMethod);
|
|
131
|
+
this.#isReadyRx = (0, rxjs_1.from)(
|
|
132
|
+
// You can create an observable from an event, however my mind groks this form better
|
|
133
|
+
new Promise((resolve) => {
|
|
134
|
+
super.on('ready', () => resolve(this));
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @description Creates an ApiRx instance using the supplied provider. Returns an Observable containing the actual Api instance.
|
|
139
|
+
* @param options options that is passed to the class constructor. Can be either [[ApiOptions]] or [[WsProvider]]
|
|
140
|
+
* @example
|
|
141
|
+
* <BR>
|
|
142
|
+
*
|
|
143
|
+
* ```javascript
|
|
144
|
+
* import { switchMap } from 'rxjs';
|
|
145
|
+
* import Api from '@pezkuwi/api/rx';
|
|
146
|
+
*
|
|
147
|
+
* Api.create()
|
|
148
|
+
* .pipe(
|
|
149
|
+
* switchMap((api) =>
|
|
150
|
+
* api.rpc.chain.subscribeNewHeads()
|
|
151
|
+
* ))
|
|
152
|
+
* .subscribe((header) => {
|
|
153
|
+
* console.log(`new block #${header.number.toNumber()}`);
|
|
154
|
+
* });
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
static create(options) {
|
|
158
|
+
return new ApiRx(options).isReady;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* @description Observable that returns the first time we are connected and loaded
|
|
162
|
+
*/
|
|
163
|
+
get isReady() {
|
|
164
|
+
return this.#isReadyRx;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @description Returns a clone of this ApiRx instance (new underlying provider connection)
|
|
168
|
+
*/
|
|
169
|
+
clone() {
|
|
170
|
+
return new ApiRx((0, util_1.objectSpread)({}, this._options, { source: this }));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.ApiRx = ApiRx;
|
package/cjs/rx/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toRxMethod = exports.ApiRx = void 0;
|
|
4
|
+
var Api_js_1 = require("./Api.js");
|
|
5
|
+
Object.defineProperty(exports, "ApiRx", { enumerable: true, get: function () { return Api_js_1.ApiRx; } });
|
|
6
|
+
var decorateMethod_js_1 = require("./decorateMethod.js");
|
|
7
|
+
Object.defineProperty(exports, "toRxMethod", { enumerable: true, get: function () { return decorateMethod_js_1.toRxMethod; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BlockNumber, DispatchError, DispatchInfo, EventRecord, ExtrinsicStatus, Hash } from '@pezkuwi/types/interfaces';
|
|
2
|
+
import type { AnyJson, ISubmittableResult } from '@pezkuwi/types/types';
|
|
3
|
+
import type { SubmittableResultValue } from './types.js';
|
|
4
|
+
export declare class SubmittableResult implements ISubmittableResult {
|
|
5
|
+
readonly dispatchError?: DispatchError | undefined;
|
|
6
|
+
readonly dispatchInfo?: DispatchInfo | undefined;
|
|
7
|
+
readonly internalError?: Error | undefined;
|
|
8
|
+
readonly events: EventRecord[];
|
|
9
|
+
readonly status: ExtrinsicStatus;
|
|
10
|
+
readonly txHash: Hash;
|
|
11
|
+
readonly txIndex?: number | undefined;
|
|
12
|
+
readonly blockNumber?: BlockNumber | undefined;
|
|
13
|
+
constructor({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue);
|
|
14
|
+
get isCompleted(): boolean;
|
|
15
|
+
get isError(): boolean;
|
|
16
|
+
get isFinalized(): boolean;
|
|
17
|
+
get isInBlock(): boolean;
|
|
18
|
+
get isWarning(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description Filters EventRecords for the specified method & section (there could be multiple)
|
|
21
|
+
*/
|
|
22
|
+
filterRecords(section: string, method: string | string[]): EventRecord[];
|
|
23
|
+
/**
|
|
24
|
+
* @description Finds an EventRecord for the specified method & section
|
|
25
|
+
*/
|
|
26
|
+
findRecord(section: string, method: string | string[]): EventRecord | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* @description Creates a human representation of the output
|
|
29
|
+
*/
|
|
30
|
+
toHuman(isExtended?: boolean): AnyJson;
|
|
31
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubmittableResult = void 0;
|
|
4
|
+
const recordIdentity = (record) => record;
|
|
5
|
+
function filterAndApply(events, section, methods, onFound) {
|
|
6
|
+
return events
|
|
7
|
+
.filter(({ event }) => section === event.section &&
|
|
8
|
+
methods.includes(event.method))
|
|
9
|
+
.map((record) => onFound(record));
|
|
10
|
+
}
|
|
11
|
+
function getDispatchError({ event: { data: [dispatchError] } }) {
|
|
12
|
+
return dispatchError;
|
|
13
|
+
}
|
|
14
|
+
function getDispatchInfo({ event: { data, method } }) {
|
|
15
|
+
return method === 'ExtrinsicSuccess'
|
|
16
|
+
? data[0]
|
|
17
|
+
: data[1];
|
|
18
|
+
}
|
|
19
|
+
function extractError(events = []) {
|
|
20
|
+
return filterAndApply(events, 'system', ['ExtrinsicFailed'], getDispatchError)[0];
|
|
21
|
+
}
|
|
22
|
+
function extractInfo(events = []) {
|
|
23
|
+
return filterAndApply(events, 'system', ['ExtrinsicFailed', 'ExtrinsicSuccess'], getDispatchInfo)[0];
|
|
24
|
+
}
|
|
25
|
+
class SubmittableResult {
|
|
26
|
+
dispatchError;
|
|
27
|
+
dispatchInfo;
|
|
28
|
+
internalError;
|
|
29
|
+
events;
|
|
30
|
+
status;
|
|
31
|
+
txHash;
|
|
32
|
+
txIndex;
|
|
33
|
+
blockNumber;
|
|
34
|
+
constructor({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }) {
|
|
35
|
+
this.dispatchError = dispatchError || extractError(events);
|
|
36
|
+
this.dispatchInfo = dispatchInfo || extractInfo(events);
|
|
37
|
+
this.events = events || [];
|
|
38
|
+
this.internalError = internalError;
|
|
39
|
+
this.status = status;
|
|
40
|
+
this.txHash = txHash;
|
|
41
|
+
this.txIndex = txIndex;
|
|
42
|
+
this.blockNumber = blockNumber;
|
|
43
|
+
}
|
|
44
|
+
get isCompleted() {
|
|
45
|
+
return this.isError || this.status.isInBlock || this.status.isFinalized;
|
|
46
|
+
}
|
|
47
|
+
get isError() {
|
|
48
|
+
return this.status.isDropped || this.status.isFinalityTimeout || this.status.isInvalid || this.status.isUsurped;
|
|
49
|
+
}
|
|
50
|
+
get isFinalized() {
|
|
51
|
+
return this.status.isFinalized;
|
|
52
|
+
}
|
|
53
|
+
get isInBlock() {
|
|
54
|
+
return this.status.isInBlock;
|
|
55
|
+
}
|
|
56
|
+
get isWarning() {
|
|
57
|
+
return this.status.isRetracted;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @description Filters EventRecords for the specified method & section (there could be multiple)
|
|
61
|
+
*/
|
|
62
|
+
filterRecords(section, method) {
|
|
63
|
+
return filterAndApply(this.events, section, Array.isArray(method) ? method : [method], recordIdentity);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @description Finds an EventRecord for the specified method & section
|
|
67
|
+
*/
|
|
68
|
+
findRecord(section, method) {
|
|
69
|
+
return this.filterRecords(section, method)[0];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @description Creates a human representation of the output
|
|
73
|
+
*/
|
|
74
|
+
toHuman(isExtended) {
|
|
75
|
+
return {
|
|
76
|
+
dispatchError: this.dispatchError?.toHuman(),
|
|
77
|
+
dispatchInfo: this.dispatchInfo?.toHuman(),
|
|
78
|
+
events: this.events.map((e) => e.toHuman(isExtended)),
|
|
79
|
+
internalError: this.internalError?.message.toString(),
|
|
80
|
+
status: this.status.toHuman(isExtended)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.SubmittableResult = SubmittableResult;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CodecClass } from '@pezkuwi/types/types';
|
|
2
|
+
import type { ApiBase } from '../base/index.js';
|
|
3
|
+
import type { ApiInterfaceRx, ApiTypes } from '../types/index.js';
|
|
4
|
+
import type { SubmittableExtrinsic } from './types.js';
|
|
5
|
+
interface SubmittableOptions<ApiType extends ApiTypes> {
|
|
6
|
+
api: ApiInterfaceRx;
|
|
7
|
+
apiType: ApiTypes;
|
|
8
|
+
blockHash?: Uint8Array | undefined;
|
|
9
|
+
decorateMethod: ApiBase<ApiType>['_decorateMethod'];
|
|
10
|
+
}
|
|
11
|
+
export declare function createClass<ApiType extends ApiTypes>({ api, apiType, blockHash, decorateMethod }: SubmittableOptions<ApiType>): CodecClass<SubmittableExtrinsic<ApiType>>;
|
|
12
|
+
export {};
|