@arkade-os/swap 0.1.0-rc.14 → 0.1.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/dist/advanced.cjs +1137 -1021
- package/dist/advanced.d.cts +148 -280
- package/dist/advanced.d.ts +148 -280
- package/dist/advanced.js +22 -8
- package/dist/{chunk-PVLLQMX6.js → chunk-3RSH73P4.js} +619 -284
- package/dist/chunk-A3SHHRX4.js +104 -0
- package/dist/{chunk-KRXPQQJ7.js → chunk-BBP25BWH.js} +198 -218
- package/dist/{chunk-CCGJHRJW.js → chunk-RX3WPV5D.js} +344 -583
- package/dist/errors-DYGuDb4G.d.ts +1559 -0
- package/dist/errors-O-27mWDX.d.cts +1559 -0
- package/dist/index.cjs +1513 -1346
- package/dist/index.d.cts +69 -186
- package/dist/index.d.ts +69 -186
- package/dist/index.js +108 -158
- package/dist/lockupContract-Bz8T0pYL.d.ts +215 -0
- package/dist/lockupContract-C-4zimb4.d.cts +215 -0
- package/dist/node/index.cjs +61 -10
- package/dist/node/index.d.cts +227 -600
- package/dist/node/index.d.ts +227 -600
- package/dist/node/index.js +65 -10
- package/dist/nostr.cjs +11 -11
- package/dist/nostr.d.cts +23 -68
- package/dist/nostr.d.ts +23 -68
- package/dist/nostr.js +3 -4
- package/dist/offer-CJzNPS5H.d.ts +261 -0
- package/dist/offer-DCaE0YNp.d.cts +261 -0
- package/dist/protocol.cjs +742 -1015
- package/dist/protocol.d.cts +120 -255
- package/dist/protocol.d.ts +120 -255
- package/dist/protocol.js +147 -150
- package/dist/repositories/realm/index.cjs +55 -11
- package/dist/repositories/realm/index.d.cts +18 -30
- package/dist/repositories/realm/index.d.ts +18 -30
- package/dist/repositories/realm/index.js +49 -12
- package/dist/repositories/sqlite/index.cjs +61 -10
- package/dist/repositories/sqlite/index.d.cts +7 -6
- package/dist/repositories/sqlite/index.d.ts +7 -6
- package/dist/repositories/sqlite/index.js +57 -11
- package/dist/repository-S2OS6Yl-.d.cts +2260 -0
- package/dist/repository-V98jQmTD.d.ts +2260 -0
- package/dist/{rfq-BWE8qkV2.d.ts → rfq-60PGpQ_x.d.cts} +178 -408
- package/dist/{rfq-BWE8qkV2.d.cts → rfq-60PGpQ_x.d.ts} +178 -408
- package/dist/{watch-D8Z78RAV.d.ts → watch-3pNJbc4T.d.ts} +12 -30
- package/dist/{watch-C4ReJR5z.d.cts → watch-BFMXLQV-.d.cts} +12 -30
- package/package.json +2 -2
- package/dist/chunk-U7VWWTL6.js +0 -66
- package/dist/errors-LXMcNhNS.d.ts +0 -2222
- package/dist/errors-XUs8r0LT.d.cts +0 -2222
- package/dist/lockupContract-BhMebZCb.d.cts +0 -650
- package/dist/lockupContract-CAiN97fX.d.ts +0 -650
- package/dist/repository-BJLuVFQ0.d.ts +0 -3436
- package/dist/repository-DsR3b0JJ.d.cts +0 -3436
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Each is one `quote` → `accept` chain. `quote` returns binding, verified terms
|
|
|
27
27
|
durable; `accept` writes the record, then funds.
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
|
-
const BTC = btcOn("arkade", "bitcoin"); // arkade:bitcoin/slip44:0
|
|
30
|
+
const BTC = btcOn("arkade", "bitcoin"); // arkade:bitcoin/slip44:0 (slip44:1 on test networks)
|
|
31
31
|
const USDT = "arkade:bitcoin/asset:…";
|
|
32
32
|
|
|
33
33
|
// arkade -> lightning: pay an invoice. The amount is the invoice's.
|
|
@@ -98,7 +98,7 @@ Asset ids are CAIP-19 with the rail as the CAIP-2 namespace, `<rail>:<network>/<
|
|
|
98
98
|
```ts
|
|
99
99
|
const asset = canonicalAssetId("BTC", {
|
|
100
100
|
network: "regtest",
|
|
101
|
-
assets: [{ ticker: "BTC", id: "arkade:regtest/slip44:
|
|
101
|
+
assets: [{ ticker: "BTC", id: "arkade:regtest/slip44:1" }],
|
|
102
102
|
});
|
|
103
103
|
```
|
|
104
104
|
|
|
@@ -179,6 +179,17 @@ though: a `Date` in a field you added comes back an ISO string, a `Set` or `Map`
|
|
|
179
179
|
and a `bigint` throws on save. The package's own records are JSON-safe by design; keep yours that
|
|
180
180
|
way too.
|
|
181
181
|
|
|
182
|
+
For bounded reads, all four backends provide `getAssetSwapsPage`,
|
|
183
|
+
`getRfqSwapsPage`, and `getSwapRecordsPage`. Pass `{ limit, after? }` with a
|
|
184
|
+
limit of 1–500, then use each result's `nextCursor` for the following page.
|
|
185
|
+
Asset swaps and swap records sort by ID. RFQ swaps sort by `(updatedAt, rfqId)`
|
|
186
|
+
and accept `{ state?, since? }`; `since` is inclusive Unix seconds. Keep the
|
|
187
|
+
filter fixed while paging. Repository collection reads use pages directly;
|
|
188
|
+
internal recovery and lifecycle paths consume every page before acting.
|
|
189
|
+
SDK transaction-history page `since` values use Unix milliseconds instead.
|
|
190
|
+
SQLite RFQ pages use a row-value comparison, so they need SQLite 3.15.0 or
|
|
191
|
+
newer.
|
|
192
|
+
|
|
182
193
|
### Restore an imported wallet
|
|
183
194
|
|
|
184
195
|
Register swap recovery before calling the core wallet's explicit `restore()`:
|