@gobob/bob-sdk 5.12.0 → 5.13.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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/gateway/client.js.map +1 -1
  3. package/dist/gateway/error/gateway-error.js.map +1 -1
  4. package/dist/gateway/utils/common.d.ts +821 -5884
  5. package/dist/index.d.ts +0 -3
  6. package/dist/index.js +0 -3
  7. package/dist/index.js.map +1 -1
  8. package/dist/mempool.js +1 -1
  9. package/dist/mempool.js.map +1 -1
  10. package/dist/wallet/utxo.d.ts +1 -3
  11. package/dist/wallet/utxo.js +7 -90
  12. package/dist/wallet/utxo.js.map +1 -1
  13. package/package.json +4 -5
  14. package/dist/helpers.d.ts +0 -3
  15. package/dist/helpers.js +0 -77
  16. package/dist/helpers.js.map +0 -1
  17. package/dist/inscription.d.ts +0 -23
  18. package/dist/inscription.js +0 -198
  19. package/dist/inscription.js.map +0 -1
  20. package/dist/ordinal-api/index.d.ts +0 -113
  21. package/dist/ordinal-api/index.js +0 -156
  22. package/dist/ordinal-api/index.js.map +0 -1
  23. package/dist/ordinals/commit.d.ts +0 -11
  24. package/dist/ordinals/commit.js +0 -66
  25. package/dist/ordinals/commit.js.map +0 -1
  26. package/dist/ordinals/index.d.ts +0 -5
  27. package/dist/ordinals/index.js +0 -83
  28. package/dist/ordinals/index.js.map +0 -1
  29. package/dist/ordinals/reveal.d.ts +0 -13
  30. package/dist/ordinals/reveal.js +0 -78
  31. package/dist/ordinals/reveal.js.map +0 -1
  32. package/dist/ordinals/signer.d.ts +0 -14
  33. package/dist/ordinals/signer.js +0 -17
  34. package/dist/ordinals/signer.js.map +0 -1
  35. package/dist/runes.d.ts +0 -5
  36. package/dist/runes.js +0 -55
  37. package/dist/runes.js.map +0 -1
  38. package/dist/wallet/inscriptions.d.ts +0 -4
  39. package/dist/wallet/inscriptions.js +0 -43
  40. package/dist/wallet/inscriptions.js.map +0 -1
@@ -1,4 +0,0 @@
1
- import { EsploraClient, UTXO } from '../esplora';
2
- import { OrdinalsClient } from '../ordinal-api';
3
- export declare function findUtxoForInscriptionId(esploraClient: EsploraClient, ordinalsClient: OrdinalsClient, utxos: UTXO[], inscriptionId: string): Promise<UTXO | undefined>;
4
- export declare function findUtxosWithoutInscriptions(network: string, utxos: UTXO[]): Promise<UTXO[]>;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findUtxoForInscriptionId = findUtxoForInscriptionId;
4
- exports.findUtxosWithoutInscriptions = findUtxosWithoutInscriptions;
5
- const inscription_1 = require("../inscription");
6
- const ordinal_api_1 = require("../ordinal-api");
7
- async function findUtxoForInscriptionId(esploraClient, ordinalsClient, utxos, inscriptionId) {
8
- const { txid, index } = ordinal_api_1.InscriptionId.fromString(inscriptionId);
9
- for (const utxo of utxos) {
10
- if (utxo.confirmed) {
11
- const inscriptionUtxo = await ordinalsClient.getInscriptionsFromOutPoint(utxo);
12
- if (inscriptionUtxo.inscriptions && inscriptionUtxo.inscriptions.includes(inscriptionId)) {
13
- return utxo;
14
- }
15
- }
16
- else if (txid == utxo.txid) {
17
- const inscriptions = await (0, inscription_1.getTxInscriptions)(esploraClient, utxo.txid);
18
- if (typeof inscriptions[index] !== 'undefined') {
19
- return utxo;
20
- }
21
- }
22
- }
23
- return undefined;
24
- }
25
- async function findUtxosWithoutInscriptions(network, utxos) {
26
- const ordinalsClient = new ordinal_api_1.OrdinalsClient(network);
27
- const safeUtxos = [];
28
- await Promise.all([
29
- utxos.map(async (utxo) => {
30
- if (utxo.confirmed) {
31
- const inscription = await ordinalsClient.getInscriptionsFromOutPoint({
32
- txid: utxo.txid,
33
- vout: utxo.vout,
34
- });
35
- if (inscription.inscriptions.length === 0) {
36
- safeUtxos.push(utxo);
37
- }
38
- }
39
- }),
40
- ]);
41
- return safeUtxos;
42
- }
43
- //# sourceMappingURL=inscriptions.js.map
@@ -1 +0,0 @@
1
- {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