@secondlayer/sdk 13.1.0 → 14.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/README.md CHANGED
@@ -339,6 +339,27 @@ await sl.index.contractCalls.consume({
339
339
  });
340
340
  ```
341
341
 
342
+ ### Runes
343
+
344
+ Bitcoin Runes on the same Index plane: an etch catalog, per-rune activity, and
345
+ balances, on a Bitcoin tip instead of a Stacks one.
346
+
347
+ ```typescript
348
+ await sl.index.runes.list({ search: "dog", sort: "mints" });
349
+ await sl.index.runes.get("DOG•GO•TO•THE•MOON"); // id, spaced name, or bare name — null on 404
350
+ await sl.index.runes.balances({ address: "bc1phnp234rd5hel0h8ulqvnq3zrww2td0a8q48hjcg7mv67j97jnxfq9ayczm" }); // exactly one of address/outpoint
351
+
352
+ for await (const e of sl.index.runes.activity.walk({ fromHeight: 900_000 })) {
353
+ console.log(e.kind, e.rune.spaced_name, e.amount); // amounts are u128 decimal strings
354
+ }
355
+ ```
356
+
357
+ `RuneRef` (the type every `rune` field/param takes) is an id (`` `${number}:${number}` ``)
358
+ or any name form, spacers and case ignored — typing all 178k+ rune names would
359
+ be huge and stale, so `list({ search })` covers discovery instead. Self-host
360
+ with the `bitcoin` compose profile has data today; hosted follows. Full guide:
361
+ [docs/runes](https://www.secondlayer.tools/docs/runes).
362
+
342
363
  ## Transaction-inclusion proofs
343
364
 
344
365
  Verify — **without trusting Secondlayer** — that a transaction is included in a