@polymeshassociation/polymesh-types 5.2.0 → 5.4.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # [5.4.0](https://github.com/PolymeshAssociation/polymesh-types/compare/v5.3.0...v5.4.0) (2023-04-24)
2
+
3
+
4
+ ### Features
5
+
6
+ * 🎸 add 5.4.0 types ([e430ed1](https://github.com/PolymeshAssociation/polymesh-types/commit/e430ed1e5ffbaf46d110922bbd32da62d42ab6ea))
7
+
8
+ # [5.3.0](https://github.com/PolymeshAssociation/polymesh-types/compare/v5.2.0...v5.3.0) (2023-03-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * 🐛 Update repositoryUrl in release.config.js ([#6](https://github.com/PolymeshAssociation/polymesh-types/issues/6)) ([c1ddaad](https://github.com/PolymeshAssociation/polymesh-types/commit/c1ddaad1a7536979d0128e89b176bf224db2f0e3))
14
+
15
+
16
+ ### Features
17
+
18
+ * 🎸 Add all spec version types ([#5](https://github.com/PolymeshAssociation/polymesh-types/issues/5)) ([ff737ab](https://github.com/PolymeshAssociation/polymesh-types/commit/ff737ab9e401f5a1aa02047dd42f132ca1890a52))
package/index.d.ts CHANGED
@@ -1,14 +1,7 @@
1
- declare const _default: {
2
- types: Record<string, any>;
3
- rpc: Record<string, Record<string, RpcFunctionDefinition>>;
4
- };
5
- export default _default;
6
- export interface RpcFunctionDefinition {
7
- description: string;
8
- params: Array<{
9
- name: string;
10
- type: string;
11
- isOptional: boolean;
12
- }>;
13
- type: string;
1
+ import { OverrideBundleDefinition } from '@polkadot/types/types';
2
+ interface PolymeshTypesBundle {
3
+ spec: Record<string, OverrideBundleDefinition>;
14
4
  }
5
+ export declare const typesBundle: PolymeshTypesBundle;
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAMjE,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;CAChD;AAQD,eAAO,MAAM,WAAW,EAAE,mBAQzB,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,24 @@
1
- import schema from "./polymesh_schema.json";
2
- export default schema;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.typesBundle = void 0;
7
+ const rpc_1 = __importDefault(require("./rpc"));
8
+ const signedExtensions_1 = __importDefault(require("./signedExtensions"));
9
+ const types_1 = __importDefault(require("./types"));
10
+ const specTypes = {
11
+ rpc: rpc_1.default,
12
+ types: types_1.default,
13
+ signedExtensions: signedExtensions_1.default,
14
+ };
15
+ exports.typesBundle = {
16
+ spec: {
17
+ polymesh_dev: specTypes,
18
+ polymesh: specTypes,
19
+ polymesh_ci: specTypes,
20
+ polymesh_mainnet: specTypes,
21
+ polymesh_testnet: specTypes,
22
+ },
23
+ };
24
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAwB;AACxB,0EAAkD;AAClD,oDAA4B;AAM5B,MAAM,SAAS,GAA6B;IAC1C,GAAG,EAAH,aAAG;IACH,KAAK,EAAL,eAAK;IACL,gBAAgB,EAAhB,0BAAgB;CACjB,CAAC;AAEW,QAAA,WAAW,GAAwB;IAC9C,IAAI,EAAE;QACJ,YAAY,EAAE,SAAS;QACvB,QAAQ,EAAE,SAAS;QACnB,WAAW,EAAE,SAAS;QACtB,gBAAgB,EAAE,SAAS;QAC3B,gBAAgB,EAAE,SAAS;KAC5B;CACF,CAAC"}
package/package.json CHANGED
@@ -1,22 +1,69 @@
1
1
  {
2
2
  "name": "@polymeshassociation/polymesh-types",
3
- "version": "5.2.0",
3
+ "version": "5.4.0",
4
4
  "description": "Substrate types used in Polymesh chain",
5
- "main": "build/index.js",
6
- "typings": "index.d.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
7
  "repository": "https://github.com/PolymeshAssociation/polymesh-types",
8
8
  "author": "Polymesh Association",
9
9
  "license": "Apache-2.0",
10
10
  "keywords": [
11
11
  "Polkadot",
12
- "Polymesh"
12
+ "Polymesh",
13
+ "types"
13
14
  ],
14
15
  "scripts": {
15
- "build": "webpack",
16
- "prepublish": "yarn build"
16
+ "build:ts": "tsc -b",
17
+ "commit": "npx git-cz",
18
+ "diff_versions": "ts-node scripts/diff_versions",
19
+ "semantic-release": "semantic-release",
20
+ "lint": "eslint src --ext .js,.jsx,.ts,.tsx",
21
+ "format": "cross-env prettier-eslint $PWD\"/src/**/*.{ts,tsx,js,jsx,json,css,md}\" --write"
17
22
  },
18
23
  "devDependencies": {
19
- "webpack": "^5.2.0",
20
- "webpack-cli": "^4.2.0"
24
+ "@commitlint/cli": "13.1.0",
25
+ "@commitlint/config-conventional": "13.1.0",
26
+ "@polkadot/typegen": "^10.1.2",
27
+ "@semantic-release/changelog": "^6.0.2",
28
+ "@semantic-release/git": "^10.0.1",
29
+ "@semantic-release/github": "^8.0.7",
30
+ "@semantic-release/npm": "^9.0.2",
31
+ "@types/jest": "26.0.24",
32
+ "@types/node": "^18.15.3",
33
+ "@typescript-eslint/eslint-plugin": "4.29.0",
34
+ "@typescript-eslint/parser": "4.29.0",
35
+ "@zerollup/ts-transform-paths": "1.7.18",
36
+ "cross-env": "7.0.3",
37
+ "eslint": "7.32.0",
38
+ "eslint-config-prettier": "8.3.0",
39
+ "eslint-config-semistandard": "16.0.0",
40
+ "eslint-config-standard": "16.0.3",
41
+ "eslint-plugin-import": "2.23.4",
42
+ "eslint-plugin-node": "11.1.0",
43
+ "eslint-plugin-prettier": "3.3.1",
44
+ "eslint-plugin-promise": "5.1.0",
45
+ "eslint-plugin-simple-import-sort": "7.0.0",
46
+ "eslint-plugin-standard": "5.0.0",
47
+ "husky": "7.0.1",
48
+ "jest": "27.0.6",
49
+ "jest-diff": "^27.2.0",
50
+ "lint-staged": "11.1.1",
51
+ "prettier": "2.3.2",
52
+ "prettier-eslint": "13.0.0",
53
+ "prettier-eslint-cli": "5.0.1",
54
+ "semantic-release": "^19.0.5",
55
+ "ts-jest": "27.0.4",
56
+ "ts-node": "^10.9.1",
57
+ "ttypescript": "1.5.12",
58
+ "typedoc": "0.16.8",
59
+ "typescript": "^4.9.5"
60
+ },
61
+ "config": {
62
+ "commitizen": {
63
+ "path": "./node_modules/cz-conventional-changelog"
64
+ }
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
21
68
  }
22
69
  }
package/rpc/index.d.ts ADDED
@@ -0,0 +1,173 @@
1
+ declare const _default: {
2
+ compliance: {
3
+ canTransfer: {
4
+ description: string;
5
+ params: {
6
+ name: string;
7
+ type: string;
8
+ isOptional: boolean;
9
+ }[];
10
+ type: string;
11
+ };
12
+ };
13
+ identity: {
14
+ isIdentityHasValidCdd: {
15
+ description: string;
16
+ params: {
17
+ name: string;
18
+ type: string;
19
+ isOptional: boolean;
20
+ }[];
21
+ type: string;
22
+ };
23
+ getAssetDid: {
24
+ description: string;
25
+ params: {
26
+ name: string;
27
+ type: string;
28
+ isOptional: boolean;
29
+ }[];
30
+ type: string;
31
+ };
32
+ getDidRecords: {
33
+ description: string;
34
+ params: {
35
+ name: string;
36
+ type: string;
37
+ isOptional: boolean;
38
+ }[];
39
+ type: string;
40
+ };
41
+ getDidStatus: {
42
+ description: string;
43
+ params: {
44
+ name: string;
45
+ type: string;
46
+ isOptional: boolean;
47
+ }[];
48
+ type: string;
49
+ };
50
+ getFilteredAuthorizations: {
51
+ description: string;
52
+ params: {
53
+ name: string;
54
+ type: string;
55
+ isOptional: boolean;
56
+ }[];
57
+ type: string;
58
+ };
59
+ getKeyIdentityData: {
60
+ description: string;
61
+ params: {
62
+ name: string;
63
+ type: string;
64
+ isOptional: boolean;
65
+ }[];
66
+ type: string;
67
+ };
68
+ };
69
+ pips: {
70
+ getVotes: {
71
+ description: string;
72
+ params: {
73
+ name: string;
74
+ type: string;
75
+ isOptional: boolean;
76
+ }[];
77
+ type: string;
78
+ };
79
+ proposedBy: {
80
+ description: string;
81
+ params: {
82
+ name: string;
83
+ type: string;
84
+ isOptional: boolean;
85
+ }[];
86
+ type: string;
87
+ };
88
+ votedOn: {
89
+ description: string;
90
+ params: {
91
+ name: string;
92
+ type: string;
93
+ isOptional: boolean;
94
+ }[];
95
+ type: string;
96
+ };
97
+ };
98
+ protocolFee: {
99
+ computeFee: {
100
+ description: string;
101
+ params: {
102
+ name: string;
103
+ type: string;
104
+ isOptional: boolean;
105
+ }[];
106
+ type: string;
107
+ };
108
+ };
109
+ staking: {
110
+ getCurve: {
111
+ description: string;
112
+ params: {
113
+ name: string;
114
+ type: string;
115
+ isOptional: boolean;
116
+ }[];
117
+ type: string;
118
+ };
119
+ };
120
+ asset: {
121
+ canTransfer: {
122
+ description: string;
123
+ params: {
124
+ name: string;
125
+ type: string;
126
+ isOptional: boolean;
127
+ }[];
128
+ type: string;
129
+ };
130
+ canTransferGranular: {
131
+ description: string;
132
+ params: {
133
+ name: string;
134
+ type: string;
135
+ isOptional: boolean;
136
+ }[];
137
+ type: string;
138
+ };
139
+ };
140
+ group: {
141
+ getCDDValidMembers: {
142
+ description: string;
143
+ params: {
144
+ name: string;
145
+ type: string;
146
+ isOptional: boolean;
147
+ }[];
148
+ type: string;
149
+ };
150
+ getGCValidMembers: {
151
+ description: string;
152
+ params: {
153
+ name: string;
154
+ type: string;
155
+ isOptional: boolean;
156
+ }[];
157
+ type: string;
158
+ };
159
+ };
160
+ nft: {
161
+ validateNFTTransfer: {
162
+ description: string;
163
+ params: {
164
+ name: string;
165
+ type: string;
166
+ isOptional: boolean;
167
+ }[];
168
+ type: string;
169
+ };
170
+ };
171
+ };
172
+ export default _default;
173
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rpc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAgXE"}
package/rpc/index.js ADDED
@@ -0,0 +1,368 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ compliance: {
5
+ canTransfer: {
6
+ description: 'Checks whether a transaction with given parameters is compliant to the compliance manager conditions',
7
+ params: [
8
+ {
9
+ name: 'ticker',
10
+ type: 'Ticker',
11
+ isOptional: false,
12
+ },
13
+ {
14
+ name: 'from_did',
15
+ type: 'Option<IdentityId>',
16
+ isOptional: false,
17
+ },
18
+ {
19
+ name: 'to_did',
20
+ type: 'Option<IdentityId>',
21
+ isOptional: false,
22
+ },
23
+ {
24
+ name: 'blockHash',
25
+ type: 'Hash',
26
+ isOptional: true,
27
+ },
28
+ ],
29
+ type: 'AssetComplianceResult',
30
+ },
31
+ },
32
+ identity: {
33
+ isIdentityHasValidCdd: {
34
+ description: 'use to tell whether the given did has valid cdd claim or not',
35
+ params: [
36
+ {
37
+ name: 'did',
38
+ type: 'IdentityId',
39
+ isOptional: false,
40
+ },
41
+ {
42
+ name: 'buffer_time',
43
+ type: 'u64',
44
+ isOptional: true,
45
+ },
46
+ {
47
+ name: 'blockHash',
48
+ type: 'Hash',
49
+ isOptional: true,
50
+ },
51
+ ],
52
+ type: 'CddStatus',
53
+ },
54
+ getAssetDid: {
55
+ description: 'function is used to query the given ticker DID',
56
+ params: [
57
+ {
58
+ name: 'ticker',
59
+ type: 'Ticker',
60
+ isOptional: false,
61
+ },
62
+ {
63
+ name: 'blockHash',
64
+ type: 'Hash',
65
+ isOptional: true,
66
+ },
67
+ ],
68
+ type: 'AssetDidResult',
69
+ },
70
+ getDidRecords: {
71
+ description: 'Used to get the did record values for a given DID',
72
+ params: [
73
+ {
74
+ name: 'did',
75
+ type: 'IdentityId',
76
+ isOptional: false,
77
+ },
78
+ {
79
+ name: 'blockHash',
80
+ type: 'Hash',
81
+ isOptional: true,
82
+ },
83
+ ],
84
+ type: 'RpcDidRecords',
85
+ },
86
+ getDidStatus: {
87
+ description: 'Retrieve status of the DID',
88
+ params: [
89
+ {
90
+ name: 'did',
91
+ type: 'Vec<IdentityId>',
92
+ isOptional: false,
93
+ },
94
+ {
95
+ name: 'blockHash',
96
+ type: 'Hash',
97
+ isOptional: true,
98
+ },
99
+ ],
100
+ type: 'Vec<DidStatus>',
101
+ },
102
+ getFilteredAuthorizations: {
103
+ description: 'Retrieve authorizations data for a given signatory and filtered using the given authorization type',
104
+ params: [
105
+ {
106
+ name: 'signatory',
107
+ type: 'Signatory',
108
+ isOptional: false,
109
+ },
110
+ {
111
+ name: 'allow_expired',
112
+ type: 'bool',
113
+ isOptional: false,
114
+ },
115
+ {
116
+ name: 'auth_type',
117
+ type: 'AuthorizationType',
118
+ isOptional: true,
119
+ },
120
+ {
121
+ name: 'blockHash',
122
+ type: 'Hash',
123
+ isOptional: true,
124
+ },
125
+ ],
126
+ type: 'Vec<Authorization>',
127
+ },
128
+ getKeyIdentityData: {
129
+ description: 'Query relation between a signing key and a DID',
130
+ params: [
131
+ {
132
+ name: 'acc',
133
+ type: 'AccountId',
134
+ isOptional: false,
135
+ },
136
+ {
137
+ name: 'blockHash',
138
+ type: 'Hash',
139
+ isOptional: true,
140
+ },
141
+ ],
142
+ type: 'Option<KeyIdentityData>',
143
+ },
144
+ },
145
+ pips: {
146
+ getVotes: {
147
+ description: 'Summary of votes of a proposal given by index',
148
+ params: [
149
+ {
150
+ name: 'index',
151
+ type: 'PipId',
152
+ isOptional: false,
153
+ },
154
+ {
155
+ name: 'blockHash',
156
+ type: 'Hash',
157
+ isOptional: true,
158
+ },
159
+ ],
160
+ type: 'VoteCount',
161
+ },
162
+ proposedBy: {
163
+ description: 'Retrieves proposal indices started by address',
164
+ params: [
165
+ {
166
+ name: 'address',
167
+ type: 'AccountId',
168
+ isOptional: false,
169
+ },
170
+ {
171
+ name: 'blockHash',
172
+ type: 'Hash',
173
+ isOptional: true,
174
+ },
175
+ ],
176
+ type: 'Vec<PipId>',
177
+ },
178
+ votedOn: {
179
+ description: 'Retrieves proposal address indices voted on',
180
+ params: [
181
+ {
182
+ name: 'address',
183
+ type: 'AccountId',
184
+ isOptional: false,
185
+ },
186
+ {
187
+ name: 'blockHash',
188
+ type: 'Hash',
189
+ isOptional: true,
190
+ },
191
+ ],
192
+ type: 'Vec<PipId>',
193
+ },
194
+ },
195
+ protocolFee: {
196
+ computeFee: {
197
+ description: 'Gets the fee of a chargeable extrinsic operation',
198
+ params: [
199
+ {
200
+ name: 'op',
201
+ type: 'ProtocolOp',
202
+ isOptional: false,
203
+ },
204
+ {
205
+ name: 'blockHash',
206
+ type: 'Hash',
207
+ isOptional: true,
208
+ },
209
+ ],
210
+ type: 'CappedFee',
211
+ },
212
+ },
213
+ staking: {
214
+ getCurve: {
215
+ description: 'Retrieves curves parameters',
216
+ params: [
217
+ {
218
+ name: 'blockHash',
219
+ type: 'Hash',
220
+ isOptional: true,
221
+ },
222
+ ],
223
+ type: 'Vec<(Perbill, Perbill)>',
224
+ },
225
+ },
226
+ asset: {
227
+ canTransfer: {
228
+ description: 'Checks whether a transaction with given parameters can take place or not',
229
+ params: [
230
+ {
231
+ name: 'sender',
232
+ type: 'AccountId',
233
+ isOptional: false,
234
+ },
235
+ {
236
+ name: 'from_custodian',
237
+ type: 'Option<IdentityId>',
238
+ isOptional: false,
239
+ },
240
+ {
241
+ name: 'from_portfolio',
242
+ type: 'PortfolioId',
243
+ isOptional: false,
244
+ },
245
+ {
246
+ name: 'to_custodian',
247
+ type: 'Option<IdentityId>',
248
+ isOptional: false,
249
+ },
250
+ {
251
+ name: 'to_portfolio',
252
+ type: 'PortfolioId',
253
+ isOptional: false,
254
+ },
255
+ {
256
+ name: 'ticker',
257
+ type: 'Ticker',
258
+ isOptional: false,
259
+ },
260
+ {
261
+ name: 'value',
262
+ type: 'Balance',
263
+ isOptional: false,
264
+ },
265
+ {
266
+ name: 'blockHash',
267
+ type: 'Hash',
268
+ isOptional: true,
269
+ },
270
+ ],
271
+ type: 'CanTransferResult',
272
+ },
273
+ canTransferGranular: {
274
+ description: 'Checks whether a transaction with given parameters can take place or not. The result is granular meaning each check is run and returned regardless of outcome.',
275
+ params: [
276
+ {
277
+ name: 'from_custodian',
278
+ type: 'Option<IdentityId>',
279
+ isOptional: false,
280
+ },
281
+ {
282
+ name: 'from_portfolio',
283
+ type: 'PortfolioId',
284
+ isOptional: false,
285
+ },
286
+ {
287
+ name: 'to_custodian',
288
+ type: 'Option<IdentityId>',
289
+ isOptional: false,
290
+ },
291
+ {
292
+ name: 'to_portfolio',
293
+ type: 'PortfolioId',
294
+ isOptional: false,
295
+ },
296
+ {
297
+ name: 'ticker',
298
+ type: 'Ticker',
299
+ isOptional: false,
300
+ },
301
+ {
302
+ name: 'value',
303
+ type: 'Balance',
304
+ isOptional: false,
305
+ },
306
+ {
307
+ name: 'blockHash',
308
+ type: 'Hash',
309
+ isOptional: true,
310
+ },
311
+ ],
312
+ type: 'GranularCanTransferResult',
313
+ },
314
+ },
315
+ group: {
316
+ getCDDValidMembers: {
317
+ description: 'Get the CDD members',
318
+ params: [
319
+ {
320
+ name: 'blockHash',
321
+ type: 'Hash',
322
+ isOptional: true,
323
+ },
324
+ ],
325
+ type: 'Vec<Member>',
326
+ },
327
+ getGCValidMembers: {
328
+ description: 'Get the GC members',
329
+ params: [
330
+ {
331
+ name: 'blockHash',
332
+ type: 'Hash',
333
+ isOptional: true,
334
+ },
335
+ ],
336
+ type: 'Vec<Member>',
337
+ },
338
+ },
339
+ nft: {
340
+ validateNFTTransfer: {
341
+ description: 'Verifies if and the sender and receiver are not the same, if both have valid balances, if the sender owns the nft, and if all compliance rules are being respected.',
342
+ params: [
343
+ {
344
+ name: 'sender_portfolio',
345
+ type: 'PortfolioId',
346
+ isOptional: false,
347
+ },
348
+ {
349
+ name: 'receiver_portfolio',
350
+ type: 'PortfolioId',
351
+ isOptional: false,
352
+ },
353
+ {
354
+ name: 'nfts',
355
+ type: 'NFTs',
356
+ isOptional: false,
357
+ },
358
+ {
359
+ name: 'blockHash',
360
+ type: 'Hash',
361
+ isOptional: true,
362
+ },
363
+ ],
364
+ type: 'DispatchResult',
365
+ },
366
+ },
367
+ };
368
+ //# sourceMappingURL=index.js.map