mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-06-20 17:21:04 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 66983cca98 | |||
| 5a042364e0 | |||
| bb61d7a5ca | |||
| df8a5095e0 | |||
| d069be2314 | |||
| 2db0d19928 | |||
| 31467f90d4 | |||
| 6e91756e5c | |||
| 7bd44393fb | |||
| c2f759f58d | |||
| c97f94045f | |||
| 1b74138baf | |||
| 2977764510 | |||
| 6f9c13a054 | |||
| e4dee9afaa | |||
| 539a05cd08 |
@@ -0,0 +1,101 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '45 23 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- name: Run manual build steps
|
||||
if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -1,6 +1,7 @@
|
||||
name: 'Lock Threads'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '10 1/3 * * *'
|
||||
|
||||
@@ -12,7 +13,7 @@ jobs:
|
||||
steps:
|
||||
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT_BOT }}
|
||||
github-token: ${{ github.token }}
|
||||
issue-inactive-days: '7'
|
||||
issue-comment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
|
||||
@@ -1,9 +1,70 @@
|
||||
# @pezkuwi/api
|
||||
|
||||
This library provides a clean wrapper around all the methods exposed by a Pezkuwi/Bizinikiwi network client and defines all the types exposed by a node. For complete documentation around the interfaces and their use, visit the [documentation portal](https://js.pezkuwichain.app/docs/api/).
|
||||
Promise and RxJS APIs for interacting with PezkuwiChain and Bizinikiwi-based networks.
|
||||
|
||||
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) when changing versions.
|
||||
**Developed by Dijital Kurdistan Tech Institute**
|
||||
|
||||
## tutorials
|
||||
## Overview
|
||||
|
||||
Looking for tutorials to get started? Look at [examples](https://js.pezkuwichain.app/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
|
||||
This library provides a clean wrapper around all the methods exposed by a PezkuwiChain/Bizinikiwi network client and defines all the types exposed by a node.
|
||||
|
||||
## Documentation
|
||||
|
||||
For complete documentation around the interfaces and their use, visit the [documentation portal](https://js.pezkuwichain.app/docs/api/).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Using npm
|
||||
npm install @pezkuwi/api
|
||||
|
||||
# Using yarn
|
||||
yarn add @pezkuwi/api
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
```javascript
|
||||
import { ApiPromise, WsProvider } from '@pezkuwi/api';
|
||||
|
||||
// Connect to a PezkuwiChain node
|
||||
const wsProvider = new WsProvider('wss://rpc.pezkuwichain.io');
|
||||
const api = await ApiPromise.create({ provider: wsProvider });
|
||||
|
||||
// Query chain info
|
||||
const chain = await api.rpc.system.chain();
|
||||
console.log(`Connected to ${chain}`);
|
||||
```
|
||||
|
||||
## Packages
|
||||
|
||||
| Package | Description |
|
||||
|---------|-------------|
|
||||
| @pezkuwi/api | Main API package |
|
||||
| @pezkuwi/api-derive | Derived API methods |
|
||||
| @pezkuwi/types | Type definitions |
|
||||
| @pezkuwi/rpc-core | RPC core functionality |
|
||||
| @pezkuwi/rpc-provider | RPC providers (WS, HTTP) |
|
||||
|
||||
## Tutorials
|
||||
|
||||
Looking for tutorials? Check out [examples](https://js.pezkuwichain.app/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
|
||||
|
||||
## Changelog
|
||||
|
||||
If you are an existing user, please track the [CHANGELOG](CHANGELOG.md) when changing versions.
|
||||
|
||||
## Links
|
||||
|
||||
- Website: https://pezkuwichain.io
|
||||
- Documentation: https://docs.pezkuwichain.io
|
||||
- API Docs: https://js.pezkuwichain.app
|
||||
- GitHub: https://github.com/pezkuwichain
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
|
||||
## Author
|
||||
|
||||
Dijital Kurdistan Tech Institute
|
||||
|
||||
+29
-11
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"version": "16.5.18",
|
||||
"versions": {
|
||||
"git": "16.5.4",
|
||||
"npm": "16.5.4"
|
||||
"git": "16.5.18",
|
||||
"npm": "16.5.22"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -40,16 +40,34 @@
|
||||
"test:one": "pezkuwi-dev-run-test --env node"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pezkuwi/dev": "^0.85.1",
|
||||
"@pezkuwi/dev-test": "^0.85.1",
|
||||
"@pezkuwi/dev-ts": "^0.85.1",
|
||||
"@pezkuwi/typegen": "^16.5.4",
|
||||
"@types/node": "^22.10.5"
|
||||
"@pezkuwi/dev": "0.85.7",
|
||||
"@pezkuwi/dev-test": "0.85.7",
|
||||
"@pezkuwi/dev-ts": "0.85.7",
|
||||
"@pezkuwi/typegen": "workspace:*",
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/yargs": "^17.0.35"
|
||||
},
|
||||
"resolutions": {
|
||||
"@pezkuwi/dev": "0.85.1",
|
||||
"@pezkuwi/dev-test": "0.85.1",
|
||||
"@pezkuwi/dev-ts": "0.85.1",
|
||||
"@pezkuwi/dev": "^0.85.7",
|
||||
"@pezkuwi/dev-test": "^0.85.7",
|
||||
"@pezkuwi/dev-ts": "^0.85.7",
|
||||
"@pezkuwi/hw-ledger": "14.0.11",
|
||||
"@pezkuwi/hw-ledger-transports": "14.0.11",
|
||||
"@pezkuwi/keyring": "14.0.11",
|
||||
"@pezkuwi/networks": "14.0.11",
|
||||
"@pezkuwi/util": "14.0.11",
|
||||
"@pezkuwi/util-crypto": "14.0.11",
|
||||
"@pezkuwi/wasm-bridge": "7.5.4",
|
||||
"@pezkuwi/wasm-crypto": "7.5.4",
|
||||
"@pezkuwi/wasm-util": "7.5.4",
|
||||
"@pezkuwi/x-bigint": "14.0.11",
|
||||
"@pezkuwi/x-bundle": "14.0.11",
|
||||
"@pezkuwi/x-fetch": "14.0.11",
|
||||
"@pezkuwi/x-global": "14.0.11",
|
||||
"@pezkuwi/x-randomvalues": "14.0.11",
|
||||
"@pezkuwi/x-textdecoder": "14.0.11",
|
||||
"@pezkuwi/x-textencoder": "14.0.11",
|
||||
"@pezkuwi/x-ws": "14.0.11",
|
||||
"typescript": "5.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -15,18 +15,446 @@
|
||||
},
|
||||
"sideEffects": [
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
"./cjs/packageDetect.js"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"version": "16.5.22",
|
||||
"main": "./cjs/index.js",
|
||||
"module": "./index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"module": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/index.d.ts",
|
||||
"default": "./cjs/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
}
|
||||
},
|
||||
"./assetHubDicle": {
|
||||
"module": "./assetHubDicle/index.js",
|
||||
"require": "./cjs/assetHubDicle/index.js",
|
||||
"default": "./assetHubDicle/index.js"
|
||||
},
|
||||
"./assetHubDicle/consts": {
|
||||
"module": "./assetHubDicle/consts.js",
|
||||
"require": "./cjs/assetHubDicle/consts.js",
|
||||
"default": "./assetHubDicle/consts.js"
|
||||
},
|
||||
"./assetHubDicle/errors": {
|
||||
"module": "./assetHubDicle/errors.js",
|
||||
"require": "./cjs/assetHubDicle/errors.js",
|
||||
"default": "./assetHubDicle/errors.js"
|
||||
},
|
||||
"./assetHubDicle/events": {
|
||||
"module": "./assetHubDicle/events.js",
|
||||
"require": "./cjs/assetHubDicle/events.js",
|
||||
"default": "./assetHubDicle/events.js"
|
||||
},
|
||||
"./assetHubDicle/query": {
|
||||
"module": "./assetHubDicle/query.js",
|
||||
"require": "./cjs/assetHubDicle/query.js",
|
||||
"default": "./assetHubDicle/query.js"
|
||||
},
|
||||
"./assetHubDicle/registry": {
|
||||
"module": "./assetHubDicle/registry.js",
|
||||
"require": "./cjs/assetHubDicle/registry.js",
|
||||
"default": "./assetHubDicle/registry.js"
|
||||
},
|
||||
"./assetHubDicle/runtime": {
|
||||
"module": "./assetHubDicle/runtime.js",
|
||||
"require": "./cjs/assetHubDicle/runtime.js",
|
||||
"default": "./assetHubDicle/runtime.js"
|
||||
},
|
||||
"./assetHubDicle/tx": {
|
||||
"module": "./assetHubDicle/tx.js",
|
||||
"require": "./cjs/assetHubDicle/tx.js",
|
||||
"default": "./assetHubDicle/tx.js"
|
||||
},
|
||||
"./assetHubPezkuwi": {
|
||||
"module": "./assetHubPezkuwi/index.js",
|
||||
"require": "./cjs/assetHubPezkuwi/index.js",
|
||||
"default": "./assetHubPezkuwi/index.js"
|
||||
},
|
||||
"./assetHubPezkuwi/consts": {
|
||||
"module": "./assetHubPezkuwi/consts.js",
|
||||
"require": "./cjs/assetHubPezkuwi/consts.js",
|
||||
"default": "./assetHubPezkuwi/consts.js"
|
||||
},
|
||||
"./assetHubPezkuwi/errors": {
|
||||
"module": "./assetHubPezkuwi/errors.js",
|
||||
"require": "./cjs/assetHubPezkuwi/errors.js",
|
||||
"default": "./assetHubPezkuwi/errors.js"
|
||||
},
|
||||
"./assetHubPezkuwi/events": {
|
||||
"module": "./assetHubPezkuwi/events.js",
|
||||
"require": "./cjs/assetHubPezkuwi/events.js",
|
||||
"default": "./assetHubPezkuwi/events.js"
|
||||
},
|
||||
"./assetHubPezkuwi/query": {
|
||||
"module": "./assetHubPezkuwi/query.js",
|
||||
"require": "./cjs/assetHubPezkuwi/query.js",
|
||||
"default": "./assetHubPezkuwi/query.js"
|
||||
},
|
||||
"./assetHubPezkuwi/registry": {
|
||||
"module": "./assetHubPezkuwi/registry.js",
|
||||
"require": "./cjs/assetHubPezkuwi/registry.js",
|
||||
"default": "./assetHubPezkuwi/registry.js"
|
||||
},
|
||||
"./assetHubPezkuwi/runtime": {
|
||||
"module": "./assetHubPezkuwi/runtime.js",
|
||||
"require": "./cjs/assetHubPezkuwi/runtime.js",
|
||||
"default": "./assetHubPezkuwi/runtime.js"
|
||||
},
|
||||
"./assetHubPezkuwi/tx": {
|
||||
"module": "./assetHubPezkuwi/tx.js",
|
||||
"require": "./cjs/assetHubPezkuwi/tx.js",
|
||||
"default": "./assetHubPezkuwi/tx.js"
|
||||
},
|
||||
"./base": {
|
||||
"module": {
|
||||
"types": "./base.d.ts",
|
||||
"default": "./base.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base.d.ts",
|
||||
"default": "./cjs/base.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base.d.ts",
|
||||
"default": "./base.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/index.d.ts",
|
||||
"default": "./bizinikiwi/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/index.d.ts",
|
||||
"default": "./cjs/bizinikiwi/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/index.d.ts",
|
||||
"default": "./bizinikiwi/index.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/consts": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/consts.d.ts",
|
||||
"default": "./bizinikiwi/consts.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/consts.d.ts",
|
||||
"default": "./cjs/bizinikiwi/consts.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/consts.d.ts",
|
||||
"default": "./bizinikiwi/consts.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/errors": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/errors.d.ts",
|
||||
"default": "./bizinikiwi/errors.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/errors.d.ts",
|
||||
"default": "./cjs/bizinikiwi/errors.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/errors.d.ts",
|
||||
"default": "./bizinikiwi/errors.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/events": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/events.d.ts",
|
||||
"default": "./bizinikiwi/events.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/events.d.ts",
|
||||
"default": "./cjs/bizinikiwi/events.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/events.d.ts",
|
||||
"default": "./bizinikiwi/events.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/query": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/query.d.ts",
|
||||
"default": "./bizinikiwi/query.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/query.d.ts",
|
||||
"default": "./cjs/bizinikiwi/query.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/query.d.ts",
|
||||
"default": "./bizinikiwi/query.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/registry": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/registry.d.ts",
|
||||
"default": "./bizinikiwi/registry.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/registry.d.ts",
|
||||
"default": "./cjs/bizinikiwi/registry.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/registry.d.ts",
|
||||
"default": "./bizinikiwi/registry.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/runtime": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/runtime.d.ts",
|
||||
"default": "./bizinikiwi/runtime.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/runtime.d.ts",
|
||||
"default": "./cjs/bizinikiwi/runtime.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/runtime.d.ts",
|
||||
"default": "./bizinikiwi/runtime.js"
|
||||
}
|
||||
},
|
||||
"./bizinikiwi/tx": {
|
||||
"module": {
|
||||
"types": "./bizinikiwi/tx.d.ts",
|
||||
"default": "./bizinikiwi/tx.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bizinikiwi/tx.d.ts",
|
||||
"default": "./cjs/bizinikiwi/tx.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bizinikiwi/tx.d.ts",
|
||||
"default": "./bizinikiwi/tx.js"
|
||||
}
|
||||
},
|
||||
"./bundle": {
|
||||
"module": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bundle.d.ts",
|
||||
"default": "./cjs/bundle.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
}
|
||||
},
|
||||
"./cjs/*": "./cjs/*.js",
|
||||
"./cjs/package.json": "./cjs/package.json",
|
||||
"./dicle/consts": {
|
||||
"module": "./dicle/consts.js",
|
||||
"require": "./cjs/dicle/consts.js",
|
||||
"default": "./dicle/consts.js"
|
||||
},
|
||||
"./dicle/errors": {
|
||||
"module": "./dicle/errors.js",
|
||||
"require": "./cjs/dicle/errors.js",
|
||||
"default": "./dicle/errors.js"
|
||||
},
|
||||
"./dicle/events": {
|
||||
"module": "./dicle/events.js",
|
||||
"require": "./cjs/dicle/events.js",
|
||||
"default": "./dicle/events.js"
|
||||
},
|
||||
"./dicle/query": {
|
||||
"module": "./dicle/query.js",
|
||||
"require": "./cjs/dicle/query.js",
|
||||
"default": "./dicle/query.js"
|
||||
},
|
||||
"./dicle/runtime": {
|
||||
"module": "./dicle/runtime.js",
|
||||
"require": "./cjs/dicle/runtime.js",
|
||||
"default": "./dicle/runtime.js"
|
||||
},
|
||||
"./dicle/tx": {
|
||||
"module": "./dicle/tx.js",
|
||||
"require": "./cjs/dicle/tx.js",
|
||||
"default": "./dicle/tx.js"
|
||||
},
|
||||
"./package.json": {
|
||||
"require": "./cjs/package.json",
|
||||
"default": "./package.json"
|
||||
},
|
||||
"./packageDetect": {
|
||||
"module": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageDetect.d.ts",
|
||||
"default": "./cjs/packageDetect.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo.js": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/index.d.ts",
|
||||
"default": "./pezkuwi/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/index.d.ts",
|
||||
"default": "./cjs/pezkuwi/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/index.d.ts",
|
||||
"default": "./pezkuwi/index.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/consts": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/consts.d.ts",
|
||||
"default": "./pezkuwi/consts.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/consts.d.ts",
|
||||
"default": "./cjs/pezkuwi/consts.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/consts.d.ts",
|
||||
"default": "./pezkuwi/consts.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/errors": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/errors.d.ts",
|
||||
"default": "./pezkuwi/errors.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/errors.d.ts",
|
||||
"default": "./cjs/pezkuwi/errors.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/errors.d.ts",
|
||||
"default": "./pezkuwi/errors.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/events": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/events.d.ts",
|
||||
"default": "./pezkuwi/events.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/events.d.ts",
|
||||
"default": "./cjs/pezkuwi/events.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/events.d.ts",
|
||||
"default": "./pezkuwi/events.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/query": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/query.d.ts",
|
||||
"default": "./pezkuwi/query.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/query.d.ts",
|
||||
"default": "./cjs/pezkuwi/query.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/query.d.ts",
|
||||
"default": "./pezkuwi/query.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/registry": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/registry.d.ts",
|
||||
"default": "./pezkuwi/registry.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/registry.d.ts",
|
||||
"default": "./cjs/pezkuwi/registry.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/registry.d.ts",
|
||||
"default": "./pezkuwi/registry.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/runtime": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/runtime.d.ts",
|
||||
"default": "./pezkuwi/runtime.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/runtime.d.ts",
|
||||
"default": "./cjs/pezkuwi/runtime.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/runtime.d.ts",
|
||||
"default": "./pezkuwi/runtime.js"
|
||||
}
|
||||
},
|
||||
"./pezkuwi/tx": {
|
||||
"module": {
|
||||
"types": "./pezkuwi/tx.d.ts",
|
||||
"default": "./pezkuwi/tx.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/pezkuwi/tx.d.ts",
|
||||
"default": "./cjs/pezkuwi/tx.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./pezkuwi/tx.d.ts",
|
||||
"default": "./pezkuwi/tx.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@pezkuwi/api-base": "16.5.4",
|
||||
"@pezkuwi/rpc-augment": "16.5.4",
|
||||
"@pezkuwi/types": "16.5.4",
|
||||
"@pezkuwi/types-augment": "16.5.4",
|
||||
"@pezkuwi/types-codec": "16.5.4",
|
||||
"@pezkuwi/util": "^14.0.1",
|
||||
"@pezkuwi/api-base": "16.5.22",
|
||||
"@pezkuwi/rpc-augment": "16.5.22",
|
||||
"@pezkuwi/types": "16.5.22",
|
||||
"@pezkuwi/types-augment": "16.5.22",
|
||||
"@pezkuwi/types-codec": "16.5.22",
|
||||
"@pezkuwi/util": "14.0.13",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
|
||||
export const packageInfo = { name: '@pezkuwi/api-augment', path: 'auto', type: 'auto', version: '16.5.4' };
|
||||
export const packageInfo = { name: '@pezkuwi/api-augment', path: 'auto', type: 'auto', version: '16.5.18' };
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -15,15 +15,249 @@
|
||||
},
|
||||
"sideEffects": [
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
"./cjs/packageDetect.js"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"version": "16.5.22",
|
||||
"main": "./cjs/index.js",
|
||||
"module": "./index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"module": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/index.d.ts",
|
||||
"default": "./cjs/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
}
|
||||
},
|
||||
"./bundle": {
|
||||
"module": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bundle.d.ts",
|
||||
"default": "./cjs/bundle.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
}
|
||||
},
|
||||
"./cjs/*": "./cjs/*.js",
|
||||
"./cjs/package.json": "./cjs/package.json",
|
||||
"./package.json": {
|
||||
"require": "./cjs/package.json",
|
||||
"default": "./package.json"
|
||||
},
|
||||
"./packageDetect": {
|
||||
"module": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageDetect.d.ts",
|
||||
"default": "./cjs/packageDetect.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo.js": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./types": {
|
||||
"module": {
|
||||
"types": "./types/index.d.ts",
|
||||
"default": "./types/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/index.d.ts",
|
||||
"default": "./cjs/types/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/index.d.ts",
|
||||
"default": "./types/index.js"
|
||||
}
|
||||
},
|
||||
"./types/api": {
|
||||
"module": {
|
||||
"types": "./types/api.d.ts",
|
||||
"default": "./types/api.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/api.d.ts",
|
||||
"default": "./cjs/types/api.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/api.d.ts",
|
||||
"default": "./types/api.js"
|
||||
}
|
||||
},
|
||||
"./types/base": {
|
||||
"module": {
|
||||
"types": "./types/base.d.ts",
|
||||
"default": "./types/base.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/base.d.ts",
|
||||
"default": "./cjs/types/base.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/base.d.ts",
|
||||
"default": "./types/base.js"
|
||||
}
|
||||
},
|
||||
"./types/calls": {
|
||||
"module": {
|
||||
"types": "./types/calls.d.ts",
|
||||
"default": "./types/calls.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/calls.d.ts",
|
||||
"default": "./cjs/types/calls.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/calls.d.ts",
|
||||
"default": "./types/calls.js"
|
||||
}
|
||||
},
|
||||
"./types/consts": {
|
||||
"module": {
|
||||
"types": "./types/consts.d.ts",
|
||||
"default": "./types/consts.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/consts.d.ts",
|
||||
"default": "./cjs/types/consts.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/consts.d.ts",
|
||||
"default": "./types/consts.js"
|
||||
}
|
||||
},
|
||||
"./types/derive": {
|
||||
"module": {
|
||||
"types": "./types/derive.d.ts",
|
||||
"default": "./types/derive.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/derive.d.ts",
|
||||
"default": "./cjs/types/derive.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/derive.d.ts",
|
||||
"default": "./types/derive.js"
|
||||
}
|
||||
},
|
||||
"./types/errors": {
|
||||
"module": {
|
||||
"types": "./types/errors.d.ts",
|
||||
"default": "./types/errors.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/errors.d.ts",
|
||||
"default": "./cjs/types/errors.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/errors.d.ts",
|
||||
"default": "./types/errors.js"
|
||||
}
|
||||
},
|
||||
"./types/events": {
|
||||
"module": {
|
||||
"types": "./types/events.d.ts",
|
||||
"default": "./types/events.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/events.d.ts",
|
||||
"default": "./cjs/types/events.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/events.d.ts",
|
||||
"default": "./types/events.js"
|
||||
}
|
||||
},
|
||||
"./types/rpc": {
|
||||
"module": {
|
||||
"types": "./types/rpc.d.ts",
|
||||
"default": "./types/rpc.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/rpc.d.ts",
|
||||
"default": "./cjs/types/rpc.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/rpc.d.ts",
|
||||
"default": "./types/rpc.js"
|
||||
}
|
||||
},
|
||||
"./types/storage": {
|
||||
"module": {
|
||||
"types": "./types/storage.d.ts",
|
||||
"default": "./types/storage.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/storage.d.ts",
|
||||
"default": "./cjs/types/storage.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/storage.d.ts",
|
||||
"default": "./types/storage.js"
|
||||
}
|
||||
},
|
||||
"./types/submittable": {
|
||||
"module": {
|
||||
"types": "./types/submittable.d.ts",
|
||||
"default": "./types/submittable.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/submittable.d.ts",
|
||||
"default": "./cjs/types/submittable.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/submittable.d.ts",
|
||||
"default": "./types/submittable.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@pezkuwi/rpc-core": "16.5.4",
|
||||
"@pezkuwi/types": "16.5.4",
|
||||
"@pezkuwi/util": "^14.0.1",
|
||||
"@pezkuwi/rpc-core": "16.5.22",
|
||||
"@pezkuwi/types": "16.5.22",
|
||||
"@pezkuwi/util": "14.0.13",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
|
||||
export const packageInfo = { name: '@pezkuwi/api-base', path: 'auto', type: 'auto', version: '16.5.4' };
|
||||
export const packageInfo = { name: '@pezkuwi/api-base', path: 'auto', type: 'auto', version: '16.5.18' };
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -15,25 +15,396 @@
|
||||
},
|
||||
"sideEffects": [
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
"./cjs/packageDetect.js"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"version": "16.5.22",
|
||||
"main": "./cjs/index.js",
|
||||
"module": "./index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"module": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/index.d.ts",
|
||||
"default": "./cjs/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
}
|
||||
},
|
||||
"./Abi": {
|
||||
"module": {
|
||||
"types": "./Abi/index.d.ts",
|
||||
"default": "./Abi/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/Abi/index.d.ts",
|
||||
"default": "./cjs/Abi/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./Abi/index.d.ts",
|
||||
"default": "./Abi/index.js"
|
||||
}
|
||||
},
|
||||
"./Abi/toLatestCompatible": {
|
||||
"module": {
|
||||
"types": "./Abi/toLatestCompatible.d.ts",
|
||||
"default": "./Abi/toLatestCompatible.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/Abi/toLatestCompatible.d.ts",
|
||||
"default": "./cjs/Abi/toLatestCompatible.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./Abi/toLatestCompatible.d.ts",
|
||||
"default": "./Abi/toLatestCompatible.js"
|
||||
}
|
||||
},
|
||||
"./Abi/toV1": {
|
||||
"module": {
|
||||
"types": "./Abi/toV1.d.ts",
|
||||
"default": "./Abi/toV1.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/Abi/toV1.d.ts",
|
||||
"default": "./cjs/Abi/toV1.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./Abi/toV1.d.ts",
|
||||
"default": "./Abi/toV1.js"
|
||||
}
|
||||
},
|
||||
"./Abi/toV2": {
|
||||
"module": {
|
||||
"types": "./Abi/toV2.d.ts",
|
||||
"default": "./Abi/toV2.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/Abi/toV2.d.ts",
|
||||
"default": "./cjs/Abi/toV2.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./Abi/toV2.d.ts",
|
||||
"default": "./Abi/toV2.js"
|
||||
}
|
||||
},
|
||||
"./Abi/toV3": {
|
||||
"module": {
|
||||
"types": "./Abi/toV3.d.ts",
|
||||
"default": "./Abi/toV3.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/Abi/toV3.d.ts",
|
||||
"default": "./cjs/Abi/toV3.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./Abi/toV3.d.ts",
|
||||
"default": "./Abi/toV3.js"
|
||||
}
|
||||
},
|
||||
"./Abi/toV4": {
|
||||
"module": {
|
||||
"types": "./Abi/toV4.d.ts",
|
||||
"default": "./Abi/toV4.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/Abi/toV4.d.ts",
|
||||
"default": "./cjs/Abi/toV4.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./Abi/toV4.d.ts",
|
||||
"default": "./Abi/toV4.js"
|
||||
}
|
||||
},
|
||||
"./augment": {
|
||||
"module": {
|
||||
"types": "./augment.d.ts",
|
||||
"default": "./augment.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/augment.d.ts",
|
||||
"default": "./cjs/augment.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./augment.d.ts",
|
||||
"default": "./augment.js"
|
||||
}
|
||||
},
|
||||
"./base": {
|
||||
"module": {
|
||||
"types": "./base/index.d.ts",
|
||||
"default": "./base/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/index.d.ts",
|
||||
"default": "./cjs/base/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/index.d.ts",
|
||||
"default": "./base/index.js"
|
||||
}
|
||||
},
|
||||
"./base/Base": {
|
||||
"module": {
|
||||
"types": "./base/Base.d.ts",
|
||||
"default": "./base/Base.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Base.d.ts",
|
||||
"default": "./cjs/base/Base.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Base.d.ts",
|
||||
"default": "./base/Base.js"
|
||||
}
|
||||
},
|
||||
"./base/Blueprint": {
|
||||
"module": {
|
||||
"types": "./base/Blueprint.d.ts",
|
||||
"default": "./base/Blueprint.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Blueprint.d.ts",
|
||||
"default": "./cjs/base/Blueprint.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Blueprint.d.ts",
|
||||
"default": "./base/Blueprint.js"
|
||||
}
|
||||
},
|
||||
"./base/Code": {
|
||||
"module": {
|
||||
"types": "./base/Code.d.ts",
|
||||
"default": "./base/Code.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Code.d.ts",
|
||||
"default": "./cjs/base/Code.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Code.d.ts",
|
||||
"default": "./base/Code.js"
|
||||
}
|
||||
},
|
||||
"./base/Contract": {
|
||||
"module": {
|
||||
"types": "./base/Contract.d.ts",
|
||||
"default": "./base/Contract.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Contract.d.ts",
|
||||
"default": "./cjs/base/Contract.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Contract.d.ts",
|
||||
"default": "./base/Contract.js"
|
||||
}
|
||||
},
|
||||
"./base/mock": {
|
||||
"module": {
|
||||
"types": "./base/mock.d.ts",
|
||||
"default": "./base/mock.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/mock.d.ts",
|
||||
"default": "./cjs/base/mock.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/mock.d.ts",
|
||||
"default": "./base/mock.js"
|
||||
}
|
||||
},
|
||||
"./base/types": {
|
||||
"module": {
|
||||
"types": "./base/types.d.ts",
|
||||
"default": "./base/types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/types.d.ts",
|
||||
"default": "./cjs/base/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/types.d.ts",
|
||||
"default": "./base/types.js"
|
||||
}
|
||||
},
|
||||
"./base/util": {
|
||||
"module": {
|
||||
"types": "./base/util.d.ts",
|
||||
"default": "./base/util.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/util.d.ts",
|
||||
"default": "./cjs/base/util.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/util.d.ts",
|
||||
"default": "./base/util.js"
|
||||
}
|
||||
},
|
||||
"./bundle": {
|
||||
"module": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bundle.d.ts",
|
||||
"default": "./cjs/bundle.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
}
|
||||
},
|
||||
"./cjs/*": "./cjs/*.js",
|
||||
"./cjs/package.json": "./cjs/package.json",
|
||||
"./package.json": {
|
||||
"require": "./cjs/package.json",
|
||||
"default": "./package.json"
|
||||
},
|
||||
"./packageDetect": {
|
||||
"module": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageDetect.d.ts",
|
||||
"default": "./cjs/packageDetect.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo.js": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./promise": {
|
||||
"module": {
|
||||
"types": "./promise/index.d.ts",
|
||||
"default": "./promise/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/index.d.ts",
|
||||
"default": "./cjs/promise/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/index.d.ts",
|
||||
"default": "./promise/index.js"
|
||||
}
|
||||
},
|
||||
"./promise/types": {
|
||||
"module": {
|
||||
"types": "./promise/types.d.ts",
|
||||
"default": "./promise/types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/types.d.ts",
|
||||
"default": "./cjs/promise/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/types.d.ts",
|
||||
"default": "./promise/types.js"
|
||||
}
|
||||
},
|
||||
"./rx": {
|
||||
"module": {
|
||||
"types": "./rx/index.d.ts",
|
||||
"default": "./rx/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/rx/index.d.ts",
|
||||
"default": "./cjs/rx/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./rx/index.d.ts",
|
||||
"default": "./rx/index.js"
|
||||
}
|
||||
},
|
||||
"./rx/types": {
|
||||
"module": {
|
||||
"types": "./rx/types.d.ts",
|
||||
"default": "./rx/types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/rx/types.d.ts",
|
||||
"default": "./cjs/rx/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./rx/types.d.ts",
|
||||
"default": "./rx/types.js"
|
||||
}
|
||||
},
|
||||
"./types": {
|
||||
"module": {
|
||||
"types": "./types.d.ts",
|
||||
"default": "./types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types.d.ts",
|
||||
"default": "./cjs/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types.d.ts",
|
||||
"default": "./types.js"
|
||||
}
|
||||
},
|
||||
"./util": {
|
||||
"module": {
|
||||
"types": "./util.d.ts",
|
||||
"default": "./util.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util.d.ts",
|
||||
"default": "./cjs/util.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util.d.ts",
|
||||
"default": "./util.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@pezkuwi/api": "16.5.4",
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/types": "16.5.4",
|
||||
"@pezkuwi/types-codec": "16.5.4",
|
||||
"@pezkuwi/types-create": "16.5.4",
|
||||
"@pezkuwi/util": "^14.0.1",
|
||||
"@pezkuwi/util-crypto": "^14.0.1",
|
||||
"@pezkuwi/api": "16.5.22",
|
||||
"@pezkuwi/api-augment": "16.5.22",
|
||||
"@pezkuwi/keyring": "14.0.13",
|
||||
"@pezkuwi/types": "16.5.22",
|
||||
"@pezkuwi/types-codec": "16.5.22",
|
||||
"@pezkuwi/types-create": "16.5.22",
|
||||
"@pezkuwi/types-support": "16.5.22",
|
||||
"@pezkuwi/util": "14.0.13",
|
||||
"@pezkuwi/util-crypto": "14.0.13",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/keyring": "^14.0.1",
|
||||
"@pezkuwi/types-support": "16.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ import fs from 'node:fs';
|
||||
|
||||
import { toPromiseMethod } from '@pezkuwi/api';
|
||||
|
||||
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
|
||||
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
|
||||
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
|
||||
import v6contractErc20 from '../test/contracts/ink/v6/erc20.contract.json' assert { type: 'json' };
|
||||
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' with { type: 'json' };
|
||||
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' with { type: 'json' };
|
||||
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' with { type: 'json' };
|
||||
import v6contractErc20 from '../test/contracts/ink/v6/erc20.contract.json' with { type: 'json' };
|
||||
import { Code } from './Code.js';
|
||||
import { mockApi, mockReviveApi } from './mock.js';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ApiPromise } from '@pezkuwi/api';
|
||||
import { BlueprintPromise, ContractPromise } from '@pezkuwi/api-contract';
|
||||
import { createTestPairs } from '@pezkuwi/keyring/testingPairs';
|
||||
|
||||
import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: 'json' };
|
||||
import abiIncrementer from './test/contracts/ink/v0/incrementer.json' with { type: 'json' };
|
||||
|
||||
async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMapBizinikiwi): Promise<void> {
|
||||
const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
|
||||
export const packageInfo = { name: '@pezkuwi/api-contract', path: 'auto', type: 'auto', version: '16.5.4' };
|
||||
export const packageInfo = { name: '@pezkuwi/api-contract', path: 'auto', type: 'auto', version: '16.5.18' };
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as delegator } from './delegator.json' assert { type: 'json' };
|
||||
export { default as dns } from './dns.json' assert { type: 'json' };
|
||||
export { default as erc20 } from './erc20.json' assert { type: 'json' };
|
||||
export { default as erc721 } from './erc721.json' assert { type: 'json' };
|
||||
export { default as flipperBundle } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipper } from './flipper.json' assert { type: 'json' };
|
||||
export { default as incrementer } from './incrementer.json' assert { type: 'json' };
|
||||
export { default as multisigPlain } from './multisig_plain.json' assert { type: 'json' };
|
||||
export { default as delegator } from './delegator.json' with { type: 'json' };
|
||||
export { default as dns } from './dns.json' with { type: 'json' };
|
||||
export { default as erc20 } from './erc20.json' with { type: 'json' };
|
||||
export { default as erc721 } from './erc721.json' with { type: 'json' };
|
||||
export { default as flipperBundle } from './flipper.contract.json' with { type: 'json' };
|
||||
export { default as flipper } from './flipper.json' with { type: 'json' };
|
||||
export { default as incrementer } from './incrementer.json' with { type: 'json' };
|
||||
export { default as multisigPlain } from './multisig_plain.json' with { type: 'json' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipper } from './flipper.contract.json' with { type: 'json' };
|
||||
// A complex contract example with traits.
|
||||
export { default as psp22 } from './psp22_minter_pauser.contract.json' assert { type: 'json' };
|
||||
export { default as psp22 } from './psp22_minter_pauser.contract.json' with { type: 'json' };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as erc20 } from './erc20.contract.json' assert { type: 'json' };
|
||||
export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as erc20 } from './erc20.contract.json' with { type: 'json' };
|
||||
export { default as flipper } from './flipper.contract.json' with { type: 'json' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipper } from './flipper.contract.json' with { type: 'json' };
|
||||
// A complex contract example with traits.
|
||||
export { default as traitErc20 } from './trait_erc20.contract.json' assert { type: 'json' };
|
||||
export { default as traitErc20 } from './trait_erc20.contract.json' with { type: 'json' };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
|
||||
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
|
||||
export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' with { type: 'json' };
|
||||
export { default as flipperContract } from './flipper.contract.json' with { type: 'json' };
|
||||
export { default as flipperMetadata } from './flipper.json' with { type: 'json' };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
|
||||
export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' assert { type: 'json' };
|
||||
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
|
||||
export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' with { type: 'json' };
|
||||
export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' with { type: 'json' };
|
||||
export { default as flipperContract } from './flipper.contract.json' with { type: 'json' };
|
||||
export { default as flipperMetadata } from './flipper.json' with { type: 'json' };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
|
||||
export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' with { type: 'json' };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as ints256 } from './ints256.json' assert { type: 'json' };
|
||||
export { default as ints256 } from './ints256.json' with { type: 'json' };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as assetTransfer } from './assetTransfer.json' assert { type: 'json' };
|
||||
export { default as enumExample } from './enumExample.json' assert { type: 'json' };
|
||||
export { default as recursive } from './recursive.contract.json' assert { type: 'json' };
|
||||
export { default as withString } from './withString.json' assert { type: 'json' };
|
||||
export { default as assetTransfer } from './assetTransfer.json' with { type: 'json' };
|
||||
export { default as enumExample } from './enumExample.json' with { type: 'json' };
|
||||
export { default as recursive } from './recursive.contract.json' with { type: 'json' };
|
||||
export { default as withString } from './withString.json' with { type: 'json' };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as ask } from './ask.json' assert { type: 'json' };
|
||||
export { default as ask } from './ask.json' with { type: 'json' };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as events } from './events.contract.json' assert { type: 'json' };
|
||||
export { default as events } from './events.contract.json' with { type: 'json' };
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -15,28 +15,25 @@
|
||||
},
|
||||
"sideEffects": [
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
"./cjs/packageDetect.js"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"version": "16.5.22",
|
||||
"main": "./cjs/index.js",
|
||||
"module": "./index.js",
|
||||
"dependencies": {
|
||||
"@pezkuwi/api": "16.5.4",
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/api-base": "16.5.4",
|
||||
"@pezkuwi/rpc-core": "16.5.4",
|
||||
"@pezkuwi/types": "16.5.4",
|
||||
"@pezkuwi/types-codec": "16.5.4",
|
||||
"@pezkuwi/util": "^14.0.1",
|
||||
"@pezkuwi/util-crypto": "^14.0.1",
|
||||
"@pezkuwi/api": "16.5.22",
|
||||
"@pezkuwi/api-augment": "16.5.22",
|
||||
"@pezkuwi/api-base": "16.5.22",
|
||||
"@pezkuwi/rpc-core": "16.5.22",
|
||||
"@pezkuwi/rpc-provider": "16.5.22",
|
||||
"@pezkuwi/types": "16.5.22",
|
||||
"@pezkuwi/types-codec": "16.5.22",
|
||||
"@pezkuwi/types-support": "16.5.22",
|
||||
"@pezkuwi/util": "14.0.13",
|
||||
"@pezkuwi/util-crypto": "14.0.13",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pezkuwi/api": "16.5.4",
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/rpc-augment": "16.5.4",
|
||||
"@pezkuwi/rpc-provider": "16.5.4",
|
||||
"@pezkuwi/types-support": "16.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,8 @@ export function subscribeFinalizedHeads (instanceId: string, api: DeriveApi): ()
|
||||
const endHash = prevHash;
|
||||
const startHash = header.parentHash;
|
||||
|
||||
prevHash = header.createdAtHash = header.hash;
|
||||
header.createdAtHash = header.hash as unknown as typeof header.createdAtHash;
|
||||
prevHash = header.hash as unknown as Hash;
|
||||
|
||||
return endHash === null || startHash.eq(endHash)
|
||||
? of(header)
|
||||
|
||||
@@ -46,7 +46,7 @@ function createChildKey (info: AllInfo): string {
|
||||
*/
|
||||
export function childKey (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<string | null> {
|
||||
return memo(instanceId, (paraId: string | number | BN): Observable<string | null> =>
|
||||
api.query.crowdloan.funds<Option<PezkuwiRuntimeCommonCrowdloanFundInfo>>(paraId).pipe(
|
||||
api.query['crowdloan']['funds']<Option<PezkuwiRuntimeCommonCrowdloanFundInfo>>(paraId).pipe(
|
||||
map((optInfo) =>
|
||||
optInfo.isSome
|
||||
? createChildKey(optInfo.unwrap())
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
|
||||
export const packageInfo = { name: '@pezkuwi/api-derive', path: 'auto', type: 'auto', version: '16.5.4' };
|
||||
export const packageInfo = { name: '@pezkuwi/api-derive', path: 'auto', type: 'auto', version: '16.5.18' };
|
||||
|
||||
@@ -90,14 +90,14 @@ function parse (id: ParaId, [active, retryQueue, selectedThreads, didUpdate, inf
|
||||
*/
|
||||
export function info (instanceId: string, api: DeriveApi): (id: ParaId | number) => Observable<DeriveTeyrchainFull | null> {
|
||||
return memo(instanceId, (id: ParaId | number): Observable<DeriveTeyrchainFull | null> =>
|
||||
api.query.registrar && api.query['teyrchains']
|
||||
api.query['registrar'] && api.query['teyrchains']
|
||||
? api.queryMulti<Result>([
|
||||
api.query.registrar['active'],
|
||||
api.query.registrar['retryQueue'],
|
||||
api.query.registrar['selectedThreads'],
|
||||
api.query['registrar']['active'],
|
||||
api.query['registrar']['retryQueue'],
|
||||
api.query['registrar']['selectedThreads'],
|
||||
api.query['teyrchains']['didUpdate'],
|
||||
[api.query.registrar.paras, id],
|
||||
[api.query.registrar.pendingSwap, id],
|
||||
[api.query['registrar']['paras'], id],
|
||||
[api.query['registrar']['pendingSwap'], id],
|
||||
[api.query['teyrchains']['heads'], id],
|
||||
[api.query['teyrchains']['relayDispatchQueue'], id]
|
||||
])
|
||||
|
||||
@@ -45,15 +45,15 @@ function parse ([ids, didUpdate, relayDispatchQueueSizes, infos, pendingSwaps]:
|
||||
*/
|
||||
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveTeyrchain[]> {
|
||||
return memo(instanceId, (): Observable<DeriveTeyrchain[]> =>
|
||||
api.query.registrar?.['teyrchains'] && api.query['teyrchains']
|
||||
? api.query.registrar['teyrchains']<ParaId[]>().pipe(
|
||||
api.query['registrar']?.['teyrchains'] && api.query['teyrchains']
|
||||
? api.query['registrar']['teyrchains']<ParaId[]>().pipe(
|
||||
switchMap((paraIds) =>
|
||||
combineLatest([
|
||||
of(paraIds),
|
||||
api.query['teyrchains']['didUpdate']<DidUpdate>(),
|
||||
api.query['teyrchains']['relayDispatchQueueSize'].multi<RelayDispatchQueueSize>(paraIds),
|
||||
api.query.registrar.paras.multi<ParaInfoResult>(paraIds),
|
||||
api.query.registrar.pendingSwap.multi<PendingSwap>(paraIds)
|
||||
api.query['registrar']['paras'].multi<ParaInfoResult>(paraIds),
|
||||
api.query['registrar']['pendingSwap'].multi<PendingSwap>(paraIds)
|
||||
])
|
||||
),
|
||||
map(parse)
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
+588
-21
@@ -15,32 +15,599 @@
|
||||
},
|
||||
"sideEffects": [
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
"./cjs/packageDetect.js"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"version": "16.5.22",
|
||||
"main": "./cjs/index.js",
|
||||
"module": "./index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"module": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/index.d.ts",
|
||||
"default": "./cjs/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
}
|
||||
},
|
||||
"./augment": {
|
||||
"module": {
|
||||
"types": "./augment.d.ts",
|
||||
"default": "./augment.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/augment.d.ts",
|
||||
"default": "./cjs/augment.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./augment.d.ts",
|
||||
"default": "./augment.js"
|
||||
}
|
||||
},
|
||||
"./base": {
|
||||
"module": {
|
||||
"types": "./base/index.d.ts",
|
||||
"default": "./base/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/index.d.ts",
|
||||
"default": "./cjs/base/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/index.d.ts",
|
||||
"default": "./base/index.js"
|
||||
}
|
||||
},
|
||||
"./base/Decorate": {
|
||||
"module": {
|
||||
"types": "./base/Decorate.d.ts",
|
||||
"default": "./base/Decorate.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Decorate.d.ts",
|
||||
"default": "./cjs/base/Decorate.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Decorate.d.ts",
|
||||
"default": "./base/Decorate.js"
|
||||
}
|
||||
},
|
||||
"./base/Events": {
|
||||
"module": {
|
||||
"types": "./base/Events.d.ts",
|
||||
"default": "./base/Events.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Events.d.ts",
|
||||
"default": "./cjs/base/Events.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Events.d.ts",
|
||||
"default": "./base/Events.js"
|
||||
}
|
||||
},
|
||||
"./base/find": {
|
||||
"module": {
|
||||
"types": "./base/find.d.ts",
|
||||
"default": "./base/find.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/find.d.ts",
|
||||
"default": "./cjs/base/find.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/find.d.ts",
|
||||
"default": "./base/find.js"
|
||||
}
|
||||
},
|
||||
"./base/Getters": {
|
||||
"module": {
|
||||
"types": "./base/Getters.d.ts",
|
||||
"default": "./base/Getters.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Getters.d.ts",
|
||||
"default": "./cjs/base/Getters.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Getters.d.ts",
|
||||
"default": "./base/Getters.js"
|
||||
}
|
||||
},
|
||||
"./base/Init": {
|
||||
"module": {
|
||||
"types": "./base/Init.d.ts",
|
||||
"default": "./base/Init.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/Init.d.ts",
|
||||
"default": "./cjs/base/Init.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/Init.d.ts",
|
||||
"default": "./base/Init.js"
|
||||
}
|
||||
},
|
||||
"./base/types": {
|
||||
"module": {
|
||||
"types": "./base/types.d.ts",
|
||||
"default": "./base/types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/base/types.d.ts",
|
||||
"default": "./cjs/base/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./base/types.d.ts",
|
||||
"default": "./base/types.js"
|
||||
}
|
||||
},
|
||||
"./bundle": {
|
||||
"module": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/bundle.d.ts",
|
||||
"default": "./cjs/bundle.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./bundle.d.ts",
|
||||
"default": "./bundle.js"
|
||||
}
|
||||
},
|
||||
"./cjs/*": "./cjs/*.js",
|
||||
"./cjs/package.json": "./cjs/package.json",
|
||||
"./package.json": {
|
||||
"require": "./cjs/package.json",
|
||||
"default": "./package.json"
|
||||
},
|
||||
"./packageDetect": {
|
||||
"module": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageDetect.d.ts",
|
||||
"default": "./cjs/packageDetect.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageDetect.d.ts",
|
||||
"default": "./packageDetect.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./packageInfo.js": {
|
||||
"module": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/packageInfo.d.ts",
|
||||
"default": "./cjs/packageInfo.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./packageInfo.d.ts",
|
||||
"default": "./packageInfo.js"
|
||||
}
|
||||
},
|
||||
"./promise": {
|
||||
"module": {
|
||||
"types": "./promise/index.d.ts",
|
||||
"default": "./promise/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/index.d.ts",
|
||||
"default": "./cjs/promise/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/index.d.ts",
|
||||
"default": "./promise/index.js"
|
||||
}
|
||||
},
|
||||
"./promise/Api": {
|
||||
"module": {
|
||||
"types": "./promise/Api.d.ts",
|
||||
"default": "./promise/Api.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/Api.d.ts",
|
||||
"default": "./cjs/promise/Api.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/Api.d.ts",
|
||||
"default": "./promise/Api.js"
|
||||
}
|
||||
},
|
||||
"./promise/Combinator": {
|
||||
"module": {
|
||||
"types": "./promise/Combinator.d.ts",
|
||||
"default": "./promise/Combinator.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/Combinator.d.ts",
|
||||
"default": "./cjs/promise/Combinator.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/Combinator.d.ts",
|
||||
"default": "./promise/Combinator.js"
|
||||
}
|
||||
},
|
||||
"./promise/decorateMethod": {
|
||||
"module": {
|
||||
"types": "./promise/decorateMethod.d.ts",
|
||||
"default": "./promise/decorateMethod.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/decorateMethod.d.ts",
|
||||
"default": "./cjs/promise/decorateMethod.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/decorateMethod.d.ts",
|
||||
"default": "./promise/decorateMethod.js"
|
||||
}
|
||||
},
|
||||
"./promise/types": {
|
||||
"module": {
|
||||
"types": "./promise/types.d.ts",
|
||||
"default": "./promise/types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/promise/types.d.ts",
|
||||
"default": "./cjs/promise/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./promise/types.d.ts",
|
||||
"default": "./promise/types.js"
|
||||
}
|
||||
},
|
||||
"./rx": {
|
||||
"module": {
|
||||
"types": "./rx/index.d.ts",
|
||||
"default": "./rx/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/rx/index.d.ts",
|
||||
"default": "./cjs/rx/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./rx/index.d.ts",
|
||||
"default": "./rx/index.js"
|
||||
}
|
||||
},
|
||||
"./rx/Api": {
|
||||
"module": {
|
||||
"types": "./rx/Api.d.ts",
|
||||
"default": "./rx/Api.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/rx/Api.d.ts",
|
||||
"default": "./cjs/rx/Api.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./rx/Api.d.ts",
|
||||
"default": "./rx/Api.js"
|
||||
}
|
||||
},
|
||||
"./rx/decorateMethod": {
|
||||
"module": {
|
||||
"types": "./rx/decorateMethod.d.ts",
|
||||
"default": "./rx/decorateMethod.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/rx/decorateMethod.d.ts",
|
||||
"default": "./cjs/rx/decorateMethod.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./rx/decorateMethod.d.ts",
|
||||
"default": "./rx/decorateMethod.js"
|
||||
}
|
||||
},
|
||||
"./submittable": {
|
||||
"module": {
|
||||
"types": "./submittable/index.d.ts",
|
||||
"default": "./submittable/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/submittable/index.d.ts",
|
||||
"default": "./cjs/submittable/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./submittable/index.d.ts",
|
||||
"default": "./submittable/index.js"
|
||||
}
|
||||
},
|
||||
"./submittable/createClass": {
|
||||
"module": {
|
||||
"types": "./submittable/createClass.d.ts",
|
||||
"default": "./submittable/createClass.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/submittable/createClass.d.ts",
|
||||
"default": "./cjs/submittable/createClass.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./submittable/createClass.d.ts",
|
||||
"default": "./submittable/createClass.js"
|
||||
}
|
||||
},
|
||||
"./submittable/createSubmittable": {
|
||||
"module": {
|
||||
"types": "./submittable/createSubmittable.d.ts",
|
||||
"default": "./submittable/createSubmittable.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/submittable/createSubmittable.d.ts",
|
||||
"default": "./cjs/submittable/createSubmittable.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./submittable/createSubmittable.d.ts",
|
||||
"default": "./submittable/createSubmittable.js"
|
||||
}
|
||||
},
|
||||
"./submittable/Result": {
|
||||
"module": {
|
||||
"types": "./submittable/Result.d.ts",
|
||||
"default": "./submittable/Result.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/submittable/Result.d.ts",
|
||||
"default": "./cjs/submittable/Result.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./submittable/Result.d.ts",
|
||||
"default": "./submittable/Result.js"
|
||||
}
|
||||
},
|
||||
"./submittable/types": {
|
||||
"module": {
|
||||
"types": "./submittable/types.d.ts",
|
||||
"default": "./submittable/types.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/submittable/types.d.ts",
|
||||
"default": "./cjs/submittable/types.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./submittable/types.d.ts",
|
||||
"default": "./submittable/types.js"
|
||||
}
|
||||
},
|
||||
"./types": {
|
||||
"module": {
|
||||
"types": "./types/index.d.ts",
|
||||
"default": "./types/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/index.d.ts",
|
||||
"default": "./cjs/types/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/index.d.ts",
|
||||
"default": "./types/index.js"
|
||||
}
|
||||
},
|
||||
"./types/calls": {
|
||||
"module": {
|
||||
"types": "./types/calls.d.ts",
|
||||
"default": "./types/calls.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/calls.d.ts",
|
||||
"default": "./cjs/types/calls.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/calls.d.ts",
|
||||
"default": "./types/calls.js"
|
||||
}
|
||||
},
|
||||
"./types/consts": {
|
||||
"module": {
|
||||
"types": "./types/consts.d.ts",
|
||||
"default": "./types/consts.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/consts.d.ts",
|
||||
"default": "./cjs/types/consts.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/consts.d.ts",
|
||||
"default": "./types/consts.js"
|
||||
}
|
||||
},
|
||||
"./types/errors": {
|
||||
"module": {
|
||||
"types": "./types/errors.d.ts",
|
||||
"default": "./types/errors.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/errors.d.ts",
|
||||
"default": "./cjs/types/errors.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/errors.d.ts",
|
||||
"default": "./types/errors.js"
|
||||
}
|
||||
},
|
||||
"./types/events": {
|
||||
"module": {
|
||||
"types": "./types/events.d.ts",
|
||||
"default": "./types/events.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/events.d.ts",
|
||||
"default": "./cjs/types/events.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/events.d.ts",
|
||||
"default": "./types/events.js"
|
||||
}
|
||||
},
|
||||
"./types/storage": {
|
||||
"module": {
|
||||
"types": "./types/storage.d.ts",
|
||||
"default": "./types/storage.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/storage.d.ts",
|
||||
"default": "./cjs/types/storage.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/storage.d.ts",
|
||||
"default": "./types/storage.js"
|
||||
}
|
||||
},
|
||||
"./types/submittable": {
|
||||
"module": {
|
||||
"types": "./types/submittable.d.ts",
|
||||
"default": "./types/submittable.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/types/submittable.d.ts",
|
||||
"default": "./cjs/types/submittable.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./types/submittable.d.ts",
|
||||
"default": "./types/submittable.js"
|
||||
}
|
||||
},
|
||||
"./util": {
|
||||
"module": {
|
||||
"types": "./util/index.d.ts",
|
||||
"default": "./util/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/index.d.ts",
|
||||
"default": "./cjs/util/index.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/index.d.ts",
|
||||
"default": "./util/index.js"
|
||||
}
|
||||
},
|
||||
"./util/augmentObject": {
|
||||
"module": {
|
||||
"types": "./util/augmentObject.d.ts",
|
||||
"default": "./util/augmentObject.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/augmentObject.d.ts",
|
||||
"default": "./cjs/util/augmentObject.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/augmentObject.d.ts",
|
||||
"default": "./util/augmentObject.js"
|
||||
}
|
||||
},
|
||||
"./util/decorate": {
|
||||
"module": {
|
||||
"types": "./util/decorate.d.ts",
|
||||
"default": "./util/decorate.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/decorate.d.ts",
|
||||
"default": "./cjs/util/decorate.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/decorate.d.ts",
|
||||
"default": "./util/decorate.js"
|
||||
}
|
||||
},
|
||||
"./util/filterEvents": {
|
||||
"module": {
|
||||
"types": "./util/filterEvents.d.ts",
|
||||
"default": "./util/filterEvents.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/filterEvents.d.ts",
|
||||
"default": "./cjs/util/filterEvents.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/filterEvents.d.ts",
|
||||
"default": "./util/filterEvents.js"
|
||||
}
|
||||
},
|
||||
"./util/isKeyringPair": {
|
||||
"module": {
|
||||
"types": "./util/isKeyringPair.d.ts",
|
||||
"default": "./util/isKeyringPair.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/isKeyringPair.d.ts",
|
||||
"default": "./cjs/util/isKeyringPair.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/isKeyringPair.d.ts",
|
||||
"default": "./util/isKeyringPair.js"
|
||||
}
|
||||
},
|
||||
"./util/logging": {
|
||||
"module": {
|
||||
"types": "./util/logging.d.ts",
|
||||
"default": "./util/logging.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/logging.d.ts",
|
||||
"default": "./cjs/util/logging.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/logging.d.ts",
|
||||
"default": "./util/logging.js"
|
||||
}
|
||||
},
|
||||
"./util/validate": {
|
||||
"module": {
|
||||
"types": "./util/validate.d.ts",
|
||||
"default": "./util/validate.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/util/validate.d.ts",
|
||||
"default": "./cjs/util/validate.js"
|
||||
},
|
||||
"default": {
|
||||
"types": "./util/validate.d.ts",
|
||||
"default": "./util/validate.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/api-base": "16.5.4",
|
||||
"@pezkuwi/api-derive": "16.5.4",
|
||||
"@pezkuwi/keyring": "^14.0.1",
|
||||
"@pezkuwi/rpc-augment": "16.5.4",
|
||||
"@pezkuwi/rpc-core": "16.5.4",
|
||||
"@pezkuwi/rpc-provider": "16.5.4",
|
||||
"@pezkuwi/types": "16.5.4",
|
||||
"@pezkuwi/types-augment": "16.5.4",
|
||||
"@pezkuwi/types-codec": "16.5.4",
|
||||
"@pezkuwi/types-create": "16.5.4",
|
||||
"@pezkuwi/types-known": "16.5.4",
|
||||
"@pezkuwi/util": "^14.0.1",
|
||||
"@pezkuwi/util-crypto": "^14.0.1",
|
||||
"@pezkuwi/api-augment": "16.5.22",
|
||||
"@pezkuwi/api-base": "16.5.22",
|
||||
"@pezkuwi/api-derive": "16.5.22",
|
||||
"@pezkuwi/keyring": "14.0.13",
|
||||
"@pezkuwi/rpc-augment": "16.5.22",
|
||||
"@pezkuwi/rpc-core": "16.5.22",
|
||||
"@pezkuwi/rpc-provider": "16.5.22",
|
||||
"@pezkuwi/types": "16.5.22",
|
||||
"@pezkuwi/types-augment": "16.5.22",
|
||||
"@pezkuwi/types-codec": "16.5.22",
|
||||
"@pezkuwi/types-create": "16.5.22",
|
||||
"@pezkuwi/types-known": "16.5.22",
|
||||
"@pezkuwi/types-support": "16.5.22",
|
||||
"@pezkuwi/util": "14.0.13",
|
||||
"@pezkuwi/util-crypto": "14.0.13",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/types-support": "16.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
|
||||
export const packageInfo = { name: '@pezkuwi/api', path: 'auto', type: 'auto', version: '16.5.4' };
|
||||
export const packageInfo = { name: '@pezkuwi/api', path: 'auto', type: 'auto', version: '16.5.18' };
|
||||
|
||||
@@ -54,7 +54,8 @@ function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions
|
||||
}
|
||||
|
||||
return makeSignOptions(api, partialOptions, {
|
||||
blockHash: header.hash,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
blockHash: header.hash as any,
|
||||
era: registry.createTypeUnsafe<ExtrinsicEra>('ExtrinsicEra', [{
|
||||
current: header.number,
|
||||
period: partialOptions.era || mortalLength
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Josep M Sobrepere
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
# @polkadot-api/substrate-bindings
|
||||
@@ -0,0 +1,45 @@
|
||||
import { enhanceCodec, Bytes, _void } from 'scale-ts';
|
||||
import '../utils/ss58-util.mjs';
|
||||
import './scale/Binary.mjs';
|
||||
import './scale/bitSequence.mjs';
|
||||
import './scale/char.mjs';
|
||||
import { compactNumber } from './scale/compact.mjs';
|
||||
import { Hex } from './scale/Hex.mjs';
|
||||
import './scale/fixed-str.mjs';
|
||||
import { Variant } from './scale/Variant.mjs';
|
||||
import './scale/ethAccount.mjs';
|
||||
import { Struct, Vector } from './scale/shaped.mjs';
|
||||
import './scale/BitSeq.mjs';
|
||||
|
||||
const textEncoder$1 = new TextEncoder();
|
||||
const textDecoder = new TextDecoder();
|
||||
const fourChars = enhanceCodec(
|
||||
Bytes(4),
|
||||
textEncoder$1.encode.bind(textEncoder$1),
|
||||
textDecoder.decode.bind(textDecoder)
|
||||
);
|
||||
const diggestVal = Struct({
|
||||
engine: fourChars,
|
||||
payload: Hex()
|
||||
});
|
||||
const diggest = Variant(
|
||||
{
|
||||
other: Bytes(),
|
||||
consensus: diggestVal,
|
||||
seal: diggestVal,
|
||||
preRuntime: diggestVal,
|
||||
runtimeUpdated: _void
|
||||
},
|
||||
[0, 4, 5, 6, 8]
|
||||
);
|
||||
const hex32$1 = Hex(32);
|
||||
const blockHeader = Struct({
|
||||
parentHash: hex32$1,
|
||||
number: compactNumber,
|
||||
stateRoot: hex32$1,
|
||||
extrinsicRoot: hex32$1,
|
||||
digests: Vector(diggest)
|
||||
});
|
||||
|
||||
export { blockHeader };
|
||||
//# sourceMappingURL=blockHeader.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"blockHeader.mjs","sources":["../../../src/codecs/blockHeader.ts"],"sourcesContent":["import {\n Bytes,\n CodecType,\n Struct,\n Vector,\n _void,\n enhanceCodec,\n Hex,\n Variant,\n compactNumber,\n} from \"./scale\"\n\nconst textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\nconst fourChars = enhanceCodec(\n Bytes(4),\n textEncoder.encode.bind(textEncoder),\n textDecoder.decode.bind(textDecoder),\n)\n\nconst diggestVal = Struct({\n engine: fourChars,\n payload: Hex(),\n})\n\nconst diggest = Variant(\n {\n other: Bytes(),\n consensus: diggestVal,\n seal: diggestVal,\n preRuntime: diggestVal,\n runtimeUpdated: _void,\n },\n [0, 4, 5, 6, 8],\n)\n\nconst hex32 = Hex(32)\nexport const blockHeader = Struct({\n parentHash: hex32,\n number: compactNumber,\n stateRoot: hex32,\n extrinsicRoot: hex32,\n digests: Vector(diggest),\n})\n\nexport type BlockHeader = CodecType<typeof blockHeader>\n"],"names":["textEncoder","hex32"],"mappings":";;;;;;;;;;;;;AAYA,MAAMA,aAAA,GAAc,IAAI,WAAA,EAAY;AACpC,MAAM,WAAA,GAAc,IAAI,WAAA,EAAY;AAEpC,MAAM,SAAA,GAAY,YAAA;AAAA,EAChB,MAAM,CAAC,CAAA;AAAA,EACPA,aAAA,CAAY,MAAA,CAAO,IAAA,CAAKA,aAAW,CAAA;AAAA,EACnC,WAAA,CAAY,MAAA,CAAO,IAAA,CAAK,WAAW;AACrC,CAAA;AAEA,MAAM,aAAa,MAAA,CAAO;AAAA,EACxB,MAAA,EAAQ,SAAA;AAAA,EACR,SAAS,GAAA;AACX,CAAC,CAAA;AAED,MAAM,OAAA,GAAU,OAAA;AAAA,EACd;AAAA,IACE,OAAO,KAAA,EAAM;AAAA,IACb,SAAA,EAAW,UAAA;AAAA,IACX,IAAA,EAAM,UAAA;AAAA,IACN,UAAA,EAAY,UAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,CAAC,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,GAAG,CAAC;AAChB,CAAA;AAEA,MAAMC,OAAA,GAAQ,IAAI,EAAE,CAAA;AACb,MAAM,cAAc,MAAA,CAAO;AAAA,EAChC,UAAA,EAAYA,OAAA;AAAA,EACZ,MAAA,EAAQ,aAAA;AAAA,EACR,SAAA,EAAWA,OAAA;AAAA,EACX,aAAA,EAAeA,OAAA;AAAA,EACf,OAAA,EAAS,OAAO,OAAO;AACzB,CAAC;;;;"}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Enum, Struct, _void, Option, str, Vector, u8 } from 'scale-ts';
|
||||
|
||||
const itemDeprecation = Enum({
|
||||
NotDeprecated: _void,
|
||||
DeprecatedWithoutNote: _void,
|
||||
Deprecated: Struct({
|
||||
note: str,
|
||||
since: Option(str)
|
||||
})
|
||||
});
|
||||
const variantDeprecation = Vector(
|
||||
Struct({
|
||||
index: u8,
|
||||
deprecation: Enum(
|
||||
{
|
||||
DeprecatedWithoutNote: _void,
|
||||
Deprecated: Struct({
|
||||
note: str,
|
||||
since: Option(str)
|
||||
})
|
||||
},
|
||||
[1, 2]
|
||||
)
|
||||
})
|
||||
);
|
||||
|
||||
export { itemDeprecation, variantDeprecation };
|
||||
//# sourceMappingURL=deprecation.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"deprecation.mjs","sources":["../../../../src/codecs/metadata/deprecation.ts"],"sourcesContent":["import { _void, Enum, Option, str, Struct, u8, Vector } from \"scale-ts\"\n\nexport const itemDeprecation = Enum({\n NotDeprecated: _void,\n DeprecatedWithoutNote: _void,\n Deprecated: Struct({\n note: str,\n since: Option(str),\n }),\n})\n\nexport const variantDeprecation = Vector(\n Struct({\n index: u8,\n deprecation: Enum(\n {\n DeprecatedWithoutNote: _void,\n Deprecated: Struct({\n note: str,\n since: Option(str),\n }),\n },\n [1, 2],\n ),\n }),\n)\n"],"names":[],"mappings":";;AAEO,MAAM,kBAAkB,IAAA,CAAK;AAAA,EAClC,aAAA,EAAe,KAAA;AAAA,EACf,qBAAA,EAAuB,KAAA;AAAA,EACvB,YAAY,MAAA,CAAO;AAAA,IACjB,IAAA,EAAM,GAAA;AAAA,IACN,KAAA,EAAO,OAAO,GAAG;AAAA,GAClB;AACH,CAAC;AAEM,MAAM,kBAAA,GAAqB,MAAA;AAAA,EAChC,MAAA,CAAO;AAAA,IACL,KAAA,EAAO,EAAA;AAAA,IACP,WAAA,EAAa,IAAA;AAAA,MACX;AAAA,QACE,qBAAA,EAAuB,KAAA;AAAA,QACvB,YAAY,MAAA,CAAO;AAAA,UACjB,IAAA,EAAM,GAAA;AAAA,UACN,KAAA,EAAO,OAAO,GAAG;AAAA,SAClB;AAAA,OACH;AAAA,MACA,CAAC,GAAG,CAAC;AAAA;AACP,GACD;AACH;;;;"}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Vector, str } from 'scale-ts';
|
||||
|
||||
const docs = Vector(str);
|
||||
|
||||
export { docs };
|
||||
//# sourceMappingURL=docs.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"docs.mjs","sources":["../../../../src/codecs/metadata/docs.ts"],"sourcesContent":["import { Vector, str } from \"scale-ts\"\n\nexport const docs = Vector(str)\n"],"names":[],"mappings":";;AAEO,MAAM,IAAA,GAAO,OAAO,GAAG;;;;"}
|
||||
@@ -0,0 +1,72 @@
|
||||
import { compactNumber } from '../scale/compact.mjs';
|
||||
import { Option, str, Enum, _void, Vector, Struct, u32, u8 } from 'scale-ts';
|
||||
import { docs } from './docs.mjs';
|
||||
|
||||
const oStr = Option(str);
|
||||
const primitive = Enum({
|
||||
bool: _void,
|
||||
char: _void,
|
||||
str: _void,
|
||||
u8: _void,
|
||||
u16: _void,
|
||||
u32: _void,
|
||||
u64: _void,
|
||||
u128: _void,
|
||||
u256: _void,
|
||||
i8: _void,
|
||||
i16: _void,
|
||||
i32: _void,
|
||||
i64: _void,
|
||||
i128: _void,
|
||||
i256: _void
|
||||
});
|
||||
const fields = Vector(
|
||||
Struct({
|
||||
name: oStr,
|
||||
type: compactNumber,
|
||||
typeName: oStr,
|
||||
docs
|
||||
})
|
||||
);
|
||||
const arr = Struct({
|
||||
len: u32,
|
||||
type: compactNumber
|
||||
});
|
||||
const bitSequence = Struct({
|
||||
bitStoreType: compactNumber,
|
||||
bitOrderType: compactNumber
|
||||
});
|
||||
const variant = Vector(
|
||||
Struct({
|
||||
name: str,
|
||||
fields,
|
||||
index: u8,
|
||||
docs
|
||||
})
|
||||
);
|
||||
const def = Enum({
|
||||
composite: fields,
|
||||
variant,
|
||||
sequence: compactNumber,
|
||||
array: arr,
|
||||
tuple: Vector(compactNumber),
|
||||
primitive,
|
||||
compact: compactNumber,
|
||||
bitSequence
|
||||
});
|
||||
const param = Struct({
|
||||
name: str,
|
||||
type: Option(compactNumber)
|
||||
});
|
||||
const params = Vector(param);
|
||||
const entry = Struct({
|
||||
id: compactNumber,
|
||||
path: docs,
|
||||
params,
|
||||
def,
|
||||
docs
|
||||
});
|
||||
const lookup = Vector(entry);
|
||||
|
||||
export { lookup };
|
||||
//# sourceMappingURL=lookup.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"lookup.mjs","sources":["../../../../src/codecs/metadata/lookup.ts"],"sourcesContent":["import { compactNumber } from \"../scale/compact\"\nimport {\n CodecType,\n Enum,\n Option,\n Struct,\n Vector,\n _void,\n str,\n u32,\n u8,\n} from \"scale-ts\"\nimport { docs } from \"./docs\"\n\nconst oStr = Option(str)\n\nconst primitive = Enum({\n bool: _void,\n char: _void,\n str: _void,\n u8: _void,\n u16: _void,\n u32: _void,\n u64: _void,\n u128: _void,\n u256: _void,\n i8: _void,\n i16: _void,\n i32: _void,\n i64: _void,\n i128: _void,\n i256: _void,\n})\n\nconst fields = Vector(\n Struct({\n name: oStr,\n type: compactNumber,\n typeName: oStr,\n docs,\n }),\n)\n\nconst arr = Struct({\n len: u32,\n type: compactNumber,\n})\n\nconst bitSequence = Struct({\n bitStoreType: compactNumber,\n bitOrderType: compactNumber,\n})\n\nconst variant = Vector(\n Struct({\n name: str,\n fields,\n index: u8,\n docs,\n }),\n)\n\nconst def = Enum({\n composite: fields,\n variant,\n sequence: compactNumber,\n array: arr,\n tuple: Vector(compactNumber),\n primitive,\n compact: compactNumber,\n bitSequence,\n})\n\nconst param = Struct({\n name: str,\n type: Option(compactNumber),\n})\nconst params = Vector(param)\n\nconst entry = Struct({\n id: compactNumber,\n path: docs,\n params,\n def,\n docs,\n})\n\nexport const lookup = Vector(entry)\nexport type V14Lookup = CodecType<typeof lookup>\n"],"names":[],"mappings":";;;;AAcA,MAAM,IAAA,GAAO,OAAO,GAAG,CAAA;AAEvB,MAAM,YAAY,IAAA,CAAK;AAAA,EACrB,IAAA,EAAM,KAAA;AAAA,EACN,IAAA,EAAM,KAAA;AAAA,EACN,GAAA,EAAK,KAAA;AAAA,EACL,EAAA,EAAI,KAAA;AAAA,EACJ,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,KAAA;AAAA,EACL,IAAA,EAAM,KAAA;AAAA,EACN,IAAA,EAAM,KAAA;AAAA,EACN,EAAA,EAAI,KAAA;AAAA,EACJ,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,KAAA;AAAA,EACL,IAAA,EAAM,KAAA;AAAA,EACN,IAAA,EAAM;AACR,CAAC,CAAA;AAED,MAAM,MAAA,GAAS,MAAA;AAAA,EACb,MAAA,CAAO;AAAA,IACL,IAAA,EAAM,IAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,QAAA,EAAU,IAAA;AAAA,IACV;AAAA,GACD;AACH,CAAA;AAEA,MAAM,MAAM,MAAA,CAAO;AAAA,EACjB,GAAA,EAAK,GAAA;AAAA,EACL,IAAA,EAAM;AACR,CAAC,CAAA;AAED,MAAM,cAAc,MAAA,CAAO;AAAA,EACzB,YAAA,EAAc,aAAA;AAAA,EACd,YAAA,EAAc;AAChB,CAAC,CAAA;AAED,MAAM,OAAA,GAAU,MAAA;AAAA,EACd,MAAA,CAAO;AAAA,IACL,IAAA,EAAM,GAAA;AAAA,IACN,MAAA;AAAA,IACA,KAAA,EAAO,EAAA;AAAA,IACP;AAAA,GACD;AACH,CAAA;AAEA,MAAM,MAAM,IAAA,CAAK;AAAA,EACf,SAAA,EAAW,MAAA;AAAA,EACX,OAAA;AAAA,EACA,QAAA,EAAU,aAAA;AAAA,EACV,KAAA,EAAO,GAAA;AAAA,EACP,KAAA,EAAO,OAAO,aAAa,CAAA;AAAA,EAC3B,SAAA;AAAA,EACA,OAAA,EAAS,aAAA;AAAA,EACT;AACF,CAAC,CAAA;AAED,MAAM,QAAQ,MAAA,CAAO;AAAA,EACnB,IAAA,EAAM,GAAA;AAAA,EACN,IAAA,EAAM,OAAO,aAAa;AAC5B,CAAC,CAAA;AACD,MAAM,MAAA,GAAS,OAAO,KAAK,CAAA;AAE3B,MAAM,QAAQ,MAAA,CAAO;AAAA,EACnB,EAAA,EAAI,aAAA;AAAA,EACJ,IAAA,EAAM,IAAA;AAAA,EACN,MAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAC,CAAA;AAEM,MAAM,MAAA,GAAS,OAAO,KAAK;;;;"}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { createCodec, Struct, Enum, u32, Bytes, Option, Tuple, compact } from 'scale-ts';
|
||||
import { v14 } from './v14.mjs';
|
||||
import { v15 } from './v15.mjs';
|
||||
import { v16 } from './v16.mjs';
|
||||
|
||||
const unsupportedFn = () => {
|
||||
throw new Error("Unsupported metadata version!");
|
||||
};
|
||||
const unsupported = createCodec(
|
||||
unsupportedFn,
|
||||
unsupportedFn
|
||||
);
|
||||
const metadata = Struct({
|
||||
magicNumber: u32,
|
||||
metadata: Enum({
|
||||
v0: unsupported,
|
||||
v1: unsupported,
|
||||
v2: unsupported,
|
||||
v3: unsupported,
|
||||
v4: unsupported,
|
||||
v5: unsupported,
|
||||
v6: unsupported,
|
||||
v7: unsupported,
|
||||
v8: unsupported,
|
||||
v9: unsupported,
|
||||
v10: unsupported,
|
||||
v11: unsupported,
|
||||
v12: unsupported,
|
||||
v13: unsupported,
|
||||
v14,
|
||||
v15,
|
||||
v16
|
||||
})
|
||||
});
|
||||
const opaqueBytes = Bytes();
|
||||
const optionOpaque = Option(opaqueBytes);
|
||||
const opaqueOpaqueBytes = Tuple(compact, opaqueBytes);
|
||||
const decAnyMetadata = (input) => {
|
||||
try {
|
||||
return metadata.dec(input);
|
||||
} catch (_) {
|
||||
}
|
||||
try {
|
||||
return metadata.dec(optionOpaque.dec(input));
|
||||
} catch (_) {
|
||||
}
|
||||
try {
|
||||
return metadata.dec(opaqueBytes.dec(input));
|
||||
} catch (_) {
|
||||
}
|
||||
try {
|
||||
return metadata.dec(opaqueOpaqueBytes.dec(input)[1]);
|
||||
} catch (_) {
|
||||
}
|
||||
throw null;
|
||||
};
|
||||
|
||||
export { decAnyMetadata, metadata };
|
||||
//# sourceMappingURL=metadata.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"metadata.mjs","sources":["../../../../src/codecs/metadata/metadata.ts"],"sourcesContent":["import {\n Bytes,\n type Codec,\n type CodecType,\n Enum,\n Option,\n Struct,\n Tuple,\n compact,\n createCodec,\n u32,\n} from \"scale-ts\"\nimport type { HexString } from \"../scale\"\nimport { v14 } from \"./v14\"\nimport { v15 } from \"./v15\"\nimport { v16 } from \"./v16\"\n\nconst unsupportedFn = () => {\n throw new Error(\"Unsupported metadata version!\")\n}\n\nconst unsupported = createCodec(\n unsupportedFn,\n unsupportedFn,\n) as unknown as Codec<unknown>\n\nexport const metadata = Struct({\n magicNumber: u32,\n metadata: Enum({\n v0: unsupported,\n v1: unsupported,\n v2: unsupported,\n v3: unsupported,\n v4: unsupported,\n v5: unsupported,\n v6: unsupported,\n v7: unsupported,\n v8: unsupported,\n v9: unsupported,\n v10: unsupported,\n v11: unsupported,\n v12: unsupported,\n v13: unsupported,\n v14,\n v15,\n v16,\n }),\n})\nexport type Metadata = CodecType<typeof metadata>\n\nconst opaqueBytes = Bytes()\nconst optionOpaque = Option(opaqueBytes)\nconst opaqueOpaqueBytes = Tuple(compact, opaqueBytes)\n\nexport const decAnyMetadata = (\n input: Uint8Array | HexString,\n): CodecType<typeof metadata> => {\n try {\n return metadata.dec(input)\n } catch (_) {}\n\n // comes from metadata.metadata_at_version\n try {\n return metadata.dec(optionOpaque.dec(input)!)\n } catch (_) {}\n\n // comes from state.getMetadata\n try {\n return metadata.dec(opaqueBytes.dec(input))\n } catch (_) {}\n\n // comes from metadata.metadata\n try {\n return metadata.dec(opaqueOpaqueBytes.dec(input)[1])\n } catch (_) {}\n\n throw null\n}\n"],"names":[],"mappings":";;;;;AAiBA,MAAM,gBAAgB,MAAM;AAC1B,EAAA,MAAM,IAAI,MAAM,+BAA+B,CAAA;AACjD,CAAA;AAEA,MAAM,WAAA,GAAc,WAAA;AAAA,EAClB,aAAA;AAAA,EACA;AACF,CAAA;AAEO,MAAM,WAAW,MAAA,CAAO;AAAA,EAC7B,WAAA,EAAa,GAAA;AAAA,EACb,UAAU,IAAA,CAAK;AAAA,IACb,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,EAAA,EAAI,WAAA;AAAA,IACJ,GAAA,EAAK,WAAA;AAAA,IACL,GAAA,EAAK,WAAA;AAAA,IACL,GAAA,EAAK,WAAA;AAAA,IACL,GAAA,EAAK,WAAA;AAAA,IACL,GAAA;AAAA,IACA,GAAA;AAAA,IACA;AAAA,GACD;AACH,CAAC;AAGD,MAAM,cAAc,KAAA,EAAM;AAC1B,MAAM,YAAA,GAAe,OAAO,WAAW,CAAA;AACvC,MAAM,iBAAA,GAAoB,KAAA,CAAM,OAAA,EAAS,WAAW,CAAA;AAE7C,MAAM,cAAA,GAAiB,CAC5B,KAAA,KAC+B;AAC/B,EAAA,IAAI;AACF,IAAA,OAAO,QAAA,CAAS,IAAI,KAAK,CAAA;AAAA,EAC3B,SAAS,CAAA,EAAG;AAAA,EAAC;AAGb,EAAA,IAAI;AACF,IAAA,OAAO,QAAA,CAAS,GAAA,CAAI,YAAA,CAAa,GAAA,CAAI,KAAK,CAAE,CAAA;AAAA,EAC9C,SAAS,CAAA,EAAG;AAAA,EAAC;AAGb,EAAA,IAAI;AACF,IAAA,OAAO,QAAA,CAAS,GAAA,CAAI,WAAA,CAAY,GAAA,CAAI,KAAK,CAAC,CAAA;AAAA,EAC5C,SAAS,CAAA,EAAG;AAAA,EAAC;AAGb,EAAA,IAAI;AACF,IAAA,OAAO,SAAS,GAAA,CAAI,iBAAA,CAAkB,IAAI,KAAK,CAAA,CAAE,CAAC,CAAC,CAAA;AAAA,EACrD,SAAS,CAAA,EAAG;AAAA,EAAC;AAEb,EAAA,MAAM,IAAA;AACR;;;;"}
|
||||
@@ -0,0 +1,110 @@
|
||||
import { Enum, _void, Vector, Struct, Option, str, u8 } from 'scale-ts';
|
||||
import '../../utils/ss58-util.mjs';
|
||||
import '../scale/Binary.mjs';
|
||||
import '../scale/bitSequence.mjs';
|
||||
import '../scale/char.mjs';
|
||||
import { compactNumber } from '../scale/compact.mjs';
|
||||
import { Hex } from '../scale/Hex.mjs';
|
||||
import '../scale/fixed-str.mjs';
|
||||
import '../scale/Variant.mjs';
|
||||
import '../scale/ethAccount.mjs';
|
||||
import '../scale/shaped.mjs';
|
||||
import '../scale/BitSeq.mjs';
|
||||
import { docs } from './docs.mjs';
|
||||
import { variantDeprecation, itemDeprecation } from './deprecation.mjs';
|
||||
import { viewFunction } from './runtime-api.mjs';
|
||||
|
||||
const hashType = Enum({
|
||||
Blake2128: _void,
|
||||
Blake2256: _void,
|
||||
Blake2128Concat: _void,
|
||||
Twox128: _void,
|
||||
Twox256: _void,
|
||||
Twox64Concat: _void,
|
||||
Identity: _void
|
||||
});
|
||||
const hashers$1 = Vector(hashType);
|
||||
const storageMap = Struct({
|
||||
hashers: hashers$1,
|
||||
key: compactNumber,
|
||||
value: compactNumber
|
||||
});
|
||||
const storageItem = {
|
||||
name: str,
|
||||
modifier: u8,
|
||||
type: Enum({
|
||||
plain: compactNumber,
|
||||
map: storageMap
|
||||
}),
|
||||
fallback: Hex(),
|
||||
docs
|
||||
};
|
||||
const enumRefV14 = Option(compactNumber);
|
||||
const v14Pallet = {
|
||||
name: str,
|
||||
storage: Option(
|
||||
Struct({
|
||||
prefix: str,
|
||||
items: Vector(Struct(storageItem))
|
||||
})
|
||||
),
|
||||
calls: enumRefV14,
|
||||
events: enumRefV14,
|
||||
constants: Vector(
|
||||
Struct({
|
||||
name: str,
|
||||
type: compactNumber,
|
||||
value: Hex(),
|
||||
docs
|
||||
})
|
||||
),
|
||||
errors: enumRefV14,
|
||||
index: u8
|
||||
};
|
||||
const v15Pallet = {
|
||||
...v14Pallet,
|
||||
docs
|
||||
};
|
||||
const enumRef = Option(
|
||||
Struct({ type: compactNumber, deprecationInfo: variantDeprecation })
|
||||
);
|
||||
const v16Pallet = {
|
||||
name: str,
|
||||
storage: Option(
|
||||
Struct({
|
||||
prefix: str,
|
||||
items: Vector(
|
||||
Struct({
|
||||
...storageItem,
|
||||
deprecationInfo: itemDeprecation
|
||||
})
|
||||
)
|
||||
})
|
||||
),
|
||||
calls: enumRef,
|
||||
events: enumRef,
|
||||
constants: Vector(
|
||||
Struct({
|
||||
name: str,
|
||||
type: compactNumber,
|
||||
value: Hex(),
|
||||
docs,
|
||||
deprecationInfo: itemDeprecation
|
||||
})
|
||||
),
|
||||
errors: enumRef,
|
||||
associatedTypes: Vector(
|
||||
Struct({
|
||||
name: str,
|
||||
type: compactNumber,
|
||||
docs
|
||||
})
|
||||
),
|
||||
viewFns: Vector(viewFunction),
|
||||
index: u8,
|
||||
docs,
|
||||
deprecationInfo: itemDeprecation
|
||||
};
|
||||
|
||||
export { storageMap, v14Pallet, v15Pallet, v16Pallet };
|
||||
//# sourceMappingURL=pallets.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pallets.mjs","sources":["../../../../src/codecs/metadata/pallets.ts"],"sourcesContent":["import { Hex, compactNumber } from \"@/codecs/scale\"\nimport { Struct, Option, Vector, u8, str, Enum, _void } from \"scale-ts\"\nimport { docs } from \"./docs\"\nimport { itemDeprecation, variantDeprecation } from \"./deprecation\"\nimport { viewFunction } from \"./runtime-api\"\n\nconst hashType = Enum({\n Blake2128: _void,\n Blake2256: _void,\n Blake2128Concat: _void,\n Twox128: _void,\n Twox256: _void,\n Twox64Concat: _void,\n Identity: _void,\n})\n\nconst hashers = Vector(hashType)\n\nexport const storageMap = Struct({\n hashers,\n key: compactNumber,\n value: compactNumber,\n})\n\nconst storageItem = {\n name: str,\n modifier: u8,\n type: Enum({\n plain: compactNumber,\n map: storageMap,\n }),\n fallback: Hex(),\n docs,\n}\n\nconst enumRefV14 = Option(compactNumber)\n\nexport const v14Pallet = {\n name: str,\n storage: Option(\n Struct({\n prefix: str,\n items: Vector(Struct(storageItem)),\n }),\n ),\n calls: enumRefV14,\n events: enumRefV14,\n constants: Vector(\n Struct({\n name: str,\n type: compactNumber,\n value: Hex(),\n docs,\n }),\n ),\n errors: enumRefV14,\n index: u8,\n}\n\nexport const v15Pallet = {\n ...v14Pallet,\n docs,\n}\n\nconst enumRef = Option(\n Struct({ type: compactNumber, deprecationInfo: variantDeprecation }),\n)\n\nexport const v16Pallet = {\n name: str,\n storage: Option(\n Struct({\n prefix: str,\n items: Vector(\n Struct({\n ...storageItem,\n deprecationInfo: itemDeprecation,\n }),\n ),\n }),\n ),\n calls: enumRef,\n events: enumRef,\n constants: Vector(\n Struct({\n name: str,\n type: compactNumber,\n value: Hex(),\n docs,\n deprecationInfo: itemDeprecation,\n }),\n ),\n errors: enumRef,\n associatedTypes: Vector(\n Struct({\n name: str,\n type: compactNumber,\n docs,\n }),\n ),\n viewFns: Vector(viewFunction),\n index: u8,\n docs,\n deprecationInfo: itemDeprecation,\n}\n"],"names":["hashers"],"mappings":";;;;;;;;;;;;;;;;AAMA,MAAM,WAAW,IAAA,CAAK;AAAA,EACpB,SAAA,EAAW,KAAA;AAAA,EACX,SAAA,EAAW,KAAA;AAAA,EACX,eAAA,EAAiB,KAAA;AAAA,EACjB,OAAA,EAAS,KAAA;AAAA,EACT,OAAA,EAAS,KAAA;AAAA,EACT,YAAA,EAAc,KAAA;AAAA,EACd,QAAA,EAAU;AACZ,CAAC,CAAA;AAED,MAAMA,SAAA,GAAU,OAAO,QAAQ,CAAA;AAExB,MAAM,aAAa,MAAA,CAAO;AAAA,WAC/BA,SAAA;AAAA,EACA,GAAA,EAAK,aAAA;AAAA,EACL,KAAA,EAAO;AACT,CAAC;AAED,MAAM,WAAA,GAAc;AAAA,EAClB,IAAA,EAAM,GAAA;AAAA,EACN,QAAA,EAAU,EAAA;AAAA,EACV,MAAM,IAAA,CAAK;AAAA,IACT,KAAA,EAAO,aAAA;AAAA,IACP,GAAA,EAAK;AAAA,GACN,CAAA;AAAA,EACD,UAAU,GAAA,EAAI;AAAA,EACd;AACF,CAAA;AAEA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AAEhC,MAAM,SAAA,GAAY;AAAA,EACvB,IAAA,EAAM,GAAA;AAAA,EACN,OAAA,EAAS,MAAA;AAAA,IACP,MAAA,CAAO;AAAA,MACL,MAAA,EAAQ,GAAA;AAAA,MACR,KAAA,EAAO,MAAA,CAAO,MAAA,CAAO,WAAW,CAAC;AAAA,KAClC;AAAA,GACH;AAAA,EACA,KAAA,EAAO,UAAA;AAAA,EACP,MAAA,EAAQ,UAAA;AAAA,EACR,SAAA,EAAW,MAAA;AAAA,IACT,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,GAAA;AAAA,MACN,IAAA,EAAM,aAAA;AAAA,MACN,OAAO,GAAA,EAAI;AAAA,MACX;AAAA,KACD;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,UAAA;AAAA,EACR,KAAA,EAAO;AACT;AAEO,MAAM,SAAA,GAAY;AAAA,EACvB,GAAG,SAAA;AAAA,EACH;AACF;AAEA,MAAM,OAAA,GAAU,MAAA;AAAA,EACd,OAAO,EAAE,IAAA,EAAM,aAAA,EAAe,eAAA,EAAiB,oBAAoB;AACrE,CAAA;AAEO,MAAM,SAAA,GAAY;AAAA,EACvB,IAAA,EAAM,GAAA;AAAA,EACN,OAAA,EAAS,MAAA;AAAA,IACP,MAAA,CAAO;AAAA,MACL,MAAA,EAAQ,GAAA;AAAA,MACR,KAAA,EAAO,MAAA;AAAA,QACL,MAAA,CAAO;AAAA,UACL,GAAG,WAAA;AAAA,UACH,eAAA,EAAiB;AAAA,SAClB;AAAA;AACH,KACD;AAAA,GACH;AAAA,EACA,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,OAAA;AAAA,EACR,SAAA,EAAW,MAAA;AAAA,IACT,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,GAAA;AAAA,MACN,IAAA,EAAM,aAAA;AAAA,MACN,OAAO,GAAA,EAAI;AAAA,MACX,IAAA;AAAA,MACA,eAAA,EAAiB;AAAA,KAClB;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,OAAA;AAAA,EACR,eAAA,EAAiB,MAAA;AAAA,IACf,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,GAAA;AAAA,MACN,IAAA,EAAM,aAAA;AAAA,MACN;AAAA,KACD;AAAA,GACH;AAAA,EACA,OAAA,EAAS,OAAO,YAAY,CAAA;AAAA,EAC5B,KAAA,EAAO,EAAA;AAAA,EACP,IAAA;AAAA,EACA,eAAA,EAAiB;AACnB;;;;"}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { Vector, Struct, str } from 'scale-ts';
|
||||
import { docs } from './docs.mjs';
|
||||
import '../../utils/ss58-util.mjs';
|
||||
import '../scale/Binary.mjs';
|
||||
import '../scale/bitSequence.mjs';
|
||||
import '../scale/char.mjs';
|
||||
import { compactNumber } from '../scale/compact.mjs';
|
||||
import { Hex } from '../scale/Hex.mjs';
|
||||
import '../scale/fixed-str.mjs';
|
||||
import '../scale/Variant.mjs';
|
||||
import '../scale/ethAccount.mjs';
|
||||
import '../scale/shaped.mjs';
|
||||
import '../scale/BitSeq.mjs';
|
||||
import { itemDeprecation } from './deprecation.mjs';
|
||||
|
||||
const runtimeApiMethod = {
|
||||
name: str,
|
||||
inputs: Vector(
|
||||
Struct({
|
||||
name: str,
|
||||
type: compactNumber
|
||||
})
|
||||
),
|
||||
output: compactNumber,
|
||||
docs
|
||||
};
|
||||
const runtimeApiV15 = Struct({
|
||||
name: str,
|
||||
methods: Vector(Struct(runtimeApiMethod)),
|
||||
docs
|
||||
});
|
||||
const runtimeApi = Struct({
|
||||
name: str,
|
||||
methods: Vector(
|
||||
Struct({ ...runtimeApiMethod, deprecationInfo: itemDeprecation })
|
||||
),
|
||||
docs,
|
||||
version: compactNumber,
|
||||
deprecationInfo: itemDeprecation
|
||||
});
|
||||
const viewFunction = Struct({
|
||||
id: Hex(32),
|
||||
...runtimeApiMethod,
|
||||
deprecationInfo: itemDeprecation
|
||||
});
|
||||
|
||||
export { runtimeApi, runtimeApiMethod, runtimeApiV15, viewFunction };
|
||||
//# sourceMappingURL=runtime-api.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"runtime-api.mjs","sources":["../../../../src/codecs/metadata/runtime-api.ts"],"sourcesContent":["import { Struct, Vector, str } from \"scale-ts\"\nimport { docs } from \"./docs\"\nimport { compactNumber, Hex, compactNumber as ty } from \"../scale\"\nimport { itemDeprecation } from \"./deprecation\"\n\nexport const runtimeApiMethod = {\n name: str,\n inputs: Vector(\n Struct({\n name: str,\n type: ty,\n }),\n ),\n output: ty,\n docs,\n}\n\nexport const runtimeApiV15 = Struct({\n name: str,\n methods: Vector(Struct(runtimeApiMethod)),\n docs,\n})\n\nexport const runtimeApi = Struct({\n name: str,\n methods: Vector(\n Struct({ ...runtimeApiMethod, deprecationInfo: itemDeprecation }),\n ),\n docs,\n version: compactNumber,\n deprecationInfo: itemDeprecation,\n})\n\nexport const viewFunction = Struct({\n id: Hex(32),\n ...runtimeApiMethod,\n deprecationInfo: itemDeprecation,\n})\n"],"names":["ty"],"mappings":";;;;;;;;;;;;;;;AAKO,MAAM,gBAAA,GAAmB;AAAA,EAC9B,IAAA,EAAM,GAAA;AAAA,EACN,MAAA,EAAQ,MAAA;AAAA,IACN,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,GAAA;AAAA,MACN,IAAA,EAAMA;AAAA,KACP;AAAA,GACH;AAAA,EACA,MAAA,EAAQA,aAAA;AAAA,EACR;AACF;AAEO,MAAM,gBAAgB,MAAA,CAAO;AAAA,EAClC,IAAA,EAAM,GAAA;AAAA,EACN,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,gBAAgB,CAAC,CAAA;AAAA,EACxC;AACF,CAAC;AAEM,MAAM,aAAa,MAAA,CAAO;AAAA,EAC/B,IAAA,EAAM,GAAA;AAAA,EACN,OAAA,EAAS,MAAA;AAAA,IACP,OAAO,EAAE,GAAG,gBAAA,EAAkB,eAAA,EAAiB,iBAAiB;AAAA,GAClE;AAAA,EACA,IAAA;AAAA,EACA,OAAA,EAAS,aAAA;AAAA,EACT,eAAA,EAAiB;AACnB,CAAC;AAEM,MAAM,eAAe,MAAA,CAAO;AAAA,EACjC,EAAA,EAAI,IAAI,EAAE,CAAA;AAAA,EACV,GAAG,gBAAA;AAAA,EACH,eAAA,EAAiB;AACnB,CAAC;;;;"}
|
||||
@@ -0,0 +1,48 @@
|
||||
const unifyMetadata = (metadata) => {
|
||||
if ("magicNumber" in metadata) metadata = metadata.metadata;
|
||||
if ("tag" in metadata) {
|
||||
if (metadata.tag !== "v14" && metadata.tag !== "v15" && metadata.tag !== "v16")
|
||||
throw new Error("Only metadata 14, 15, and 16 are supported");
|
||||
metadata = metadata.value;
|
||||
}
|
||||
if ("signedExtensionsByVersion" in metadata.extrinsic) {
|
||||
return { version: 16, ...metadata };
|
||||
}
|
||||
if ("custom" in metadata) {
|
||||
const { lookup: lookup2, extrinsic: extrinsic2, custom, apis, pallets: pallets2, outerEnums } = metadata;
|
||||
return {
|
||||
version: 15,
|
||||
lookup: lookup2,
|
||||
pallets: pallets2.map((p) => ({
|
||||
...p,
|
||||
calls: p.calls != null ? { type: p.calls } : void 0,
|
||||
events: p.events != null ? { type: p.events } : void 0,
|
||||
errors: p.errors != null ? { type: p.errors } : void 0,
|
||||
viewFns: [],
|
||||
associatedTypes: []
|
||||
})),
|
||||
extrinsic: { ...extrinsic2, version: [extrinsic2.version] },
|
||||
apis,
|
||||
outerEnums,
|
||||
custom
|
||||
};
|
||||
}
|
||||
const { lookup, extrinsic, pallets } = metadata;
|
||||
return {
|
||||
version: 14,
|
||||
lookup,
|
||||
pallets: pallets.map((p) => ({
|
||||
...p,
|
||||
calls: p.calls != null ? { type: p.calls } : void 0,
|
||||
events: p.events != null ? { type: p.events } : void 0,
|
||||
errors: p.errors != null ? { type: p.errors } : void 0,
|
||||
viewFns: [],
|
||||
associatedTypes: []
|
||||
})),
|
||||
extrinsic: { ...extrinsic, version: [extrinsic.version] },
|
||||
apis: []
|
||||
};
|
||||
};
|
||||
|
||||
export { unifyMetadata };
|
||||
//# sourceMappingURL=unified.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
|
||||
import { Struct, Vector, u8, str, createCodec } from 'scale-ts';
|
||||
import { lookup } from './lookup.mjs';
|
||||
import '../../utils/ss58-util.mjs';
|
||||
import '../scale/Binary.mjs';
|
||||
import '../scale/bitSequence.mjs';
|
||||
import '../scale/char.mjs';
|
||||
import { compactNumber } from '../scale/compact.mjs';
|
||||
import '../scale/Hex.mjs';
|
||||
import '../scale/fixed-str.mjs';
|
||||
import '../scale/Variant.mjs';
|
||||
import '../scale/ethAccount.mjs';
|
||||
import '../scale/shaped.mjs';
|
||||
import '../scale/BitSeq.mjs';
|
||||
import { v14Pallet } from './pallets.mjs';
|
||||
|
||||
const empty = new Uint8Array();
|
||||
const Always = (value) => createCodec(
|
||||
() => empty,
|
||||
() => value
|
||||
);
|
||||
const extrinsic$2 = Struct({
|
||||
type: compactNumber,
|
||||
version: u8,
|
||||
signedExtensions: Vector(
|
||||
Struct({
|
||||
identifier: str,
|
||||
type: compactNumber,
|
||||
additionalSigned: compactNumber
|
||||
})
|
||||
)
|
||||
});
|
||||
const v14 = Struct({
|
||||
lookup,
|
||||
pallets: Vector(Struct({ ...v14Pallet, docs: Always([]) })),
|
||||
extrinsic: extrinsic$2,
|
||||
type: compactNumber,
|
||||
apis: Always([])
|
||||
});
|
||||
|
||||
export { v14 };
|
||||
//# sourceMappingURL=v14.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v14.mjs","sources":["../../../../src/codecs/metadata/v14.ts"],"sourcesContent":["import { CodecType, Struct, Vector, createCodec, str, u8 } from \"scale-ts\"\nimport { lookup } from \"./lookup\"\nimport { compactNumber } from \"../scale\"\nimport { v14Pallet } from \"./pallets\"\nimport { runtimeApi } from \"./runtime-api\"\n\nconst empty = new Uint8Array()\nconst Always = <T>(value: T) =>\n createCodec<T>(\n () => empty,\n () => value,\n )\n\nconst extrinsic = Struct({\n type: compactNumber,\n version: u8,\n signedExtensions: Vector(\n Struct({\n identifier: str,\n type: compactNumber,\n additionalSigned: compactNumber,\n }),\n ),\n})\n\nexport const v14 = Struct({\n lookup,\n pallets: Vector(Struct({ ...v14Pallet, docs: Always([] as string[]) })),\n extrinsic,\n type: compactNumber,\n apis: Always([] as Array<CodecType<typeof runtimeApi>>),\n})\nexport type V14 = CodecType<typeof v14>\n"],"names":["extrinsic"],"mappings":";;;;;;;;;;;;;;;AAMA,MAAM,KAAA,GAAQ,IAAI,UAAA,EAAW;AAC7B,MAAM,MAAA,GAAS,CAAI,KAAA,KACjB,WAAA;AAAA,EACE,MAAM,KAAA;AAAA,EACN,MAAM;AACR,CAAA;AAEF,MAAMA,cAAY,MAAA,CAAO;AAAA,EACvB,IAAA,EAAM,aAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,gBAAA,EAAkB,MAAA;AAAA,IAChB,MAAA,CAAO;AAAA,MACL,UAAA,EAAY,GAAA;AAAA,MACZ,IAAA,EAAM,aAAA;AAAA,MACN,gBAAA,EAAkB;AAAA,KACnB;AAAA;AAEL,CAAC,CAAA;AAEM,MAAM,MAAM,MAAA,CAAO;AAAA,EACxB,MAAA;AAAA,EACA,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,EAAE,GAAG,SAAA,EAAW,IAAA,EAAM,MAAA,CAAO,EAAc,CAAA,EAAG,CAAC,CAAA;AAAA,aACtEA,WAAA;AAAA,EACA,IAAA,EAAM,aAAA;AAAA,EACN,IAAA,EAAM,MAAA,CAAO,EAAyC;AACxD,CAAC;;;;"}
|
||||
@@ -0,0 +1,46 @@
|
||||
import { Struct, Vector, u8, str, Tuple } from 'scale-ts';
|
||||
import { lookup } from './lookup.mjs';
|
||||
import { v15Pallet } from './pallets.mjs';
|
||||
import '../../utils/ss58-util.mjs';
|
||||
import '../scale/Binary.mjs';
|
||||
import '../scale/bitSequence.mjs';
|
||||
import '../scale/char.mjs';
|
||||
import { compactNumber } from '../scale/compact.mjs';
|
||||
import { Hex } from '../scale/Hex.mjs';
|
||||
import '../scale/fixed-str.mjs';
|
||||
import '../scale/Variant.mjs';
|
||||
import '../scale/ethAccount.mjs';
|
||||
import '../scale/shaped.mjs';
|
||||
import '../scale/BitSeq.mjs';
|
||||
import { runtimeApiV15 } from './runtime-api.mjs';
|
||||
|
||||
const extrinsic$1 = Struct({
|
||||
version: u8,
|
||||
address: compactNumber,
|
||||
call: compactNumber,
|
||||
signature: compactNumber,
|
||||
extra: compactNumber,
|
||||
signedExtensions: Vector(
|
||||
Struct({
|
||||
identifier: str,
|
||||
type: compactNumber,
|
||||
additionalSigned: compactNumber
|
||||
})
|
||||
)
|
||||
});
|
||||
const v15 = Struct({
|
||||
lookup,
|
||||
pallets: Vector(Struct(v15Pallet)),
|
||||
extrinsic: extrinsic$1,
|
||||
type: compactNumber,
|
||||
apis: Vector(runtimeApiV15),
|
||||
outerEnums: Struct({
|
||||
call: compactNumber,
|
||||
event: compactNumber,
|
||||
error: compactNumber
|
||||
}),
|
||||
custom: Vector(Tuple(str, Struct({ type: compactNumber, value: Hex() })))
|
||||
});
|
||||
|
||||
export { v15 };
|
||||
//# sourceMappingURL=v15.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v15.mjs","sources":["../../../../src/codecs/metadata/v15.ts"],"sourcesContent":["import { CodecType, Struct, Tuple, Vector, str, u8 } from \"scale-ts\"\nimport { lookup } from \"./lookup\"\nimport { v15Pallet } from \"./pallets\"\nimport { Hex, compactNumber as ty } from \"../scale\"\nimport { runtimeApiV15 } from \"./runtime-api\"\n\nconst extrinsic = Struct({\n version: u8,\n address: ty,\n call: ty,\n signature: ty,\n extra: ty,\n signedExtensions: Vector(\n Struct({\n identifier: str,\n type: ty,\n additionalSigned: ty,\n }),\n ),\n})\n\nexport const v15 = Struct({\n lookup,\n pallets: Vector(Struct(v15Pallet)),\n extrinsic,\n type: ty,\n apis: Vector(runtimeApiV15),\n outerEnums: Struct({\n call: ty,\n event: ty,\n error: ty,\n }),\n custom: Vector(Tuple(str, Struct({ type: ty, value: Hex() }))),\n})\nexport type V15 = CodecType<typeof v15>\n"],"names":["extrinsic","ty"],"mappings":";;;;;;;;;;;;;;;;AAMA,MAAMA,cAAY,MAAA,CAAO;AAAA,EACvB,OAAA,EAAS,EAAA;AAAA,EACT,OAAA,EAASC,aAAA;AAAA,EACT,IAAA,EAAMA,aAAA;AAAA,EACN,SAAA,EAAWA,aAAA;AAAA,EACX,KAAA,EAAOA,aAAA;AAAA,EACP,gBAAA,EAAkB,MAAA;AAAA,IAChB,MAAA,CAAO;AAAA,MACL,UAAA,EAAY,GAAA;AAAA,MACZ,IAAA,EAAMA,aAAA;AAAA,MACN,gBAAA,EAAkBA;AAAA,KACnB;AAAA;AAEL,CAAC,CAAA;AAEM,MAAM,MAAM,MAAA,CAAO;AAAA,EACxB,MAAA;AAAA,EACA,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,SAAS,CAAC,CAAA;AAAA,aACjCD,WAAA;AAAA,EACA,IAAA,EAAMC,aAAA;AAAA,EACN,IAAA,EAAM,OAAO,aAAa,CAAA;AAAA,EAC1B,YAAY,MAAA,CAAO;AAAA,IACjB,IAAA,EAAMA,aAAA;AAAA,IACN,KAAA,EAAOA,aAAA;AAAA,IACP,KAAA,EAAOA;AAAA,GACR,CAAA;AAAA,EACD,MAAA,EAAQ,MAAA,CAAO,KAAA,CAAM,GAAA,EAAK,MAAA,CAAO,EAAE,IAAA,EAAMA,aAAA,EAAI,KAAA,EAAO,GAAA,EAAI,EAAG,CAAC,CAAC;AAC/D,CAAC;;;;"}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Struct, Vector, str, Tuple, u8 } from 'scale-ts';
|
||||
import { lookup } from './lookup.mjs';
|
||||
import { v16Pallet } from './pallets.mjs';
|
||||
import '../../utils/ss58-util.mjs';
|
||||
import '../scale/Binary.mjs';
|
||||
import '../scale/bitSequence.mjs';
|
||||
import '../scale/char.mjs';
|
||||
import { compactNumber } from '../scale/compact.mjs';
|
||||
import { Hex } from '../scale/Hex.mjs';
|
||||
import '../scale/fixed-str.mjs';
|
||||
import '../scale/Variant.mjs';
|
||||
import '../scale/ethAccount.mjs';
|
||||
import '../scale/shaped.mjs';
|
||||
import '../scale/BitSeq.mjs';
|
||||
import { runtimeApi } from './runtime-api.mjs';
|
||||
|
||||
const extrinsic = Struct({
|
||||
version: Vector(u8),
|
||||
address: compactNumber,
|
||||
call: compactNumber,
|
||||
signature: compactNumber,
|
||||
signedExtensionsByVersion: Vector(Tuple(u8, Vector(compactNumber))),
|
||||
signedExtensions: Vector(
|
||||
Struct({
|
||||
identifier: str,
|
||||
type: compactNumber,
|
||||
additionalSigned: compactNumber
|
||||
})
|
||||
)
|
||||
});
|
||||
const v16 = Struct({
|
||||
lookup,
|
||||
pallets: Vector(Struct(v16Pallet)),
|
||||
extrinsic,
|
||||
apis: Vector(runtimeApi),
|
||||
outerEnums: Struct({
|
||||
call: compactNumber,
|
||||
event: compactNumber,
|
||||
error: compactNumber
|
||||
}),
|
||||
custom: Vector(Tuple(str, Struct({ type: compactNumber, value: Hex() })))
|
||||
});
|
||||
|
||||
export { v16 };
|
||||
//# sourceMappingURL=v16.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"v16.mjs","sources":["../../../../src/codecs/metadata/v16.ts"],"sourcesContent":["import { CodecType, Struct, Tuple, Vector, str, u8 } from \"scale-ts\"\nimport { lookup } from \"./lookup\"\nimport { v16Pallet } from \"./pallets\"\nimport { compactNumber, Hex, compactNumber as ty } from \"../scale\"\nimport { runtimeApi } from \"./runtime-api\"\n\nconst extrinsic = Struct({\n version: Vector(u8),\n address: ty,\n call: ty,\n signature: ty,\n signedExtensionsByVersion: Vector(Tuple(u8, Vector(compactNumber))),\n signedExtensions: Vector(\n Struct({\n identifier: str,\n type: ty,\n additionalSigned: ty,\n }),\n ),\n})\n\nexport const v16 = Struct({\n lookup,\n pallets: Vector(Struct(v16Pallet)),\n extrinsic,\n apis: Vector(runtimeApi),\n outerEnums: Struct({\n call: ty,\n event: ty,\n error: ty,\n }),\n custom: Vector(Tuple(str, Struct({ type: ty, value: Hex() }))),\n})\nexport type V16 = CodecType<typeof v16>\n"],"names":["ty"],"mappings":";;;;;;;;;;;;;;;;AAMA,MAAM,YAAY,MAAA,CAAO;AAAA,EACvB,OAAA,EAAS,OAAO,EAAE,CAAA;AAAA,EAClB,OAAA,EAASA,aAAA;AAAA,EACT,IAAA,EAAMA,aAAA;AAAA,EACN,SAAA,EAAWA,aAAA;AAAA,EACX,2BAA2B,MAAA,CAAO,KAAA,CAAM,IAAI,MAAA,CAAO,aAAa,CAAC,CAAC,CAAA;AAAA,EAClE,gBAAA,EAAkB,MAAA;AAAA,IAChB,MAAA,CAAO;AAAA,MACL,UAAA,EAAY,GAAA;AAAA,MACZ,IAAA,EAAMA,aAAA;AAAA,MACN,gBAAA,EAAkBA;AAAA,KACnB;AAAA;AAEL,CAAC,CAAA;AAEM,MAAM,MAAM,MAAA,CAAO;AAAA,EACxB,MAAA;AAAA,EACA,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,SAAS,CAAC,CAAA;AAAA,EACjC,SAAA;AAAA,EACA,IAAA,EAAM,OAAO,UAAU,CAAA;AAAA,EACvB,YAAY,MAAA,CAAO;AAAA,IACjB,IAAA,EAAMA,aAAA;AAAA,IACN,KAAA,EAAOA,aAAA;AAAA,IACP,KAAA,EAAOA;AAAA,GACR,CAAA;AAAA,EACD,MAAA,EAAQ,MAAA,CAAO,KAAA,CAAM,GAAA,EAAK,MAAA,CAAO,EAAE,IAAA,EAAMA,aAAA,EAAI,KAAA,EAAO,GAAA,EAAI,EAAG,CAAC,CAAC;AAC/D,CAAC;;;;"}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { enhanceCodec, Bytes } from 'scale-ts';
|
||||
import { fromBufferToBase58, getSs58AddressInfo } from '../../utils/ss58-util.mjs';
|
||||
|
||||
function fromBase58ToBuffer(nBytes, _ss58Format) {
|
||||
return (address) => {
|
||||
const info = getSs58AddressInfo(address);
|
||||
if (!info.isValid) throw new Error("Invalid checksum");
|
||||
const { publicKey } = info;
|
||||
if (publicKey.length !== nBytes)
|
||||
throw new Error("Invalid public key length");
|
||||
return publicKey;
|
||||
};
|
||||
}
|
||||
const AccountId = (ss58Format = 42, nBytes = 32) => enhanceCodec(
|
||||
Bytes(nBytes),
|
||||
fromBase58ToBuffer(nBytes),
|
||||
fromBufferToBase58(ss58Format)
|
||||
);
|
||||
|
||||
export { AccountId };
|
||||
//# sourceMappingURL=AccountId.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AccountId.mjs","sources":["../../../../src/codecs/scale/AccountId.ts"],"sourcesContent":["import { Bytes, enhanceCodec } from \"scale-ts\"\nimport {\n getSs58AddressInfo,\n SS58String,\n fromBufferToBase58,\n} from \"@/utils/ss58-util\"\n\nfunction fromBase58ToBuffer(nBytes: number, _ss58Format: number) {\n return (address: SS58String) => {\n const info = getSs58AddressInfo(address)\n if (!info.isValid) throw new Error(\"Invalid checksum\")\n const { publicKey } = info\n if (publicKey.length !== nBytes)\n throw new Error(\"Invalid public key length\")\n\n return publicKey\n }\n}\n\nexport const AccountId = (ss58Format: number = 42, nBytes: 32 | 33 = 32) =>\n enhanceCodec(\n Bytes(nBytes),\n fromBase58ToBuffer(nBytes, ss58Format),\n fromBufferToBase58(ss58Format),\n )\n"],"names":[],"mappings":";;;AAOA,SAAS,kBAAA,CAAmB,QAAgB,WAAA,EAAqB;AAC/D,EAAA,OAAO,CAAC,OAAA,KAAwB;AAC9B,IAAA,MAAM,IAAA,GAAO,mBAAmB,OAAO,CAAA;AACvC,IAAA,IAAI,CAAC,IAAA,CAAK,OAAA,EAAS,MAAM,IAAI,MAAM,kBAAkB,CAAA;AACrD,IAAA,MAAM,EAAE,WAAU,GAAI,IAAA;AACtB,IAAA,IAAI,UAAU,MAAA,KAAW,MAAA;AACvB,MAAA,MAAM,IAAI,MAAM,2BAA2B,CAAA;AAE7C,IAAA,OAAO,SAAA;AAAA,EACT,CAAA;AACF;AAEO,MAAM,SAAA,GAAY,CAAC,UAAA,GAAqB,EAAA,EAAI,SAAkB,EAAA,KACnE,YAAA;AAAA,EACE,MAAM,MAAM,CAAA;AAAA,EACZ,kBAAA,CAAmB,MAAkB,CAAA;AAAA,EACrC,mBAAmB,UAAU;AAC/B;;;;"}
|
||||
@@ -0,0 +1,94 @@
|
||||
import { Tuple, compact, Bytes, createCodec } from 'scale-ts';
|
||||
import { fromHex, toHex, mergeUint8 } from '@pezkuwi/papi-utils';
|
||||
import { AccountId } from './AccountId.mjs';
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __typeError = (msg) => {
|
||||
throw TypeError(msg);
|
||||
};
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
||||
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
||||
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
||||
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
||||
var _bytes, _opaqueBytes, _hex, _opaqueHex, _str;
|
||||
const textEncoder$3 = new TextEncoder();
|
||||
const textDecoder$2 = new TextDecoder();
|
||||
const opaqueBytesDec = Tuple(compact, Bytes(Infinity))[1];
|
||||
class Binary {
|
||||
constructor(data, opaque = false) {
|
||||
__privateAdd(this, _bytes);
|
||||
__privateAdd(this, _opaqueBytes, null);
|
||||
__privateAdd(this, _hex, null);
|
||||
__privateAdd(this, _opaqueHex, null);
|
||||
__privateAdd(this, _str, null);
|
||||
__publicField(this, "asText", () => __privateGet(this, _str) ?? __privateSet(this, _str, textDecoder$2.decode(__privateGet(this, _bytes))));
|
||||
__publicField(this, "asHex", () => __privateGet(this, _hex) ?? __privateSet(this, _hex, toHex(__privateGet(this, _bytes))));
|
||||
__publicField(this, "asOpaqueHex", () => __privateGet(this, _opaqueHex) ?? __privateSet(this, _opaqueHex, toHex(this.asOpaqueBytes())));
|
||||
__publicField(this, "asBytes", () => __privateGet(this, _bytes));
|
||||
__publicField(this, "asOpaqueBytes", () => __privateGet(this, _opaqueBytes) ?? __privateSet(this, _opaqueBytes, mergeUint8([
|
||||
compact[0](__privateGet(this, _bytes).length),
|
||||
__privateGet(this, _bytes)
|
||||
])));
|
||||
if (opaque) {
|
||||
try {
|
||||
const [len, bytes] = opaqueBytesDec(data);
|
||||
if (len === bytes.length) {
|
||||
__privateSet(this, _bytes, bytes);
|
||||
__privateSet(this, _opaqueBytes, data);
|
||||
return;
|
||||
}
|
||||
} catch (_) {
|
||||
}
|
||||
throw new Error("Invalid opaque bytes");
|
||||
} else __privateSet(this, _bytes, data);
|
||||
}
|
||||
static fromText(input) {
|
||||
return new this(textEncoder$3.encode(input));
|
||||
}
|
||||
static fromHex(input) {
|
||||
return new this(fromHex(input));
|
||||
}
|
||||
static fromOpaqueHex(input) {
|
||||
return new this(fromHex(input), true);
|
||||
}
|
||||
static fromBytes(input) {
|
||||
return new this(input);
|
||||
}
|
||||
static fromOpaqueBytes(input) {
|
||||
return new this(input, true);
|
||||
}
|
||||
}
|
||||
_bytes = new WeakMap();
|
||||
_opaqueBytes = new WeakMap();
|
||||
_hex = new WeakMap();
|
||||
_opaqueHex = new WeakMap();
|
||||
_str = new WeakMap();
|
||||
const [accountIdEncoder] = AccountId();
|
||||
class FixedSizeBinary extends Binary {
|
||||
constructor(data) {
|
||||
super(data);
|
||||
}
|
||||
static fromArray(input) {
|
||||
return new this(new Uint8Array(input));
|
||||
}
|
||||
static fromAccountId32(input) {
|
||||
return new this(accountIdEncoder(input));
|
||||
}
|
||||
}
|
||||
const enc$2 = (nBytes) => {
|
||||
const _enc = Bytes.enc(nBytes);
|
||||
return (value) => _enc(value.asBytes());
|
||||
};
|
||||
const dec$2 = (nBytes) => {
|
||||
const _dec = Bytes.dec(nBytes);
|
||||
const Bin2 = nBytes == null ? Binary : FixedSizeBinary;
|
||||
return (value) => Bin2.fromBytes(_dec(value));
|
||||
};
|
||||
const Bin = (nBytes) => createCodec(enc$2(nBytes), dec$2(nBytes));
|
||||
Bin.enc = enc$2;
|
||||
Bin.dec = dec$2;
|
||||
|
||||
export { Bin, Binary, FixedSizeBinary };
|
||||
//# sourceMappingURL=Binary.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,37 @@
|
||||
import { createCodec, createDecoder, Bytes } from 'scale-ts';
|
||||
import { compactNumber } from './compact.mjs';
|
||||
import { mergeUint8 } from '@pezkuwi/papi-utils';
|
||||
|
||||
const dec = (isLsb = true) => createDecoder((data) => {
|
||||
const bitsLen = compactNumber.dec(data);
|
||||
const bytesLen = Math.ceil(bitsLen / 8);
|
||||
const bytes = Bytes(bytesLen).dec(data);
|
||||
const result = new Array(bitsLen);
|
||||
let resultIdx = 0;
|
||||
bytes.forEach((val) => {
|
||||
for (let i = 0; i < 8 && resultIdx < bitsLen; i++) {
|
||||
const actualIdx = isLsb ? i : 7 - i;
|
||||
result[resultIdx++] = val >> actualIdx & 1;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
});
|
||||
const enc = (isLsb = true) => (input) => {
|
||||
const lenEncoded = compactNumber.enc(input.length);
|
||||
const nBytes = Math.ceil(input.length / 8);
|
||||
const bytes = new Uint8Array(nBytes);
|
||||
for (let byteIdx = 0; byteIdx < nBytes; byteIdx++) {
|
||||
let inputIdx = byteIdx * 8;
|
||||
let byte = 0;
|
||||
for (let i = 0; i < 8 && inputIdx < input.length; i++, inputIdx++)
|
||||
byte |= input[inputIdx] << (isLsb ? i : 7 - i);
|
||||
bytes[byteIdx] = byte;
|
||||
}
|
||||
return mergeUint8([lenEncoded, bytes]);
|
||||
};
|
||||
const BitSeq = (isLsb) => createCodec(enc(isLsb), dec(isLsb));
|
||||
BitSeq.enc = enc;
|
||||
BitSeq.dec = dec;
|
||||
|
||||
export { BitSeq };
|
||||
//# sourceMappingURL=BitSeq.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"BitSeq.mjs","sources":["../../../../src/codecs/scale/BitSeq.ts"],"sourcesContent":["import {\n Bytes,\n Codec,\n Decoder,\n Encoder,\n createCodec,\n createDecoder,\n} from \"scale-ts\"\nimport { compactNumber } from \"./compact\"\nimport { mergeUint8 } from \"@pezkuwi/papi-utils\"\n\nexport type BitSeq = Array<0 | 1>\n\nconst dec: (isLsb?: boolean) => Decoder<BitSeq> = (isLsb = true) =>\n createDecoder((data) => {\n const bitsLen = compactNumber.dec(data)\n const bytesLen = Math.ceil(bitsLen / 8)\n const bytes = Bytes(bytesLen).dec(data)\n\n const result = new Array<0 | 1>(bitsLen)\n let resultIdx = 0\n bytes.forEach((val) => {\n for (let i = 0; i < 8 && resultIdx < bitsLen; i++) {\n const actualIdx = isLsb ? i : 7 - i\n result[resultIdx++] = ((val >> actualIdx) & 1) as 1 | 0\n }\n })\n return result\n })\n\nconst enc: (isLsb?: boolean) => Encoder<BitSeq> =\n (isLsb = true) =>\n (input) => {\n const lenEncoded = compactNumber.enc(input.length)\n const nBytes = Math.ceil(input.length / 8)\n\n const bytes = new Uint8Array(nBytes)\n for (let byteIdx = 0; byteIdx < nBytes; byteIdx++) {\n let inputIdx = byteIdx * 8\n let byte = 0\n for (let i = 0; i < 8 && inputIdx < input.length; i++, inputIdx++)\n byte |= input[inputIdx] << (isLsb ? i : 7 - i)\n bytes[byteIdx] = byte\n }\n\n return mergeUint8([lenEncoded, bytes])\n }\n\nexport const BitSeq = (isLsb?: boolean): Codec<BitSeq> =>\n createCodec(enc(isLsb), dec(isLsb))\n\nBitSeq.enc = enc\nBitSeq.dec = dec\n"],"names":[],"mappings":";;;;AAaA,MAAM,MAA4C,CAAC,KAAA,GAAQ,IAAA,KACzD,aAAA,CAAc,CAAC,IAAA,KAAS;AACtB,EAAA,MAAM,OAAA,GAAU,aAAA,CAAc,GAAA,CAAI,IAAI,CAAA;AACtC,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,IAAA,CAAK,OAAA,GAAU,CAAC,CAAA;AACtC,EAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,QAAQ,CAAA,CAAE,IAAI,IAAI,CAAA;AAEtC,EAAA,MAAM,MAAA,GAAS,IAAI,KAAA,CAAa,OAAO,CAAA;AACvC,EAAA,IAAI,SAAA,GAAY,CAAA;AAChB,EAAA,KAAA,CAAM,OAAA,CAAQ,CAAC,GAAA,KAAQ;AACrB,IAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAI,CAAA,IAAK,SAAA,GAAY,SAAS,CAAA,EAAA,EAAK;AACjD,MAAA,MAAM,SAAA,GAAY,KAAA,GAAQ,CAAA,GAAI,CAAA,GAAI,CAAA;AAClC,MAAA,MAAA,CAAO,SAAA,EAAW,CAAA,GAAM,GAAA,IAAO,SAAA,GAAa,CAAA;AAAA,IAC9C;AAAA,EACF,CAAC,CAAA;AACD,EAAA,OAAO,MAAA;AACT,CAAC,CAAA;AAEH,MAAM,GAAA,GACJ,CAAC,KAAA,GAAQ,IAAA,KACT,CAAC,KAAA,KAAU;AACT,EAAA,MAAM,UAAA,GAAa,aAAA,CAAc,GAAA,CAAI,KAAA,CAAM,MAAM,CAAA;AACjD,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,IAAA,CAAK,KAAA,CAAM,SAAS,CAAC,CAAA;AAEzC,EAAA,MAAM,KAAA,GAAQ,IAAI,UAAA,CAAW,MAAM,CAAA;AACnC,EAAA,KAAA,IAAS,OAAA,GAAU,CAAA,EAAG,OAAA,GAAU,MAAA,EAAQ,OAAA,EAAA,EAAW;AACjD,IAAA,IAAI,WAAW,OAAA,GAAU,CAAA;AACzB,IAAA,IAAI,IAAA,GAAO,CAAA;AACX,IAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAI,KAAK,QAAA,GAAW,KAAA,CAAM,QAAQ,CAAA,EAAA,EAAK,QAAA,EAAA;AACrD,MAAA,IAAA,IAAQ,KAAA,CAAM,QAAQ,CAAA,KAAM,KAAA,GAAQ,IAAI,CAAA,GAAI,CAAA,CAAA;AAC9C,IAAA,KAAA,CAAM,OAAO,CAAA,GAAI,IAAA;AAAA,EACnB;AAEA,EAAA,OAAO,UAAA,CAAW,CAAC,UAAA,EAAY,KAAK,CAAC,CAAA;AACvC,CAAA;AAEK,MAAM,MAAA,GAAS,CAAC,KAAA,KACrB,WAAA,CAAY,IAAI,KAAK,CAAA,EAAG,GAAA,CAAI,KAAK,CAAC;AAEpC,MAAA,CAAO,GAAA,GAAM,GAAA;AACb,MAAA,CAAO,GAAA,GAAM,GAAA;;;;"}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { fromHex, toHex } from '@pezkuwi/papi-utils';
|
||||
import { createCodec, Bytes } from 'scale-ts';
|
||||
|
||||
const enc$1 = (nBytes) => {
|
||||
const _enc = Bytes.enc(nBytes);
|
||||
return (value) => _enc(fromHex(value));
|
||||
};
|
||||
const dec$1 = (nBytes) => {
|
||||
const _dec = Bytes.dec(nBytes);
|
||||
return (value) => toHex(_dec(value));
|
||||
};
|
||||
const Hex = (nBytes) => createCodec(enc$1(nBytes), dec$1(nBytes));
|
||||
Hex.enc = enc$1;
|
||||
Hex.dec = dec$1;
|
||||
|
||||
export { Hex };
|
||||
//# sourceMappingURL=Hex.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Hex.mjs","sources":["../../../../src/codecs/scale/Hex.ts"],"sourcesContent":["import { fromHex, toHex } from \"@pezkuwi/papi-utils\"\nimport { Bytes, Codec, Decoder, Encoder, createCodec } from \"scale-ts\"\n\nexport type HexString = string & { __hexString?: unknown }\n\nconst enc = (nBytes?: number): Encoder<HexString> => {\n const _enc = Bytes.enc(nBytes)\n return (value: string) => _enc(fromHex(value))\n}\n\nconst dec = (nBytes?: number): Decoder<HexString> => {\n const _dec = Bytes.dec(nBytes)\n return (value) => toHex(_dec(value)) as HexString\n}\n\nexport const Hex = (nBytes?: number): Codec<HexString> =>\n createCodec(enc(nBytes), dec(nBytes))\n\nHex.enc = enc\nHex.dec = dec\n"],"names":["enc","dec"],"mappings":";;;AAKA,MAAMA,KAAA,GAAM,CAAC,MAAA,KAAwC;AACnD,EAAA,MAAM,IAAA,GAAO,KAAA,CAAM,GAAA,CAAI,MAAM,CAAA;AAC7B,EAAA,OAAO,CAAC,KAAA,KAAkB,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAC,CAAA;AAC/C,CAAA;AAEA,MAAMC,KAAA,GAAM,CAAC,MAAA,KAAwC;AACnD,EAAA,MAAM,IAAA,GAAO,KAAA,CAAM,GAAA,CAAI,MAAM,CAAA;AAC7B,EAAA,OAAO,CAAC,KAAA,KAAU,KAAA,CAAM,IAAA,CAAK,KAAK,CAAC,CAAA;AACrC,CAAA;AAEO,MAAM,GAAA,GAAM,CAAC,MAAA,KAClB,WAAA,CAAYD,MAAI,MAAM,CAAA,EAAGC,KAAA,CAAI,MAAM,CAAC;AAEtC,GAAA,CAAI,GAAA,GAAMD,KAAA;AACV,GAAA,CAAI,GAAA,GAAMC,KAAA;;;;"}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { createCodec } from 'scale-ts';
|
||||
|
||||
const selfEncoder = (value) => {
|
||||
let cache = (x) => {
|
||||
const encoder = value();
|
||||
cache = encoder;
|
||||
return encoder(x);
|
||||
};
|
||||
return (x) => cache(x);
|
||||
};
|
||||
const selfDecoder = (value) => {
|
||||
let cache = (x) => {
|
||||
const decoder = value();
|
||||
const result = decoder;
|
||||
cache = decoder;
|
||||
return result(x);
|
||||
};
|
||||
return (x) => cache(x);
|
||||
};
|
||||
const Self = (value) => createCodec(
|
||||
selfEncoder(() => value().enc),
|
||||
selfDecoder(() => value().dec)
|
||||
);
|
||||
|
||||
export { Self, selfDecoder, selfEncoder };
|
||||
//# sourceMappingURL=Self.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Self.mjs","sources":["../../../../src/codecs/scale/Self.ts"],"sourcesContent":["import { Codec, Decoder, Encoder, createCodec, _void } from \"scale-ts\"\n\nexport const selfEncoder = <T>(value: () => Encoder<T>): Encoder<T> => {\n let cache: Encoder<T> = (x) => {\n const encoder = value()\n cache = encoder\n return encoder(x)\n }\n\n return (x) => cache(x)\n}\n\nexport const selfDecoder = <T>(value: () => Decoder<T>): Decoder<T> => {\n let cache: Decoder<T> = (x) => {\n const decoder = value()\n const result = decoder\n cache = decoder\n return result(x)\n }\n\n return (x) => cache(x)\n}\n\nexport const Self = <T>(value: () => Codec<T>): Codec<T> =>\n createCodec(\n selfEncoder(() => value().enc),\n selfDecoder(() => value().dec),\n )\n"],"names":[],"mappings":";;AAEO,MAAM,WAAA,GAAc,CAAI,KAAA,KAAwC;AACrE,EAAA,IAAI,KAAA,GAAoB,CAAC,CAAA,KAAM;AAC7B,IAAA,MAAM,UAAU,KAAA,EAAM;AACtB,IAAA,KAAA,GAAQ,OAAA;AACR,IAAA,OAAO,QAAQ,CAAC,CAAA;AAAA,EAClB,CAAA;AAEA,EAAA,OAAO,CAAC,CAAA,KAAM,KAAA,CAAM,CAAC,CAAA;AACvB;AAEO,MAAM,WAAA,GAAc,CAAI,KAAA,KAAwC;AACrE,EAAA,IAAI,KAAA,GAAoB,CAAC,CAAA,KAAM;AAC7B,IAAA,MAAM,UAAU,KAAA,EAAM;AACtB,IAAA,MAAM,MAAA,GAAS,OAAA;AACf,IAAA,KAAA,GAAQ,OAAA;AACR,IAAA,OAAO,OAAO,CAAC,CAAA;AAAA,EACjB,CAAA;AAEA,EAAA,OAAO,CAAC,CAAA,KAAM,KAAA,CAAM,CAAC,CAAA;AACvB;AAEO,MAAM,IAAA,GAAO,CAAI,KAAA,KACtB,WAAA;AAAA,EACE,WAAA,CAAY,MAAM,KAAA,EAAM,CAAE,GAAG,CAAA;AAAA,EAC7B,WAAA,CAAY,MAAM,KAAA,EAAM,CAAE,GAAG;AAC/B;;;;"}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { createCodec, Enum } from 'scale-ts';
|
||||
import { mapObject } from '@pezkuwi/papi-utils';
|
||||
import { Enum as Enum$1 } from '../../types/enum.mjs';
|
||||
import { withInner } from './with-inner.mjs';
|
||||
|
||||
const VariantEnc = (...args) => {
|
||||
const enc = Enum.enc(...args);
|
||||
return withInner((v) => enc({ tag: v.type, value: v.value }), args[0]);
|
||||
};
|
||||
const VariantDec = (...args) => {
|
||||
const dec = Enum.dec(...args);
|
||||
return withInner((v) => {
|
||||
const { tag, value } = dec(v);
|
||||
return Enum$1(tag, value);
|
||||
}, args[0]);
|
||||
};
|
||||
const Variant = (inner, ...args) => withInner(
|
||||
createCodec(
|
||||
VariantEnc(
|
||||
mapObject(inner, ([encoder]) => encoder),
|
||||
...args
|
||||
),
|
||||
VariantDec(
|
||||
mapObject(inner, ([, decoder]) => decoder),
|
||||
...args
|
||||
)
|
||||
),
|
||||
inner
|
||||
);
|
||||
Variant.enc = VariantEnc;
|
||||
Variant.dec = VariantDec;
|
||||
const ScaleEnum = (inner, ...args) => withInner(Enum(inner, ...args), inner);
|
||||
ScaleEnum.enc = (inner, ...rest) => withInner(Enum.enc(inner, ...rest), inner);
|
||||
ScaleEnum.dec = (inner, ...rest) => withInner(Enum.dec(inner, ...rest), inner);
|
||||
|
||||
export { ScaleEnum, Variant };
|
||||
//# sourceMappingURL=Variant.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,24 @@
|
||||
import { createDecoder, Bytes, createCodec } from 'scale-ts';
|
||||
import { compactNumber } from './compact.mjs';
|
||||
|
||||
const bitSequenceDecoder = createDecoder((data) => {
|
||||
const bitsLen = compactNumber.dec(data);
|
||||
const bytesLen = Math.ceil(bitsLen / 8);
|
||||
const bytes = Bytes(bytesLen).dec(data);
|
||||
return { bytes, bitsLen };
|
||||
});
|
||||
const bitSequenceEncoder = (input) => {
|
||||
if (input.bitsLen > input.bytes.length * 8)
|
||||
throw new Error(
|
||||
`Not enough bytes. (bitsLen:${input.bitsLen}, bytesLen:${input.bytes.length})`
|
||||
);
|
||||
const lenEncoded = compactNumber.enc(input.bitsLen);
|
||||
const result = new Uint8Array(input.bytes.length + lenEncoded.length);
|
||||
result.set(lenEncoded, 0);
|
||||
result.set(input.bytes, lenEncoded.length);
|
||||
return result;
|
||||
};
|
||||
const bitSequence$1 = createCodec(bitSequenceEncoder, bitSequenceDecoder);
|
||||
|
||||
export { bitSequence$1 as bitSequence };
|
||||
//# sourceMappingURL=bitSequence.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bitSequence.mjs","sources":["../../../../src/codecs/scale/bitSequence.ts"],"sourcesContent":["import { Bytes, Decoder, Encoder, createCodec, createDecoder } from \"scale-ts\"\nimport { compactNumber } from \"./compact\"\n\nexport interface BitSequence {\n bitsLen: number\n bytes: Uint8Array\n}\n\nconst bitSequenceDecoder: Decoder<BitSequence> = createDecoder((data) => {\n const bitsLen = compactNumber.dec(data)\n\n const bytesLen = Math.ceil(bitsLen / 8)\n const bytes = Bytes(bytesLen).dec(data)\n return { bytes, bitsLen }\n})\n\nconst bitSequenceEncoder: Encoder<BitSequence> = (input) => {\n if (input.bitsLen > input.bytes.length * 8)\n throw new Error(\n `Not enough bytes. (bitsLen:${input.bitsLen}, bytesLen:${input.bytes.length})`,\n )\n\n const lenEncoded = compactNumber.enc(input.bitsLen)\n const result = new Uint8Array(input.bytes.length + lenEncoded.length)\n result.set(lenEncoded, 0)\n result.set(input.bytes, lenEncoded.length)\n return result\n}\n\nexport const bitSequence = createCodec(bitSequenceEncoder, bitSequenceDecoder)\n"],"names":["bitSequence"],"mappings":";;;AAQA,MAAM,kBAAA,GAA2C,aAAA,CAAc,CAAC,IAAA,KAAS;AACvE,EAAA,MAAM,OAAA,GAAU,aAAA,CAAc,GAAA,CAAI,IAAI,CAAA;AAEtC,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,IAAA,CAAK,OAAA,GAAU,CAAC,CAAA;AACtC,EAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,QAAQ,CAAA,CAAE,IAAI,IAAI,CAAA;AACtC,EAAA,OAAO,EAAE,OAAO,OAAA,EAAQ;AAC1B,CAAC,CAAA;AAED,MAAM,kBAAA,GAA2C,CAAC,KAAA,KAAU;AAC1D,EAAA,IAAI,KAAA,CAAM,OAAA,GAAU,KAAA,CAAM,KAAA,CAAM,MAAA,GAAS,CAAA;AACvC,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,8BAA8B,KAAA,CAAM,OAAO,CAAA,WAAA,EAAc,KAAA,CAAM,MAAM,MAAM,CAAA,CAAA;AAAA,KAC7E;AAEF,EAAA,MAAM,UAAA,GAAa,aAAA,CAAc,GAAA,CAAI,KAAA,CAAM,OAAO,CAAA;AAClD,EAAA,MAAM,SAAS,IAAI,UAAA,CAAW,MAAM,KAAA,CAAM,MAAA,GAAS,WAAW,MAAM,CAAA;AACpE,EAAA,MAAA,CAAO,GAAA,CAAI,YAAY,CAAC,CAAA;AACxB,EAAA,MAAA,CAAO,GAAA,CAAI,KAAA,CAAM,KAAA,EAAO,UAAA,CAAW,MAAM,CAAA;AACzC,EAAA,OAAO,MAAA;AACT,CAAA;AAEO,MAAMA,aAAA,GAAc,WAAA,CAAY,kBAAA,EAAoB,kBAAkB;;;;"}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { enhanceCodec, u8 } from 'scale-ts';
|
||||
|
||||
const char = enhanceCodec(
|
||||
u8,
|
||||
(str) => str.charCodeAt(0),
|
||||
String.fromCharCode
|
||||
);
|
||||
|
||||
export { char };
|
||||
//# sourceMappingURL=char.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"char.mjs","sources":["../../../../src/codecs/scale/char.ts"],"sourcesContent":["import { enhanceCodec, u8 } from \"scale-ts\"\n\nexport const char = enhanceCodec(\n u8,\n (str: string) => str.charCodeAt(0),\n String.fromCharCode,\n)\n"],"names":[],"mappings":";;AAEO,MAAM,IAAA,GAAO,YAAA;AAAA,EAClB,EAAA;AAAA,EACA,CAAC,GAAA,KAAgB,GAAA,CAAI,UAAA,CAAW,CAAC,CAAA;AAAA,EACjC,MAAA,CAAO;AACT;;;;"}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { enhanceCodec, compact } from 'scale-ts';
|
||||
|
||||
const compactNumber = enhanceCodec(compact, (v) => v, Number);
|
||||
const compactBn = enhanceCodec(compact, (v) => v, BigInt);
|
||||
|
||||
export { compactBn, compactNumber };
|
||||
//# sourceMappingURL=compact.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"compact.mjs","sources":["../../../../src/codecs/scale/compact.ts"],"sourcesContent":["import { compact, enhanceCodec } from \"scale-ts\"\n\nexport const compactNumber = enhanceCodec(compact, (v) => v, Number)\nexport const compactBn = enhanceCodec(compact, (v) => v, BigInt)\n"],"names":[],"mappings":";;AAEO,MAAM,gBAAgB,YAAA,CAAa,OAAA,EAAS,CAAC,CAAA,KAAM,GAAG,MAAM;AAC5D,MAAM,YAAY,YAAA,CAAa,OAAA,EAAS,CAAC,CAAA,KAAM,GAAG,MAAM;;;;"}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { fromHex, toHex } from '@pezkuwi/papi-utils';
|
||||
import { Bytes, createCodec, createDecoder } from 'scale-ts';
|
||||
import '@noble/hashes/blake2.js';
|
||||
import '@noble/hashes/blake3.js';
|
||||
import { Keccak256 } from '../../hashes/keccak.mjs';
|
||||
import { textEncoder } from './fixed-str.mjs';
|
||||
|
||||
const getFormattedAddress = (hexAddress) => {
|
||||
const nonChecksum = hexAddress.slice(2);
|
||||
const hashedAddress = toHex(Keccak256(textEncoder.encode(nonChecksum))).slice(
|
||||
2
|
||||
);
|
||||
const result = new Array(40);
|
||||
for (let i = 0; i < 40; i++) {
|
||||
const checksumVal = parseInt(hashedAddress[i], 16);
|
||||
const char = nonChecksum[i];
|
||||
result[i] = checksumVal > 7 ? char.toUpperCase() : char;
|
||||
}
|
||||
return `0x${result.join("")}`;
|
||||
};
|
||||
const bytes20Dec = Bytes(20)[1];
|
||||
const ethAccount = createCodec(
|
||||
(input) => {
|
||||
const bytes = fromHex(input);
|
||||
if (bytes.length !== 20)
|
||||
throw new Error(`Invalid length found on EthAddress(${input})`);
|
||||
const hexAddress = toHex(bytes);
|
||||
if (input === hexAddress || input === hexAddress.toUpperCase()) return bytes;
|
||||
if (getFormattedAddress(hexAddress) !== input)
|
||||
throw new Error(`Invalid checksum found on EthAddress(${input})`);
|
||||
return bytes;
|
||||
},
|
||||
createDecoder((bytes) => getFormattedAddress(toHex(bytes20Dec(bytes))))
|
||||
);
|
||||
|
||||
export { ethAccount };
|
||||
//# sourceMappingURL=ethAccount.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ethAccount.mjs","sources":["../../../../src/codecs/scale/ethAccount.ts"],"sourcesContent":["import { fromHex, toHex } from \"@pezkuwi/papi-utils\"\nimport { Bytes, createCodec, createDecoder } from \"scale-ts\"\nimport { Keccak256 } from \"../../hashes\"\nimport { textEncoder } from \"./fixed-str\"\n\nconst getFormattedAddress = (hexAddress: string) => {\n const nonChecksum = hexAddress.slice(2)\n const hashedAddress = toHex(Keccak256(textEncoder.encode(nonChecksum))).slice(\n 2,\n )\n const result = new Array(40)\n\n for (let i = 0; i < 40; i++) {\n const checksumVal = parseInt(hashedAddress[i], 16)\n const char = nonChecksum[i]\n result[i] = checksumVal > 7 ? char.toUpperCase() : char\n }\n\n return `0x${result.join(\"\")}`\n}\n\nconst bytes20Dec = Bytes(20)[1]\n\nexport const ethAccount = createCodec<string>(\n (input: string) => {\n const bytes = fromHex(input)\n if (bytes.length !== 20)\n throw new Error(`Invalid length found on EthAddress(${input})`)\n\n const hexAddress = toHex(bytes)\n if (input === hexAddress || input === hexAddress.toUpperCase()) return bytes\n\n if (getFormattedAddress(hexAddress) !== input)\n throw new Error(`Invalid checksum found on EthAddress(${input})`)\n\n return bytes\n },\n createDecoder((bytes) => getFormattedAddress(toHex(bytes20Dec(bytes)))),\n)\n"],"names":[],"mappings":";;;;;;;AAKA,MAAM,mBAAA,GAAsB,CAAC,UAAA,KAAuB;AAClD,EAAA,MAAM,WAAA,GAAc,UAAA,CAAW,KAAA,CAAM,CAAC,CAAA;AACtC,EAAA,MAAM,aAAA,GAAgB,MAAM,SAAA,CAAU,WAAA,CAAY,OAAO,WAAW,CAAC,CAAC,CAAA,CAAE,KAAA;AAAA,IACtE;AAAA,GACF;AACA,EAAA,MAAM,MAAA,GAAS,IAAI,KAAA,CAAM,EAAE,CAAA;AAE3B,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,EAAA,EAAI,CAAA,EAAA,EAAK;AAC3B,IAAA,MAAM,WAAA,GAAc,QAAA,CAAS,aAAA,CAAc,CAAC,GAAG,EAAE,CAAA;AACjD,IAAA,MAAM,IAAA,GAAO,YAAY,CAAC,CAAA;AAC1B,IAAA,MAAA,CAAO,CAAC,CAAA,GAAI,WAAA,GAAc,CAAA,GAAI,IAAA,CAAK,aAAY,GAAI,IAAA;AAAA,EACrD;AAEA,EAAA,OAAO,CAAA,EAAA,EAAK,MAAA,CAAO,IAAA,CAAK,EAAE,CAAC,CAAA,CAAA;AAC7B,CAAA;AAEA,MAAM,UAAA,GAAa,KAAA,CAAM,EAAE,CAAA,CAAE,CAAC,CAAA;AAEvB,MAAM,UAAA,GAAa,WAAA;AAAA,EACxB,CAAC,KAAA,KAAkB;AACjB,IAAA,MAAM,KAAA,GAAQ,QAAQ,KAAK,CAAA;AAC3B,IAAA,IAAI,MAAM,MAAA,KAAW,EAAA;AACnB,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,mCAAA,EAAsC,KAAK,CAAA,CAAA,CAAG,CAAA;AAEhE,IAAA,MAAM,UAAA,GAAa,MAAM,KAAK,CAAA;AAC9B,IAAA,IAAI,UAAU,UAAA,IAAc,KAAA,KAAU,UAAA,CAAW,WAAA,IAAe,OAAO,KAAA;AAEvE,IAAA,IAAI,mBAAA,CAAoB,UAAU,CAAA,KAAM,KAAA;AACtC,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,qCAAA,EAAwC,KAAK,CAAA,CAAA,CAAG,CAAA;AAElE,IAAA,OAAO,KAAA;AAAA,EACT,CAAA;AAAA,EACA,aAAA,CAAc,CAAC,KAAA,KAAU,mBAAA,CAAoB,MAAM,UAAA,CAAW,KAAK,CAAC,CAAC,CAAC;AACxE;;;;"}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { enhanceCodec, Bytes } from 'scale-ts';
|
||||
|
||||
const textEncoder$2 = new TextEncoder();
|
||||
const textDecoder$1 = new TextDecoder();
|
||||
const fixedStr = (nBytes) => enhanceCodec(
|
||||
Bytes(nBytes),
|
||||
(str) => textEncoder$2.encode(str),
|
||||
(bytes) => textDecoder$1.decode(bytes)
|
||||
);
|
||||
|
||||
export { fixedStr, textEncoder$2 as textEncoder };
|
||||
//# sourceMappingURL=fixed-str.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fixed-str.mjs","sources":["../../../../src/codecs/scale/fixed-str.ts"],"sourcesContent":["import { Bytes, enhanceCodec } from \"scale-ts\"\n\nexport const textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\nexport const fixedStr = (nBytes: number) =>\n enhanceCodec(\n Bytes(nBytes),\n (str: string) => textEncoder.encode(str),\n (bytes) => textDecoder.decode(bytes),\n )\n"],"names":["textEncoder","textDecoder"],"mappings":";;AAEO,MAAMA,aAAA,GAAc,IAAI,WAAA;AAC/B,MAAMC,aAAA,GAAc,IAAI,WAAA,EAAY;AAE7B,MAAM,QAAA,GAAW,CAAC,MAAA,KACvB,YAAA;AAAA,EACE,MAAM,MAAM,CAAA;AAAA,EACZ,CAAC,GAAA,KAAgBD,aAAA,CAAY,MAAA,CAAO,GAAG,CAAA;AAAA,EACvC,CAAC,KAAA,KAAUC,aAAA,CAAY,MAAA,CAAO,KAAK;AACrC;;;;"}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Struct as Struct$1, Vector as Vector$1, Tuple as Tuple$1, Result as Result$1, Option as Option$1 } from 'scale-ts';
|
||||
import { withInner } from './with-inner.mjs';
|
||||
|
||||
const Struct = (codecs) => withInner(Struct$1(codecs), codecs);
|
||||
Struct.enc = (x) => withInner(Struct$1.enc(x), x);
|
||||
Struct.dec = (x) => withInner(Struct$1.dec(x), x);
|
||||
const Tuple = (...inner) => withInner(Tuple$1(...inner), inner);
|
||||
Tuple.enc = (...inner) => withInner(Tuple$1.enc(...inner), inner);
|
||||
Tuple.dec = (...inner) => withInner(Tuple$1.dec(...inner), inner);
|
||||
const Vector = (inner, ...rest) => withInner(Vector$1(inner, ...rest), inner);
|
||||
Vector.enc = (inner, ...rest) => withInner(Vector$1.enc(inner, ...rest), inner);
|
||||
Vector.dec = (inner, ...rest) => withInner(Vector$1.dec(inner, ...rest), inner);
|
||||
const Result = (ok, ko) => withInner(Result$1(ok, ko), { ok, ko });
|
||||
Result.enc = (ok, ko) => withInner(Result$1.enc(ok, ko), { ok, ko });
|
||||
Result.dec = (ok, ko) => withInner(Result$1.dec(ok, ko), { ok, ko });
|
||||
const Option = (inner) => withInner(Option$1(inner), inner);
|
||||
Option.enc = (inner) => withInner(Option$1.enc(inner), inner);
|
||||
Option.dec = (inner) => withInner(Option$1.dec(inner), inner);
|
||||
|
||||
export { Option, Result, Struct, Tuple, Vector };
|
||||
//# sourceMappingURL=shaped.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
const withInner = (codec, inner) => {
|
||||
const result = codec;
|
||||
result.inner = inner;
|
||||
return result;
|
||||
};
|
||||
|
||||
export { withInner };
|
||||
//# sourceMappingURL=with-inner.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"with-inner.mjs","sources":["../../../../src/codecs/scale/with-inner.ts"],"sourcesContent":["export const withInner = <T, I>(codec: T, inner: I): T & { inner: I } => {\n const result: T & { inner: I } = codec as any\n result.inner = inner\n return result\n}\n"],"names":[],"mappings":"AAAO,MAAM,SAAA,GAAY,CAAO,KAAA,EAAU,KAAA,KAA+B;AACvE,EAAA,MAAM,MAAA,GAA2B,KAAA;AACjC,EAAA,MAAA,CAAO,KAAA,GAAQ,KAAA;AACf,EAAA,OAAO,MAAA;AACT;;;;"}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { enhanceCodec, u8 } from 'scale-ts';
|
||||
|
||||
const TYPES = {
|
||||
bare: 0,
|
||||
0: "bare",
|
||||
general: 1,
|
||||
1: "general",
|
||||
signed: 2,
|
||||
2: "signed"
|
||||
};
|
||||
const extrinsicFormat = enhanceCodec(
|
||||
u8,
|
||||
({ version, type }) => version + (TYPES[type] << 6),
|
||||
(v) => {
|
||||
const version = v & 63;
|
||||
const type = v >> 6;
|
||||
if (version === 4 && (type === TYPES.bare || type === TYPES.signed))
|
||||
return { version, type: TYPES[type] };
|
||||
if (version === 5 && (type === TYPES.bare || type === TYPES.general))
|
||||
return { version, type: TYPES[type] };
|
||||
throw new Error(`ExtrinsicFormat ${v} not valid`);
|
||||
}
|
||||
);
|
||||
|
||||
export { extrinsicFormat };
|
||||
//# sourceMappingURL=extrinsic-format.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"extrinsic-format.mjs","sources":["../../../src/extrinsics/extrinsic-format.ts"],"sourcesContent":["import { enhanceCodec, u8 } from \"scale-ts\"\n\nconst TYPES = {\n bare: 0b00,\n 0b00: \"bare\",\n general: 0b01,\n 0b01: \"general\",\n signed: 0b10,\n 0b10: \"signed\",\n} as const\n\nexport type ExtrinsicFormat =\n | { version: 4; type: \"bare\" | \"signed\" }\n | { version: 5; type: \"bare\" | \"general\" }\n\nexport const extrinsicFormat = enhanceCodec<number, ExtrinsicFormat>(\n u8,\n ({ version, type }) => version + (TYPES[type] << 6),\n (v) => {\n const version = v & 0x3f // 0b0011_1111\n const type = v >> 6\n if (version === 4 && (type === TYPES.bare || type === TYPES.signed))\n return { version, type: TYPES[type] }\n if (version === 5 && (type === TYPES.bare || type === TYPES.general))\n return { version, type: TYPES[type] }\n throw new Error(`ExtrinsicFormat ${v} not valid`)\n },\n)\n"],"names":[],"mappings":";;AAEA,MAAM,KAAA,GAAQ;AAAA,EACZ,IAAA,EAAM,CAAA;AAAA,EACN,CAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,CAAA;AAAA,EACT,CAAA,EAAM,SAAA;AAAA,EACN,MAAA,EAAQ,CAAA;AAAA,EACR,CAAA,EAAM;AACR,CAAA;AAMO,MAAM,eAAA,GAAkB,YAAA;AAAA,EAC7B,EAAA;AAAA,EACA,CAAC,EAAE,OAAA,EAAS,IAAA,OAAW,OAAA,IAAW,KAAA,CAAM,IAAI,CAAA,IAAK,CAAA,CAAA;AAAA,EACjD,CAAC,CAAA,KAAM;AACL,IAAA,MAAM,UAAU,CAAA,GAAI,EAAA;AACpB,IAAA,MAAM,OAAO,CAAA,IAAK,CAAA;AAClB,IAAA,IAAI,YAAY,CAAA,KAAM,IAAA,KAAS,KAAA,CAAM,IAAA,IAAQ,SAAS,KAAA,CAAM,MAAA,CAAA;AAC1D,MAAA,OAAO,EAAE,OAAA,EAAS,IAAA,EAAM,KAAA,CAAM,IAAI,CAAA,EAAE;AACtC,IAAA,IAAI,YAAY,CAAA,KAAM,IAAA,KAAS,KAAA,CAAM,IAAA,IAAQ,SAAS,KAAA,CAAM,OAAA,CAAA;AAC1D,MAAA,OAAO,EAAE,OAAA,EAAS,IAAA,EAAM,KAAA,CAAM,IAAI,CAAA,EAAE;AACtC,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,gBAAA,EAAmB,CAAC,CAAA,UAAA,CAAY,CAAA;AAAA,EAClD;AACF;;;;"}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { mergeUint8 } from '@pezkuwi/papi-utils';
|
||||
import { blake2b } from '@noble/hashes/blake2.js';
|
||||
|
||||
const len32$1 = { dkLen: 32 };
|
||||
const Blake2256 = (encoded) => blake2b(encoded, len32$1);
|
||||
const len16 = { dkLen: 16 };
|
||||
const Blake2128 = (encoded) => blake2b(encoded, len16);
|
||||
const Blake2128Concat = (encoded) => mergeUint8([Blake2128(encoded), encoded]);
|
||||
|
||||
export { Blake2128, Blake2128Concat, Blake2256 };
|
||||
//# sourceMappingURL=blake2.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"blake2.mjs","sources":["../../../src/hashes/blake2.ts"],"sourcesContent":["import { mergeUint8 } from \"@pezkuwi/papi-utils\"\nimport { blake2b } from \"@noble/hashes/blake2.js\"\n\nconst len32 = { dkLen: 32 }\nexport const Blake2256 = (encoded: Uint8Array) => blake2b(encoded, len32)\n\nconst len16 = { dkLen: 16 }\nexport const Blake2128 = (encoded: Uint8Array) => blake2b(encoded, len16)\n\nexport const Blake2128Concat = (encoded: Uint8Array) =>\n mergeUint8([Blake2128(encoded), encoded])\n"],"names":["len32"],"mappings":";;;AAGA,MAAMA,OAAA,GAAQ,EAAE,KAAA,EAAO,EAAA,EAAG;AACnB,MAAM,SAAA,GAAY,CAAC,OAAA,KAAwB,OAAA,CAAQ,SAASA,OAAK;AAExE,MAAM,KAAA,GAAQ,EAAE,KAAA,EAAO,EAAA,EAAG;AACnB,MAAM,SAAA,GAAY,CAAC,OAAA,KAAwB,OAAA,CAAQ,SAAS,KAAK;AAEjE,MAAM,eAAA,GAAkB,CAAC,OAAA,KAC9B,UAAA,CAAW,CAAC,SAAA,CAAU,OAAO,CAAA,EAAG,OAAO,CAAC;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { mergeUint8 } from '@pezkuwi/papi-utils';
|
||||
import { blake3 } from '@noble/hashes/blake3.js';
|
||||
|
||||
const len32 = { dkLen: 32 };
|
||||
const Blake3256 = (encoded) => blake3(encoded, len32);
|
||||
const Blake3256Concat = (encoded) => mergeUint8([Blake3256(encoded), encoded]);
|
||||
|
||||
export { Blake3256, Blake3256Concat };
|
||||
//# sourceMappingURL=blake3.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"blake3.mjs","sources":["../../../src/hashes/blake3.ts"],"sourcesContent":["import { mergeUint8 } from \"@pezkuwi/papi-utils\"\nimport { blake3 } from \"@noble/hashes/blake3.js\"\n\nconst len32 = { dkLen: 32 }\nexport const Blake3256 = (encoded: Uint8Array) => blake3(encoded, len32)\n\nexport const Blake3256Concat = (encoded: Uint8Array) =>\n mergeUint8([Blake3256(encoded), encoded])\n"],"names":[],"mappings":";;;AAGA,MAAM,KAAA,GAAQ,EAAE,KAAA,EAAO,EAAA,EAAG;AACnB,MAAM,SAAA,GAAY,CAAC,OAAA,KAAwB,MAAA,CAAO,SAAS,KAAK;AAEhE,MAAM,eAAA,GAAkB,CAAC,OAAA,KAC9B,UAAA,CAAW,CAAC,SAAA,CAAU,OAAO,CAAA,EAAG,OAAO,CAAC;;;;"}
|
||||
@@ -0,0 +1,134 @@
|
||||
const bigintFromU16 = (v0, v1, v2, v3) => new DataView(new Uint16Array([v0, v1, v2, v3]).buffer).getBigUint64(0, true);
|
||||
const MASK_64 = 2n ** 64n - 1n;
|
||||
const rotl = (input, nBits) => input << nBits & MASK_64 | input >> 64n - nBits;
|
||||
const multiply = (a, b) => a * b & MASK_64;
|
||||
const add = (a, b) => a + b & MASK_64;
|
||||
const PRIME64_1 = 11400714785074694791n;
|
||||
const PRIME64_2 = 14029467366897019727n;
|
||||
const PRIME64_3 = 1609587929392839161n;
|
||||
const PRIME64_4 = 9650029242287828579n;
|
||||
const PRIME64_5 = 2870177450012600261n;
|
||||
function h64(input, seed = 0n) {
|
||||
let v1 = add(add(seed, PRIME64_1), PRIME64_2);
|
||||
let v2 = add(seed, PRIME64_2);
|
||||
let v3 = seed;
|
||||
let v4 = seed - PRIME64_1;
|
||||
let totalLen = input.length;
|
||||
let memsize = 0;
|
||||
let memory = null;
|
||||
(function update() {
|
||||
let p2 = 0;
|
||||
let bEnd = p2 + totalLen;
|
||||
if (!totalLen) return;
|
||||
memory = new Uint8Array(32);
|
||||
if (totalLen < 32) {
|
||||
memory.set(input.subarray(0, totalLen), memsize);
|
||||
memsize += totalLen;
|
||||
return;
|
||||
}
|
||||
if (p2 <= bEnd - 32) {
|
||||
const limit = bEnd - 32;
|
||||
do {
|
||||
let other;
|
||||
other = bigintFromU16(
|
||||
input[p2 + 1] << 8 | input[p2],
|
||||
input[p2 + 3] << 8 | input[p2 + 2],
|
||||
input[p2 + 5] << 8 | input[p2 + 4],
|
||||
input[p2 + 7] << 8 | input[p2 + 6]
|
||||
);
|
||||
v1 = multiply(rotl(add(v1, multiply(other, PRIME64_2)), 31n), PRIME64_1);
|
||||
p2 += 8;
|
||||
other = bigintFromU16(
|
||||
input[p2 + 1] << 8 | input[p2],
|
||||
input[p2 + 3] << 8 | input[p2 + 2],
|
||||
input[p2 + 5] << 8 | input[p2 + 4],
|
||||
input[p2 + 7] << 8 | input[p2 + 6]
|
||||
);
|
||||
v2 = multiply(rotl(add(v2, multiply(other, PRIME64_2)), 31n), PRIME64_1);
|
||||
p2 += 8;
|
||||
other = bigintFromU16(
|
||||
input[p2 + 1] << 8 | input[p2],
|
||||
input[p2 + 3] << 8 | input[p2 + 2],
|
||||
input[p2 + 5] << 8 | input[p2 + 4],
|
||||
input[p2 + 7] << 8 | input[p2 + 6]
|
||||
);
|
||||
v3 = multiply(rotl(add(v3, multiply(other, PRIME64_2)), 31n), PRIME64_1);
|
||||
p2 += 8;
|
||||
other = bigintFromU16(
|
||||
input[p2 + 1] << 8 | input[p2],
|
||||
input[p2 + 3] << 8 | input[p2 + 2],
|
||||
input[p2 + 5] << 8 | input[p2 + 4],
|
||||
input[p2 + 7] << 8 | input[p2 + 6]
|
||||
);
|
||||
v4 = multiply(rotl(add(v4, multiply(other, PRIME64_2)), 31n), PRIME64_1);
|
||||
p2 += 8;
|
||||
} while (p2 <= limit);
|
||||
}
|
||||
if (p2 < bEnd) {
|
||||
memory.set(input.subarray(p2, bEnd), memsize);
|
||||
memsize = bEnd - p2;
|
||||
}
|
||||
})();
|
||||
input = memory || input;
|
||||
let result;
|
||||
let p = 0;
|
||||
if (totalLen >= 32) {
|
||||
result = rotl(v1, 1n);
|
||||
result = add(result, rotl(v2, 7n));
|
||||
result = add(result, rotl(v3, 12n));
|
||||
result = add(result, rotl(v4, 18n));
|
||||
v1 = multiply(rotl(multiply(v1, PRIME64_2), 31n), PRIME64_1);
|
||||
result = result ^ v1;
|
||||
result = add(multiply(result, PRIME64_1), PRIME64_4);
|
||||
v2 = multiply(rotl(multiply(v2, PRIME64_2), 31n), PRIME64_1);
|
||||
result = result ^ v2;
|
||||
result = add(multiply(result, PRIME64_1), PRIME64_4);
|
||||
v3 = multiply(rotl(multiply(v3, PRIME64_2), 31n), PRIME64_1);
|
||||
result = result ^ v3;
|
||||
result = add(multiply(result, PRIME64_1), PRIME64_4);
|
||||
v4 = multiply(rotl(multiply(v4, PRIME64_2), 31n), PRIME64_1);
|
||||
result = result ^ v4;
|
||||
result = add(multiply(result, PRIME64_1), PRIME64_4);
|
||||
} else {
|
||||
result = add(seed, PRIME64_5);
|
||||
}
|
||||
result = add(result, BigInt(totalLen));
|
||||
while (p <= memsize - 8) {
|
||||
let temp2 = bigintFromU16(
|
||||
input[p + 1] << 8 | input[p],
|
||||
input[p + 3] << 8 | input[p + 2],
|
||||
input[p + 5] << 8 | input[p + 4],
|
||||
input[p + 7] << 8 | input[p + 6]
|
||||
);
|
||||
temp2 = multiply(rotl(multiply(temp2, PRIME64_2), 31n), PRIME64_1);
|
||||
result = add(multiply(rotl(result ^ temp2, 27n), PRIME64_1), PRIME64_4);
|
||||
p += 8;
|
||||
}
|
||||
if (p + 4 <= memsize) {
|
||||
let temp2 = multiply(
|
||||
bigintFromU16(
|
||||
input[p + 1] << 8 | input[p],
|
||||
input[p + 3] << 8 | input[p + 2],
|
||||
0,
|
||||
0
|
||||
),
|
||||
PRIME64_1
|
||||
);
|
||||
result = add(multiply(rotl(result ^ temp2, 23n), PRIME64_2), PRIME64_3);
|
||||
p += 4;
|
||||
}
|
||||
while (p < memsize) {
|
||||
const temp2 = multiply(bigintFromU16(input[p++], 0, 0, 0), PRIME64_5);
|
||||
result = multiply(rotl(result ^ temp2, 11n), PRIME64_1);
|
||||
}
|
||||
let temp = result >> 33n;
|
||||
result = multiply(result ^ temp, PRIME64_2);
|
||||
temp = result >> 29n;
|
||||
result = multiply(result ^ temp, PRIME64_3);
|
||||
temp = result >> 32n;
|
||||
result ^= temp;
|
||||
return result;
|
||||
}
|
||||
|
||||
export { h64 };
|
||||
//# sourceMappingURL=h64.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
|
||||
const Identity = (encoded) => encoded;
|
||||
|
||||
export { Identity };
|
||||
//# sourceMappingURL=identity.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"identity.mjs","sources":["../../../src/hashes/identity.ts"],"sourcesContent":["export const Identity = (encoded: Uint8Array): Uint8Array => encoded\n"],"names":[],"mappings":"AAAO,MAAM,QAAA,GAAW,CAAC,OAAA,KAAoC;;;;"}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { keccak_256 } from '@noble/hashes/sha3.js';
|
||||
|
||||
const Keccak256 = keccak_256;
|
||||
|
||||
export { Keccak256 };
|
||||
//# sourceMappingURL=keccak.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"keccak.mjs","sources":["../../../src/hashes/keccak.ts"],"sourcesContent":["import { keccak_256 } from \"@noble/hashes/sha3.js\"\n\nexport const Keccak256: (input: Uint8Array) => Uint8Array = keccak_256\n"],"names":[],"mappings":";;AAEO,MAAM,SAAA,GAA+C;;;;"}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { mergeUint8 } from '@pezkuwi/papi-utils';
|
||||
import { u64 } from 'scale-ts';
|
||||
import { h64 } from './h64.mjs';
|
||||
|
||||
const Twox128 = (input) => {
|
||||
const result = new Uint8Array(16);
|
||||
const dv = new DataView(result.buffer);
|
||||
dv.setBigUint64(0, h64(input), true);
|
||||
dv.setBigUint64(8, h64(input, 1n), true);
|
||||
return result;
|
||||
};
|
||||
const Twox256 = (input) => {
|
||||
const result = new Uint8Array(32);
|
||||
const dv = new DataView(result.buffer);
|
||||
dv.setBigUint64(0, h64(input), true);
|
||||
dv.setBigUint64(8, h64(input, 1n), true);
|
||||
dv.setBigUint64(16, h64(input, 2n), true);
|
||||
dv.setBigUint64(24, h64(input, 3n), true);
|
||||
return result;
|
||||
};
|
||||
const Twox64Concat = (encoded) => mergeUint8([u64.enc(h64(encoded)), encoded]);
|
||||
|
||||
export { Twox128, Twox256, Twox64Concat };
|
||||
//# sourceMappingURL=twoX.mjs.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user