@parity/product-sdk-contracts 0.6.2 → 0.7.1
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 +34 -22
- package/dist/codegen.d.ts +1 -1
- package/dist/index.d.ts +34 -8
- package/dist/index.js +156 -19
- package/dist/index.js.map +1 -1
- package/dist/pvm.d.ts +1 -1
- package/dist/{types-DzYW54TT.d.ts → types-pkS1R9Bk.d.ts} +15 -14
- package/package.json +9 -9
package/dist/pvm.d.ts
CHANGED
|
@@ -122,7 +122,6 @@ type ReviveDryRunCall = (origin: SS58String, dest: HexString, value: bigint, gas
|
|
|
122
122
|
*
|
|
123
123
|
* const client = await createChainClient({
|
|
124
124
|
* chains: { assetHub: paseo_asset_hub },
|
|
125
|
-
* rpcs: { assetHub: ["wss://paseo-asset-hub-next-rpc.polkadot.io"] },
|
|
126
125
|
* });
|
|
127
126
|
* const runtime = createContractRuntimeFromClient(client.raw.assetHub, paseo_asset_hub);
|
|
128
127
|
* ```
|
|
@@ -219,11 +218,7 @@ declare function ensureContractAccountMapped(runtime: ContractRuntime, address:
|
|
|
219
218
|
onStatus?: (s: string) => void;
|
|
220
219
|
}): Promise<TxResult | null>;
|
|
221
220
|
|
|
222
|
-
|
|
223
|
-
interface CdmJsonTarget {
|
|
224
|
-
"asset-hub": string;
|
|
225
|
-
bulletin: string;
|
|
226
|
-
}
|
|
221
|
+
type CdmJsonDependencyVersion = number | string;
|
|
227
222
|
/**
|
|
228
223
|
* A deployed contract's on-chain address, ABI, and optional metadata CID.
|
|
229
224
|
*
|
|
@@ -237,11 +232,11 @@ interface CdmJsonContract {
|
|
|
237
232
|
abi: AbiEntry[];
|
|
238
233
|
metadataCid?: string;
|
|
239
234
|
}
|
|
240
|
-
/** A project's `cdm.json` manifest
|
|
235
|
+
/** A project's `cdm.json` manifest. */
|
|
241
236
|
interface CdmJson {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
237
|
+
dependencies: Record<string, CdmJsonDependencyVersion>;
|
|
238
|
+
contracts?: Record<string, CdmJsonContract>;
|
|
239
|
+
registry?: HexString;
|
|
245
240
|
}
|
|
246
241
|
/** An ABI parameter or return value, with support for nested tuple and struct types. */
|
|
247
242
|
interface AbiParam {
|
|
@@ -376,9 +371,15 @@ interface ContractOptions {
|
|
|
376
371
|
defaultSigner?: PolkadotSigner;
|
|
377
372
|
}
|
|
378
373
|
/** Options for {@link ContractManager} construction. */
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
374
|
+
type ContractManagerOptions = ContractOptions;
|
|
375
|
+
/** Options for resolving installed CDM contract addresses from the live CDM registry. */
|
|
376
|
+
interface LiveContractResolutionOptions {
|
|
377
|
+
/** CDM registry contract address. Defaults to `cdm.json.registry`. */
|
|
378
|
+
registryAddress?: HexString;
|
|
379
|
+
/** Subset of installed libraries to resolve. Defaults to every contract in the manifest. */
|
|
380
|
+
libraries?: readonly string[];
|
|
381
|
+
/** Origin used for CDM registry dry-run queries. Defaults to `defaultOrigin` in manager helpers. */
|
|
382
|
+
registryOrigin?: SS58String;
|
|
382
383
|
}
|
|
383
384
|
/**
|
|
384
385
|
* A typed contract handle where each ABI method exposes `.query()` and `.tx()`.
|
|
@@ -432,4 +433,4 @@ type Contract<C extends ContractDef> = {
|
|
|
432
433
|
};
|
|
433
434
|
};
|
|
434
435
|
|
|
435
|
-
export { type AbiEntry as A, type CdmJson as C, type PrepareOptions as P, type QueryOptions as Q, type ReviveDryRunCall as R, type TxOptions as T, type ContractRuntime as a, type ContractManagerOptions as b, type ContractDefaults as c, type ContractRuntimeOptions as d, type Contracts as e, type Contract as f, type ContractDef as g, type ContractOptions as h, type AbiParam as i, type CdmJsonContract as j, type
|
|
436
|
+
export { type AbiEntry as A, type CdmJson as C, type LiveContractResolutionOptions as L, type PrepareOptions as P, type QueryOptions as Q, type ReviveDryRunCall as R, type TxOptions as T, type ContractRuntime as a, type ContractManagerOptions as b, type ContractDefaults as c, type ContractRuntimeOptions as d, type Contracts as e, type Contract as f, type ContractDef as g, type ContractOptions as h, type AbiParam as i, type CdmJsonContract as j, type CdmJsonDependencyVersion as k, type ContractDryRunAt as l, type QueryResult as m, type ReviveDryRunCallOptions as n, type ReviveDryRunResult as o, type ReviveTypedApi as p, createContractRuntime as q, createContractRuntimeFromClient as r, ensureContractAccountMapped as s };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parity/product-sdk-contracts",
|
|
3
3
|
"description": "Typed contract interactions on Polkadot Asset Hub",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@polkadot-labs/hdkd-helpers": "^0.0.
|
|
31
|
-
"polkadot-api": "^2.1.
|
|
32
|
-
"viem": "^2.
|
|
30
|
+
"@polkadot-labs/hdkd-helpers": "^0.0.30",
|
|
31
|
+
"polkadot-api": "^2.1.5",
|
|
32
|
+
"viem": "^2.52.0",
|
|
33
33
|
"@parity/product-sdk-address": "0.1.1",
|
|
34
|
-
"@parity/product-sdk-
|
|
35
|
-
"@parity/product-sdk-signer": "0.
|
|
36
|
-
"@parity/product-sdk-
|
|
37
|
-
"@parity/product-sdk-
|
|
34
|
+
"@parity/product-sdk-tx": "0.2.8",
|
|
35
|
+
"@parity/product-sdk-signer": "0.6.1",
|
|
36
|
+
"@parity/product-sdk-keys": "0.3.4",
|
|
37
|
+
"@parity/product-sdk-logger": "0.1.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"tsup": "^8.
|
|
40
|
+
"tsup": "^8.5.1",
|
|
41
41
|
"typescript": "^5.9.3",
|
|
42
42
|
"vitest": "^3.1.4"
|
|
43
43
|
},
|