@trustvc/trustvc 2.6.1 → 2.7.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/README.md +217 -0
- package/dist/cjs/document-store/contract-interfaces.js +24 -0
- package/dist/cjs/document-store/deploy.js +49 -0
- package/dist/cjs/document-store/document-store-roles.js +38 -0
- package/dist/cjs/document-store/index.js +46 -0
- package/dist/cjs/document-store/issue.js +71 -0
- package/dist/cjs/document-store/revoke.js +71 -0
- package/dist/cjs/document-store/supportInterfaceIds.js +22 -0
- package/dist/cjs/document-store/tt-document-store-abi.js +231 -0
- package/dist/cjs/index.js +21 -0
- package/dist/esm/document-store/contract-interfaces.js +22 -0
- package/dist/esm/document-store/deploy.js +47 -0
- package/dist/esm/document-store/document-store-roles.js +35 -0
- package/dist/esm/document-store/index.js +5 -0
- package/dist/esm/document-store/issue.js +69 -0
- package/dist/esm/document-store/revoke.js +69 -0
- package/dist/esm/document-store/supportInterfaceIds.js +20 -0
- package/dist/esm/document-store/tt-document-store-abi.js +229 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/document-store/contract-interfaces.d.ts +14 -0
- package/dist/types/document-store/deploy.d.ts +29 -0
- package/dist/types/document-store/document-store-roles.d.ts +14 -0
- package/dist/types/document-store/index.d.ts +11 -0
- package/dist/types/document-store/issue.d.ts +32 -0
- package/dist/types/document-store/revoke.d.ts +32 -0
- package/dist/types/document-store/supportInterfaceIds.d.ts +16 -0
- package/dist/types/document-store/tt-document-store-abi.d.ts +388 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +2 -1
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TT Document Store ABI
|
|
3
|
+
* This is a legacy document store contract that doesn't support ERC-165 supportsInterface.
|
|
4
|
+
* It will be detected as a fallback when other document store interfaces are not supported.
|
|
5
|
+
*/
|
|
6
|
+
declare const TT_DOCUMENT_STORE_ABI: readonly [{
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly internalType: "string";
|
|
9
|
+
readonly name: "_name";
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
}, {
|
|
12
|
+
readonly internalType: "address";
|
|
13
|
+
readonly name: "owner";
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
}];
|
|
16
|
+
readonly stateMutability: "nonpayable";
|
|
17
|
+
readonly type: "constructor";
|
|
18
|
+
}, {
|
|
19
|
+
readonly anonymous: false;
|
|
20
|
+
readonly inputs: readonly [{
|
|
21
|
+
readonly indexed: true;
|
|
22
|
+
readonly internalType: "bytes32";
|
|
23
|
+
readonly name: "document";
|
|
24
|
+
readonly type: "bytes32";
|
|
25
|
+
}];
|
|
26
|
+
readonly name: "DocumentIssued";
|
|
27
|
+
readonly type: "event";
|
|
28
|
+
}, {
|
|
29
|
+
readonly anonymous: false;
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly indexed: true;
|
|
32
|
+
readonly internalType: "bytes32";
|
|
33
|
+
readonly name: "document";
|
|
34
|
+
readonly type: "bytes32";
|
|
35
|
+
}];
|
|
36
|
+
readonly name: "DocumentRevoked";
|
|
37
|
+
readonly type: "event";
|
|
38
|
+
}, {
|
|
39
|
+
readonly anonymous: false;
|
|
40
|
+
readonly inputs: readonly [{
|
|
41
|
+
readonly indexed: true;
|
|
42
|
+
readonly internalType: "bytes32";
|
|
43
|
+
readonly name: "role";
|
|
44
|
+
readonly type: "bytes32";
|
|
45
|
+
}, {
|
|
46
|
+
readonly indexed: true;
|
|
47
|
+
readonly internalType: "bytes32";
|
|
48
|
+
readonly name: "previousAdminRole";
|
|
49
|
+
readonly type: "bytes32";
|
|
50
|
+
}, {
|
|
51
|
+
readonly indexed: true;
|
|
52
|
+
readonly internalType: "bytes32";
|
|
53
|
+
readonly name: "newAdminRole";
|
|
54
|
+
readonly type: "bytes32";
|
|
55
|
+
}];
|
|
56
|
+
readonly name: "RoleAdminChanged";
|
|
57
|
+
readonly type: "event";
|
|
58
|
+
}, {
|
|
59
|
+
readonly anonymous: false;
|
|
60
|
+
readonly inputs: readonly [{
|
|
61
|
+
readonly indexed: true;
|
|
62
|
+
readonly internalType: "bytes32";
|
|
63
|
+
readonly name: "role";
|
|
64
|
+
readonly type: "bytes32";
|
|
65
|
+
}, {
|
|
66
|
+
readonly indexed: true;
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
readonly name: "account";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly indexed: true;
|
|
72
|
+
readonly internalType: "address";
|
|
73
|
+
readonly name: "sender";
|
|
74
|
+
readonly type: "address";
|
|
75
|
+
}];
|
|
76
|
+
readonly name: "RoleGranted";
|
|
77
|
+
readonly type: "event";
|
|
78
|
+
}, {
|
|
79
|
+
readonly anonymous: false;
|
|
80
|
+
readonly inputs: readonly [{
|
|
81
|
+
readonly indexed: true;
|
|
82
|
+
readonly internalType: "bytes32";
|
|
83
|
+
readonly name: "role";
|
|
84
|
+
readonly type: "bytes32";
|
|
85
|
+
}, {
|
|
86
|
+
readonly indexed: true;
|
|
87
|
+
readonly internalType: "address";
|
|
88
|
+
readonly name: "account";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
}, {
|
|
91
|
+
readonly indexed: true;
|
|
92
|
+
readonly internalType: "address";
|
|
93
|
+
readonly name: "sender";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}];
|
|
96
|
+
readonly name: "RoleRevoked";
|
|
97
|
+
readonly type: "event";
|
|
98
|
+
}, {
|
|
99
|
+
readonly inputs: readonly [];
|
|
100
|
+
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
101
|
+
readonly outputs: readonly [{
|
|
102
|
+
readonly internalType: "bytes32";
|
|
103
|
+
readonly name: "";
|
|
104
|
+
readonly type: "bytes32";
|
|
105
|
+
}];
|
|
106
|
+
readonly stateMutability: "view";
|
|
107
|
+
readonly type: "function";
|
|
108
|
+
}, {
|
|
109
|
+
readonly inputs: readonly [];
|
|
110
|
+
readonly name: "ISSUER_ROLE";
|
|
111
|
+
readonly outputs: readonly [{
|
|
112
|
+
readonly internalType: "bytes32";
|
|
113
|
+
readonly name: "";
|
|
114
|
+
readonly type: "bytes32";
|
|
115
|
+
}];
|
|
116
|
+
readonly stateMutability: "view";
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
}, {
|
|
119
|
+
readonly inputs: readonly [];
|
|
120
|
+
readonly name: "REVOKER_ROLE";
|
|
121
|
+
readonly outputs: readonly [{
|
|
122
|
+
readonly internalType: "bytes32";
|
|
123
|
+
readonly name: "";
|
|
124
|
+
readonly type: "bytes32";
|
|
125
|
+
}];
|
|
126
|
+
readonly stateMutability: "view";
|
|
127
|
+
readonly type: "function";
|
|
128
|
+
}, {
|
|
129
|
+
readonly inputs: readonly [{
|
|
130
|
+
readonly internalType: "bytes32[]";
|
|
131
|
+
readonly name: "documents";
|
|
132
|
+
readonly type: "bytes32[]";
|
|
133
|
+
}];
|
|
134
|
+
readonly name: "bulkIssue";
|
|
135
|
+
readonly outputs: readonly [];
|
|
136
|
+
readonly stateMutability: "nonpayable";
|
|
137
|
+
readonly type: "function";
|
|
138
|
+
}, {
|
|
139
|
+
readonly inputs: readonly [{
|
|
140
|
+
readonly internalType: "bytes32[]";
|
|
141
|
+
readonly name: "documents";
|
|
142
|
+
readonly type: "bytes32[]";
|
|
143
|
+
}];
|
|
144
|
+
readonly name: "bulkRevoke";
|
|
145
|
+
readonly outputs: readonly [];
|
|
146
|
+
readonly stateMutability: "nonpayable";
|
|
147
|
+
readonly type: "function";
|
|
148
|
+
}, {
|
|
149
|
+
readonly inputs: readonly [{
|
|
150
|
+
readonly internalType: "bytes32";
|
|
151
|
+
readonly name: "";
|
|
152
|
+
readonly type: "bytes32";
|
|
153
|
+
}];
|
|
154
|
+
readonly name: "documentIssued";
|
|
155
|
+
readonly outputs: readonly [{
|
|
156
|
+
readonly internalType: "uint256";
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}];
|
|
160
|
+
readonly stateMutability: "view";
|
|
161
|
+
readonly type: "function";
|
|
162
|
+
}, {
|
|
163
|
+
readonly inputs: readonly [{
|
|
164
|
+
readonly internalType: "bytes32";
|
|
165
|
+
readonly name: "";
|
|
166
|
+
readonly type: "bytes32";
|
|
167
|
+
}];
|
|
168
|
+
readonly name: "documentRevoked";
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly internalType: "uint256";
|
|
171
|
+
readonly name: "";
|
|
172
|
+
readonly type: "uint256";
|
|
173
|
+
}];
|
|
174
|
+
readonly stateMutability: "view";
|
|
175
|
+
readonly type: "function";
|
|
176
|
+
}, {
|
|
177
|
+
readonly inputs: readonly [{
|
|
178
|
+
readonly internalType: "bytes32";
|
|
179
|
+
readonly name: "document";
|
|
180
|
+
readonly type: "bytes32";
|
|
181
|
+
}];
|
|
182
|
+
readonly name: "getIssuedBlock";
|
|
183
|
+
readonly outputs: readonly [{
|
|
184
|
+
readonly internalType: "uint256";
|
|
185
|
+
readonly name: "";
|
|
186
|
+
readonly type: "uint256";
|
|
187
|
+
}];
|
|
188
|
+
readonly stateMutability: "view";
|
|
189
|
+
readonly type: "function";
|
|
190
|
+
}, {
|
|
191
|
+
readonly inputs: readonly [{
|
|
192
|
+
readonly internalType: "bytes32";
|
|
193
|
+
readonly name: "role";
|
|
194
|
+
readonly type: "bytes32";
|
|
195
|
+
}];
|
|
196
|
+
readonly name: "getRoleAdmin";
|
|
197
|
+
readonly outputs: readonly [{
|
|
198
|
+
readonly internalType: "bytes32";
|
|
199
|
+
readonly name: "";
|
|
200
|
+
readonly type: "bytes32";
|
|
201
|
+
}];
|
|
202
|
+
readonly stateMutability: "view";
|
|
203
|
+
readonly type: "function";
|
|
204
|
+
}, {
|
|
205
|
+
readonly inputs: readonly [{
|
|
206
|
+
readonly internalType: "bytes32";
|
|
207
|
+
readonly name: "role";
|
|
208
|
+
readonly type: "bytes32";
|
|
209
|
+
}, {
|
|
210
|
+
readonly internalType: "address";
|
|
211
|
+
readonly name: "account";
|
|
212
|
+
readonly type: "address";
|
|
213
|
+
}];
|
|
214
|
+
readonly name: "grantRole";
|
|
215
|
+
readonly outputs: readonly [];
|
|
216
|
+
readonly stateMutability: "nonpayable";
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
}, {
|
|
219
|
+
readonly inputs: readonly [{
|
|
220
|
+
readonly internalType: "bytes32";
|
|
221
|
+
readonly name: "role";
|
|
222
|
+
readonly type: "bytes32";
|
|
223
|
+
}, {
|
|
224
|
+
readonly internalType: "address";
|
|
225
|
+
readonly name: "account";
|
|
226
|
+
readonly type: "address";
|
|
227
|
+
}];
|
|
228
|
+
readonly name: "hasRole";
|
|
229
|
+
readonly outputs: readonly [{
|
|
230
|
+
readonly internalType: "bool";
|
|
231
|
+
readonly name: "";
|
|
232
|
+
readonly type: "bool";
|
|
233
|
+
}];
|
|
234
|
+
readonly stateMutability: "view";
|
|
235
|
+
readonly type: "function";
|
|
236
|
+
}, {
|
|
237
|
+
readonly inputs: readonly [{
|
|
238
|
+
readonly internalType: "bytes32";
|
|
239
|
+
readonly name: "document";
|
|
240
|
+
readonly type: "bytes32";
|
|
241
|
+
}];
|
|
242
|
+
readonly name: "isIssued";
|
|
243
|
+
readonly outputs: readonly [{
|
|
244
|
+
readonly internalType: "bool";
|
|
245
|
+
readonly name: "";
|
|
246
|
+
readonly type: "bool";
|
|
247
|
+
}];
|
|
248
|
+
readonly stateMutability: "view";
|
|
249
|
+
readonly type: "function";
|
|
250
|
+
}, {
|
|
251
|
+
readonly inputs: readonly [{
|
|
252
|
+
readonly internalType: "bytes32";
|
|
253
|
+
readonly name: "document";
|
|
254
|
+
readonly type: "bytes32";
|
|
255
|
+
}, {
|
|
256
|
+
readonly internalType: "uint256";
|
|
257
|
+
readonly name: "blockNumber";
|
|
258
|
+
readonly type: "uint256";
|
|
259
|
+
}];
|
|
260
|
+
readonly name: "isIssuedBefore";
|
|
261
|
+
readonly outputs: readonly [{
|
|
262
|
+
readonly internalType: "bool";
|
|
263
|
+
readonly name: "";
|
|
264
|
+
readonly type: "bool";
|
|
265
|
+
}];
|
|
266
|
+
readonly stateMutability: "view";
|
|
267
|
+
readonly type: "function";
|
|
268
|
+
}, {
|
|
269
|
+
readonly inputs: readonly [{
|
|
270
|
+
readonly internalType: "bytes32";
|
|
271
|
+
readonly name: "document";
|
|
272
|
+
readonly type: "bytes32";
|
|
273
|
+
}];
|
|
274
|
+
readonly name: "isRevoked";
|
|
275
|
+
readonly outputs: readonly [{
|
|
276
|
+
readonly internalType: "bool";
|
|
277
|
+
readonly name: "";
|
|
278
|
+
readonly type: "bool";
|
|
279
|
+
}];
|
|
280
|
+
readonly stateMutability: "view";
|
|
281
|
+
readonly type: "function";
|
|
282
|
+
}, {
|
|
283
|
+
readonly inputs: readonly [{
|
|
284
|
+
readonly internalType: "bytes32";
|
|
285
|
+
readonly name: "document";
|
|
286
|
+
readonly type: "bytes32";
|
|
287
|
+
}, {
|
|
288
|
+
readonly internalType: "uint256";
|
|
289
|
+
readonly name: "blockNumber";
|
|
290
|
+
readonly type: "uint256";
|
|
291
|
+
}];
|
|
292
|
+
readonly name: "isRevokedBefore";
|
|
293
|
+
readonly outputs: readonly [{
|
|
294
|
+
readonly internalType: "bool";
|
|
295
|
+
readonly name: "";
|
|
296
|
+
readonly type: "bool";
|
|
297
|
+
}];
|
|
298
|
+
readonly stateMutability: "view";
|
|
299
|
+
readonly type: "function";
|
|
300
|
+
}, {
|
|
301
|
+
readonly inputs: readonly [{
|
|
302
|
+
readonly internalType: "bytes32";
|
|
303
|
+
readonly name: "document";
|
|
304
|
+
readonly type: "bytes32";
|
|
305
|
+
}];
|
|
306
|
+
readonly name: "issue";
|
|
307
|
+
readonly outputs: readonly [];
|
|
308
|
+
readonly stateMutability: "nonpayable";
|
|
309
|
+
readonly type: "function";
|
|
310
|
+
}, {
|
|
311
|
+
readonly inputs: readonly [];
|
|
312
|
+
readonly name: "name";
|
|
313
|
+
readonly outputs: readonly [{
|
|
314
|
+
readonly internalType: "string";
|
|
315
|
+
readonly name: "";
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
}];
|
|
318
|
+
readonly stateMutability: "view";
|
|
319
|
+
readonly type: "function";
|
|
320
|
+
}, {
|
|
321
|
+
readonly inputs: readonly [{
|
|
322
|
+
readonly internalType: "bytes32";
|
|
323
|
+
readonly name: "role";
|
|
324
|
+
readonly type: "bytes32";
|
|
325
|
+
}, {
|
|
326
|
+
readonly internalType: "address";
|
|
327
|
+
readonly name: "account";
|
|
328
|
+
readonly type: "address";
|
|
329
|
+
}];
|
|
330
|
+
readonly name: "renounceRole";
|
|
331
|
+
readonly outputs: readonly [];
|
|
332
|
+
readonly stateMutability: "nonpayable";
|
|
333
|
+
readonly type: "function";
|
|
334
|
+
}, {
|
|
335
|
+
readonly inputs: readonly [{
|
|
336
|
+
readonly internalType: "bytes32";
|
|
337
|
+
readonly name: "document";
|
|
338
|
+
readonly type: "bytes32";
|
|
339
|
+
}];
|
|
340
|
+
readonly name: "revoke";
|
|
341
|
+
readonly outputs: readonly [{
|
|
342
|
+
readonly internalType: "bool";
|
|
343
|
+
readonly name: "";
|
|
344
|
+
readonly type: "bool";
|
|
345
|
+
}];
|
|
346
|
+
readonly stateMutability: "nonpayable";
|
|
347
|
+
readonly type: "function";
|
|
348
|
+
}, {
|
|
349
|
+
readonly inputs: readonly [{
|
|
350
|
+
readonly internalType: "bytes32";
|
|
351
|
+
readonly name: "role";
|
|
352
|
+
readonly type: "bytes32";
|
|
353
|
+
}, {
|
|
354
|
+
readonly internalType: "address";
|
|
355
|
+
readonly name: "account";
|
|
356
|
+
readonly type: "address";
|
|
357
|
+
}];
|
|
358
|
+
readonly name: "revokeRole";
|
|
359
|
+
readonly outputs: readonly [];
|
|
360
|
+
readonly stateMutability: "nonpayable";
|
|
361
|
+
readonly type: "function";
|
|
362
|
+
}, {
|
|
363
|
+
readonly inputs: readonly [{
|
|
364
|
+
readonly internalType: "bytes4";
|
|
365
|
+
readonly name: "interfaceId";
|
|
366
|
+
readonly type: "bytes4";
|
|
367
|
+
}];
|
|
368
|
+
readonly name: "supportsInterface";
|
|
369
|
+
readonly outputs: readonly [{
|
|
370
|
+
readonly internalType: "bool";
|
|
371
|
+
readonly name: "";
|
|
372
|
+
readonly type: "bool";
|
|
373
|
+
}];
|
|
374
|
+
readonly stateMutability: "view";
|
|
375
|
+
readonly type: "function";
|
|
376
|
+
}, {
|
|
377
|
+
readonly inputs: readonly [];
|
|
378
|
+
readonly name: "version";
|
|
379
|
+
readonly outputs: readonly [{
|
|
380
|
+
readonly internalType: "string";
|
|
381
|
+
readonly name: "";
|
|
382
|
+
readonly type: "string";
|
|
383
|
+
}];
|
|
384
|
+
readonly stateMutability: "view";
|
|
385
|
+
readonly type: "function";
|
|
386
|
+
}];
|
|
387
|
+
|
|
388
|
+
export { TT_DOCUMENT_STORE_ABI };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export { supportInterfaceIds as v5SupportInterfaceIds } from './token-registry-v
|
|
|
10
10
|
export { c as v5Contracts } from './contracts-BaIGKzNt.js';
|
|
11
11
|
export { computeInterfaceId as v5ComputeInterfaceId, encodeInitParams as v5EncodeInitParams, getEventFromReceipt as v5GetEventFromReceipt } from './token-registry-v5/utils.js';
|
|
12
12
|
export { TypedContractMethod } from '@tradetrust-tt/token-registry-v5/contracts/common';
|
|
13
|
+
export { documentStoreIssue } from './document-store/issue.js';
|
|
14
|
+
export { documentStoreRevoke } from './document-store/revoke.js';
|
|
15
|
+
export { deployDocumentStore } from './document-store/deploy.js';
|
|
16
|
+
export { DocumentStore__factory, TransferableDocumentStore__factory } from '@trustvc/document-store';
|
|
13
17
|
export { nominate, transferBeneficiary, transferHolder, transferOwners } from './token-registry-functions/transfer.js';
|
|
14
18
|
export { rejectTransferBeneficiary, rejectTransferHolder, rejectTransferOwners } from './token-registry-functions/rejectTransfers.js';
|
|
15
19
|
export { acceptReturned, rejectReturned, returnToIssuer } from './token-registry-functions/returnToken.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustvc/trustvc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "TrustVC library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"@tradetrust-tt/token-registry-v5": "npm:@tradetrust-tt/token-registry@^5.5.0",
|
|
122
122
|
"@tradetrust-tt/tradetrust": "^6.10.2",
|
|
123
123
|
"@tradetrust-tt/tt-verify": "^9.6.0",
|
|
124
|
+
"@trustvc/document-store": "^1.0.3",
|
|
124
125
|
"@trustvc/w3c": "^2.0.0",
|
|
125
126
|
"@trustvc/w3c-context": "^2.0.0",
|
|
126
127
|
"@trustvc/w3c-credential-status": "^2.0.0",
|