@omnisat/lasereyes 0.0.152 → 0.0.153-next.1

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 (3) hide show
  1. package/dist/index.js +32 -20
  2. package/dist/ui.js +32 -20
  3. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -49956,17 +49956,23 @@ class wMe {
49956
49956
  `/addresses/${t}/brc20`
49957
49957
  );
49958
49958
  }
49959
- async getAddressInscriptions(t, r, n) {
49960
- const i = new URLSearchParams();
49961
- r !== void 0 && i.append("offset", r.toString()), n !== void 0 && i.append("limit", n.toString());
49962
- const o = `/addresses/${t}/inscriptions${i.toString() ? `?${i.toString()}` : ""}`, a = await this.call(
49963
- "get",
49964
- o
49965
- );
49959
+ async getAddressInscriptions(t, r = 0, n = 10) {
49960
+ let i, o = r, a = 100, s = null;
49961
+ for (; o > 0; ) {
49962
+ const f = Math.min(a, o), h = new URLSearchParams();
49963
+ h.append("count", f.toString()), i && h.append("cursor", i);
49964
+ const g = `/addresses/${t}/inscriptions?${h.toString()}`;
49965
+ if (s = await this.call("get", g), !s.next_cursor && o > f)
49966
+ return { ...s, data: [] };
49967
+ i = s.next_cursor, o -= f;
49968
+ }
49969
+ const c = new URLSearchParams();
49970
+ c.append("count", n.toString()), i && c.append("cursor", i);
49971
+ const l = `/addresses/${t}/inscriptions?${c.toString()}`, u = await this.call("get", l);
49966
49972
  return {
49967
- ...a,
49968
- data: a.data.map((s) => ({
49969
- ...s,
49973
+ ...u,
49974
+ data: u.data.map((f) => ({
49975
+ ...f,
49970
49976
  address: t
49971
49977
  }))
49972
49978
  };
@@ -135255,17 +135261,23 @@ class Lot {
135255
135261
  `/addresses/${t}/brc20`
135256
135262
  );
135257
135263
  }
135258
- async getAddressInscriptions(t, r, n) {
135259
- const i = new URLSearchParams();
135260
- r !== void 0 && i.append("offset", r.toString()), n !== void 0 && i.append("limit", n.toString());
135261
- const o = `/addresses/${t}/inscriptions${i.toString() ? `?${i.toString()}` : ""}`, a = await this.call(
135262
- "get",
135263
- o
135264
- );
135264
+ async getAddressInscriptions(t, r = 0, n = 10) {
135265
+ let i, o = r, a = 100, s = null;
135266
+ for (; o > 0; ) {
135267
+ const f = Math.min(a, o), h = new URLSearchParams();
135268
+ h.append("count", f.toString()), i && h.append("cursor", i);
135269
+ const g = `/addresses/${t}/inscriptions?${h.toString()}`;
135270
+ if (s = await this.call("get", g), !s.next_cursor && o > f)
135271
+ return { ...s, data: [] };
135272
+ i = s.next_cursor, o -= f;
135273
+ }
135274
+ const c = new URLSearchParams();
135275
+ c.append("count", n.toString()), i && c.append("cursor", i);
135276
+ const l = `/addresses/${t}/inscriptions?${c.toString()}`, u = await this.call("get", l);
135265
135277
  return {
135266
- ...a,
135267
- data: a.data.map((s) => ({
135268
- ...s,
135278
+ ...u,
135279
+ data: u.data.map((f) => ({
135280
+ ...f,
135269
135281
  address: t
135270
135282
  }))
135271
135283
  };
package/dist/ui.js CHANGED
@@ -52514,17 +52514,23 @@ class SPe {
52514
52514
  `/addresses/${t}/brc20`
52515
52515
  );
52516
52516
  }
52517
- async getAddressInscriptions(t, r, n) {
52518
- const i = new URLSearchParams();
52519
- r !== void 0 && i.append("offset", r.toString()), n !== void 0 && i.append("limit", n.toString());
52520
- const o = `/addresses/${t}/inscriptions${i.toString() ? `?${i.toString()}` : ""}`, a = await this.call(
52521
- "get",
52522
- o
52523
- );
52517
+ async getAddressInscriptions(t, r = 0, n = 10) {
52518
+ let i, o = r, a = 100, s = null;
52519
+ for (; o > 0; ) {
52520
+ const h = Math.min(a, o), f = new URLSearchParams();
52521
+ f.append("count", h.toString()), i && f.append("cursor", i);
52522
+ const g = `/addresses/${t}/inscriptions?${f.toString()}`;
52523
+ if (s = await this.call("get", g), !s.next_cursor && o > h)
52524
+ return { ...s, data: [] };
52525
+ i = s.next_cursor, o -= h;
52526
+ }
52527
+ const c = new URLSearchParams();
52528
+ c.append("count", n.toString()), i && c.append("cursor", i);
52529
+ const l = `/addresses/${t}/inscriptions?${c.toString()}`, u = await this.call("get", l);
52524
52530
  return {
52525
- ...a,
52526
- data: a.data.map((s) => ({
52527
- ...s,
52531
+ ...u,
52532
+ data: u.data.map((h) => ({
52533
+ ...h,
52528
52534
  address: t
52529
52535
  }))
52530
52536
  };
@@ -138268,17 +138274,23 @@ class Ett {
138268
138274
  `/addresses/${t}/brc20`
138269
138275
  );
138270
138276
  }
138271
- async getAddressInscriptions(t, r, n) {
138272
- const i = new URLSearchParams();
138273
- r !== void 0 && i.append("offset", r.toString()), n !== void 0 && i.append("limit", n.toString());
138274
- const o = `/addresses/${t}/inscriptions${i.toString() ? `?${i.toString()}` : ""}`, a = await this.call(
138275
- "get",
138276
- o
138277
- );
138277
+ async getAddressInscriptions(t, r = 0, n = 10) {
138278
+ let i, o = r, a = 100, s = null;
138279
+ for (; o > 0; ) {
138280
+ const h = Math.min(a, o), f = new URLSearchParams();
138281
+ f.append("count", h.toString()), i && f.append("cursor", i);
138282
+ const g = `/addresses/${t}/inscriptions?${f.toString()}`;
138283
+ if (s = await this.call("get", g), !s.next_cursor && o > h)
138284
+ return { ...s, data: [] };
138285
+ i = s.next_cursor, o -= h;
138286
+ }
138287
+ const c = new URLSearchParams();
138288
+ c.append("count", n.toString()), i && c.append("cursor", i);
138289
+ const l = `/addresses/${t}/inscriptions?${c.toString()}`, u = await this.call("get", l);
138278
138290
  return {
138279
- ...a,
138280
- data: a.data.map((s) => ({
138281
- ...s,
138291
+ ...u,
138292
+ data: u.data.map((h) => ({
138293
+ ...h,
138282
138294
  address: t
138283
138295
  }))
138284
138296
  };
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "url": "https://github.com/omnisat/lasereyes-mono.git"
21
21
  },
22
22
  "private": false,
23
- "version": "0.0.152",
23
+ "version": "0.0.153-next.1",
24
24
  "type": "module",
25
25
  "module": "./dist/index.js",
26
26
  "files": [
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "bip39": "^3.1.0",
43
- "@omnisat/lasereyes-react": "0.0.69",
44
- "@omnisat/lasereyes-core": "0.0.74",
45
- "@omnisat/lasereyes-ui": "0.0.11"
43
+ "@omnisat/lasereyes-core": "0.0.75-next.1",
44
+ "@omnisat/lasereyes-ui": "0.0.12-next.1",
45
+ "@omnisat/lasereyes-react": "0.0.70-next.1"
46
46
  },
47
47
  "license": "MIT",
48
48
  "publishConfig": {