@dedot/contracts 0.0.1-next.04c158c0.11 → 0.0.1-next.49d80ab2.3

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/Contract.d.ts CHANGED
@@ -4,7 +4,7 @@ import { TypinkRegistry } from './TypinkRegistry.js';
4
4
  import { ContractMetadata, GenericContractApi } from './types/index.js';
5
5
  export declare class Contract<ContractApi extends GenericContractApi = GenericContractApi> {
6
6
  #private;
7
- constructor(api: ISubstrateClient, address: AccountId32Like, metadata: ContractMetadata | string);
7
+ constructor(api: ISubstrateClient, metadata: ContractMetadata | string, address: AccountId32Like);
8
8
  get metadata(): ContractMetadata;
9
9
  get address(): AccountId32;
10
10
  get registry(): TypinkRegistry;
package/Contract.js CHANGED
@@ -7,7 +7,7 @@ export class Contract {
7
7
  #registry;
8
8
  #address;
9
9
  #metadata;
10
- constructor(api, address, metadata) {
10
+ constructor(api, metadata, address) {
11
11
  ensureSupportContractsPallet(api);
12
12
  this.#api = api;
13
13
  this.#address = new AccountId32(address);
package/cjs/Contract.js CHANGED
@@ -10,7 +10,7 @@ class Contract {
10
10
  #registry;
11
11
  #address;
12
12
  #metadata;
13
- constructor(api, address, metadata) {
13
+ constructor(api, metadata, address) {
14
14
  (0, utils_js_1.ensureSupportContractsPallet)(api);
15
15
  this.#api = api;
16
16
  this.#address = new codecs_1.AccountId32(address);
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "@dedot/contracts",
3
- "version": "0.0.1-next.04c158c0.11+04c158c",
3
+ "version": "0.0.1-next.49d80ab2.3+49d80ab",
4
4
  "description": "Delightful ink! Contract APIs",
5
5
  "author": "Tung Vu <tung@coongcrafts.io>",
6
+ "homepage": "https://github.com/dedotdev/dedot/tree/main/packages/contracts",
7
+ "repository": {
8
+ "directory": "packages/contracts",
9
+ "type": "git",
10
+ "url": "https://github.com/dedotdev/dedot.git"
11
+ },
6
12
  "main": "./cjs/index.js",
7
13
  "sideEffects": false,
8
14
  "type": "module",
@@ -12,17 +18,17 @@
12
18
  "test": "vitest --watch=false"
13
19
  },
14
20
  "dependencies": {
15
- "@dedot/api": "0.0.1-next.04c158c0.11+04c158c",
16
- "@dedot/codecs": "0.0.1-next.04c158c0.11+04c158c",
17
- "@dedot/types": "0.0.1-next.04c158c0.11+04c158c",
18
- "@dedot/utils": "0.0.1-next.04c158c0.11+04c158c"
21
+ "@dedot/api": "0.0.1-next.49d80ab2.3+49d80ab",
22
+ "@dedot/codecs": "0.0.1-next.49d80ab2.3+49d80ab",
23
+ "@dedot/types": "0.0.1-next.49d80ab2.3+49d80ab",
24
+ "@dedot/utils": "0.0.1-next.49d80ab2.3+49d80ab"
19
25
  },
20
26
  "publishConfig": {
21
27
  "access": "public",
22
28
  "directory": "dist"
23
29
  },
24
30
  "license": "Apache-2.0",
25
- "gitHead": "04c158c09942c402411b7a3dc93de565c1f66d6d",
31
+ "gitHead": "49d80ab2d4c009e11a24d4df3f4fcdca5b0a2124",
26
32
  "module": "./index.js",
27
33
  "types": "./index.d.ts",
28
34
  "exports": {
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SubstrateApi } from '@dedot/api/chaintypes';
2
2
  import { AccountId32Like, BytesLike, DispatchError, Weight } from '@dedot/codecs';
3
3
  import { AnyFunc, AsyncMethod, GenericSubstrateApi, RpcVersion, VersionedGenericSubstrateApi } from '@dedot/types';
4
- import { ContractConstructorMessage, ContractCallMessage } from './shared.js';
4
+ import { ContractCallMessage, ContractConstructorMessage } from './shared.js';
5
5
  import { ContractMetadataV4 } from './v4.js';
6
6
  import { ContractMetadataV5 } from './v5.js';
7
7
  export * from './shared.js';
@@ -64,9 +64,9 @@ export interface GenericConstructorQuery<ChainApi extends GenericSubstrateApi> {
64
64
  export interface GenericConstructorTx<ChainApi extends GenericSubstrateApi> {
65
65
  [method: string]: GenericConstructorTxCall<ChainApi>;
66
66
  }
67
- export interface GenericContractApi<ChainApi extends VersionedGenericSubstrateApi = SubstrateApi> {
68
- query: GenericContractQuery<ChainApi[RpcVersion]>;
69
- tx: GenericContractTx<ChainApi[RpcVersion]>;
70
- constructorQuery: GenericConstructorQuery<ChainApi[RpcVersion]>;
71
- constructorTx: GenericConstructorTx<ChainApi[RpcVersion]>;
67
+ export interface GenericContractApi<Rv extends RpcVersion = RpcVersion, ChainApi extends VersionedGenericSubstrateApi = SubstrateApi> {
68
+ query: GenericContractQuery<ChainApi[Rv]>;
69
+ tx: GenericContractTx<ChainApi[Rv]>;
70
+ constructorQuery: GenericConstructorQuery<ChainApi[Rv]>;
71
+ constructorTx: GenericConstructorTx<ChainApi[Rv]>;
72
72
  }