@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.
- package/CHANGELOG.md +57 -0
- package/README.md +118 -2
- package/SECURITY.md +3 -2
- package/STABILITY.md +25 -12
- package/dist/artifacts/contracts/lock/v1/artifacts/build-report.txt +4 -0
- package/dist/artifacts/contracts/lock/v1/artifacts/factory.artifact.json +267 -0
- package/dist/artifacts/contracts/lock/v1/artifacts/factory.ctor.json +80 -0
- package/dist/artifacts/contracts/lock/v1/artifacts/lock.artifact.json +258 -0
- package/dist/artifacts/contracts/lock/v1/artifacts/lock.ctor.json +112 -0
- package/dist/artifacts/contracts/lock/v1/artifacts/manifest.json +70 -0
- package/dist/artifacts/manifest.json +18 -0
- package/dist/chunks/chunk-H7LB2HPQ.js +4 -0
- package/dist/chunks/chunk-WJFZETEQ.js +1 -0
- package/dist/chunks/token-lock-v1-763GG7M6.js +1 -0
- package/dist/index.d.ts +458 -12
- package/dist/index.js +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/web-lite-mainnet.d.ts +1 -1
- package/dist/web-lite-mainnet.js +1 -1
- package/dist/web-lite-testnet-10.d.ts +1 -1
- package/dist/web-lite-testnet-10.js +1 -1
- package/dist/web-mainnet.d.ts +1 -1
- package/dist/web-mainnet.js +1 -1
- package/dist/web-testnet-10.d.ts +1 -1
- package/dist/web-testnet-10.js +1 -1
- package/dist/web.d.ts +1 -1
- package/dist/web.js +1 -1
- package/docs/api.md +52 -0
- package/docs/contract-artifacts.md +32 -3
- package/docs/errors.md +8 -0
- package/docs/explorers.md +27 -1
- package/docs/partner-tag.md +134 -0
- package/docs/wallets.md +5 -0
- package/examples/README.md +1 -0
- package/examples/partner-tag.ts +58 -0
- package/package.json +2 -1
- package/dist/chunks/chunk-FYCRPHEE.js +0 -4
- package/dist/chunks/chunk-JZJ7MFR5.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@kassealhq/sdk`. The versioning rules are in [STABILITY.md](STABILITY.md).
|
|
4
4
|
|
|
5
|
+
## 1.0.0
|
|
6
|
+
|
|
7
|
+
The first stable release: the public API is frozen under semantic versioning, as set out in
|
|
8
|
+
[STABILITY.md](STABILITY.md).
|
|
9
|
+
|
|
10
|
+
**Upgrading from 0.3.x**
|
|
11
|
+
|
|
12
|
+
- Nothing breaks. Every 0.3.0 export is still exported with the same name, every 0.3.0 call keeps its parameters,
|
|
13
|
+
and a build without the new options produces the same transaction, byte for byte, as 0.3.0.
|
|
14
|
+
- The string unions that describe a built transaction (`OutputRole`, `InputCellKind`, `SignatureKind`) have new
|
|
15
|
+
members. Code that switches over them exhaustively should keep a default branch.
|
|
16
|
+
|
|
17
|
+
**Wallet partner tag**
|
|
18
|
+
|
|
19
|
+
- Trade builds take an optional wallet partner tag: `partner: { partner, channel }` on `buildBuy`, `buildSell`,
|
|
20
|
+
`buildSwap` and `buildScriptSell`, and `partnerTag` on the synchronous shapes `buildBuy`, `buildSell`,
|
|
21
|
+
`buildSwapKasForTokens` and `buildSwapTokensForKas`. A wallet that embeds Kasseal trades in its own app passes its
|
|
22
|
+
partner id and channel 3 (`embedded`). See [docs/partner-tag.md](docs/partner-tag.md).
|
|
23
|
+
- With a tag, the transaction's payload is the 6-byte tag (`4B 53 01`, partner id u16 big-endian, channel u8) and the
|
|
24
|
+
network fee covers its 6 bytes. Without one, the payload stays empty and every build is byte for byte as before.
|
|
25
|
+
- New exports: `PARTNER_IDS`, `PARTNER_CHANNELS`, `encodePartnerTag`, `decodePartnerTag`, `decodePartnerTagHex`,
|
|
26
|
+
`isPartnerId`, `isPartnerChannel`, `tradePayload`, the format constants (`PARTNER_TAG_BYTES`, `PARTNER_TAG_VERSION`,
|
|
27
|
+
`PARTNER_TAG_MAGIC_0`, `PARTNER_TAG_MAGIC_1`) and the types `PartnerTag`, `PartnerId`, `PartnerChannel`, `PartnerKey`,
|
|
28
|
+
`PartnerChannelKey`, `PartnerOptions`.
|
|
29
|
+
- Partners at release: KasWare (1), Kaspire (2), Kastle (3, reserved) and BraidSwap (1000, the first app partner;
|
|
30
|
+
its tag is `4B 53 01 03 E8 03`).
|
|
31
|
+
- New guide for wallets, [docs/partner-tag.md](docs/partner-tag.md), and example `examples/partner-tag.ts`.
|
|
32
|
+
- No change to the contract builds, their artifacts or any other builder.
|
|
33
|
+
|
|
34
|
+
**Token locks**
|
|
35
|
+
|
|
36
|
+
- The token-lock build is bundled: the lock program (`LOCK_H` `9f4eb229…0ac9`) and its factory (`FACTORY_H`
|
|
37
|
+
`481065e0…8f6b`), one build for mainnet and testnet-10, each file checked against its pinned SHA-256 at load
|
|
38
|
+
(`artifactManifest.lock`, `lockArtifactPaths`). The web entries load it as one chunk on first use.
|
|
39
|
+
- Read and verify: `loadLockSet`, `lockProgramKind` (template-hash recognition, state left out), `decodeLockState`,
|
|
40
|
+
`encodeLockState`, `lockStateOfProgram`, `lockCellOf`, `lockTokenCellProblem`, `lockStateProblem`, and the
|
|
41
|
+
schedule: `lockVestedAt`, `lockClaimableAt`, `lockNextUnlock`, `lockSchedule`, `lockAmountAt`, `lockDueAt`,
|
|
42
|
+
`lockRemaining`, `lockEndOf`, `lockEndCapOf`, `lockDeposit`.
|
|
43
|
+
- Create: `buildLockPrep` (the creator's factory cell) and `buildLockCreate` (the lock, its token cell, the creator's
|
|
44
|
+
rest), with `lockFactoryAddressOf` and `lockFactoryCellsOf` for factory cells an earlier prep left unspent. Claim:
|
|
45
|
+
`buildLockClaim` (anyone, no signature). Checks of a serialised create or claim: `checkLockCreateTx`,
|
|
46
|
+
`checkLockClaimTx`. The transactions are byte for byte the ones Kasseal's app builds.
|
|
47
|
+
- Kasseal's lock rules (`assertLockAppRules`; at least 0.05 % of the supply, 7 days to 2 years, at most 100
|
|
48
|
+
releases, no back-dated schedule) apply in the builders; `lockMinDurationMsOf(network)` gives 7 days on mainnet and
|
|
49
|
+
10 minutes on testnet-10 for `minDurationMs`. The README separates them from what the contracts enforce.
|
|
50
|
+
- New error codes: `LOCK_REFUSED` (`LockRefused`), `LOCK_CLAIM_NOT_DUE` (`LockClaimNotDue`), `LOCK_RULE`
|
|
51
|
+
(`LockRuleViolation`).
|
|
52
|
+
- The type declarations no longer name output roles and input kinds of contracts the package does not ship.
|
|
53
|
+
|
|
54
|
+
**Many heads in one request**
|
|
55
|
+
|
|
56
|
+
- `fetchCurveHeads({ baseUrl, cells?, pool?, attempts?, fetch? }, ids)` reads the curve heads of many tokens through
|
|
57
|
+
`GET /v1/tokens/heads`, `CURVE_HEADS_MAX` (50) per request, in the order asked. A graduated token carries its pool's
|
|
58
|
+
state (`pool`, on by default) and a token that cannot be served its own `error`. A 429 or 503 is waited out as in
|
|
59
|
+
`createApiSources`. For routers, aggregators and portfolios that price many tokens: one request in place of one per
|
|
60
|
+
token. New exports: `fetchCurveHeads`, `CURVE_HEADS_MAX`, and the types `CurveHeadsOptions` and `CurveHeadsItem`.
|
|
61
|
+
|
|
5
62
|
## 0.3.0
|
|
6
63
|
|
|
7
64
|
**The creator window (new contract builds)**
|
package/README.md
CHANGED
|
@@ -13,11 +13,13 @@ The SDK gives you:
|
|
|
13
13
|
- **Transaction builders** for curve buys and sells, pool swaps (including composable swap-and-deposit and
|
|
14
14
|
script-owned sells), adding and removing liquidity, and fee payouts.
|
|
15
15
|
- **Launch-proof verification**, so you can prove a token, its curve and its pool are genuine before you trade.
|
|
16
|
+
- **Token locks**: decode and verify a lock, compute what it releases and when, build its creation and its claims.
|
|
16
17
|
- **Submission helpers** for the races every UTXO venue has: build on the pending tip, retry without trading twice.
|
|
17
18
|
- **Wallet adapters** for KasWare, Kastle and Kaspire.
|
|
18
19
|
- **API types** for the public Kasseal REST API.
|
|
19
20
|
|
|
20
|
-
Version
|
|
21
|
+
Version 1.0 is the first stable release: its public API follows semantic versioning, as set out in
|
|
22
|
+
[STABILITY.md](STABILITY.md).
|
|
21
23
|
|
|
22
24
|
## Install
|
|
23
25
|
|
|
@@ -154,6 +156,119 @@ node and can be sent again once the window has passed. `hasCreatorWindow(ctx.cur
|
|
|
154
156
|
- **Units.** Token amounts are whole tokens (0 decimals). Curve trades are in whole lots (1,000 tokens on most
|
|
155
157
|
tokens, 10,000 on tokens launched at high KAS prices). Pool KAS legs are whole multiples of 0.01 KAS.
|
|
156
158
|
|
|
159
|
+
## Wallets: adding your partner tag
|
|
160
|
+
|
|
161
|
+
Wallet partners' trades are recognised by a 6-byte partner tag in the transaction's payload: `4B 53 01`, the partner
|
|
162
|
+
id (u16, big-endian), the channel (u8). Tagged trades are credited to the partner under its partner agreement with
|
|
163
|
+
Kasseal. Partner ids are assigned by Kasseal.
|
|
164
|
+
|
|
165
|
+
- **Connected trades** (channel 1, extension; channel 2, WalletConnect): the Kasseal website adds the tag. The wallet
|
|
166
|
+
only has to sign the transaction with its payload unchanged; it must never strip or rewrite the payload.
|
|
167
|
+
- **In-wallet trades** (channel 3): a swap inside the wallet's own app adds the tag itself. Pass `partner` to
|
|
168
|
+
`buildBuy`, `buildSell`, `buildSwap` or `buildScriptSell` (or `partnerTag` to the synchronous shapes):
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
import { encodePartnerTag, decodePartnerTagHex, type PartnerTag } from '@kassealhq/sdk/web';
|
|
172
|
+
|
|
173
|
+
const partner: PartnerTag = { partner: 1, channel: 3 }; // your id, channel 3 (in-wallet)
|
|
174
|
+
const built = await builder.buildSwap({ ...swap, partner }); // `swap`: the quickstart's parameters
|
|
175
|
+
decodePartnerTagHex(JSON.parse(built.txJson).payload); // { partner: 1, channel: 3 }
|
|
176
|
+
encodePartnerTag(partner); // the 6 bytes, for your own builds
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The full guide, with every builder, the hand-built payload and the checks, is
|
|
180
|
+
[docs/partner-tag.md](docs/partner-tag.md).
|
|
181
|
+
|
|
182
|
+
## Token locks
|
|
183
|
+
|
|
184
|
+
A token lock holds KCC-20 tokens (or LP shares) for a fixed beneficiary and releases them on a fixed schedule. It is
|
|
185
|
+
two covenants: the **lock** (lineage K, one per lock) and a stateless **lock factory** that creates it. One lock build
|
|
186
|
+
serves mainnet and testnet-10 alike; it is bundled with the SDK and checked against its pinned SHA-256 like the trade
|
|
187
|
+
builds.
|
|
188
|
+
|
|
189
|
+
- **State** (140 bytes at offset 1): the token's covenant id, the beneficiary (a Schnorr key, scheme `0x00`, or a
|
|
190
|
+
script hash, scheme `0x03`), `total`, `claimed` (releases paid), `start`, `cliff`, `period` (Unix ms), `tranches`
|
|
191
|
+
N (1 to 100), `version` and `endCap`.
|
|
192
|
+
- **Schedule.** Release k is due at `max(cliff, start + k × period)`. Tokens released by the first k releases:
|
|
193
|
+
`floor(k × total / N)`, so the remainder is spread one token at a time. The last release is due at
|
|
194
|
+
`lockEndOf(state)`.
|
|
195
|
+
- **Deposit.** The lock holds exactly `N × 1.2 KAS + 1 KAS` (`lockDeposit(N)`): each release pays 1 KAS with the
|
|
196
|
+
tokens to the beneficiary and up to 0.2 KAS of network fee; the final release pays what is left to the beneficiary.
|
|
197
|
+
The lock's token cell carries 1 KAS more.
|
|
198
|
+
|
|
199
|
+
**Read and verify.** `await loadLockSet()` gives the build (it loads the lock chunk on demand in the web entries).
|
|
200
|
+
`lockProgramKind(set, program)` recognises a lock or factory program by its template hash, the state left out.
|
|
201
|
+
`lockCellOf(set, cell)` re-derives a served lock cell from its own redeem script (template, well-formed state, K);
|
|
202
|
+
`lockClaimableAt`, `lockNextUnlock`, `lockSchedule`, `lockVestedAt`, `lockRemaining` and `lockEndOf` compute the
|
|
203
|
+
schedule exactly as the contract does. A covenant id is a Kasseal lock only if its genesis was authorised by a
|
|
204
|
+
factory program through its `create` entry; the lock program alone does not prove that
|
|
205
|
+
([explorers.md](docs/explorers.md)).
|
|
206
|
+
|
|
207
|
+
**Create.** Two transactions, built together before either is signed (a txid does not depend on signatures):
|
|
208
|
+
|
|
209
|
+
1. `buildLockPrep` funds the creator's factory cell (0.2 KAS) from the creator's KAS, with change back to the creator.
|
|
210
|
+
2. `buildLockCreate` spends that factory cell, 1 to 3 of the creator's token cells and the prep's change into the
|
|
211
|
+
lock, the lock's token cell, the creator's rest (if any) and change. Send it once the prep is accepted.
|
|
212
|
+
|
|
213
|
+
The creator must be a Schnorr P2PK address: the factory binds the creation to an input paying exactly the creator's
|
|
214
|
+
script. The prep signs plain KAS inputs (`signBuiltWithKey` works); the create also signs the creator's token cells,
|
|
215
|
+
which are P2SH slots: sign them through a wallet adapter, or with your own signer as described in
|
|
216
|
+
[trading-bots.md](docs/trading-bots.md#7-signing-submitting-and-following-a-transaction).
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
import { buildLockCreate, buildLockPrep, loadLockSet, lockMinDurationMsOf, signBuiltWithKey } from '@kassealhq/sdk/node';
|
|
220
|
+
|
|
221
|
+
const set = await loadLockSet();
|
|
222
|
+
const prep = buildLockPrep({ set, creator, funding: kasUtxos }); // kasUtxos: the creator's FundingUtxo[]
|
|
223
|
+
const change = { outpoint: { txid: prep.tx.txid, index: 1 }, amount: prep.built.outputs[1]!.value, spk: prep.built.outputs[1]!.spk, daaScore: 0n, address: creator };
|
|
224
|
+
const lock = buildLockCreate({
|
|
225
|
+
set, creator, factory: { ...prep.factory, daaScore: 0n }, tokenCells, // the creator's key-owned cells of the token
|
|
226
|
+
beneficiary: { kind: 'p2pk', xOnly: beneficiaryKey },
|
|
227
|
+
total: 1_000_000n, start: now, cliff: now, period: 30n * 86_400_000n, tranches: 4n, // four monthly releases
|
|
228
|
+
funding: [change], supply, now, minDurationMs: lockMinDurationMsOf('mainnet'),
|
|
229
|
+
});
|
|
230
|
+
// lock.lockId is K. Sign and send prep.tx, then lock.tx once the prep is accepted.
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Claim.** Anyone may claim; only the beneficiary is paid, and a claim has no signature. `buildLockClaim` pays every
|
|
234
|
+
release vested at `now`, the claim's lock time in Unix ms. The network accepts a timestamp lock time only once the
|
|
235
|
+
chain's past median time is above it (about two minutes behind the newest block), and rejects a claim with a later
|
|
236
|
+
one: pass at most the past median time minus 1 (Kasseal's app uses the API's `nowMs` less 2 minutes). Nothing due
|
|
237
|
+
throws `LockClaimNotDue` with `nextAt`. The final claim also pays the lock's remaining KAS to the beneficiary.
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
import { buildLockClaim, fromHex, lockCellOf, tokenStateFromJson } from '@kassealhq/sdk/node';
|
|
241
|
+
|
|
242
|
+
const { nowMs, locks: [l] } = await (await fetch(`${API_BASE}/locks/${lockId}/cells`)).json();
|
|
243
|
+
const c = l.lockCell;
|
|
244
|
+
const lock = lockCellOf(set, { outpoint: c.outpoint, value: BigInt(c.amount), covenantId: c.covenantId, program: fromHex(c.redeemScript), daaScore: 0n });
|
|
245
|
+
const t = l.tokenCell;
|
|
246
|
+
const tCell = { kind: 'token', outpoint: t.outpoint, value: BigInt(t.amount), covenantId: t.covenantId, program: fromHex(t.redeemScript), state: tokenStateFromJson(t.state), daaScore: 0n } as const;
|
|
247
|
+
const claim = buildLockClaim({ set, lock, tCell, now: BigInt(nowMs) - 120_000n });
|
|
248
|
+
// claim.tx is complete: submit claim.tx.txJson as is.
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Every builder re-checks its own transaction from its bytes before returning it (`checkLockCreateTx`,
|
|
252
|
+
`checkLockClaimTx`, also exported for transactions you did not build) and refuses with `LockRefused` (`rule` says
|
|
253
|
+
which). The beneficiary's `extend` (moving the schedule later) is not in this release.
|
|
254
|
+
|
|
255
|
+
**Contract rules and Kasseal's rules.** The contracts pin the state, the deposit, the lock's token cell and the
|
|
256
|
+
creation's layout; they know neither the token's supply nor the time of the creation. The builders add Kasseal's
|
|
257
|
+
rules, the ones its app offers and its indexer counts a lock as locked by:
|
|
258
|
+
|
|
259
|
+
| Rule | Contract | Builder (`buildLockCreate`, `checkLockCreateTx`) |
|
|
260
|
+
|---|---|---|
|
|
261
|
+
| Releases | 1 to 100 | the same |
|
|
262
|
+
| Amount | 1 to 10^18 tokens, at least one per release | at least 0.05 % of `supply`, at most `supply` |
|
|
263
|
+
| Shortest lock | none | the last release at least `minDurationMs` after `now`: 7 days by default (`LOCK_MIN_DURATION_MS`); `lockMinDurationMsOf('testnet-10')` is 10 minutes (`LOCK_MIN_DURATION_MS_TESTNET`) |
|
|
264
|
+
| Longest lock | the end at most `endCap` (end + 5 years) | the last release at most 2 years after `now` (`LOCK_MAX_DURATION_MS`) |
|
|
265
|
+
| Back-dated schedule | allowed | refused: the first release by the schedule (`start + period`) must be after `now` |
|
|
266
|
+
| Beneficiary | any 32 bytes, scheme `0x00` or `0x03` | a valid x-only key, or a script that needs a signature (`keyLockedRedeem`; `allowAnyScript` to override) |
|
|
267
|
+
|
|
268
|
+
The 7-day minimum is Kasseal's mainnet rule. For now Kasseal's app also offers 10-minute locks on mainnet, and its
|
|
269
|
+
indexer counts them as locked; pass `minDurationMs: LOCK_MIN_DURATION_MS_TESTNET` to build one. That is a policy
|
|
270
|
+
setting that may return to 7 days, not a contract rule.
|
|
271
|
+
|
|
157
272
|
## Browser
|
|
158
273
|
|
|
159
274
|
```js
|
|
@@ -223,7 +338,7 @@ await initWeb({ kaspa: { module: kaspa, wasm: new URL('./vendor/kaspa/kaspa_bg.w
|
|
|
223
338
|
|
|
224
339
|
## Integrity
|
|
225
340
|
|
|
226
|
-
- Contract artifacts: only the
|
|
341
|
+
- Contract artifacts: only the builds above and the token-lock build are bundled. `dist/artifacts/manifest.json` lists each build's
|
|
227
342
|
template hashes and the SHA-256 of every file; the same manifest is compiled into the code, and every file is
|
|
228
343
|
checked before use. A missing, altered or unlisted file is refused (`ArtifactIntegrityError`).
|
|
229
344
|
- Kaspa WASM SDK: rusty-kaspa v2.1.0, unmodified. The Node build is hashed before it is loaded; the web WASM is
|
|
@@ -245,6 +360,7 @@ instead of matching messages. `ERROR_CODES` lists them all; [docs/errors.md](doc
|
|
|
245
360
|
| [Trading bots](docs/trading-bots.md) | Reading state, building, racing, retrying, rate limits |
|
|
246
361
|
| [DEXs and routers](docs/dex-and-routers.md) | Composable swaps: what the pool checks, what it refuses, what you must guard |
|
|
247
362
|
| [Wallets](docs/wallets.md) | Showing Kasseal tokens and signing with KasWare, Kastle and Kaspire |
|
|
363
|
+
| [Partner tag](docs/partner-tag.md) | Wallets: adding your partner tag to the trades you build or sign |
|
|
248
364
|
| [Explorers](docs/explorers.md) | Labelling Kasseal covenants and transactions, decoding state |
|
|
249
365
|
| [Launch proof](docs/launch-proof.md) | What the proof verifies and how to run it |
|
|
250
366
|
| [API](docs/api.md) | REST routes, the stream, rate limits, errors |
|
package/SECURITY.md
CHANGED
|
@@ -58,5 +58,6 @@ compromised user device or key.
|
|
|
58
58
|
|
|
59
59
|
## Supported versions
|
|
60
60
|
|
|
61
|
-
Security fixes go into the latest
|
|
62
|
-
[CHANGELOG](CHANGELOG.md), and affected versions are marked deprecated on npm. See
|
|
61
|
+
Security fixes go into the latest 1.x release; 0.x releases receive no further fixes. A release with a security fix
|
|
62
|
+
is announced in the [CHANGELOG](CHANGELOG.md), and affected versions are marked deprecated on npm. See
|
|
63
|
+
[STABILITY.md](STABILITY.md).
|
package/STABILITY.md
CHANGED
|
@@ -1,38 +1,51 @@
|
|
|
1
1
|
# Stability and versioning
|
|
2
2
|
|
|
3
|
-
`@kassealhq/sdk` follows [semantic versioning](https://semver.org).
|
|
3
|
+
`@kassealhq/sdk` follows [semantic versioning](https://semver.org). From version 1.0.0 the public API described
|
|
4
|
+
below is frozen under the usual rules:
|
|
4
5
|
|
|
5
6
|
| Release | May contain |
|
|
6
7
|
|---|---|
|
|
7
|
-
| Patch (`
|
|
8
|
-
| Minor (`0.
|
|
8
|
+
| Patch (`1.0.0` → `1.0.1`) | Bug fixes, security fixes and documentation. No change to the public API, and no change to the bytes of any transaction a builder produces for the same inputs, unless the old bytes were wrong |
|
|
9
|
+
| Minor (`1.0.x` → `1.1.0`) | New features that add to the API without breaking it: new exports, new optional parameters and result fields, new contract builds, newly assigned partner ids. Existing calls keep working and, for the same inputs, keep producing the same bytes |
|
|
10
|
+
| Major (`1.x` → `2.0.0`) | Breaking changes to the API. Every breaking change is listed in the [CHANGELOG](CHANGELOG.md) with what to do |
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
semver rules.
|
|
12
|
+
Depend on `^1.0.0` to receive fixes and additive features, or pin a minor version (`~1.0.0`) if you want only fixes.
|
|
12
13
|
|
|
13
14
|
**Safety fixes come first.** If a release fixes a way your users could lose funds, we may tighten a check in a patch
|
|
14
15
|
release, so that a call which used to succeed now throws. A stricter check is never loosened in a patch. Versions
|
|
15
16
|
with a safety issue are marked deprecated on npm, with the reason.
|
|
16
17
|
|
|
17
|
-
## What is stable in
|
|
18
|
+
## What is stable in 1.x
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
These change only in a major release, listed in the CHANGELOG; additions to them come in minor releases:
|
|
20
21
|
|
|
21
22
|
- **Quote math**: the results of the curve, pool, liquidity and slippage functions. They mirror the contracts
|
|
22
23
|
exactly; a contract build never changes, so for a given build the numbers never change either.
|
|
23
24
|
- **Error codes**: the `code` string of every error class in [docs/errors.md](docs/errors.md). A code is never reused
|
|
24
|
-
for a different meaning.
|
|
25
|
+
for a different meaning. New codes may be added in a minor release.
|
|
25
26
|
- **The launch-proof verdicts**: `bound`, `unverified`, `invalid`, `malformed`, and what each means.
|
|
26
27
|
- **The bundled contract builds**: `v1-kasseal-mainnet-3`, `v1-kasseal-mainnet-2` and their testnet-10 builds
|
|
27
|
-
`v1-kasseal-mainnet-3-tn10`, `v1-kasseal-mainnet-2-tn10`,
|
|
28
|
+
`v1-kasseal-mainnet-3-tn10`, `v1-kasseal-mainnet-2-tn10`, the token-lock build (lock and factory, one build for both
|
|
29
|
+
networks), their artifacts and their hashes. A new contract build is added in a minor release; a bundled build is
|
|
30
|
+
never modified or removed in 1.x.
|
|
31
|
+
- **The wallet partner tag**: format version 1, 6 bytes (`4B 53 01`, partner id u16 big-endian, channel u8; see
|
|
32
|
+
[docs/partner-tag.md](docs/partner-tag.md)), the channels 1, 2 and 3, and every assigned partner id. An id or a
|
|
33
|
+
channel is never reused for a different meaning. A new format would get a new version byte and would not replace
|
|
34
|
+
version 1 in 1.x.
|
|
35
|
+
- **Token lock builders**: `buildLockPrep`, `buildLockCreate`, `buildLockClaim`, the checks `checkLockCreateTx` and
|
|
36
|
+
`checkLockClaimTx`, the schedule maths and the lock state codec give the same results and the same bytes for the same
|
|
37
|
+
inputs. Kasseal's own lock rules (`assertLockAppRules`) may only be loosened in a minor release, never tightened
|
|
38
|
+
outside the safety policy above.
|
|
28
39
|
- **Entry points**: `@kassealhq/sdk`, `@kassealhq/sdk/node`, `@kassealhq/sdk/web`, `@kassealhq/sdk/web/mainnet`,
|
|
29
40
|
`@kassealhq/sdk/web/testnet-10`, `@kassealhq/sdk/web-lite/mainnet`, `@kassealhq/sdk/web-lite/testnet-10`.
|
|
41
|
+
- **The exported builders, quotes, codecs and wallet adapters**: their names, parameters and result shapes.
|
|
30
42
|
|
|
31
43
|
## What may change in a minor release
|
|
32
44
|
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
45
|
+
- New optional parameters and result fields, and new members of the string unions that describe transactions
|
|
46
|
+
(output roles, input kinds, signature kinds). Code that switches over such a union should keep a default branch.
|
|
47
|
+
- Wallet adapter details that follow the wallets themselves, as long as the adapter interface stays the same.
|
|
48
|
+
- The pinned Kaspa WASM SDK version, when a compatible upstream release is needed.
|
|
36
49
|
- Helpers marked experimental in their documentation.
|
|
37
50
|
|
|
38
51
|
## What the SDK does not control
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
1. silverc v1.0.0 (3ed973335b59269293564805cc2c58a14595ec03)
|
|
2
|
+
2. TOKEN_H 9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7; LOCK_TIME_THRESHOLD 500000000000; TRANCHES_MAX 100; TOTAL_MAX 1000000000000000000; PAYOUT_CELL_KAS 100000000; FEE_CAP 20000000; LOCK_VERSION 1; FIVE_YEARS_MS 157788000000; TOKEN_PREFIX_LEN 1; TOKEN_SUFFIX_LEN 3885; FINAL_KAS_MIN 100000000; T_CELL_KAS_MIN 100000000; LOCK_OUT 0; MAX_CREATE_OUTPUTS 6
|
|
3
|
+
3. Lock 4827 B, state span (1, 140), suffix 4686 B, template hash LOCK_H 9f4eb229cfea334fafd15c05901ce20a8db0a59ba0932cbc7a3a1de079a70ac9 (same for two probe states)
|
|
4
|
+
4. LockFactory 2011 B, state span (1, 37), template hash FACTORY_H 481065e01ee2f15fe06e7ce2b865857b073e18a6298e30a22551426c4c328f6b
|
|
@@ -0,0 +1,267 @@
|
|
|
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
|
+
"LockState": {
|
|
56
|
+
"fields": [
|
|
57
|
+
{
|
|
58
|
+
"name": "tokenCovId",
|
|
59
|
+
"type": {
|
|
60
|
+
"kind": "fixed_bytes",
|
|
61
|
+
"len": 32
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "beneficiary",
|
|
66
|
+
"type": {
|
|
67
|
+
"kind": "fixed_bytes",
|
|
68
|
+
"len": 32
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "scheme",
|
|
73
|
+
"type": {
|
|
74
|
+
"kind": "byte"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "total",
|
|
79
|
+
"type": {
|
|
80
|
+
"kind": "int"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "claimed",
|
|
85
|
+
"type": {
|
|
86
|
+
"kind": "int"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "start",
|
|
91
|
+
"type": {
|
|
92
|
+
"kind": "int"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "cliff",
|
|
97
|
+
"type": {
|
|
98
|
+
"kind": "int"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "period",
|
|
103
|
+
"type": {
|
|
104
|
+
"kind": "int"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "tranches",
|
|
109
|
+
"type": {
|
|
110
|
+
"kind": "int"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "version",
|
|
115
|
+
"type": {
|
|
116
|
+
"kind": "int"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "endCap",
|
|
121
|
+
"type": {
|
|
122
|
+
"kind": "int"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"contracts": {
|
|
129
|
+
"LockFactory": {
|
|
130
|
+
"source_path": "sil/LockFactory.sil",
|
|
131
|
+
"runtime_state": {
|
|
132
|
+
"source": "State",
|
|
133
|
+
"fields": [
|
|
134
|
+
{
|
|
135
|
+
"name": "creatorSpk",
|
|
136
|
+
"type": {
|
|
137
|
+
"kind": "fixed_bytes",
|
|
138
|
+
"len": 36
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"entries": {
|
|
144
|
+
"create": {
|
|
145
|
+
"dispatch_tag": "041ad008",
|
|
146
|
+
"params": [
|
|
147
|
+
{
|
|
148
|
+
"name": "tokenCovId",
|
|
149
|
+
"type": {
|
|
150
|
+
"kind": "fixed_bytes",
|
|
151
|
+
"len": 32
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "beneficiary",
|
|
156
|
+
"type": {
|
|
157
|
+
"kind": "fixed_bytes",
|
|
158
|
+
"len": 32
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "scheme",
|
|
163
|
+
"type": {
|
|
164
|
+
"kind": "byte"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "total",
|
|
169
|
+
"type": {
|
|
170
|
+
"kind": "int"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "start",
|
|
175
|
+
"type": {
|
|
176
|
+
"kind": "int"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "cliff",
|
|
181
|
+
"type": {
|
|
182
|
+
"kind": "int"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "period",
|
|
187
|
+
"type": {
|
|
188
|
+
"kind": "int"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "tranches",
|
|
193
|
+
"type": {
|
|
194
|
+
"kind": "int"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "restAmount",
|
|
199
|
+
"type": {
|
|
200
|
+
"kind": "int"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "creatorIdx",
|
|
205
|
+
"type": {
|
|
206
|
+
"kind": "int"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "lockPrefix",
|
|
211
|
+
"type": {
|
|
212
|
+
"kind": "bytes"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"name": "lockSuffix",
|
|
217
|
+
"type": {
|
|
218
|
+
"kind": "bytes"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"compiled": {
|
|
225
|
+
"bytecode": [
|
|
226
|
+
107, 36, 0, 0, 32, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 172, 108, 118, 4, 4, 26, 208, 8, 135, 99, 117, 92, 121, 130, 1, 32, 157, 117, 91, 121, 130, 1, 32, 157, 117, 90, 121,
|
|
227
|
+
130, 81, 157, 117, 89, 121, 130, 89, 159, 105, 117, 88, 121, 130, 89, 159, 105, 117, 87, 121, 130, 89, 159, 105, 117, 86, 121, 130, 89, 159, 105, 117, 85, 121, 130, 89, 159, 105, 117, 84, 121, 130, 89, 159, 105, 117, 83, 121, 130, 89, 159, 105, 117, 82, 121, 130, 81, 151, 0, 157, 117, 120, 130, 81,
|
|
228
|
+
151, 0, 157, 117, 83, 121, 0, 162, 105, 83, 121, 179, 159, 105, 83, 121, 191, 120, 135, 105, 0, 213, 0, 195, 118, 130, 124, 117, 81, 150, 1, 37, 156, 105, 185, 118, 186, 120, 187, 84, 205, 126, 81, 88, 205, 126, 0, 84, 205, 126, 0, 194, 88, 205, 126, 2, 0, 0, 126, 1, 35, 88, 205, 126,
|
|
229
|
+
82, 121, 82, 1, 37, 127, 126, 118, 10, 67, 111, 118, 101, 110, 97, 110, 116, 73, 68, 167, 84, 121, 135, 105, 83, 121, 208, 0, 156, 105, 180, 86, 161, 105, 81, 118, 180, 159, 99, 118, 213, 118, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
230
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 120, 1, 20, 121, 135, 155, 105, 117, 104, 117, 82, 118, 180, 159, 99, 118, 213, 118, 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,
|
|
231
|
+
120, 1, 20, 121, 135, 155, 105, 117, 104, 117, 83, 118, 180, 159, 99, 118, 213, 118, 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, 120, 1, 20, 121, 135, 155, 105, 117, 104, 117, 84, 118,
|
|
232
|
+
180, 159, 99, 118, 213, 118, 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, 120, 1, 20, 121, 135, 155, 105, 117, 104, 117, 85, 118, 180, 159, 99, 118, 213, 118, 32, 0, 0, 0, 0, 0,
|
|
233
|
+
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, 120, 1, 20, 121, 135, 155, 105, 117, 104, 117, 92, 121, 90, 121, 92, 121, 149, 147, 92, 121, 120, 160, 99, 92, 121, 119, 104, 1, 17, 121, 1, 17, 121, 1, 17, 121,
|
|
234
|
+
1, 17, 121, 0, 1, 18, 121, 1, 18, 121, 1, 18, 121, 1, 18, 121, 81, 90, 121, 5, 0, 207, 229, 188, 36, 147, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 90, 121, 1, 26, 121, 91, 121, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
235
|
+
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, 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,
|
|
236
|
+
82, 106, 116, 162, 105, 85, 121, 87, 121, 162, 105, 88, 121, 84, 121, 162, 105, 88, 121, 8, 0, 0, 100, 167, 179, 182, 224, 13, 161, 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,
|
|
237
|
+
99, 85, 121, 119, 104, 118, 118, 95, 121, 161, 105, 32, 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, 1, 44, 121, 130, 124, 117, 81, 150, 88, 205, 1, 45, 121, 126, 1, 44, 121, 130, 124, 117,
|
|
238
|
+
81, 150, 88, 205, 1, 45, 121, 126, 126, 217, 136, 1, 32, 1, 36, 121, 126, 1, 32, 1, 36, 121, 126, 1, 1, 1, 36, 121, 126, 1, 8, 1, 36, 121, 88, 205, 126, 1, 8, 1, 36, 121, 88, 205, 126, 1, 8, 1, 36, 121, 88, 205, 126, 1, 8, 1, 36, 121, 88, 205, 126, 1, 8, 1,
|
|
239
|
+
36, 121, 88, 205, 126, 1, 8, 1, 36, 121, 88, 205, 126, 1, 8, 1, 36, 121, 88, 205, 126, 1, 8, 1, 36, 121, 88, 205, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 1, 44, 121, 124, 126, 1, 43, 121, 126, 170, 2, 0, 0, 1, 170, 126, 1, 32, 126, 124, 126, 1, 135, 126, 0,
|
|
240
|
+
195, 136, 0, 194, 1, 47, 121, 4, 0, 225, 245, 5, 4, 0, 45, 49, 1, 147, 149, 4, 0, 225, 245, 5, 147, 162, 105, 1, 53, 121, 208, 81, 162, 105, 1, 53, 121, 0, 209, 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,
|
|
241
|
+
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, 79, 101, 82, 5, 178, 180, 99, 177, 249, 236, 46, 199, 60, 247,
|
|
242
|
+
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, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 85, 121, 201,
|
|
243
|
+
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, 2, 45, 15, 147, 148, 81, 81, 147, 147, 1, 32, 147, 188, 120,
|
|
244
|
+
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, 45, 15, 147, 148, 81, 1, 43, 147, 147, 84, 121, 201, 81, 2,
|
|
245
|
+
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, 81, 1, 76, 147, 147, 81, 147, 188, 84, 121, 85, 121, 201, 81,
|
|
246
|
+
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, 81, 1, 80, 147, 147, 87, 121, 201, 81, 2, 145, 0, 147, 2,
|
|
247
|
+
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, 147, 1, 32, 147, 188, 1, 61, 121, 0, 211, 87, 121, 1, 60,
|
|
248
|
+
121, 1, 51, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 121, 0, 96, 121, 1, 17, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 1, 18, 121, 201,
|
|
249
|
+
81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 119, 0, 1, 17, 121, 1, 18, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 1, 19, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2, 45, 15, 147, 188, 119,
|
|
250
|
+
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, 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,
|
|
251
|
+
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, 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,
|
|
252
|
+
89, 121, 194, 4, 0, 225, 245, 5, 162, 105, 1, 71, 121, 210, 118, 81, 158, 99, 118, 82, 156, 105, 1, 17, 121, 1, 65, 121, 1, 17, 121, 1, 17, 121, 1, 17, 121, 1, 17, 121, 1, 17, 121, 0, 1, 26, 121, 1, 27, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 1, 28, 121,
|
|
253
|
+
201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 188, 119, 0, 1, 27, 121, 1, 28, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 1, 29, 121, 201, 81, 2, 145, 0, 147, 2, 45, 15, 147, 148, 81, 147, 2, 145, 0, 147, 2, 45, 15, 147, 188,
|
|
254
|
+
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, 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,
|
|
255
|
+
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, 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, 82, 121,
|
|
256
|
+
81, 211, 195, 136, 117, 117, 117, 117, 117, 117, 117, 117, 117, 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, 117, 117, 117, 117, 117, 117, 117,
|
|
257
|
+
117, 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
|
|
258
|
+
],
|
|
259
|
+
"template_hash": [72, 16, 101, 224, 30, 226, 241, 95, 224, 110, 124, 226, 184, 101, 133, 123, 7, 62, 24, 166, 41, 142, 48, 162, 37, 81, 66, 108, 76, 50, 143, 107],
|
|
260
|
+
"state_span": {
|
|
261
|
+
"offset": 1,
|
|
262
|
+
"len": 37
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"kind": "bytes",
|
|
4
|
+
"value": [
|
|
5
|
+
159,
|
|
6
|
+
78,
|
|
7
|
+
178,
|
|
8
|
+
41,
|
|
9
|
+
207,
|
|
10
|
+
234,
|
|
11
|
+
51,
|
|
12
|
+
79,
|
|
13
|
+
175,
|
|
14
|
+
209,
|
|
15
|
+
92,
|
|
16
|
+
5,
|
|
17
|
+
144,
|
|
18
|
+
28,
|
|
19
|
+
226,
|
|
20
|
+
10,
|
|
21
|
+
141,
|
|
22
|
+
176,
|
|
23
|
+
165,
|
|
24
|
+
155,
|
|
25
|
+
160,
|
|
26
|
+
147,
|
|
27
|
+
44,
|
|
28
|
+
188,
|
|
29
|
+
122,
|
|
30
|
+
58,
|
|
31
|
+
29,
|
|
32
|
+
224,
|
|
33
|
+
121,
|
|
34
|
+
167,
|
|
35
|
+
10,
|
|
36
|
+
201
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"kind": "bytes",
|
|
41
|
+
"value": [
|
|
42
|
+
0,
|
|
43
|
+
0,
|
|
44
|
+
32,
|
|
45
|
+
68,
|
|
46
|
+
68,
|
|
47
|
+
68,
|
|
48
|
+
68,
|
|
49
|
+
68,
|
|
50
|
+
68,
|
|
51
|
+
68,
|
|
52
|
+
68,
|
|
53
|
+
68,
|
|
54
|
+
68,
|
|
55
|
+
68,
|
|
56
|
+
68,
|
|
57
|
+
68,
|
|
58
|
+
68,
|
|
59
|
+
68,
|
|
60
|
+
68,
|
|
61
|
+
68,
|
|
62
|
+
68,
|
|
63
|
+
68,
|
|
64
|
+
68,
|
|
65
|
+
68,
|
|
66
|
+
68,
|
|
67
|
+
68,
|
|
68
|
+
68,
|
|
69
|
+
68,
|
|
70
|
+
68,
|
|
71
|
+
68,
|
|
72
|
+
68,
|
|
73
|
+
68,
|
|
74
|
+
68,
|
|
75
|
+
68,
|
|
76
|
+
68,
|
|
77
|
+
172
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|