@kassealhq/sdk 0.3.0 → 1.0.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +118 -2
  3. package/SECURITY.md +3 -2
  4. package/STABILITY.md +25 -12
  5. package/dist/artifacts/contracts/lock/v1/artifacts/build-report.txt +4 -0
  6. package/dist/artifacts/contracts/lock/v1/artifacts/factory.artifact.json +267 -0
  7. package/dist/artifacts/contracts/lock/v1/artifacts/factory.ctor.json +80 -0
  8. package/dist/artifacts/contracts/lock/v1/artifacts/lock.artifact.json +258 -0
  9. package/dist/artifacts/contracts/lock/v1/artifacts/lock.ctor.json +112 -0
  10. package/dist/artifacts/contracts/lock/v1/artifacts/manifest.json +70 -0
  11. package/dist/artifacts/manifest.json +18 -0
  12. package/dist/chunks/chunk-H7LB2HPQ.js +4 -0
  13. package/dist/chunks/chunk-WJFZETEQ.js +1 -0
  14. package/dist/chunks/token-lock-v1-763GG7M6.js +1 -0
  15. package/dist/index.d.ts +458 -12
  16. package/dist/index.js +1 -1
  17. package/dist/node.d.ts +1 -1
  18. package/dist/node.js +1 -1
  19. package/dist/web-lite-mainnet.d.ts +1 -1
  20. package/dist/web-lite-mainnet.js +1 -1
  21. package/dist/web-lite-testnet-10.d.ts +1 -1
  22. package/dist/web-lite-testnet-10.js +1 -1
  23. package/dist/web-mainnet.d.ts +1 -1
  24. package/dist/web-mainnet.js +1 -1
  25. package/dist/web-testnet-10.d.ts +1 -1
  26. package/dist/web-testnet-10.js +1 -1
  27. package/dist/web.d.ts +1 -1
  28. package/dist/web.js +1 -1
  29. package/docs/api.md +52 -0
  30. package/docs/contract-artifacts.md +32 -3
  31. package/docs/errors.md +8 -0
  32. package/docs/explorers.md +27 -1
  33. package/docs/partner-tag.md +134 -0
  34. package/docs/wallets.md +5 -0
  35. package/examples/README.md +1 -0
  36. package/examples/partner-tag.ts +58 -0
  37. package/package.json +2 -1
  38. package/dist/chunks/chunk-FYCRPHEE.js +0 -4
  39. package/dist/chunks/chunk-JZJ7MFR5.js +0 -1
