@dedot/api 0.10.1-next.b29d4eee.6 → 0.11.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/chaintypes/substrate/consts.d.ts +81 -11
- package/chaintypes/substrate/errors.d.ts +230 -2
- package/chaintypes/substrate/events.d.ts +335 -85
- package/chaintypes/substrate/query.d.ts +132 -19
- package/chaintypes/substrate/runtime.d.ts +92 -11
- package/chaintypes/substrate/tx.d.ts +559 -27
- package/chaintypes/substrate/types.d.ts +1752 -258
- package/package.json +9 -9
- package/cjs/test.js +0 -29
- package/test.d.ts +0 -1
- package/test.js +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "A delightful JavaScript/TypeScript client for Polkadot & Substrate",
|
|
5
5
|
"author": "Thang X. Vu <thang@dedot.dev>",
|
|
6
6
|
"homepage": "https://dedot.dev",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dedot/codecs": "0.
|
|
17
|
-
"@dedot/providers": "0.
|
|
18
|
-
"@dedot/runtime-specs": "0.
|
|
19
|
-
"@dedot/shape": "0.
|
|
20
|
-
"@dedot/storage": "0.
|
|
21
|
-
"@dedot/types": "0.
|
|
22
|
-
"@dedot/utils": "0.
|
|
16
|
+
"@dedot/codecs": "0.11.0",
|
|
17
|
+
"@dedot/providers": "0.11.0",
|
|
18
|
+
"@dedot/runtime-specs": "0.11.0",
|
|
19
|
+
"@dedot/shape": "0.11.0",
|
|
20
|
+
"@dedot/storage": "0.11.0",
|
|
21
|
+
"@dedot/types": "0.11.0",
|
|
22
|
+
"@dedot/utils": "0.11.0"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc --project tsconfig.build.json && tsc --project tsconfig.build.cjs.json",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node": ">=18"
|
|
49
49
|
},
|
|
50
50
|
"license": "Apache-2.0",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "5aa20d8c24305df30528f008b55dc0f6f89b9e95",
|
|
52
52
|
"module": "./index.js",
|
|
53
53
|
"types": "./index.d.ts"
|
|
54
54
|
}
|
package/cjs/test.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const keyring_1 = __importDefault(require("@polkadot/keyring"));
|
|
7
|
-
const util_crypto_1 = require("@polkadot/util-crypto");
|
|
8
|
-
const providers_1 = require("@dedot/providers");
|
|
9
|
-
const index_js_1 = require("./client/index.js");
|
|
10
|
-
const run = async () => {
|
|
11
|
-
await (0, util_crypto_1.cryptoWaitReady)();
|
|
12
|
-
const alice = new keyring_1.default({ type: 'sr25519' }).addFromUri('//Alice');
|
|
13
|
-
const client = await index_js_1.LegacyClient.new(new providers_1.WsProvider('wss://westend-rpc.polkadot.io'));
|
|
14
|
-
// const client = await DedotClient.new(new WsProvider('wss://westend-rpc.polkadot.io'));
|
|
15
|
-
console.log('connected');
|
|
16
|
-
const result = await client.tx.system
|
|
17
|
-
.remarkWithEvent('Hello dedot') // prettier-end-here
|
|
18
|
-
.signAndSend(alice)
|
|
19
|
-
.untilFinalized();
|
|
20
|
-
// const tx = client.tx.system.remarkWithEvent('Hello dedot'); // prettier-end-here
|
|
21
|
-
//
|
|
22
|
-
// await tx.sign(alice);
|
|
23
|
-
//
|
|
24
|
-
// const result = await tx.send();
|
|
25
|
-
console.log('print result');
|
|
26
|
-
console.log(result);
|
|
27
|
-
await client.disconnect();
|
|
28
|
-
};
|
|
29
|
-
run().catch(console.error);
|
package/test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/test.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Keyring from '@polkadot/keyring';
|
|
2
|
-
import { cryptoWaitReady } from '@polkadot/util-crypto';
|
|
3
|
-
import { WsProvider } from '@dedot/providers';
|
|
4
|
-
import { LegacyClient } from './client/index.js';
|
|
5
|
-
const run = async () => {
|
|
6
|
-
await cryptoWaitReady();
|
|
7
|
-
const alice = new Keyring({ type: 'sr25519' }).addFromUri('//Alice');
|
|
8
|
-
const client = await LegacyClient.new(new WsProvider('wss://westend-rpc.polkadot.io'));
|
|
9
|
-
// const client = await DedotClient.new(new WsProvider('wss://westend-rpc.polkadot.io'));
|
|
10
|
-
console.log('connected');
|
|
11
|
-
const result = await client.tx.system
|
|
12
|
-
.remarkWithEvent('Hello dedot') // prettier-end-here
|
|
13
|
-
.signAndSend(alice)
|
|
14
|
-
.untilFinalized();
|
|
15
|
-
// const tx = client.tx.system.remarkWithEvent('Hello dedot'); // prettier-end-here
|
|
16
|
-
//
|
|
17
|
-
// await tx.sign(alice);
|
|
18
|
-
//
|
|
19
|
-
// const result = await tx.send();
|
|
20
|
-
console.log('print result');
|
|
21
|
-
console.log(result);
|
|
22
|
-
await client.disconnect();
|
|
23
|
-
};
|
|
24
|
-
run().catch(console.error);
|