@polkadot-api/ink-contracts 0.2.0 → 0.2.2

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +22 -2
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CodecType, Codec, StringRecord } from 'scale-ts';
2
2
  import { LookupEntry } from '@polkadot-api/metadata-builders';
3
- import { Binary } from '@polkadot-api/substrate-bindings';
3
+ import { HexString, Binary } from '@polkadot-api/substrate-bindings';
4
4
 
5
5
  type PjsVariant<O extends StringRecord<Codec<any>>> = {
6
6
  [K in keyof O]: {
@@ -73,25 +73,45 @@ declare const pjsTypes: Codec<{
73
73
  type PjsTypes = CodecType<typeof pjsTypes>;
74
74
 
75
75
  interface InkMetadataV4 {
76
+ source: InkSource;
76
77
  spec: InkSpecV4;
77
78
  storage: RootLayout;
78
79
  types: PjsTypes;
79
80
  version: "4";
81
+ user?: Record<string, unknown>;
80
82
  }
81
83
  interface InkSpecV4 {
82
84
  constructors: ConstructorSpec[];
83
85
  messages: MessageSpec[];
84
86
  environment: EnvironmentSpecV4;
85
87
  events: EventSpecV4[];
88
+ docs: string[];
86
89
  lang_error: TypeSpec;
87
90
  }
88
91
  interface InkMetadataV5 {
92
+ source: InkSource;
89
93
  spec: InkSpecV5;
90
94
  storage: RootLayout;
91
95
  types: PjsTypes;
92
96
  version: 5;
93
97
  }
94
98
  type InkMetadata = InkMetadataV4 | InkMetadataV5;
99
+ interface InkSource {
100
+ hash: HexString;
101
+ language: string;
102
+ compiler: string;
103
+ wasm?: HexString;
104
+ build_info?: Record<string, unknown>;
105
+ }
106
+ interface InkContractInfo {
107
+ name: string;
108
+ version: string;
109
+ authors: string[];
110
+ description?: string;
111
+ repository?: string;
112
+ homepage?: string;
113
+ license?: string;
114
+ }
95
115
  interface InkSpecV5 {
96
116
  constructors: ConstructorSpec[];
97
117
  messages: MessageSpec[];
@@ -324,4 +344,4 @@ interface InkClient<D extends InkDescriptors<InkStorageDescriptor, InkCallableDe
324
344
  }
325
345
  declare const getInkClient: <D extends InkDescriptors<InkStorageDescriptor, InkCallableDescriptor, InkCallableDescriptor, Event>>(inkContract: D) => InkClient<D>;
326
346
 
327
- export { type ArrayLayout, type EnumLayout, type Event, type EventParamSpec, type EventSpecV5, type FieldLayout, type GenericEvent, type HashLayout, type InkCallableDescriptor, type InkCallableInterface, type InkClient, type InkDescriptors, type InkDynamicBuilder, type InkEventInterface, type InkMetadata, type InkMetadataLookup, type InkStorageDescriptor, type InkStorageInterface, type Layout, type LeafLayout, type MessageParamSpec, type RootLayout, type StorageEntryPoint, type StorageLayout, type StructLayout, type TypeSpec, getInkClient, getInkDynamicBuilder, getInkLookup };
347
+ export { type ArrayLayout, type EnumLayout, type Event, type EventParamSpec, type EventSpecV5, type FieldLayout, type GenericEvent, type HashLayout, type InkCallableDescriptor, type InkCallableInterface, type InkClient, type InkContractInfo, type InkDescriptors, type InkDynamicBuilder, type InkEventInterface, type InkMetadata, type InkMetadataLookup, type InkSource, type InkStorageDescriptor, type InkStorageInterface, type Layout, type LeafLayout, type MessageParamSpec, type RootLayout, type StorageEntryPoint, type StorageLayout, type StructLayout, type TypeSpec, getInkClient, getInkDynamicBuilder, getInkLookup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polkadot-api/ink-contracts",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "author": "Victor Oliva (https://github.com/voliva)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,9 +36,9 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "scale-ts": "^1.6.1",
39
- "@polkadot-api/metadata-builders": "0.9.1",
39
+ "@polkadot-api/metadata-builders": "0.9.2",
40
40
  "@polkadot-api/utils": "0.1.2",
41
- "@polkadot-api/substrate-bindings": "0.9.3"
41
+ "@polkadot-api/substrate-bindings": "0.9.4"
42
42
  },
43
43
  "scripts": {
44
44
  "build-core": "tsc --noEmit && rollup -c ../../rollup.config.js",