@lfdecentralizedtrust/paladin-sdk 0.13.0-rc.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.
Files changed (88) hide show
  1. package/README.md +21 -0
  2. package/build/domains/abis/INoto.json +448 -0
  3. package/build/domains/abis/INotoPrivate.json +347 -0
  4. package/build/domains/abis/IZetoFungible.json +197 -0
  5. package/build/domains/abis/PentePrivacyGroup.json +613 -0
  6. package/build/domains/abis/Zeto_Anon.json +1263 -0
  7. package/build/domains/noto.d.ts +117 -0
  8. package/build/domains/noto.js +292 -0
  9. package/build/domains/pente.d.ts +84 -0
  10. package/build/domains/pente.js +191 -0
  11. package/build/domains/zeto.d.ts +83 -0
  12. package/build/domains/zeto.js +201 -0
  13. package/build/index.d.ts +9 -0
  14. package/build/index.js +28 -0
  15. package/build/interfaces/algorithms.d.ts +3 -0
  16. package/build/interfaces/algorithms.js +9 -0
  17. package/build/interfaces/blockchainevent.d.ts +15 -0
  18. package/build/interfaces/blockchainevent.js +2 -0
  19. package/build/interfaces/blockindex.d.ts +30 -0
  20. package/build/interfaces/blockindex.js +2 -0
  21. package/build/interfaces/domains.d.ts +9 -0
  22. package/build/interfaces/domains.js +2 -0
  23. package/build/interfaces/index.d.ts +15 -0
  24. package/build/interfaces/index.js +31 -0
  25. package/build/interfaces/keymanager.d.ts +32 -0
  26. package/build/interfaces/keymanager.js +2 -0
  27. package/build/interfaces/logger.d.ts +8 -0
  28. package/build/interfaces/logger.js +2 -0
  29. package/build/interfaces/paladin.d.ts +14 -0
  30. package/build/interfaces/paladin.js +2 -0
  31. package/build/interfaces/privacygroups.d.ts +76 -0
  32. package/build/interfaces/privacygroups.js +2 -0
  33. package/build/interfaces/query.d.ts +33 -0
  34. package/build/interfaces/query.js +2 -0
  35. package/build/interfaces/registry.d.ts +26 -0
  36. package/build/interfaces/registry.js +2 -0
  37. package/build/interfaces/states.d.ts +61 -0
  38. package/build/interfaces/states.js +2 -0
  39. package/build/interfaces/transaction.d.ts +159 -0
  40. package/build/interfaces/transaction.js +12 -0
  41. package/build/interfaces/transport.d.ts +32 -0
  42. package/build/interfaces/transport.js +2 -0
  43. package/build/interfaces/verifiers.d.ts +6 -0
  44. package/build/interfaces/verifiers.js +10 -0
  45. package/build/interfaces/websocket.d.ts +57 -0
  46. package/build/interfaces/websocket.js +2 -0
  47. package/build/paladin.d.ts +265 -0
  48. package/build/paladin.js +739 -0
  49. package/build/transaction.d.ts +8 -0
  50. package/build/transaction.js +17 -0
  51. package/build/utils.d.ts +5 -0
  52. package/build/utils.js +49 -0
  53. package/build/verifier.d.ts +16 -0
  54. package/build/verifier.js +24 -0
  55. package/build/websocket.d.ts +35 -0
  56. package/build/websocket.js +177 -0
  57. package/build.gradle +75 -0
  58. package/package.json +32 -0
  59. package/scripts/abi.mjs +19 -0
  60. package/scripts/contracts.mjs +20 -0
  61. package/scripts/download.mjs +27 -0
  62. package/scripts/util.mjs +42 -0
  63. package/src/domains/noto.ts +420 -0
  64. package/src/domains/pente.ts +287 -0
  65. package/src/domains/zeto.ts +282 -0
  66. package/src/index.ts +10 -0
  67. package/src/interfaces/algorithms.ts +6 -0
  68. package/src/interfaces/blockchainevent.ts +18 -0
  69. package/src/interfaces/blockindex.ts +33 -0
  70. package/src/interfaces/domains.ts +10 -0
  71. package/src/interfaces/index.ts +15 -0
  72. package/src/interfaces/keymanager.ts +35 -0
  73. package/src/interfaces/logger.ts +8 -0
  74. package/src/interfaces/paladin.ts +17 -0
  75. package/src/interfaces/privacygroups.ts +86 -0
  76. package/src/interfaces/query.ts +37 -0
  77. package/src/interfaces/registry.ts +27 -0
  78. package/src/interfaces/states.ts +77 -0
  79. package/src/interfaces/transaction.ts +179 -0
  80. package/src/interfaces/transport.ts +35 -0
  81. package/src/interfaces/verifiers.ts +6 -0
  82. package/src/interfaces/websocket.ts +67 -0
  83. package/src/paladin.ts +1295 -0
  84. package/src/transaction.ts +17 -0
  85. package/src/utils.ts +24 -0
  86. package/src/verifier.ts +27 -0
  87. package/src/websocket.ts +217 -0
  88. package/tsconfig.json +14 -0
