@totochain/api-augment 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -2
- package/dist/definitions/definitions.d.ts +1 -0
- package/dist/definitions/definitions.js +2 -0
- package/dist/definitions/totochain/definitions.d.ts +5 -0
- package/dist/definitions/totochain/definitions.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -0
- package/dist/interfaces/augment-api-consts.d.ts +861 -0
- package/dist/interfaces/augment-api-consts.js +5 -0
- package/dist/interfaces/augment-api-errors.d.ts +1183 -0
- package/dist/interfaces/augment-api-errors.js +5 -0
- package/dist/interfaces/augment-api-events.d.ts +2033 -0
- package/dist/interfaces/augment-api-events.js +5 -0
- package/dist/interfaces/augment-api-query.d.ts +1375 -0
- package/dist/interfaces/augment-api-query.js +5 -0
- package/dist/interfaces/augment-api-rpc.d.ts +683 -0
- package/dist/interfaces/augment-api-rpc.js +5 -0
- package/dist/interfaces/augment-api-runtime.d.ts +298 -0
- package/dist/interfaces/augment-api-runtime.js +5 -0
- package/dist/interfaces/augment-api-tx.d.ts +2356 -0
- package/dist/interfaces/augment-api-tx.js +5 -0
- package/dist/interfaces/augment-api.d.ts +7 -0
- package/dist/interfaces/augment-api.js +9 -0
- package/dist/interfaces/augment-types.d.ts +1368 -0
- package/dist/interfaces/augment-types.js +5 -0
- package/dist/interfaces/definitions.d.ts +1 -0
- package/dist/interfaces/definitions.js +2 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/lookup.d.ts +3952 -0
- package/dist/interfaces/lookup.js +3954 -0
- package/dist/interfaces/registry.d.ts +279 -0
- package/dist/interfaces/registry.js +5 -0
- package/dist/interfaces/totochain/definitions.d.ts +5 -0
- package/dist/interfaces/totochain/definitions.js +7 -0
- package/dist/interfaces/types-lookup.d.ts +4085 -0
- package/dist/interfaces/types-lookup.js +5 -0
- package/dist/interfaces/types.d.ts +1 -0
- package/dist/interfaces/types.js +3 -0
- package/package.json +69 -4
- package/src/definitions/definitions.ts +2 -0
- package/src/definitions/totochain/definitions.ts +7 -0
- package/src/index.ts +15 -0
- package/src/interfaces/augment-api-consts.ts +869 -0
- package/src/interfaces/augment-api-errors.ts +1191 -0
- package/src/interfaces/augment-api-events.ts +1307 -0
- package/src/interfaces/augment-api-query.ts +1383 -0
- package/src/interfaces/augment-api-rpc.ts +621 -0
- package/src/interfaces/augment-api-runtime.ts +264 -0
- package/src/interfaces/augment-api-tx.ts +2175 -0
- package/src/interfaces/augment-api.ts +10 -0
- package/src/interfaces/augment-types.ts +1375 -0
- package/src/interfaces/definitions.ts +2 -0
- package/src/interfaces/index.ts +4 -0
- package/src/interfaces/lookup.ts +3956 -0
- package/src/interfaces/registry.ts +286 -0
- package/src/interfaces/totochain/definitions.ts +7 -0
- package/src/interfaces/types-lookup.ts +4352 -0
- package/src/interfaces/types.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PHANTOM_GENERATED = 'generated';
|
package/package.json
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totochain/api-augment",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Polkadot API type augmentation for Totochain, generated from the chain's own metadata.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://gitlab.com/FLFPro/toto-blockchain/totochain-js.git",
|
|
9
|
+
"directory": "packages/api-augment"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://gitlab.com/FLFPro/toto-blockchain/totochain-js",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://gitlab.com/FLFPro/toto-blockchain/totochain-js/-/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"totochain",
|
|
17
|
+
"substrate",
|
|
18
|
+
"polkadot",
|
|
19
|
+
"api-augment",
|
|
20
|
+
"typescript",
|
|
21
|
+
"types"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=24.0.0"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": [
|
|
31
|
+
"./dist/index.js",
|
|
32
|
+
"./dist/interfaces/*.js"
|
|
33
|
+
],
|
|
34
|
+
"main": "./dist/index.js",
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"default": "./dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./interfaces": {
|
|
42
|
+
"types": "./dist/interfaces/index.d.ts",
|
|
43
|
+
"default": "./dist/interfaces/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"src"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "npm run clean && tsc -p tsconfig.json",
|
|
53
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
54
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
55
|
+
"generate": "./scripts/generate.sh",
|
|
56
|
+
"test:package": "publint --strict"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@polkadot/api": "^16 || ^17"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@polkadot/api": "^16.5.6",
|
|
63
|
+
"@polkadot/api-base": "^16.5.6",
|
|
64
|
+
"@polkadot/rpc-core": "^16.5.6",
|
|
65
|
+
"@polkadot/types": "^16.5.6",
|
|
66
|
+
"@polkadot/types-codec": "^16.5.6",
|
|
67
|
+
"@polkadot/typegen": "^16.5.6",
|
|
68
|
+
"publint": "^0.3.2",
|
|
69
|
+
"typescript": "^5.7.2"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Totochain's RPC definitions and types bundle live in @totochain/client, which
|
|
2
|
+
// is the single source for both. This namespace exists only to anchor typegen's
|
|
3
|
+
// output; the generated interfaces come from the chain's metadata alone.
|
|
4
|
+
export default {
|
|
5
|
+
rpc: {},
|
|
6
|
+
types: {},
|
|
7
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Importing this module augments the `@polkadot/api` interfaces in place: once it is
|
|
2
|
+
// loaded, `api.tx`, `api.query`, `api.consts`, `api.errors`, `api.events` and the
|
|
3
|
+
// runtime calls are typed against Totochain's own metadata rather than the generic
|
|
4
|
+
// `AnyTuple` fallbacks. It declares types only and emits no runtime values.
|
|
5
|
+
//
|
|
6
|
+
// import '@totochain/api-augment';
|
|
7
|
+
//
|
|
8
|
+
// The RPC definitions and the types bundle that `ApiPromise.create` needs at runtime
|
|
9
|
+
// live in `@totochain/client`, which is the single source for both.
|
|
10
|
+
|
|
11
|
+
import './interfaces/types-lookup.js';
|
|
12
|
+
import './interfaces/augment-api.js';
|
|
13
|
+
import './interfaces/augment-types.js';
|
|
14
|
+
|
|
15
|
+
export type * from './interfaces/types.js';
|