@polkadot/rpc-core 6.12.2-20 → 6.12.2-21
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/package.json +15 -21
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/{types.cjs → types/base.cjs} +0 -0
- package/{types.js → types/base.js} +0 -0
- package/types/index.cjs +31 -0
- package/types/index.js +6 -0
- package/types/jsonrpc.cjs +1 -0
- package/types/jsonrpc.js +1 -0
- package/augment.cjs +0 -3
- package/augment.d.ts +0 -1
- package/augment.js +0 -3
- package/bundle.d.ts +0 -69
- package/detectPackage.d.ts +0 -1
- package/index.d.ts +0 -2
- package/packageInfo.d.ts +0 -4
- package/types.d.ts +0 -2
- package/util/drr.d.ts +0 -15
- package/util/index.d.ts +0 -3
- package/util/memo.d.ts +0 -6
- package/util/refCountDelay.d.ts +0 -3
package/package.json
CHANGED
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"./detectPackage.cjs"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "6.12.2-
|
|
23
|
+
"version": "6.12.2-21",
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.16.5",
|
|
27
|
-
"@polkadot/rpc-augment": "6.12.2-
|
|
28
|
-
"@polkadot/rpc-provider": "6.12.2-
|
|
29
|
-
"@polkadot/types": "6.12.2-
|
|
27
|
+
"@polkadot/rpc-augment": "6.12.2-21",
|
|
28
|
+
"@polkadot/rpc-provider": "6.12.2-21",
|
|
29
|
+
"@polkadot/types": "6.12.2-21",
|
|
30
30
|
"@polkadot/util": "^8.2.2",
|
|
31
31
|
"rxjs": "^7.4.0"
|
|
32
32
|
},
|
|
@@ -38,34 +38,32 @@
|
|
|
38
38
|
"require": "./index.cjs",
|
|
39
39
|
"default": "./index.js"
|
|
40
40
|
},
|
|
41
|
-
"./augment": {
|
|
42
|
-
"require": "./augment.cjs",
|
|
43
|
-
"default": "./augment.js"
|
|
44
|
-
},
|
|
45
|
-
"./augment.d.ts": "./augment.d.ts",
|
|
46
41
|
"./bundle": {
|
|
47
42
|
"require": "./bundle.cjs",
|
|
48
43
|
"default": "./bundle.js"
|
|
49
44
|
},
|
|
50
|
-
"./bundle.d.ts": "./bundle.d.ts",
|
|
51
45
|
"./detectPackage": {
|
|
52
46
|
"require": "./detectPackage.cjs",
|
|
53
47
|
"default": "./detectPackage.js"
|
|
54
48
|
},
|
|
55
|
-
"./detectPackage.d.ts": "./detectPackage.d.ts",
|
|
56
|
-
"./index.d.ts": "./index.d.ts",
|
|
57
49
|
"./package.json": "./package.json",
|
|
58
50
|
"./packageInfo": {
|
|
59
51
|
"require": "./packageInfo.cjs",
|
|
60
52
|
"default": "./packageInfo.js"
|
|
61
53
|
},
|
|
62
|
-
"./packageInfo.d.ts": "./packageInfo.d.ts",
|
|
63
54
|
"./README.md": "./README.md",
|
|
64
55
|
"./types": {
|
|
65
|
-
"require": "./types.cjs",
|
|
66
|
-
"default": "./types.js"
|
|
56
|
+
"require": "./types/index.cjs",
|
|
57
|
+
"default": "./types/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./types/base": {
|
|
60
|
+
"require": "./types/base.cjs",
|
|
61
|
+
"default": "./types/base.js"
|
|
62
|
+
},
|
|
63
|
+
"./types/jsonrpc": {
|
|
64
|
+
"require": "./types/jsonrpc.cjs",
|
|
65
|
+
"default": "./types/jsonrpc.js"
|
|
67
66
|
},
|
|
68
|
-
"./types.d.ts": "./types.d.ts",
|
|
69
67
|
"./util": {
|
|
70
68
|
"require": "./util/index.cjs",
|
|
71
69
|
"default": "./util/index.js"
|
|
@@ -74,17 +72,13 @@
|
|
|
74
72
|
"require": "./util/drr.cjs",
|
|
75
73
|
"default": "./util/drr.js"
|
|
76
74
|
},
|
|
77
|
-
"./util/drr.d.ts": "./util/drr.d.ts",
|
|
78
|
-
"./util/index.d.ts": "./util/index.d.ts",
|
|
79
75
|
"./util/memo": {
|
|
80
76
|
"require": "./util/memo.cjs",
|
|
81
77
|
"default": "./util/memo.js"
|
|
82
78
|
},
|
|
83
|
-
"./util/memo.d.ts": "./util/memo.d.ts",
|
|
84
79
|
"./util/refCountDelay": {
|
|
85
80
|
"require": "./util/refCountDelay.cjs",
|
|
86
81
|
"default": "./util/refCountDelay.js"
|
|
87
|
-
}
|
|
88
|
-
"./util/refCountDelay.d.ts": "./util/refCountDelay.d.ts"
|
|
82
|
+
}
|
|
89
83
|
}
|
|
90
84
|
}
|
package/packageInfo.cjs
CHANGED
package/packageInfo.js
CHANGED
|
File without changes
|
|
File without changes
|
package/types/index.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _jsonrpc = require("@polkadot/rpc-core/types/jsonrpc");
|
|
8
|
+
|
|
9
|
+
Object.keys(_jsonrpc).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _jsonrpc[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _jsonrpc[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _base = require("./base.cjs");
|
|
21
|
+
|
|
22
|
+
Object.keys(_base).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _base[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _base[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
package/types/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/types/jsonrpc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/augment.cjs
DELETED
package/augment.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@polkadot/rpc-augment';
|
package/augment.js
DELETED
package/bundle.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
|
|
2
|
-
import type { DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
|
|
3
|
-
export { packageInfo } from './packageInfo';
|
|
4
|
-
export * from './util';
|
|
5
|
-
/**
|
|
6
|
-
* @name Rpc
|
|
7
|
-
* @summary The API may use a HTTP or WebSockets provider.
|
|
8
|
-
* @description It allows for querying a Polkadot Client Node.
|
|
9
|
-
* WebSockets provider is recommended since HTTP provider only supports basic querying.
|
|
10
|
-
*
|
|
11
|
-
* ```mermaid
|
|
12
|
-
* graph LR;
|
|
13
|
-
* A[Api] --> |WebSockets| B[WsProvider];
|
|
14
|
-
* B --> |endpoint| C[ws://127.0.0.1:9944]
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* <BR>
|
|
19
|
-
*
|
|
20
|
-
* ```javascript
|
|
21
|
-
* import Rpc from '@polkadot/rpc-core';
|
|
22
|
-
* import { WsProvider } from '@polkadot/rpc-provider/ws';
|
|
23
|
-
*
|
|
24
|
-
* const provider = new WsProvider('ws://127.0.0.1:9944');
|
|
25
|
-
* const rpc = new Rpc(provider);
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export declare class RpcCore {
|
|
29
|
-
#private;
|
|
30
|
-
readonly mapping: Map<string, DefinitionRpcExt>;
|
|
31
|
-
readonly provider: ProviderInterface;
|
|
32
|
-
readonly sections: string[];
|
|
33
|
-
/**
|
|
34
|
-
* @constructor
|
|
35
|
-
* Default constructor for the Api Object
|
|
36
|
-
* @param {ProviderInterface} provider An API provider using HTTP or WebSocket
|
|
37
|
-
*/
|
|
38
|
-
constructor(instanceId: string, registry: Registry, provider: ProviderInterface, userRpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>);
|
|
39
|
-
/**
|
|
40
|
-
* @description Returns the connected status of a provider
|
|
41
|
-
*/
|
|
42
|
-
get isConnected(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* @description Manually connect from the attached provider
|
|
45
|
-
*/
|
|
46
|
-
connect(): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* @description Manually disconnect from the attached provider
|
|
49
|
-
*/
|
|
50
|
-
disconnect(): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* @description Sets a registry swap (typically from Api)
|
|
53
|
-
*/
|
|
54
|
-
setRegistrySwap(registrySwap: (blockHash: Uint8Array) => Promise<{
|
|
55
|
-
registry: Registry;
|
|
56
|
-
}>): void;
|
|
57
|
-
addUserInterfaces(userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void;
|
|
58
|
-
private _memomize;
|
|
59
|
-
private _formatResult;
|
|
60
|
-
private _createMethodSend;
|
|
61
|
-
private _createSubscriber;
|
|
62
|
-
private _createMethodSubscribe;
|
|
63
|
-
private _formatInputs;
|
|
64
|
-
private _formatOutput;
|
|
65
|
-
private _formatStorageData;
|
|
66
|
-
private _formatStorageSet;
|
|
67
|
-
private _formatStorageSetEntry;
|
|
68
|
-
private _newType;
|
|
69
|
-
}
|
package/detectPackage.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/index.d.ts
DELETED
package/packageInfo.d.ts
DELETED
package/types.d.ts
DELETED
package/util/drr.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Observable } from 'rxjs';
|
|
2
|
-
export declare type DrrResult = <T>(source$: Observable<T>) => Observable<T>;
|
|
3
|
-
interface Options {
|
|
4
|
-
delay?: number;
|
|
5
|
-
skipChange?: boolean;
|
|
6
|
-
skipTimeout?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Shorthand for distinctUntilChanged(), publishReplay(1) and refCount().
|
|
10
|
-
*
|
|
11
|
-
* @ignore
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const drr: ({ delay, skipChange, skipTimeout }?: Options) => DrrResult;
|
|
15
|
-
export {};
|
package/util/index.d.ts
DELETED
package/util/memo.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Memoized } from '@polkadot/util/types';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
declare type ObsFn<T> = (...params: unknown[]) => Observable<T>;
|
|
4
|
-
/** @internal */
|
|
5
|
-
export declare function memo<T>(instanceId: string, inner: Function): Memoized<ObsFn<T>>;
|
|
6
|
-
export {};
|
package/util/refCountDelay.d.ts
DELETED