@@ -0,0 +1,347 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "INotoPrivate",
4
+ "sourceName": "contracts/domains/interfaces/INotoPrivate.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "string",
10
+ "name": "account",
11
+ "type": "string"
12
+ }
13
+ ],
14
+ "name": "balanceOf",
15
+ "outputs": [
16
+ {
17
+ "internalType": "uint256",
18
+ "name": "totalStates",
19
+ "type": "uint256"
20
+ },
21
+ {
22
+ "internalType": "uint256",
23
+ "name": "totalBalance",
24
+ "type": "uint256"
25
+ },
26
+ {
27
+ "internalType": "bool",
28
+ "name": "overflow",
29
+ "type": "bool"
30
+ }
31
+ ],
32
+ "stateMutability": "view",
33
+ "type": "function"
34
+ },
35
+ {
36
+ "inputs": [
37
+ {
38
+ "internalType": "uint256",
39
+ "name": "amount",
40
+ "type": "uint256"
41
+ },
42
+ {
43
+ "internalType": "bytes",
44
+ "name": "data",
45
+ "type": "bytes"
46
+ }
47
+ ],
48
+ "name": "burn",
49
+ "outputs": [],
50
+ "stateMutability": "nonpayable",
51
+ "type": "function"
52
+ },
53
+ {
54
+ "inputs": [
55
+ {
56
+ "internalType": "string",
57
+ "name": "from",
58
+ "type": "string"
59
+ },
60
+ {
61
+ "internalType": "uint256",
62
+ "name": "amount",
63
+ "type": "uint256"
64
+ },
65
+ {
66
+ "internalType": "bytes",
67
+ "name": "data",
68
+ "type": "bytes"
69
+ }
70
+ ],
71
+ "name": "burnFrom",
72
+ "outputs": [],
73
+ "stateMutability": "nonpayable",
74
+ "type": "function"
75
+ },
76
+ {
77
+ "inputs": [],
78
+ "name": "decimals",
79
+ "outputs": [
80
+ {
81
+ "internalType": "uint8",
82
+ "name": "",
83
+ "type": "uint8"
84
+ }
85
+ ],
86
+ "stateMutability": "view",
87
+ "type": "function"
88
+ },
89
+ {
90
+ "inputs": [
91
+ {
92
+ "internalType": "bytes32",
93
+ "name": "lockId",
94
+ "type": "bytes32"
95
+ },
96
+ {
97
+ "components": [
98
+ {
99
+ "internalType": "bytes32[]",
100
+ "name": "lockedInputs",
101
+ "type": "bytes32[]"
102
+ },
103
+ {
104
+ "internalType": "bytes32[]",
105
+ "name": "lockedOutputs",
106
+ "type": "bytes32[]"
107
+ },
108
+ {
109
+ "internalType": "bytes32[]",
110
+ "name": "outputs",
111
+ "type": "bytes32[]"
112
+ },
113
+ {
114
+ "internalType": "bytes",
115
+ "name": "signature",
116
+ "type": "bytes"
117
+ },
118
+ {
119
+ "internalType": "bytes",
120
+ "name": "data",
121
+ "type": "bytes"
122
+ }
123
+ ],
124
+ "internalType": "struct INotoPrivate.UnlockPublicParams",
125
+ "name": "unlock",
126
+ "type": "tuple"
127
+ },
128
+ {
129
+ "internalType": "address",
130
+ "name": "delegate",
131
+ "type": "address"
132
+ },
133
+ {
134
+ "internalType": "bytes",
135
+ "name": "data",
136
+ "type": "bytes"
137
+ }
138
+ ],
139
+ "name": "delegateLock",
140
+ "outputs": [],
141
+ "stateMutability": "nonpayable",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [
146
+ {
147
+ "internalType": "uint256",
148
+ "name": "amount",
149
+ "type": "uint256"
150
+ },
151
+ {
152
+ "internalType": "bytes",
153
+ "name": "data",
154
+ "type": "bytes"
155
+ }
156
+ ],
157
+ "name": "lock",
158
+ "outputs": [],
159
+ "stateMutability": "nonpayable",
160
+ "type": "function"
161
+ },
162
+ {
163
+ "inputs": [
164
+ {
165
+ "internalType": "string",
166
+ "name": "to",
167
+ "type": "string"
168
+ },
169
+ {
170
+ "internalType": "uint256",
171
+ "name": "amount",
172
+ "type": "uint256"
173
+ },
174
+ {
175
+ "internalType": "bytes",
176
+ "name": "data",
177
+ "type": "bytes"
178
+ }
179
+ ],
180
+ "name": "mint",
181
+ "outputs": [],
182
+ "stateMutability": "nonpayable",
183
+ "type": "function"
184
+ },
185
+ {
186
+ "inputs": [],
187
+ "name": "name",
188
+ "outputs": [
189
+ {
190
+ "internalType": "string",
191
+ "name": "",
192
+ "type": "string"
193
+ }
194
+ ],
195
+ "stateMutability": "view",
196
+ "type": "function"
197
+ },
198
+ {
199
+ "inputs": [
200
+ {
201
+ "internalType": "bytes32",
202
+ "name": "lockId",
203
+ "type": "bytes32"
204
+ },
205
+ {
206
+ "internalType": "string",
207
+ "name": "from",
208
+ "type": "string"
209
+ },
210
+ {
211
+ "components": [
212
+ {
213
+ "internalType": "string",
214
+ "name": "to",
215
+ "type": "string"
216
+ },
217
+ {
218
+ "internalType": "uint256",
219
+ "name": "amount",
220
+ "type": "uint256"
221
+ }
222
+ ],
223
+ "internalType": "struct INotoPrivate.UnlockRecipient[]",
224
+ "name": "recipients",
225
+ "type": "tuple[]"
226
+ },
227
+ {
228
+ "internalType": "bytes",
229
+ "name": "data",
230
+ "type": "bytes"
231
+ }
232
+ ],
233
+ "name": "prepareUnlock",
234
+ "outputs": [],
235
+ "stateMutability": "nonpayable",
236
+ "type": "function"
237
+ },
238
+ {
239
+ "inputs": [],
240
+ "name": "symbol",
241
+ "outputs": [
242
+ {
243
+ "internalType": "string",
244
+ "name": "",
245
+ "type": "string"
246
+ }
247
+ ],
248
+ "stateMutability": "view",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [
253
+ {
254
+ "internalType": "string",
255
+ "name": "to",
256
+ "type": "string"
257
+ },
258
+ {
259
+ "internalType": "uint256",
260
+ "name": "amount",
261
+ "type": "uint256"
262
+ },
263
+ {
264
+ "internalType": "bytes",
265
+ "name": "data",
266
+ "type": "bytes"
267
+ }
268
+ ],
269
+ "name": "transfer",
270
+ "outputs": [],
271
+ "stateMutability": "nonpayable",
272
+ "type": "function"
273
+ },
274
+ {
275
+ "inputs": [
276
+ {
277
+ "internalType": "string",
278
+ "name": "from",
279
+ "type": "string"
280
+ },
281
+ {
282
+ "internalType": "string",
283
+ "name": "to",
284
+ "type": "string"
285
+ },
286
+ {
287
+ "internalType": "uint256",
288
+ "name": "amount",
289
+ "type": "uint256"
290
+ },
291
+ {
292
+ "internalType": "bytes",
293
+ "name": "data",
294
+ "type": "bytes"
295
+ }
296
+ ],
297
+ "name": "transferFrom",
298
+ "outputs": [],
299
+ "stateMutability": "nonpayable",
300
+ "type": "function"
301
+ },
302
+ {
303
+ "inputs": [
304
+ {
305
+ "internalType": "bytes32",
306
+ "name": "lockId",
307
+ "type": "bytes32"
308
+ },
309
+ {
310
+ "internalType": "string",
311
+ "name": "from",
312
+ "type": "string"
313
+ },
314
+ {
315
+ "components": [
316
+ {
317
+ "internalType": "string",
318
+ "name": "to",
319
+ "type": "string"
320
+ },
321
+ {
322
+ "internalType": "uint256",
323
+ "name": "amount",
324
+ "type": "uint256"
325
+ }
326
+ ],
327
+ "internalType": "struct INotoPrivate.UnlockRecipient[]",
328
+ "name": "recipients",
329
+ "type": "tuple[]"
330
+ },
331
+ {
332
+ "internalType": "bytes",
333
+ "name": "data",
334
+ "type": "bytes"
335
+ }
336
+ ],
337
+ "name": "unlock",
338
+ "outputs": [],
339
+ "stateMutability": "nonpayable",
340
+ "type": "function"
341
+ }
342
+ ],
343
+ "bytecode": "0x",
344
+ "deployedBytecode": "0x",
345
+ "linkReferences": {},
346
+ "deployedLinkReferences": {}
347
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IZetoFungible",
4
+ "sourceName": "contracts/domains/interfaces/IZetoFungible.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "string",
10
+ "name": "account",
11
+ "type": "string"
12
+ }
13
+ ],
14
+ "name": "balanceOf",
15
+ "outputs": [
16
+ {
17
+ "internalType": "uint256",
18
+ "name": "totalStates",
19
+ "type": "uint256"
20
+ },
21
+ {
22
+ "internalType": "uint256",
23
+ "name": "totalBalance",
24
+ "type": "uint256"
25
+ },
26
+ {
27
+ "internalType": "bool",
28
+ "name": "overflow",
29
+ "type": "bool"
30
+ }
31
+ ],
32
+ "stateMutability": "view",
33
+ "type": "function"
34
+ },
35
+ {
36
+ "inputs": [
37
+ {
38
+ "internalType": "uint256",
39
+ "name": "amount",
40
+ "type": "uint256"
41
+ }
42
+ ],
43
+ "name": "deposit",
44
+ "outputs": [],
45
+ "stateMutability": "nonpayable",
46
+ "type": "function"
47
+ },
48
+ {
49
+ "inputs": [
50
+ {
51
+ "internalType": "uint256",
52
+ "name": "amount",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "internalType": "address",
57
+ "name": "delegate",
58
+ "type": "address"
59
+ }
60
+ ],
61
+ "name": "lock",
62
+ "outputs": [],
63
+ "stateMutability": "nonpayable",
64
+ "type": "function"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "components": [
70
+ {
71
+ "internalType": "string",
72
+ "name": "to",
73
+ "type": "string"
74
+ },
75
+ {
76
+ "internalType": "uint256",
77
+ "name": "amount",
78
+ "type": "uint256"
79
+ },
80
+ {
81
+ "internalType": "bytes",
82
+ "name": "data",
83
+ "type": "bytes"
84
+ }
85
+ ],
86
+ "internalType": "struct IZetoFungible.TransferParam[]",
87
+ "name": "mints",
88
+ "type": "tuple[]"
89
+ }
90
+ ],
91
+ "name": "mint",
92
+ "outputs": [],
93
+ "stateMutability": "nonpayable",
94
+ "type": "function"
95
+ },
96
+ {
97
+ "inputs": [
98
+ {
99
+ "internalType": "address",
100
+ "name": "erc20",
101
+ "type": "address"
102
+ }
103
+ ],
104
+ "name": "setERC20",
105
+ "outputs": [],
106
+ "stateMutability": "nonpayable",
107
+ "type": "function"
108
+ },
109
+ {
110
+ "inputs": [
111
+ {
112
+ "components": [
113
+ {
114
+ "internalType": "string",
115
+ "name": "to",
116
+ "type": "string"
117
+ },
118
+ {
119
+ "internalType": "uint256",
120
+ "name": "amount",
121
+ "type": "uint256"
122
+ },
123
+ {
124
+ "internalType": "bytes",
125
+ "name": "data",
126
+ "type": "bytes"
127
+ }
128
+ ],
129
+ "internalType": "struct IZetoFungible.TransferParam[]",
130
+ "name": "transfers",
131
+ "type": "tuple[]"
132
+ }
133
+ ],
134
+ "name": "transfer",
135
+ "outputs": [],
136
+ "stateMutability": "nonpayable",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "uint256[]",
143
+ "name": "lockedInputs",
144
+ "type": "uint256[]"
145
+ },
146
+ {
147
+ "internalType": "string",
148
+ "name": "delegate",
149
+ "type": "string"
150
+ },
151
+ {
152
+ "components": [
153
+ {
154
+ "internalType": "string",
155
+ "name": "to",
156
+ "type": "string"
157
+ },
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "amount",
161
+ "type": "uint256"
162
+ },
163
+ {
164
+ "internalType": "bytes",
165
+ "name": "data",
166
+ "type": "bytes"
167
+ }
168
+ ],
169
+ "internalType": "struct IZetoFungible.TransferParam[]",
170
+ "name": "transfers",
171
+ "type": "tuple[]"
172
+ }
173
+ ],
174
+ "name": "transferLocked",
175
+ "outputs": [],
176
+ "stateMutability": "nonpayable",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [
181
+ {
182
+ "internalType": "uint256",
183
+ "name": "amount",
184
+ "type": "uint256"
185
+ }
186
+ ],
187
+ "name": "withdraw",
188
+ "outputs": [],
189
+ "stateMutability": "nonpayable",
190
+ "type": "function"
191
+ }
192
+ ],
193
+ "bytecode": "0x",
194
+ "deployedBytecode": "0x",
195
+ "linkReferences": {},
196
+ "deployedLinkReferences": {}
197
+ }