@@ -0,0 +1,258 @@
1
+ {
2
+ "schema_version": 1,
3
+ "compiler_version": "0.1.0",
4
+ "structs": {
5
+ "KCC20Full": {
6
+ "fields": [
7
+ {
8
+ "name": "ctx",
9
+ "type": {
10
+ "kind": "fixed_bytes",
11
+ "len": 32
12
+ }
13
+ },
14
+ {
15
+ "name": "amount",
16
+ "type": {
17
+ "kind": "int"
18
+ }
19
+ },
20
+ {
21
+ "name": "owner",
22
+ "type": {
23
+ "kind": "fixed_bytes",
24
+ "len": 32
25
+ }
26
+ },
27
+ {
28
+ "name": "scheme",
29
+ "type": {
30
+ "kind": "byte"
31
+ }
32
+ },
33
+ {
34
+ "name": "borrow",
35
+ "type": {
36
+ "kind": "byte"
37
+ }
38
+ },
39
+ {
40
+ "name": "guard",
41
+ "type": {
42
+ "kind": "fixed_bytes",
43
+ "len": 32
44
+ }
45
+ },
46
+ {
47
+ "name": "ext",
48
+ "type": {
49
+ "kind": "fixed_bytes",
50
+ "len": 32
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ "contracts": {
57
+ "Lock": {
58
+ "source_path": "sil/Lock.sil",
59
+ "runtime_state": {
60
+ "source": "State",
61
+ "fields": [
62
+ {
63
+ "name": "tokenCovId",
64
+ "type": {
65
+ "kind": "fixed_bytes",
66
+ "len": 32
67
+ }
68
+ },
69
+ {
70
+ "name": "beneficiary",
71
+ "type": {
72
+ "kind": "fixed_bytes",
73
+ "len": 32
74
+ }
75
+ },
76
+ {
77
+ "name": "scheme",
78
+ "type": {
79
+ "kind": "byte"
80
+ }
81
+ },
82
+ {
83
+ "name": "total",
84
+ "type": {
85
+ "kind": "int"
86
+ }
87
+ },
88
+ {
89
+ "name": "claimed",
90
+ "type": {
91
+ "kind": "int"
92
+ }
93
+ },
94
+ {
95
+ "name": "start",
96
+ "type": {
97
+ "kind": "int"
98
+ }
99
+ },
100
+ {
101
+ "name": "cliff",
102
+ "type": {
103
+ "kind": "int"
104
+ }
105
+ },
106
+ {
107
+ "name": "period",
108
+ "type": {
109
+ "kind": "int"
110
+ }
111
+ },
112
+ {
113
+ "name": "tranches",
114
+ "type": {
115
+ "kind": "int"
116
+ }
117
+ },
118
+ {
119
+ "name": "version",
120
+ "type": {
121
+ "kind": "int"
122
+ }
123
+ },
124
+ {
125
+ "name": "endCap",
126
+ "type": {
127
+ "kind": "int"
128
+ }
129
+ }
130
+ ]
131
+ },
132
+ "entries": {
133
+ "__covenant_entrypoint_auth_claim": {
134
+ "dispatch_tag": "3ac6d18b",
135
+ "params": []
136
+ },
137
+ "__covenant_entrypoint_auth_extend": {
138
+ "dispatch_tag": "de31073a",
139
+ "params": [
140
+ {
141
+ "name": "newStart",
142
+ "type": {
143
+ "kind": "int"
144
+ }
145
+ },
146
+ {
147
+ "name": "newCliff",
148
+ "type": {
149
+ "kind": "int"
150
+ }
151
+ },
152
+ {
153
+ "name": "newPeriod",
154
+ "type": {
155
+ "kind": "int"
156
+ }
157
+ },
158
+ {
159
+ "name": "witness",
160
+ "type": {
161
+ "kind": "bytes"
162
+ }
163
+ }
164
+ ]
165
+ }
166
+ },
167
+ "cov_decl_to_abi": {
168
+ "claim": "__covenant_entrypoint_auth_claim",
169
+ "extend": "__covenant_entrypoint_auth_extend"
170
+ },
171
+ "compiled": {
172
+ "bytecode": [
173
+ 107, 32, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
174
+ 34, 34, 34, 1, 0, 8, 64, 66, 15, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 80, 92, 24, 163, 1, 0, 0, 8, 0, 80, 92, 24, 163, 1, 0, 0, 8, 0, 92, 38, 5, 0, 0, 0, 0, 8, 10, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0,
175
+ 0, 0, 0, 0, 8, 0, 183, 193, 8, 200, 1, 0, 0, 108, 118, 4, 58, 198, 209, 139, 135, 99, 117, 185, 203, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90,
176
+ 121, 90, 121, 90, 121, 185, 207, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177
+ 0, 0, 135, 145, 105, 91, 121, 120, 135, 145, 105, 89, 121, 1, 0, 135, 90, 121, 1, 3, 135, 155, 105, 83, 121, 81, 162, 105, 83, 121, 1, 100, 161, 105, 84, 121, 0, 160, 105, 86, 121, 5, 0, 136, 82, 106, 116, 162, 105, 85, 121, 87, 121, 162, 105, 87, 121, 0, 162, 105, 87, 121, 84, 121,
178
+ 159, 105, 88, 121, 84, 121, 162, 105, 88, 121, 8, 0, 0, 100, 167, 179, 182, 224, 13, 161, 105, 82, 121, 81, 156, 105, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 85, 121, 83, 121, 85, 121, 149, 147, 85, 121, 120, 160, 99, 85, 121, 119,
179
+ 104, 118, 118, 95, 121, 161, 105, 1, 25, 121, 208, 81, 156, 105, 181, 118, 118, 5, 0, 136, 82, 106, 116, 162, 105, 176, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 91, 121, 0, 120, 87,
180
+ 121, 162, 99, 120, 88, 121, 148, 86, 121, 150, 119, 118, 85, 121, 160, 99, 84, 121, 119, 104, 104, 118, 118, 118, 1, 49, 121, 160, 105, 118, 1, 45, 121, 156, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121, 1, 53, 121,
181
+ 1, 53, 121, 1, 53, 121, 91, 121, 118, 208, 81, 156, 105, 118, 0, 209, 118, 186, 185, 186, 135, 105, 118, 191, 120, 82, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 2, 145, 0, 147, 2, 45, 15, 147, 147, 188, 170, 2,
182
+ 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 136, 32, 151, 3, 17, 46, 230, 227, 85, 81, 7, 205, 22, 136, 88, 153, 43, 119, 211, 183, 79, 101, 82, 5, 178, 180, 99, 177, 249, 236, 46, 199, 60, 247, 81, 88, 205, 82, 121, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147,
183
+ 148, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 126, 2, 45, 15, 88, 205, 83, 121, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2,
184
+ 45, 15, 147, 188, 126, 126, 217, 136, 118, 120, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 81, 147, 147, 82, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 81, 147, 147, 1, 32, 147, 188, 120, 82, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 34, 147,
185
+ 147, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 34, 147, 147, 88, 147, 188, 82, 121, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 43, 147, 147, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 43, 147, 147, 1, 32, 147, 188,
186
+ 83, 121, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 76, 147, 147, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 76, 147, 147, 81, 147, 188, 84, 121, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 78, 147, 147, 86, 121, 201,
187
+ 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 78, 147, 147, 81, 147, 188, 85, 121, 86, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 80, 147, 147, 87, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 80, 147, 147, 1, 32, 147, 188, 86, 121, 87, 121,
188
+ 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 113, 147, 147, 88, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 113, 147, 147, 1, 32, 147, 188, 84, 121, 90, 121, 135, 105, 83, 121, 1, 4, 135, 105, 82, 121, 1, 0, 135, 105, 120, 32, 0, 0, 0, 0, 0, 0,
189
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 105, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 27, 121,
190
+ 88, 121, 84, 121, 150, 89, 121, 85, 121, 151, 82, 121, 82, 121, 149, 83, 121, 82, 121, 149, 87, 121, 150, 147, 1, 20, 121, 1, 33, 121, 82, 121, 148, 156, 105, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 97, 121, 1, 98,
191
+ 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 98, 121, 1, 105, 121, 88, 121, 84, 121, 150, 89, 121, 85, 121, 151, 82, 121, 82, 121, 149, 83, 121, 82, 121, 149, 87, 121, 150, 147, 118, 1, 114, 121, 1, 114,
192
+ 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 114, 121, 1, 73, 121, 88, 121, 84, 121, 150, 89, 121, 85, 121, 151, 82, 121, 82, 121, 149, 83, 121, 82, 121, 149, 87, 121, 150, 147, 118, 81, 82, 81, 1, 80, 121, 99, 0,
193
+ 83, 122, 117, 81, 83, 122, 117, 0, 83, 122, 117, 104, 1, 35, 121, 210, 82, 121, 156, 105, 1, 122, 121, 210, 120, 156, 105, 1, 35, 121, 83, 121, 211, 1, 43, 121, 85, 121, 1, 22, 121, 148, 2, 135, 0, 121, 2, 135, 0, 121, 1, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
194
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 43, 121, 0, 1, 52, 121, 1, 53, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 1, 54, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 119, 0, 1, 53, 121,
195
+ 1, 54, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 1, 55, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2, 45, 15, 147, 188, 119, 32, 151, 3, 17, 46, 230, 227, 85, 81, 7, 205, 22, 136, 88, 153, 43, 119, 211,
196
+ 183, 79, 101, 82, 5, 178, 180, 99, 177, 249, 236, 46, 199, 60, 247, 82, 121, 130, 124, 117, 81, 150, 88, 205, 83, 121, 126, 82, 121, 130, 124, 117, 81, 150, 88, 205, 83, 121, 126, 126, 217, 136, 1, 32, 89, 121, 126, 1, 8, 89, 121, 88, 205, 126, 1, 32, 89, 121, 126, 1, 1, 89, 121, 126,
197
+ 1, 1, 89, 121, 126, 1, 32, 89, 121, 126, 1, 32, 89, 121, 126, 126, 126, 126, 126, 126, 126, 82, 121, 124, 126, 120, 126, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 90, 121, 195, 136, 89, 121, 194, 4, 0, 225, 245, 5, 156, 105, 0, 0, 0, 0, 0, 0, 0, 0,
198
+ 0, 0, 0, 185, 190, 1, 102, 121, 99, 0, 2, 154, 0, 121, 1, 0, 135, 99, 3, 0, 0, 32, 2, 156, 0, 121, 126, 1, 172, 126, 119, 103, 2, 155, 0, 121, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 119, 104, 118, 1, 23, 121, 81, 147, 118, 195, 82, 121, 135, 105,
199
+ 118, 213, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 105, 118, 194, 84, 121, 1, 70, 121, 190, 147, 4, 0, 225, 245, 5, 148, 4, 0, 45, 49, 1, 148, 162, 105, 117, 117, 117, 103,
200
+ 1, 57, 121, 0, 211, 1, 65, 121, 1, 65, 121, 1, 65, 121, 1, 65, 121, 1, 65, 121, 1, 65, 121, 1, 65, 121, 2, 160, 0, 121, 1, 34, 121, 148, 2, 153, 0, 121, 88, 121, 82, 121, 82, 121, 1, 4, 1, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
201
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 121, 0, 1, 83, 121, 1, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 1, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 119, 0, 1, 84, 121, 1, 85, 121, 201, 81,
202
+ 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 1, 86, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2, 45, 15, 147, 188, 119, 32, 151, 3, 17, 46, 230, 227, 85, 81, 7, 205, 22, 136, 88, 153, 43, 119, 211, 183, 79, 101, 82, 5,
203
+ 178, 180, 99, 177, 249, 236, 46, 199, 60, 247, 82, 121, 130, 124, 117, 81, 150, 88, 205, 83, 121, 126, 82, 121, 130, 124, 117, 81, 150, 88, 205, 83, 121, 126, 126, 217, 136, 1, 32, 89, 121, 126, 1, 8, 89, 121, 88, 205, 126, 1, 32, 89, 121, 126, 1, 1, 89, 121, 126, 1, 1, 89, 121, 126,
204
+ 1, 32, 89, 121, 126, 1, 32, 89, 121, 126, 126, 126, 126, 126, 126, 126, 82, 121, 124, 126, 120, 126, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 1, 19, 121, 195, 136, 1, 18, 121, 194, 1, 85, 121, 190, 162, 105, 185, 0, 204, 194, 1, 20, 121, 4, 0, 225, 245, 5,
205
+ 148, 4, 0, 45, 49, 1, 148, 162, 105, 1, 30, 121, 2, 175, 0, 121, 126, 1, 30, 121, 2, 175, 0, 121, 126, 1, 30, 121, 2, 175, 0, 121, 126, 1, 30, 121, 2, 175, 0, 121, 88, 205, 126, 1, 30, 121, 1, 127, 121, 88, 205, 126, 1, 30, 121, 2, 175, 0, 121, 88, 205, 126, 1, 30,
206
+ 121, 2, 175, 0, 121, 88, 205, 126, 1, 30, 121, 2, 175, 0, 121, 88, 205, 126, 1, 30, 121, 2, 175, 0, 121, 88, 205, 126, 1, 30, 121, 2, 175, 0, 121, 88, 205, 126, 1, 30, 121, 2, 175, 0, 121, 88, 205, 126, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42,
207
+ 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 90, 121, 1, 42, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122,
208
+ 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117,
209
+ 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 117, 91, 122, 107, 108, 104, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 2, 178, 0, 121, 81, 161, 105, 2, 178, 0, 121, 91, 121, 130, 124, 117, 1, 32, 150, 156, 105, 0, 2, 179, 0,
210
+ 121, 120, 120, 83, 121, 148, 81, 161, 105, 118, 82, 121, 159, 99, 118, 185, 120, 204, 95, 121, 82, 121, 1, 32, 149, 118, 1, 32, 147, 127, 95, 121, 83, 121, 1, 32, 149, 118, 1, 32, 147, 127, 95, 121, 84, 121, 81, 149, 118, 81, 147, 127, 95, 121, 85, 121, 88, 149, 118, 88, 147, 127, 95, 121,
211
+ 86, 121, 88, 149, 118, 88, 147, 127, 95, 121, 87, 121, 88, 149, 118, 88, 147, 127, 95, 121, 88, 121, 88, 149, 118, 88, 147, 127, 95, 121, 89, 121, 88, 149, 118, 88, 147, 127, 95, 121, 90, 121, 88, 149, 118, 88, 147, 127, 95, 121, 91, 121, 88, 149, 118, 88, 147, 127, 95, 121, 92, 121, 88, 149,
212
+ 118, 88, 147, 127, 1, 32, 91, 121, 126, 1, 32, 91, 121, 126, 1, 1, 91, 121, 126, 1, 8, 91, 121, 88, 205, 126, 1, 8, 91, 121, 88, 205, 126, 1, 8, 91, 121, 88, 205, 126, 1, 8, 91, 121, 88, 205, 126, 1, 8, 91, 121, 88, 205, 126, 1, 8, 91, 121, 88, 205, 126, 1, 8, 91,
213
+ 121, 88, 205, 126, 1, 8, 91, 121, 88, 205, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 185, 118, 201, 2, 219, 18, 148, 118, 81, 147, 188, 124, 126, 185, 118, 201, 118, 2, 78, 146, 147, 124, 188, 126, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 92, 121, 195, 136,
214
+ 92, 121, 81, 147, 94, 122, 117, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 104, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
215
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
216
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
217
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 81, 103, 118, 4, 222, 49, 7, 58, 135, 99, 117, 94, 121, 130, 89, 159, 105, 117, 93, 121, 130, 89, 159, 105, 117, 92, 121, 130, 89, 159, 105, 117, 91, 121, 130, 81, 151, 0, 157, 117, 185, 203,
218
+ 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 1, 37, 121, 185, 207, 95, 121, 95, 121, 95, 121,
219
+ 95, 121, 95, 121, 95, 121, 95, 121, 95, 121, 95, 121, 95, 121, 95, 121, 91, 121, 91, 121, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 145, 105, 91, 121, 120, 135, 145, 105, 89, 121,
220
+ 1, 0, 135, 90, 121, 1, 3, 135, 155, 105, 83, 121, 81, 162, 105, 83, 121, 1, 100, 161, 105, 84, 121, 0, 160, 105, 86, 121, 5, 0, 136, 82, 106, 116, 162, 105, 85, 121, 87, 121, 162, 105, 87, 121, 0, 162, 105, 87, 121, 84, 121, 159, 105, 88, 121, 84, 121, 162, 105, 88, 121, 8, 0, 0,
221
+ 100, 167, 179, 182, 224, 13, 161, 105, 82, 121, 81, 156, 105, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 85, 121, 83, 121, 85, 121, 149, 147, 85, 121, 120, 160, 99, 85, 121, 119, 104, 118, 118, 95, 121, 161, 105, 1, 25, 121, 208, 81, 156,
222
+ 105, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 40, 121, 1, 36, 121, 91, 121, 118, 208, 81, 156, 105, 118, 0, 209, 118, 186, 185, 186, 135, 105, 118, 191, 120, 82, 121, 201, 81, 2, 145, 0, 147,
223
+ 2, 45, 15, 147, 148, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 2, 145, 0, 147, 2, 45, 15, 147, 147, 188, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 136, 32, 151, 3, 17, 46, 230, 227, 85, 81, 7, 205, 22, 136, 88, 153, 43, 119, 211, 183,
224
+ 79, 101, 82, 5, 178, 180, 99, 177, 249, 236, 46, 199, 60, 247, 81, 88, 205, 82, 121, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 126, 2, 45, 15, 88, 205, 83, 121, 84, 121, 201, 81, 2, 145, 0, 147,
225
+ 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2, 45, 15, 147, 188, 126, 126, 217, 136, 118, 120, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 81, 147, 147, 82, 121, 201, 81, 2, 145, 0, 147,
226
+ 2, 45, 15, 147, 148, 81, 81, 147, 147, 1, 32, 147, 188, 120, 82, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 34, 147, 147, 83, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 34, 147, 147, 88, 147, 188, 82, 121, 83, 121, 201, 81, 2, 145, 0, 147, 2,
227
+ 45, 15, 147, 148, 81, 1, 43, 147, 147, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 43, 147, 147, 1, 32, 147, 188, 83, 121, 84, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 76, 147, 147, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148,
228
+ 81, 1, 76, 147, 147, 81, 147, 188, 84, 121, 85, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 78, 147, 147, 86, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 78, 147, 147, 81, 147, 188, 85, 121, 86, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148,
229
+ 81, 1, 80, 147, 147, 87, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 80, 147, 147, 1, 32, 147, 188, 86, 121, 87, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 113, 147, 147, 88, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 1, 113, 147,
230
+ 147, 1, 32, 147, 188, 84, 121, 90, 121, 135, 105, 83, 121, 1, 4, 135, 105, 82, 121, 1, 0, 135, 105, 120, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 105, 1, 20, 121, 1, 20,
231
+ 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 20, 121, 1, 27, 121, 88, 121, 84, 121, 150, 89, 121, 85, 121, 151, 82, 121, 82, 121, 149, 83, 121, 82, 121, 149, 87, 121, 150, 147, 1, 20, 121, 1, 33, 121, 82, 121, 148,
232
+ 156, 105, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 22, 121, 1, 82, 121, 1, 0, 135, 99, 1, 70, 121, 130, 124, 117, 81, 150, 1, 65, 156, 105, 1, 70, 121, 1, 64, 81, 149, 118, 81, 147, 127, 1, 0, 126, 81, 156, 105, 1, 70,
233
+ 121, 1, 84, 121, 172, 105, 103, 1, 70, 121, 130, 124, 117, 81, 150, 81, 156, 105, 1, 70, 121, 0, 81, 149, 118, 81, 147, 127, 1, 0, 126, 118, 185, 158, 105, 118, 89, 121, 158, 105, 118, 191, 1, 85, 121, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 135, 105, 117, 104, 1,
234
+ 73, 121, 1, 80, 121, 162, 105, 1, 72, 121, 1, 79, 121, 162, 105, 1, 71, 121, 1, 78, 121, 162, 105, 1, 84, 121, 1, 84, 121, 1, 84, 121, 1, 84, 121, 1, 84, 121, 1, 78, 121, 1, 78, 121, 1, 78, 121, 1, 84, 121, 1, 84, 121, 1, 84, 121, 90, 121, 90, 121, 90, 121, 90, 121,
235
+ 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 1, 91, 121, 91, 121, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 145, 105, 91, 121, 120, 135, 145, 105, 89, 121, 1,
236
+ 0, 135, 90, 121, 1, 3, 135, 155, 105, 83, 121, 81, 162, 105, 83, 121, 1, 100, 161, 105, 84, 121, 0, 160, 105, 86, 121, 5, 0, 136, 82, 106, 116, 162, 105, 85, 121, 87, 121, 162, 105, 87, 121, 0, 162, 105, 87, 121, 84, 121, 159, 105, 88, 121, 84, 121, 162, 105, 88, 121, 8, 0, 0, 100,
237
+ 167, 179, 182, 224, 13, 161, 105, 82, 121, 81, 156, 105, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 91, 121, 85, 121, 83, 121, 85, 121, 149, 147, 85, 121, 120, 160, 99, 85, 121, 119, 104, 118, 118, 95, 121, 161, 105, 1, 120, 121, 118, 210, 81, 156,
238
+ 105, 118, 0, 211, 1, 44, 121, 1, 44, 121, 1, 44, 121, 1, 44, 121, 1, 44, 121, 1, 44, 121, 1, 44, 121, 1, 50, 121, 1, 115, 121, 88, 121, 82, 121, 82, 121, 1, 4, 1, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
239
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 121, 0, 1, 62, 121, 1, 63, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 1, 64, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 119, 0, 1, 63, 121, 1, 64, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15,
240
+ 147, 148, 81, 147, 2, 145, 0, 147, 1, 65, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2, 45, 15, 147, 188, 119, 32, 151, 3, 17, 46, 230, 227, 85, 81, 7, 205, 22, 136, 88, 153, 43, 119, 211, 183, 79, 101, 82, 5, 178, 180, 99, 177, 249, 236, 46,
241
+ 199, 60, 247, 82, 121, 130, 124, 117, 81, 150, 88, 205, 83, 121, 126, 82, 121, 130, 124, 117, 81, 150, 88, 205, 83, 121, 126, 126, 217, 136, 1, 32, 89, 121, 126, 1, 8, 89, 121, 88, 205, 126, 1, 32, 89, 121, 126, 1, 1, 89, 121, 126, 1, 1, 89, 121, 126, 1, 32, 89, 121, 126, 1, 32,
242
+ 89, 121, 126, 126, 126, 126, 126, 126, 126, 82, 121, 124, 126, 120, 126, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 1, 19, 121, 195, 136, 1, 18, 121, 194, 1, 64, 121, 190, 162, 105, 1, 125, 121, 210, 81, 156, 105, 185, 0, 204, 194, 185, 190, 156, 105, 1, 55, 121, 1,
243
+ 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 1, 55, 121, 2, 163, 0, 121, 81, 156, 105, 185, 0, 204, 1, 32, 92, 121, 126, 1, 32, 92, 121, 126, 1, 1, 92, 121, 126, 1, 8, 92, 121, 88, 205, 126, 1, 8, 92,
244
+ 121, 88, 205, 126, 1, 8, 92, 121, 88, 205, 126, 1, 8, 92, 121, 88, 205, 126, 1, 8, 92, 121, 88, 205, 126, 1, 8, 92, 121, 88, 205, 126, 1, 8, 92, 121, 88, 205, 126, 1, 8, 92, 121, 88, 205, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 185, 118, 201, 2, 219, 18, 148, 118,
245
+ 81, 147, 188, 124, 126, 185, 118, 201, 118, 2, 78, 146, 147, 124, 188, 126, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 120, 195, 136, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
246
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
247
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
248
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 81, 103, 106, 104, 104
249
+ ],
250
+ "template_hash": [159, 78, 178, 41, 207, 234, 51, 79, 175, 209, 92, 5, 144, 28, 226, 10, 141, 176, 165, 155, 160, 147, 44, 188, 122, 58, 29, 224, 121, 167, 10, 201],
251
+ "state_span": {
252
+ "offset": 1,
253
+ "len": 140
254
+ }
255
+ }
256
+ }
257
+ }
258
+ }
@@ -0,0 +1,112 @@
1
+ [
2
+ {
3
+ "kind": "bytes",
4
+ "value": [
5
+ 17,
6
+ 17,
7
+ 17,
8
+ 17,
9
+ 17,
10
+ 17,
11
+ 17,
12
+ 17,
13
+ 17,
14
+ 17,
15
+ 17,
16
+ 17,
17
+ 17,
18
+ 17,
19
+ 17,
20
+ 17,
21
+ 17,
22
+ 17,
23
+ 17,
24
+ 17,
25
+ 17,
26
+ 17,
27
+ 17,
28
+ 17,
29
+ 17,
30
+ 17,
31
+ 17,
32
+ 17,
33
+ 17,
34
+ 17,
35
+ 17,
36
+ 17
37
+ ]
38
+ },
39
+ {
40
+ "kind": "bytes",
41
+ "value": [
42
+ 34,
43
+ 34,
44
+ 34,
45
+ 34,
46
+ 34,
47
+ 34,
48
+ 34,
49
+ 34,
50
+ 34,
51
+ 34,
52
+ 34,
53
+ 34,
54
+ 34,
55
+ 34,
56
+ 34,
57
+ 34,
58
+ 34,
59
+ 34,
60
+ 34,
61
+ 34,
62
+ 34,
63
+ 34,
64
+ 34,
65
+ 34,
66
+ 34,
67
+ 34,
68
+ 34,
69
+ 34,
70
+ 34,
71
+ 34,
72
+ 34,
73
+ 34
74
+ ]
75
+ },
76
+ {
77
+ "kind": "byte",
78
+ "value": 0
79
+ },
80
+ {
81
+ "kind": "int",
82
+ "value": 1000000
83
+ },
84
+ {
85
+ "kind": "int",
86
+ "value": 0
87
+ },
88
+ {
89
+ "kind": "int",
90
+ "value": 1800000000000
91
+ },
92
+ {
93
+ "kind": "int",
94
+ "value": 1800000000000
95
+ },
96
+ {
97
+ "kind": "int",
98
+ "value": 86400000
99
+ },
100
+ {
101
+ "kind": "int",
102
+ "value": 10
103
+ },
104
+ {
105
+ "kind": "int",
106
+ "value": 1
107
+ },
108
+ {
109
+ "kind": "int",
110
+ "value": 1958652000000
111
+ }
112
+ ]
@@ -0,0 +1,70 @@
1
+ {
2
+ "set": "kasseal-token-lock",
3
+ "version": "1",
4
+ "compiler": {
5
+ "name": "silverc",
6
+ "tag": "v1.0.0",
7
+ "commit": "3ed973335b59269293564805cc2c58a14595ec03"
8
+ },
9
+ "inputs": {
10
+ "sources": {
11
+ "lock": {
12
+ "file": "lock/v1/lock.sil",
13
+ "sha256": "ba974c8f960dda12953e5e58555a9e02aecbaaf2847f88fc3ab52013caba4dbb"
14
+ },
15
+ "factory": {
16
+ "file": "lock/v1/factory.sil",
17
+ "sha256": "47cb243b21a4e5b02ee39e33a6f7e1ade93368d709a62fc433acfe7cd7a39b84"
18
+ }
19
+ },
20
+ "tokenTemplateHash": "9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7"
21
+ },
22
+ "constants": {
23
+ "LOCK_TIME_THRESHOLD": 500000000000,
24
+ "TRANCHES_MAX": 100,
25
+ "TOTAL_MAX": 1000000000000000000,
26
+ "PAYOUT_CELL_KAS": 100000000,
27
+ "FEE_CAP": 20000000,
28
+ "LOCK_VERSION": 1,
29
+ "FIVE_YEARS_MS": 157788000000,
30
+ "TOKEN_PREFIX_LEN": 1,
31
+ "TOKEN_SUFFIX_LEN": 3885,
32
+ "FINAL_KAS_MIN": 100000000,
33
+ "T_CELL_KAS_MIN": 100000000,
34
+ "LOCK_OUT": 0,
35
+ "MAX_CREATE_OUTPUTS": 6
36
+ },
37
+ "lock": {
38
+ "templateHash": "9f4eb229cfea334fafd15c05901ce20a8db0a59ba0932cbc7a3a1de079a70ac9",
39
+ "bytecodeBytes": 4827,
40
+ "stateSpan": {
41
+ "offset": 1,
42
+ "length": 140
43
+ },
44
+ "prefix": "6b",
45
+ "suffix": {
46
+ "bytes": 4686,
47
+ "sha256": "1fbcabcf9d80da17c30ea85bde479ecd24ee6f87644ca641e99149c0a7188c25"
48
+ },
49
+ "entries": {
50
+ "claim": "__covenant_entrypoint_auth_claim",
51
+ "extend": "__covenant_entrypoint_auth_extend"
52
+ }
53
+ },
54
+ "factory": {
55
+ "templateHash": "481065e01ee2f15fe06e7ce2b865857b073e18a6298e30a22551426c4c328f6b",
56
+ "bytecodeBytes": 2011,
57
+ "stateSpan": {
58
+ "offset": 1,
59
+ "length": 37
60
+ },
61
+ "lockH": "9f4eb229cfea334fafd15c05901ce20a8db0a59ba0932cbc7a3a1de079a70ac9"
62
+ },
63
+ "sha256": {
64
+ "artifacts/build-report.txt": "84542903ff726d3ccf68c1823e0bc1664ebae6722f0303953e2d7e0a52603565",
65
+ "artifacts/factory.artifact.json": "65e4084cf4d9660001d80b4f3247142bef6804b610b3c61831b6f2674bdfdd51",
66
+ "artifacts/factory.ctor.json": "b95a39bd35930c626d2ada15a4e925b3df29f65904d9cd3e71faa8844b55ece8",
67
+ "artifacts/lock.artifact.json": "1f0de542a17abd2d08abebd369c1c41427518f7f88c415317e16a187f0e416c1",
68
+ "artifacts/lock.ctor.json": "e51a0c58e004505d0bb2ac02a55209916d4e80a51f686dd4576dcb8d30b7ddfe"
69
+ }
70
+ }
@@ -303,6 +303,18 @@
303
303
  "templateHash": "9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7",
304
304
  "source": "argent-lang/kcc20-reference@c8a0871 fixtures/public-mint/artifact.json"
305
305
  },
306
+ "lock": {
307
+ "path": "contracts/lock/v1/artifacts",
308
+ "set": "kasseal-token-lock",
309
+ "version": "1",
310
+ "networks": [
311
+ "mainnet",
312
+ "testnet-10"
313
+ ],
314
+ "lockTemplateHash": "9f4eb229cfea334fafd15c05901ce20a8db0a59ba0932cbc7a3a1de079a70ac9",
315
+ "factoryTemplateHash": "481065e01ee2f15fe06e7ce2b865857b073e18a6298e30a22551426c4c328f6b",
316
+ "compiler": "silverc v1.0.0 3ed973335b59269293564805cc2c58a14595ec03"
317
+ },
306
318
  "files": {
307
319
  "codec/fixtures/argent-kcc20-reference-c8a0871.json": "462a937240ff3dc6f297a06c2eeb48c5150e4a2a4995eedc71c724f3a34eedee",
308
320
  "contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k103.json": "149a1894b318fb2785d96afc8fd5bd480facdd1c62759097143e8eb2ce0f24f3",
@@ -833,6 +845,12 @@
833
845
  "contracts/curve/v1/artifacts/v1-kasseal-mainnet-3/curve.standard-lot10k-k9343.artifact.json": "1f24368d3179b7ffb7a402f284c3b06bab943c61ea4ac38483d020ad465af33b",
834
846
  "contracts/curve/v1/artifacts/v1-kasseal-mainnet-3/curve.standard-lot10k-k996.artifact.json": "6683b34230c5260235d9ee5e95a7c4f96fd80f49d35bce53744379933cfb68fc",
835
847
  "contracts/curve/v1/artifacts/v1-kasseal-mainnet-3/curve.standard.artifact.json": "96e18e94daedd3da0afe5f215c227f3eb4e341d539ac4cb4df9c5963135b1ce4",
848
+ "contracts/lock/v1/artifacts/build-report.txt": "84542903ff726d3ccf68c1823e0bc1664ebae6722f0303953e2d7e0a52603565",
849
+ "contracts/lock/v1/artifacts/factory.artifact.json": "65e4084cf4d9660001d80b4f3247142bef6804b610b3c61831b6f2674bdfdd51",
850
+ "contracts/lock/v1/artifacts/factory.ctor.json": "b95a39bd35930c626d2ada15a4e925b3df29f65904d9cd3e71faa8844b55ece8",
851
+ "contracts/lock/v1/artifacts/lock.artifact.json": "1f0de542a17abd2d08abebd369c1c41427518f7f88c415317e16a187f0e416c1",
852
+ "contracts/lock/v1/artifacts/lock.ctor.json": "e51a0c58e004505d0bb2ac02a55209916d4e80a51f686dd4576dcb8d30b7ddfe",
853
+ "contracts/lock/v1/artifacts/manifest.json": "7836ef38a4b681b25f300b21e58701179ef8afc54603e859a6841340efee583d",
836
854
  "contracts/pool/v1/artifacts/v1-kasseal-mainnet-2-tn10/pool.artifact.json": "11bf7c41d2fb90beb07d92a0d8ce7de32accf676e182fa6882b84c123f3aad3c",
837
855
  "contracts/pool/v1/artifacts/v1-kasseal-mainnet-2-tn10/pool.ctor.json": "0e88b336995fcd2c4a84b882239c0a4071dd921e33bd59baf0b0d2a3bf1c3f0b",
838
856
  "contracts/pool/v1/artifacts/v1-kasseal-mainnet-2/pool.artifact.json": "7ae79b8a9a36e6b7469dc7fe1d8bd3cc227abe94632e3fe1e36cfcebcb1cccb2",
@@ -0,0 +1,4 @@
1
+ import{$h as U,Co as D,Fe as $,Lo as ie,Mo as ce,No as b,Oo as C,Ph as ne,Po as v,Qe as J,Qo as B,Se as R,So as oe,Ue as Y,Ve as Q,Yh as x,ae as H,ag as j,bi as te,de as G,ee as X,eg as W,fi as se,hf as V,ig as k,je as _,kp as q,l as T,m as I,p as w,pg as Z,qg as ee,ug as S,wo as ae,yd as P,yg as N,zg as z,zo as re}from"./chunk-WJFZETEQ.js";import{a as c}from"./chunk-XLPNXOE2.js";var de=Object.freeze({"genesis.assembled.fullySigned":"true","genesis.assembled.signed":"1","genesis.assembled.txid":"027b480b96236872627bfc9d63c236b83b71d05c31c4a94e742c77ac0039fdb7","genesis.fee":"28752100","genesis.genesis.covenantId":"d9312320443dd64203d4cae0bf2c11f487a131172014b90562815d63dc1d6865","genesis.sighash.0":"728f7651f7bbb15a6fac1edb212125882b74d4312f834221d070bde6bdd924f3","genesis.sighash.1":"ec6c50baca35a61c4181393d7cc8ef011de15afb21a0305b55ceac10052c118e","genesis.signed.refinalized":"true","genesis.signed.txJson":'{"id":"027b480b96236872627bfc9d63c236b83b71d05c31c4a94e742c77ac0039fdb7","version":1,"inputs":[{"transactionId":"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2","index":0,"sequence":"42","sigOpCount":0,"computeBudget":7,"signatureScript":"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627","utxo":{"address":null,"amount":"300000000","scriptPublicKey":"0000aa20cc6a27ad71bdbdbced89b58583949e40228e1fb7352e9af8e7410e352339ce0e87","blockDaaScore":"222","isCoinbase":false,"covenantId":"c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3"}},{"transactionId":"d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4","index":3,"sequence":"0","sigOpCount":0,"computeBudget":11,"signatureScript":"410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001","utxo":{"address":null,"amount":"1000000000","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","blockDaaScore":"333","isCoinbase":false,"covenantId":null}}],"outputs":[{"value":"300000000","scriptPublicKey":"0000aa20cc6a27ad71bdbdbced89b58583949e40228e1fb7352e9af8e7410e352339ce0e87","covenant":{"authorizingInput":0,"covenantId":"c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3"}},{"value":"50000000","scriptPublicKey":"0000aa20ce572c79db7139e1d5abe9b363274c23b0f93b0896c603d8c337c83a62e6fd1287","covenant":{"authorizingInput":1,"covenantId":"d9312320443dd64203d4cae0bf2c11f487a131172014b90562815d63dc1d6865"}},{"value":"20000000","scriptPublicKey":"0000aa20ce572c79db7139e1d5abe9b363274c23b0f93b0896c603d8c337c83a62e6fd1287","covenant":{"authorizingInput":1,"covenantId":"d9312320443dd64203d4cae0bf2c11f487a131172014b90562815d63dc1d6865"}},{"value":"901247900","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","covenant":null}],"subnetworkId":"0000000000000000000000000000000000000000","lockTime":"1000","gas":"0","storageMass":"0","payload":""}',"genesis.signed.txid":"027b480b96236872627bfc9d63c236b83b71d05c31c4a94e742c77ac0039fdb7","genesis.signed.verifies":"true","genesis.txJson":'{"id":"027b480b96236872627bfc9d63c236b83b71d05c31c4a94e742c77ac0039fdb7","version":1,"inputs":[{"transactionId":"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2","index":0,"sequence":"42","sigOpCount":0,"computeBudget":7,"signatureScript":"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627","utxo":{"address":null,"amount":"300000000","scriptPublicKey":"0000aa20cc6a27ad71bdbdbced89b58583949e40228e1fb7352e9af8e7410e352339ce0e87","blockDaaScore":"222","isCoinbase":false,"covenantId":"c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3"}},{"transactionId":"d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4","index":3,"sequence":"0","sigOpCount":0,"computeBudget":11,"signatureScript":"410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","utxo":{"address":null,"amount":"1000000000","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","blockDaaScore":"333","isCoinbase":false,"covenantId":null}}],"outputs":[{"value":"300000000","scriptPublicKey":"0000aa20cc6a27ad71bdbdbced89b58583949e40228e1fb7352e9af8e7410e352339ce0e87","covenant":{"authorizingInput":0,"covenantId":"c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3"}},{"value":"50000000","scriptPublicKey":"0000aa20ce572c79db7139e1d5abe9b363274c23b0f93b0896c603d8c337c83a62e6fd1287","covenant":{"authorizingInput":1,"covenantId":"d9312320443dd64203d4cae0bf2c11f487a131172014b90562815d63dc1d6865"}},{"value":"20000000","scriptPublicKey":"0000aa20ce572c79db7139e1d5abe9b363274c23b0f93b0896c603d8c337c83a62e6fd1287","covenant":{"authorizingInput":1,"covenantId":"d9312320443dd64203d4cae0bf2c11f487a131172014b90562815d63dc1d6865"}},{"value":"901247900","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","covenant":null}],"subnetworkId":"0000000000000000000000000000000000000000","lockTime":"1000","gas":"0","storageMass":"0","payload":""}',"genesis.txid":"027b480b96236872627bfc9d63c236b83b71d05c31c4a94e742c77ac0039fdb7","p2pk.assembled.fullySigned":"true","p2pk.assembled.signed":"0","p2pk.assembled.txid":"33fd0d9c3f1f910010e0e5803deee9599c812aac3c5ec3a0c7b4784dba88512d","p2pk.fee":"876100","p2pk.sighash.0":"a9b830e90d2339ec46592b948fc2fc75903a66e9d6e9a0aca5ec670ca7e8593a","p2pk.signed.refinalized":"true","p2pk.signed.txJson":'{"id":"33fd0d9c3f1f910010e0e5803deee9599c812aac3c5ec3a0c7b4784dba88512d","version":1,"inputs":[{"transactionId":"a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1","index":1,"sequence":"0","sigOpCount":0,"computeBudget":11,"signatureScript":"410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001","utxo":{"address":null,"amount":"500000000","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","blockDaaScore":"123456","isCoinbase":false,"covenantId":null}}],"outputs":[{"value":"123456789","scriptPublicKey":"0000aa20ea40d7af7830163e4abaee51621985ba50d1a918c206c3330d15048d55ce442087","covenant":null},{"value":"375667111","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","covenant":null}],"subnetworkId":"0000000000000000000000000000000000000000","lockTime":"0","gas":"0","storageMass":"0","payload":"6b61737365616c206b6e6f776e2d616e737765722074657374"}',"p2pk.signed.txid":"33fd0d9c3f1f910010e0e5803deee9599c812aac3c5ec3a0c7b4784dba88512d","p2pk.signed.verifies":"true","p2pk.txJson":'{"id":"33fd0d9c3f1f910010e0e5803deee9599c812aac3c5ec3a0c7b4784dba88512d","version":1,"inputs":[{"transactionId":"a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1","index":1,"sequence":"0","sigOpCount":0,"computeBudget":11,"signatureScript":"410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","utxo":{"address":null,"amount":"500000000","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","blockDaaScore":"123456","isCoinbase":false,"covenantId":null}}],"outputs":[{"value":"123456789","scriptPublicKey":"0000aa20ea40d7af7830163e4abaee51621985ba50d1a918c206c3330d15048d55ce442087","covenant":null},{"value":"375667111","scriptPublicKey":"000020cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","covenant":null}],"subnetworkId":"0000000000000000000000000000000000000000","lockTime":"0","gas":"0","storageMass":"0","payload":"6b61737365616c206b6e6f776e2d616e737765722074657374"}',"p2pk.txid":"33fd0d9c3f1f910010e0e5803deee9599c812aac3c5ec3a0c7b4784dba88512d","scripts.key.address.mainnet":"kaspa:qr93f565yswpmw47rtc86j9ycsz4dq47estnrfme3jfxsuy40l3ysvjv666lu","scripts.key.address.testnet-10":"kaspatest:qr93f565yswpmw47rtc86j9ycsz4dq47estnrfme3jfxsuy40l3ysd52p4ywc","scripts.key.script.mainnet":"20cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","scripts.key.script.testnet-10":"20cb14d354241c1dbabe1af07d48a4c4055682becc1731a7798c926870957fe248ac","scripts.p2sh.address.mainnet":"kaspa:pr4yp4a00qcpv0j2hth9zcseska9p5dfrrpqdsenp52sfr24eezzqre9sdvf8","scripts.p2sh.address.testnet-10":"kaspatest:pr4yp4a00qcpv0j2hth9zcseska9p5dfrrpqdsenp52sfr24eezzqzlrtzjcr","scripts.p2sh.script.mainnet":"aa20ea40d7af7830163e4abaee51621985ba50d1a918c206c3330d15048d55ce442087","scripts.p2sh.script.testnet-10":"aa20ea40d7af7830163e4abaee51621985ba50d1a918c206c3330d15048d55ce442087","version":"2.1.0"});var Pe="@kassealhq/sdk known-answer test key (public, holds nothing)";var M=Object.freeze({mainnet:"kaspa:qr93f565yswpmw47rtc86j9ycsz4dq47estnrfme3jfxsuy40l3ysvjv666lu","testnet-10":"kaspatest:qr93f565yswpmw47rtc86j9ycsz4dq47estnrfme3jfxsuy40l3ysd52p4ywc"});var Ce=["version","Transaction","TransactionOutput","ScriptPublicKey","GenesisCovenantGroup","CovenantBinding","Hash","PrivateKey","payToAddressScript","addressFromScriptPublicKey","createInputSignature"];var Ee=["finalize","populateGenesisCovenants","serializeToSafeJSON"];var fe={cells:{consumed:[],produced:[]},funding:{reserved:[]}};var O=c(e=>new TextEncoder().encode(e),"enc");function Ke(e){if(e===null||typeof e!=="object"&&typeof e!=="function")return["the module is not an object"];const n=e;const t=[];for(const r of Ce)if(typeof n[r]!=="function")t.push(`missing function ${r}`);const a=n["Transaction"];if(typeof a==="function"){for(const r of Ee)if(typeof a.prototype?.[r]!=="function")t.push(`missing method Transaction.prototype.${r}`);if(typeof a.deserializeFromSafeJSON!=="function")t.push("missing static Transaction.deserializeFromSafeJSON")}const s=n["SighashType"];if(s===null||typeof s!=="object"||typeof s.All!=="number")t.push("missing SighashType.All");return t}c(Ke,"missingSdkSurface");function ue(e,n){const t=JSON.parse(e).inputs[n]?.signatureScript??"";if(t.length!==132||!t.startsWith("41")||!t.endsWith("01"))throw new Error(`input ${n}: not a P2PK signature script`);return t.slice(2,130)}c(ue,"p2pkSignatureHex");function Te(e,n){const t=e.indexOf(n);if(t<0||e.indexOf(n,t+1)>=0)throw new Error("signature not found exactly once in the transaction");return e.slice(0,t)+"0".repeat(n.length)+e.slice(t+n.length)}c(Te,"masked");function Ie(e,n,t){return ne(t.subarray(1,33),I(x(e,n)),I(ue(e,n)))}c(Ie,"verifies");function _e(e){const n=w(O("kasseal kat program A"));for(const t of["mainnet","testnet-10"]){const a=S(M[t]);e[`key.script.${t}`]=T(a);e[`key.address.${t}`]=N(a,t);const s=N(n,t);e[`p2sh.address.${t}`]=s;e[`p2sh.script.${t}`]=T(S(s))}}c(_e,"scriptsCase");function $e(e,n){const t=M["testnet-10"];const a=S(t);const s={name:"kat-p2pk",inputs:[z({outpoint:{txid:"a1".repeat(32),index:1},amount:500000000n,spk:a,daaScore:123456n,address:t},"funding",$.p2pk,j)],outputs:[{label:"pay",value:123456789n,spk:w(O("kasseal kat program A")),binding:void 0,cell:void 0}],residual:{label:"change",spk:a,binding:void 0,cell:void 0,minimum:0n,dropBelow:W},genesisGroups:[],payload:O("kasseal known-answer test"),feeMargin:0n};const r=k(s);e["txid"]=r.txid;e["fee"]=String(r.fee);const i=U(r,{feerate:_,produces:[],optimistic:fe});e["txJson"]=i.txJson;e["sighash.0"]=x(i.txJson,0);le(e,i,n,[0],a);pe(e,k(s),n)}c($e,"p2pkCase");function Je(e,n){const t=M.mainnet;const a=S(t);const s=w(O("kasseal kat covenant cell"));const r=O("kasseal kat genesis");const i=w(r);const o="c3".repeat(32);const f={predicted:{kind:"token",state:V(1000n,o)},program:r,covenantId:void 0};const u={name:"kat-genesis",inputs:[{label:"cell",outpoint:{txid:"b2".repeat(32),index:0},amount:300000000n,spk:s,daaScore:222n,covenantId:o,budget:7,sigscript:Uint8Array.from({length:40},(p,h)=>h),signature:void 0,sequence:42n},z({outpoint:{txid:"d4".repeat(32),index:3},amount:1000000000n,spk:a,daaScore:333n,address:t},"funding",$.p2pk,j)],outputs:[{label:"cell",value:300000000n,spk:s,binding:{authorizingInput:0,covenantId:o},cell:void 0},{label:"genesis-a",value:50000000n,spk:i,binding:void 0,cell:f},{label:"genesis-b",value:20000000n,spk:i,binding:void 0,cell:f}],residual:{label:"change",spk:a,binding:void 0,cell:void 0,minimum:0n,dropBelow:W},genesisGroups:[{authorizingInput:1,outputs:[1,2]}],payload:new Uint8Array(0),feeMargin:0n,lockTime:1000n};const d=k(u);e["txid"]=d.txid;e["fee"]=String(d.fee);e["genesis.covenantId"]=d.genesis.map(p=>p.covenantId).join(",");const l=U(d,{feerate:_,produces:[],optimistic:fe});e["txJson"]=l.txJson;e["sighash.0"]=x(l.txJson,0);e["sighash.1"]=x(l.txJson,1);le(e,l,n,[1],a);pe(e,k(u),n)}c(Je,"genesisCase");function le(e,n,t,a,s){const r=se(n,t);e["signed.txid"]=r.txid;e["signed.verifies"]=String(a.every(o=>Ie(r.txJson,o,s)));let i=r.txJson;for(const o of a)i=Te(i,ue(r.txJson,o));e["signed.txJson"]=i;e["signed.refinalized"]=String(te(n,r.txJson).txJson===r.txJson)}c(le,"signedAnswers");function pe(e,n,t){e["assembled.signed"]=Z(n,()=>t).join(",");e["assembled.fullySigned"]=String(ee(n));e["assembled.txid"]=n.tx.id}c(pe,"assembledSigning");function Re(e){return Q(e,()=>{const n={version:String(e.version())};let t;const a=c((s,r)=>{const i={};try{r(i)}catch(o){i["error"]=o instanceof Error?o.message:String(o)}for(const[o,f]of Object.entries(i))n[`${s}.${o}`]=f},"run");a("key",()=>{t=new e.PrivateKey(P(Pe))});a("scripts",_e);a("p2pk",s=>$e(s,t));a("genesis",s=>Je(s,t));return n})}c(Re,"knownAnswers");var A=c((e,n=80)=>e===void 0?"(none)":e.length>n?`${e.slice(0,n)}... (${e.length} chars)`:e,"clip");function je(e,n=de){const t=[];const a=new Set;for(const[s,r]of Object.entries(e)){if(!s.endsWith(".error")||n[s]!==void 0)continue;const i=s.slice(0,-".error".length);a.add(i);t.push(`${i}: threw ${A(r,240)}`)}for(const s of[...new Set([...Object.keys(n),...Object.keys(e)])].sort()){const r=e[s];const i=n[s];if(r===i)continue;const o=s.slice(0,s.indexOf(".")<0?s.length:s.indexOf("."));if(a.has(o)&&(r===void 0||s===`${o}.error`))continue;if(i===void 0)t.push(`${s}: unexpected answer ${A(r)}`);else if(r===void 0)t.push(`${s}: no answer, expected ${A(i)}`);else{let f=0;while(f<r.length&&r[f]===i[f])f++;t.push(`${s}: got ${A(r)}, expected ${A(i)} (first difference at character ${f})`)}}return t}c(je,"compareKnownAnswers");function be(e){const n=e;if(n!==null&&typeof n==="object"&&typeof n["version"]==="function"){let r;try{r=n["version"]()}catch(i){throw new v("version",[`version() threw: ${i instanceof Error?i.message:String(i)} (is the WASM initialised?)`])}if(r!==J)throw new v("version",[`reports version ${JSON.stringify(r)}, expected ${J}`])}const t=Ke(e);if(t.length>0)throw new v("surface",t);const a=e;const s=je(Re(a));if(s.length>0)throw new v("known-answer",s);return a}c(be,"verifyKaspaSdk");var g=c(e=>typeof e==="object"&&e!==null&&!Array.isArray(e),"isObject");function me(e){return g(e)&&e.curvePatch===1&&g(e.files)}c(me,"isCurvePatchChunk");function ye(e){return g(e)&&e.curveTemplate===1&&g(e.docs)}c(ye,"isCurveTemplateChunk");var he=c(e=>JSON.stringify(e),"pathKey");function We(e,n,t,a){if(!Number.isInteger(n)||n<1)throw new Error("unsupported indent");let s="";const r=c(o=>" ".repeat(n*o),"pad");const i=c((o,f,u)=>{if(Array.isArray(o)){const d=s.length;const l=he(u);const p=t.get(l);if(o.length===0){s+="[]"}else if(p===0){s+="[";o.forEach((h,m)=>{if(m>0)s+=", ";i(h,f+1,[...u,m])});s+="]"}else{s+="[\n";o.forEach((h,m)=>{if(m>0)s+=p===void 0||m%p===0?`,
2
+ ${r(f+1)}`:", ";else s+=r(f+1);i(h,f+1,[...u,m])});s+=`
3
+ ${r(f)}]`}a?.set(l,[d,s.length])}else if(typeof o==="object"&&o!==null){const d=Object.keys(o);if(d.length===0){s+="{}";return}s+="{\n";d.forEach((l,p)=>{if(p>0)s+=",\n";s+=`${r(f+1)}${JSON.stringify(l)}: `;i(o[l],f+1,[...u,l])});s+=`
4
+ ${r(f)}}`}else{const d=JSON.stringify(o);if(d===void 0)throw new Error("not a JSON value");s+=d}},"rec");i(e,0,[]);return s}c(We,"renderJson");var F=/^(?:[0-9a-f]{2})*$/;function Ne(e){if(!F.test(e))throw new Error("malformed hex");const n=new Array(e.length/2);for(let t=0;t<n.length;t++)n[t]=parseInt(e.slice(2*t,2*t+2),16);return n}c(Ne,"bytesOfHex");function L(e){if(Array.isArray(e))return e.map(L);if(g(e)){const n=Object.keys(e);if(n.length===1&&n[0]==="$hex"){const a=e.$hex;if(typeof a!=="string"||a.length===0)throw new Error("malformed $hex value");return Ne(a)}const t={};for(const a of n)t[a]=L(e[a]);return t}return e}c(L,"expandCompact");function ze(e,n){if(!F.test(e)||!Array.isArray(n)||n.length%3!==0)throw new Error("malformed byte edit");const t=e.length/2;let a="";let s=0;for(let r=0;r<n.length;r+=3){const i=n[r];const o=n[r+1];const f=n[r+2];if(!Number.isSafeInteger(i)||!Number.isSafeInteger(o)||typeof f!=="string"||!F.test(f))throw new Error("malformed byte edit");const u=i;const d=o;if(u<0||d<0||s+u+d>t)throw new Error("byte edit out of range");a+=e.slice(2*s,2*(s+u))+f;s+=u+d}return a+e.slice(2*s)}c(ze,"applyHunks");function we(e){return JSON.parse(JSON.stringify(e))}c(we,"clone");function Ue(e,n){if(!g(n)||!Array.isArray(n.p))throw new Error("malformed patch op");const t=n.p;const a=c(f=>{if("v"in n)return we(n.v);if(!g(f)||typeof f.$hex!=="string"||Object.keys(f).length!==1)throw new Error("byte edit on a value that is not bytes");const u=ze(f.$hex,n.x);if(u.length===0)throw new Error("byte edit leaves no bytes");return{$hex:u}},"replace");if(t.length===0)return a(e);let s=e;for(let f=0;f<t.length-1;f++)s=ge(s,t[f]);const r=t[t.length-1];const i=ge(s,r);const o=a(i);if(Array.isArray(s))s[r]=o;else s[r]=o;return e}c(Ue,"applyOp");function ge(e,n){if(Array.isArray(e)&&typeof n==="number"&&Number.isInteger(n)&&n>=0&&n<e.length)return e[n];if(g(e)&&typeof n==="string"&&Object.hasOwn(e,n))return e[n];throw new Error("patch path not in the template")}c(ge,"child");function De(e,n){const t=g(n)&&typeof n.t==="string"&&Object.hasOwn(e.docs,n.t)?e.docs[n.t]:void 0;if(t===void 0||!Array.isArray(n.ops))throw new Error("malformed file patch");if(!Number.isInteger(t.indent)||t.indent<1||t.indent>10||typeof t.eol!=="string"||!Array.isArray(t.wrap))throw new Error("malformed template document");const a=new Map;for(const r of t.wrap){if(!Array.isArray(r)||!Array.isArray(r[0])||!Number.isInteger(r[1])||r[1]<0)throw new Error("malformed template layout");a.set(he(r[0]),r[1])}let s=we(t.doc);for(const r of n.ops)s=Ue(s,r);return We(L(s),t.indent,a)+t.eol}c(De,"decodeFile");function ke(e,n){const t={};for(const[a,s]of Object.entries(n.files))t[a]=De(e,s);return t}c(ke,"decodeCurvePatchChunk");var Se=ce["web/kaspa_bg.wasm"];async function K(e){const n=globalThis.crypto?.subtle;if(n===void 0)return P(e);const t=new Uint8Array(await n.digest("SHA-256",e));let a="";for(const s of t)a+=s.toString(16).padStart(2,"0");return a}c(K,"sha256Of");async function Oe(e,n="web/kaspa_bg.wasm"){if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);const t=typeof e==="string"||e instanceof URL?await fetch(e):e;if(!t.ok)throw new C(n,`HTTP ${t.status}`);return new Uint8Array(await t.arrayBuffer())}c(Oe,"wasmBytes");var xe="kaspa_bg.wasm (caller-supplied)";function Be(e,n){const t=n.kaspa;if(t===void 0){if(e.bundled===void 0)throw new TypeError("initWeb: this entry bundles no Kaspa SDK: pass your own as kaspa: { module, wasm }");return}if(n.wasm!==void 0)throw new TypeError("initWeb: pass the WASM of a caller-supplied SDK as kaspa.wasm, not wasm");if(t===null||typeof t!=="object"||t.module===null||typeof t.module!=="object")throw new TypeError("initWeb: kaspa.module must be the imported bindings namespace");if(t.wasm!==void 0&&typeof t.module.default!=="function")throw new TypeError("initWeb: kaspa.module has no default init function to instantiate kaspa.wasm with");if(t.sha256!==void 0){if(t.wasm===void 0)throw new TypeError("initWeb: kaspa.sha256 needs kaspa.wasm");if(typeof t.sha256!=="string"||!/^[0-9a-fA-F]{64}$/.test(t.sha256))throw new TypeError("initWeb: kaspa.sha256 must be 64 hex characters")}}c(Be,"checkKaspaOption");async function qe(e){if(e.wasm!==void 0){const n=await Oe(e.wasm,xe);if(e.sha256!==void 0){const t=e.sha256.toLowerCase();const a=await K(n);if(a!==t)throw new C(xe,`sha256 ${a} does not match the given ${t}`)}await e.module.default({module_or_path:n})}return be(e.module)}c(qe,"callerSdk");async function ve(e,n,t){const a=await e.importChunk(n,t);return a.default}c(ve,"importChunk");async function Ae(e,n,t){const a=await ve(e,n,t);let s;if(me(a)){const i=await ve(e,n,"curve-template");if(!ye(i))throw new b(`${n}--curve-template`,"is not a curve template");try{s=ke(i,a)}catch(o){throw new b(`${n}--${t}`,`could not be decoded (${o instanceof Error?o.message:String(o)})`)}}else{s=a}const r=new TextEncoder;for(const[i,o]of Object.entries(s)){if(typeof o!=="string")throw new b(i,"is not text");B(i,await K(r.encode(o)))}return s}c(Ae,"loadChunk");async function Me(){const e=`${q} chunk`;const n=(await import("./token-lock-v1-763GG7M6.js")).default;if(n===null||typeof n!=="object")throw new b(e,"is not a file map");const t=oe();if(JSON.stringify(Object.keys(n).sort())!==JSON.stringify(t))throw new b(e,`holds other files than the manifest's ${t.length} lock files`);const a=new TextEncoder;for(const[s,r]of Object.entries(n)){if(typeof r!=="string")throw new b(s,"is not text");B(s,await K(a.encode(r)))}return n}c(Me,"loadLockChunk");function Fe(e){const n=ie.builds[e];if(n===void 0)throw new b(e,"is not a bundled build");return Object.keys(n.presets).sort()}c(Fe,"presetsOfBuild");var y;var E;function Le(e,n,t){D(n);Be(e,t);if(y!==void 0){if(E!==n)return Promise.reject(new Error(`initWeb already ran for ${E}`));return y}E=n;y=(async()=>{if(Y())throw new Error("a Kaspa SDK is already installed in this context");if(t.kaspa!==void 0){R(await qe(t.kaspa))}else{const d=e.bundled;const l=await Oe(t.wasm??d.wasmUrl());const p=await K(l);if(p!==Se)throw new C("web/kaspa_bg.wasm",`sha256 ${p} does not match the pinned ${Se}`);await d.initWasm({module_or_path:l});R(d.kaspa)}const a=ae[n];const s=new Map(a.map(d=>[d,Fe(d)]));const r=[...new Set(a.flatMap(d=>s.get(d)))].sort();const i=c(async d=>{const l={};for(const p of a)if(s.get(p).includes(d))Object.assign(l,await Ae(e,p,d));return l},"loadPreset");const o={};for(const d of r)o[d]=()=>i(d);o[q]=Me;H(o);const f={};for(const d of a)Object.assign(f,await Ae(e,d,"base"));const u=t.preload==="all"?r:t.preload??[];for(const d of u){if(!r.includes(d))throw new b(d,`is not a preset of ${a.join(" or ")}`);Object.assign(f,await i(d))}X(G(f))})();y.catch(()=>{y=void 0;E=void 0});return y}c(Le,"initWebWith");function kn(e,n,t={}){const a=t.network;if(a!==void 0&&a!==n){D(a);const s=new re(a);s.message=`network ${JSON.stringify(a)} is not served by the ${n} web entry: import '@kassealhq/sdk/web/${a}' (or '@kassealhq/sdk/web')`;throw s}return Le(e,n,t)}c(kn,"initWebFor");function Sn(e,n){if(!n.includes(e))throw new b(e,`is not bundled with the ${n.join(" + ")} web entry`)}c(Sn,"assertEntryBuild");export{Le as a,kn as b,Sn as c};