@dedot/api 0.7.0 → 0.7.1-next.c1cff80e.4
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/client/BaseSubstrateClient.d.ts +2 -3
- package/extrinsic/extensions/ExtraSignedExtension.d.ts +1 -1
- package/extrinsic/extensions/SignedExtension.d.ts +1 -2
- package/extrinsic/extensions/known/ChargeAssetTxPayment.d.ts +1 -1
- package/extrinsic/extensions/known/ChargeTransactionPayment.d.ts +1 -1
- package/extrinsic/extensions/known/CheckGenesis.d.ts +1 -1
- package/extrinsic/extensions/known/CheckMetadataHash.d.ts +1 -1
- package/extrinsic/extensions/known/CheckMortality.d.ts +1 -1
- package/extrinsic/extensions/known/CheckNonce.d.ts +1 -1
- package/extrinsic/extensions/known/CheckSpecVersion.d.ts +1 -1
- package/extrinsic/extensions/known/CheckTxVersion.d.ts +1 -1
- package/extrinsic/submittable/fakeSigner.d.ts +2 -2
- package/extrinsic/submittable/utils.d.ts +1 -2
- package/package.json +9 -12
- package/types.d.ts +3 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Signer } from '@polkadot/types/types';
|
|
2
1
|
import { BlockHash, Hash, Metadata, PortableRegistry, RuntimeVersion } from '@dedot/codecs';
|
|
3
2
|
import type { JsonRpcProvider } from '@dedot/providers';
|
|
4
3
|
import { type IStorage } from '@dedot/storage';
|
|
5
|
-
import { GenericSubstrateApi, RpcVersion, VersionedGenericSubstrateApi } from '@dedot/types';
|
|
4
|
+
import { GenericSubstrateApi, InjectedSigner, RpcVersion, VersionedGenericSubstrateApi } from '@dedot/types';
|
|
6
5
|
import { Deferred } from '@dedot/utils';
|
|
7
6
|
import type { SubstrateApi } from '../chaintypes/index.js';
|
|
8
7
|
import { JsonRpcClient } from '../json-rpc/index.js';
|
|
@@ -69,5 +68,5 @@ export declare abstract class BaseSubstrateClient<Rv extends RpcVersion, ChainAp
|
|
|
69
68
|
protected callAt(hash?: BlockHash): ChainApi[Rv]['call'];
|
|
70
69
|
get tx(): ChainApi[Rv]['tx'];
|
|
71
70
|
at<ChainApiAt extends GenericSubstrateApi = ChainApi[Rv]>(hash: BlockHash): Promise<ISubstrateClientAt<ChainApiAt>>;
|
|
72
|
-
setSigner(signer?:
|
|
71
|
+
setSigner(signer?: InjectedSigner): void;
|
|
73
72
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
|
|
2
1
|
import * as $ from '@dedot/shape';
|
|
2
|
+
import { SignerPayloadJSON, SignerPayloadRaw } from '@dedot/types';
|
|
3
3
|
import { HexString } from '@dedot/utils';
|
|
4
4
|
import { SignedExtension } from './SignedExtension.js';
|
|
5
5
|
export declare class ExtraSignedExtension extends SignedExtension<any[], any[]> {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@polkadot/types/types';
|
|
2
1
|
import { PortableRegistry, SignedExtensionDefLatest } from '@dedot/codecs';
|
|
3
2
|
import * as $ from '@dedot/shape';
|
|
4
|
-
import { PayloadOptions } from '@dedot/types';
|
|
3
|
+
import { PayloadOptions, SignerPayloadJSON } from '@dedot/types';
|
|
5
4
|
import { ISubstrateClient } from '../../types.js';
|
|
6
5
|
export interface ISignedExtension {
|
|
7
6
|
identifier: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@
|
|
1
|
+
import { SignerPayloadJSON } from '@dedot/types';
|
|
2
2
|
import { SignedExtension } from '../SignedExtension.js';
|
|
3
3
|
export declare class ChargeTransactionPayment extends SignedExtension<bigint> {
|
|
4
4
|
init(): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@polkadot/types/types';
|
|
2
1
|
import { Hash } from '@dedot/codecs';
|
|
2
|
+
import { SignerPayloadJSON } from '@dedot/types';
|
|
3
3
|
import { SignedExtension } from '../SignedExtension.js';
|
|
4
4
|
/**
|
|
5
5
|
* @description Genesis hash check to provide replay protection between different networks.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@polkadot/types/types';
|
|
2
1
|
import { Hash } from '@dedot/codecs';
|
|
2
|
+
import { SignerPayloadJSON } from '@dedot/types';
|
|
3
3
|
import { SignedExtension } from '../SignedExtension.js';
|
|
4
4
|
export type CheckMetadataHashMode = 'Disabled' | 'Enabled';
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@polkadot/types/types';
|
|
2
1
|
import { EraLike, Hash } from '@dedot/codecs';
|
|
2
|
+
import { SignerPayloadJSON } from '@dedot/types';
|
|
3
3
|
import { SignedExtension } from '../SignedExtension.js';
|
|
4
4
|
export declare const MAX_FINALITY_LAG: number;
|
|
5
5
|
export declare const FALLBACK_MAX_HASH_COUNT: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@
|
|
1
|
+
import { SignerPayloadJSON } from '@dedot/types';
|
|
2
2
|
import { SignedExtension } from '../SignedExtension.js';
|
|
3
3
|
/**
|
|
4
4
|
* @description Ensure the runtime version registered in the transaction is the same as at present.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SignerPayloadJSON } from '@
|
|
1
|
+
import { SignerPayloadJSON } from '@dedot/types';
|
|
2
2
|
import { SignedExtension } from '../SignedExtension.js';
|
|
3
3
|
/**
|
|
4
4
|
* @description Ensure the transaction version registered in the transaction is the same as at present.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const fakeSigner:
|
|
1
|
+
import { InjectedSigner } from '@dedot/types';
|
|
2
|
+
export declare const fakeSigner: InjectedSigner;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IKeyringPair } from '@polkadot/types/types';
|
|
2
1
|
import { TransactionStatus } from '@dedot/codecs';
|
|
3
|
-
import type { AddressOrPair, TxStatus } from '@dedot/types';
|
|
2
|
+
import type { AddressOrPair, IKeyringPair, TxStatus } from '@dedot/types';
|
|
4
3
|
import { HexString } from '@dedot/utils';
|
|
5
4
|
export declare function isKeyringPair(account: AddressOrPair): account is IKeyringPair;
|
|
6
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/api",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
4
4
|
"description": "A delightful JavaScript/TypeScript client for Polkadot & Substrate",
|
|
5
5
|
"author": "Thang X. Vu <thang@coongcrafts.io>",
|
|
6
6
|
"homepage": "https://github.com/dedotdev/dedot/tree/main/packages/api",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dedot/codecs": "0.7.
|
|
17
|
-
"@dedot/providers": "0.7.
|
|
18
|
-
"@dedot/runtime-specs": "0.7.
|
|
19
|
-
"@dedot/shape": "0.7.
|
|
20
|
-
"@dedot/storage": "0.7.
|
|
21
|
-
"@dedot/types": "0.7.
|
|
22
|
-
"@dedot/utils": "0.7.
|
|
16
|
+
"@dedot/codecs": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
17
|
+
"@dedot/providers": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
18
|
+
"@dedot/runtime-specs": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
19
|
+
"@dedot/shape": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
20
|
+
"@dedot/storage": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
21
|
+
"@dedot/types": "0.7.1-next.c1cff80e.4+c1cff80",
|
|
22
|
+
"@dedot/utils": "0.7.1-next.c1cff80e.4+c1cff80"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc --project tsconfig.build.json && tsc --project tsconfig.build.cjs.json",
|
|
@@ -44,14 +44,11 @@
|
|
|
44
44
|
"access": "public",
|
|
45
45
|
"directory": "dist"
|
|
46
46
|
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@polkadot/types": "^15.5.2"
|
|
49
|
-
},
|
|
50
47
|
"engines": {
|
|
51
48
|
"node": ">=18"
|
|
52
49
|
},
|
|
53
50
|
"license": "Apache-2.0",
|
|
54
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "c1cff80e7e02cf2449c146cfb79ee9f2ee1f1291",
|
|
55
52
|
"module": "./index.js",
|
|
56
53
|
"types": "./index.d.ts"
|
|
57
54
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Signer } from '@polkadot/types/types';
|
|
2
1
|
import { BlockHash, Hash, Metadata, PortableRegistry } from '@dedot/codecs';
|
|
3
2
|
import type { ConnectionStatus, JsonRpcProvider, ProviderEvent } from '@dedot/providers';
|
|
4
3
|
import type { AnyShape } from '@dedot/shape';
|
|
5
4
|
import type { IStorage } from '@dedot/storage';
|
|
6
|
-
import type { GenericSubstrateApi, RpcVersion, RuntimeApiName, RuntimeApiSpec, Unsub } from '@dedot/types';
|
|
5
|
+
import type { GenericSubstrateApi, InjectedSigner, RpcVersion, RuntimeApiName, RuntimeApiSpec, Unsub } from '@dedot/types';
|
|
7
6
|
import type { HashFn, HexString, IEventEmitter } from '@dedot/utils';
|
|
8
7
|
import type { AnySignedExtension } from './extrinsic/index.js';
|
|
9
8
|
export type MetadataKey = `RAW_META/${string}`;
|
|
@@ -59,7 +58,7 @@ export interface ApiOptions extends JsonRpcClientOptions {
|
|
|
59
58
|
/**
|
|
60
59
|
* A signer instance to use for signing transactions
|
|
61
60
|
*/
|
|
62
|
-
signer?:
|
|
61
|
+
signer?: InjectedSigner;
|
|
63
62
|
}
|
|
64
63
|
export type ApiEvent = ProviderEvent | 'ready' | 'runtimeUpgraded';
|
|
65
64
|
export interface SubstrateRuntimeVersion {
|
|
@@ -119,7 +118,7 @@ export interface ISubstrateClient<ChainApi extends GenericSubstrateApi = Generic
|
|
|
119
118
|
*
|
|
120
119
|
* @param signer
|
|
121
120
|
*/
|
|
122
|
-
setSigner(signer?:
|
|
121
|
+
setSigner(signer?: InjectedSigner): void;
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* A generic interface for broadcasting transactions
|