@orbinum/sdk 0.7.9 → 0.8.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/dist/index.d.mts +28 -21
- package/dist/index.d.ts +28 -21
- package/dist/index.js +7 -12
- package/dist/index.mjs +7 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -530,8 +530,6 @@ interface ShieldedCommitment {
|
|
|
530
530
|
assetId: string;
|
|
531
531
|
/** Origin of the commitment: direct shield, output of private transfer, or change from unshield. */
|
|
532
532
|
source: 'shield' | 'transfer' | 'unshield';
|
|
533
|
-
/** SS58 or 0x-prefixed depositor address, null if not tracked. */
|
|
534
|
-
sender: string | null;
|
|
535
533
|
/** 0x-prefixed encrypted memo hex, null if not present. */
|
|
536
534
|
encryptedMemo: string | null;
|
|
537
535
|
timestampMs: number | null;
|
|
@@ -728,17 +726,29 @@ interface RegisteredAsset {
|
|
|
728
726
|
timestampMs: number | null;
|
|
729
727
|
}
|
|
730
728
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* unshield,
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
kind: '
|
|
741
|
-
|
|
729
|
+
* One shielded-pool BOUNDARY event for an address, as served by
|
|
730
|
+
* `GET /shielded/address/:addr`. Only boundary facts are exposed — block,
|
|
731
|
+
* asset, amount (unshield), time, tx hash. Note internals (commitment hex,
|
|
732
|
+
* leaf index, nullifier, memo, sender/recipient) are never returned
|
|
733
|
+
* per-address: a public sender→leaf mapping would shrink the shielded pool's
|
|
734
|
+
* anonymity set. Private transfers carry no address and are never included.
|
|
735
|
+
*/
|
|
736
|
+
interface ShieldedAddressEvent {
|
|
737
|
+
/** 'shield' = deposit into the pool by this address; 'unshield' = withdrawal received by it. */
|
|
738
|
+
kind: 'shield' | 'unshield';
|
|
739
|
+
blockNumber: number;
|
|
740
|
+
extrinsicIndex: number | null;
|
|
741
|
+
/** Asset ID as decimal string. */
|
|
742
|
+
assetId: string;
|
|
743
|
+
/**
|
|
744
|
+
* Amount as decimal string (bigint-safe) for unshields.
|
|
745
|
+
* Always null for shields — the shield amount lives in the extrinsic, not the index.
|
|
746
|
+
*/
|
|
747
|
+
amount: string | null;
|
|
748
|
+
timestampMs: number | null;
|
|
749
|
+
/** Blake2-256 hash of the enclosing extrinsic, 0x-prefixed. Null if not decoded. */
|
|
750
|
+
hash: string | null;
|
|
751
|
+
}
|
|
742
752
|
/** A validator node indexed from pallet-validator-set events. */
|
|
743
753
|
interface IndexedValidator {
|
|
744
754
|
account: string;
|
|
@@ -881,11 +891,6 @@ declare class IndexerClient {
|
|
|
881
891
|
}): Promise<PaginatedResult<IndexedBlock>>;
|
|
882
892
|
/** Returns a single block by number or hash, or null if not found. */
|
|
883
893
|
getBlock(numberOrHash: string | number): Promise<IndexedBlock | null>;
|
|
884
|
-
/** Returns a paginated list of shielded commitments initiated by an address. */
|
|
885
|
-
getAddressCommitments(address: string, params?: {
|
|
886
|
-
page?: number;
|
|
887
|
-
limit?: number;
|
|
888
|
-
}): Promise<PaginatedResult<ShieldedCommitment>>;
|
|
889
894
|
/**
|
|
890
895
|
* Returns a paginated list of unshield events where the given address is the recipient.
|
|
891
896
|
* Accepts a 0x-prefixed EVM address or an SS58 Substrate address.
|
|
@@ -895,9 +900,11 @@ declare class IndexerClient {
|
|
|
895
900
|
limit?: number;
|
|
896
901
|
}): Promise<PaginatedResult<Unshield>>;
|
|
897
902
|
/**
|
|
898
|
-
* Returns
|
|
899
|
-
*
|
|
900
|
-
*
|
|
903
|
+
* Returns the shielded-pool BOUNDARY activity for an address: shields it
|
|
904
|
+
* deposited and unshields it received, tagged `kind: 'shield' | 'unshield'`.
|
|
905
|
+
* Only boundary fields are returned (block, asset, amount for unshields,
|
|
906
|
+
* timestamp, tx hash) — note internals are never served per-address, and
|
|
907
|
+
* private transfers carry no address at all (PIR-A).
|
|
901
908
|
*/
|
|
902
909
|
getAddressShieldedActivity(address: string, params?: {
|
|
903
910
|
page?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -530,8 +530,6 @@ interface ShieldedCommitment {
|
|
|
530
530
|
assetId: string;
|
|
531
531
|
/** Origin of the commitment: direct shield, output of private transfer, or change from unshield. */
|
|
532
532
|
source: 'shield' | 'transfer' | 'unshield';
|
|
533
|
-
/** SS58 or 0x-prefixed depositor address, null if not tracked. */
|
|
534
|
-
sender: string | null;
|
|
535
533
|
/** 0x-prefixed encrypted memo hex, null if not present. */
|
|
536
534
|
encryptedMemo: string | null;
|
|
537
535
|
timestampMs: number | null;
|
|
@@ -728,17 +726,29 @@ interface RegisteredAsset {
|
|
|
728
726
|
timestampMs: number | null;
|
|
729
727
|
}
|
|
730
728
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* unshield,
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
kind: '
|
|
741
|
-
|
|
729
|
+
* One shielded-pool BOUNDARY event for an address, as served by
|
|
730
|
+
* `GET /shielded/address/:addr`. Only boundary facts are exposed — block,
|
|
731
|
+
* asset, amount (unshield), time, tx hash. Note internals (commitment hex,
|
|
732
|
+
* leaf index, nullifier, memo, sender/recipient) are never returned
|
|
733
|
+
* per-address: a public sender→leaf mapping would shrink the shielded pool's
|
|
734
|
+
* anonymity set. Private transfers carry no address and are never included.
|
|
735
|
+
*/
|
|
736
|
+
interface ShieldedAddressEvent {
|
|
737
|
+
/** 'shield' = deposit into the pool by this address; 'unshield' = withdrawal received by it. */
|
|
738
|
+
kind: 'shield' | 'unshield';
|
|
739
|
+
blockNumber: number;
|
|
740
|
+
extrinsicIndex: number | null;
|
|
741
|
+
/** Asset ID as decimal string. */
|
|
742
|
+
assetId: string;
|
|
743
|
+
/**
|
|
744
|
+
* Amount as decimal string (bigint-safe) for unshields.
|
|
745
|
+
* Always null for shields — the shield amount lives in the extrinsic, not the index.
|
|
746
|
+
*/
|
|
747
|
+
amount: string | null;
|
|
748
|
+
timestampMs: number | null;
|
|
749
|
+
/** Blake2-256 hash of the enclosing extrinsic, 0x-prefixed. Null if not decoded. */
|
|
750
|
+
hash: string | null;
|
|
751
|
+
}
|
|
742
752
|
/** A validator node indexed from pallet-validator-set events. */
|
|
743
753
|
interface IndexedValidator {
|
|
744
754
|
account: string;
|
|
@@ -881,11 +891,6 @@ declare class IndexerClient {
|
|
|
881
891
|
}): Promise<PaginatedResult<IndexedBlock>>;
|
|
882
892
|
/** Returns a single block by number or hash, or null if not found. */
|
|
883
893
|
getBlock(numberOrHash: string | number): Promise<IndexedBlock | null>;
|
|
884
|
-
/** Returns a paginated list of shielded commitments initiated by an address. */
|
|
885
|
-
getAddressCommitments(address: string, params?: {
|
|
886
|
-
page?: number;
|
|
887
|
-
limit?: number;
|
|
888
|
-
}): Promise<PaginatedResult<ShieldedCommitment>>;
|
|
889
894
|
/**
|
|
890
895
|
* Returns a paginated list of unshield events where the given address is the recipient.
|
|
891
896
|
* Accepts a 0x-prefixed EVM address or an SS58 Substrate address.
|
|
@@ -895,9 +900,11 @@ declare class IndexerClient {
|
|
|
895
900
|
limit?: number;
|
|
896
901
|
}): Promise<PaginatedResult<Unshield>>;
|
|
897
902
|
/**
|
|
898
|
-
* Returns
|
|
899
|
-
*
|
|
900
|
-
*
|
|
903
|
+
* Returns the shielded-pool BOUNDARY activity for an address: shields it
|
|
904
|
+
* deposited and unshields it received, tagged `kind: 'shield' | 'unshield'`.
|
|
905
|
+
* Only boundary fields are returned (block, asset, amount for unshields,
|
|
906
|
+
* timestamp, tx hash) — note internals are never served per-address, and
|
|
907
|
+
* private transfers carry no address at all (PIR-A).
|
|
901
908
|
*/
|
|
902
909
|
getAddressShieldedActivity(address: string, params?: {
|
|
903
910
|
page?: number;
|
package/dist/index.js
CHANGED
|
@@ -1329,14 +1329,7 @@ var IndexerClient = class {
|
|
|
1329
1329
|
async getBlock(numberOrHash) {
|
|
1330
1330
|
return this.getOrNull(`/blocks/${encodeURIComponent(String(numberOrHash))}`);
|
|
1331
1331
|
}
|
|
1332
|
-
// ─── Address
|
|
1333
|
-
/** Returns a paginated list of shielded commitments initiated by an address. */
|
|
1334
|
-
async getAddressCommitments(address, params) {
|
|
1335
|
-
const qs = this.buildQuery({ page: params?.page, limit: params?.limit });
|
|
1336
|
-
return this.get(
|
|
1337
|
-
`/address/${encodeURIComponent(address.toLowerCase())}/shielded${qs}`
|
|
1338
|
-
);
|
|
1339
|
-
}
|
|
1332
|
+
// ─── Address-scoped shielded activity ─────────────────────────────────────
|
|
1340
1333
|
/**
|
|
1341
1334
|
* Returns a paginated list of unshield events where the given address is the recipient.
|
|
1342
1335
|
* Accepts a 0x-prefixed EVM address or an SS58 Substrate address.
|
|
@@ -1348,14 +1341,16 @@ var IndexerClient = class {
|
|
|
1348
1341
|
);
|
|
1349
1342
|
}
|
|
1350
1343
|
/**
|
|
1351
|
-
* Returns
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1344
|
+
* Returns the shielded-pool BOUNDARY activity for an address: shields it
|
|
1345
|
+
* deposited and unshields it received, tagged `kind: 'shield' | 'unshield'`.
|
|
1346
|
+
* Only boundary fields are returned (block, asset, amount for unshields,
|
|
1347
|
+
* timestamp, tx hash) — note internals are never served per-address, and
|
|
1348
|
+
* private transfers carry no address at all (PIR-A).
|
|
1354
1349
|
*/
|
|
1355
1350
|
async getAddressShieldedActivity(address, params) {
|
|
1356
1351
|
const qs = this.buildQuery({ page: params?.page, limit: params?.limit });
|
|
1357
1352
|
return this.get(
|
|
1358
|
-
`/shielded/address/${encodeURIComponent(address
|
|
1353
|
+
`/shielded/address/${encodeURIComponent(address)}${qs}`
|
|
1359
1354
|
);
|
|
1360
1355
|
}
|
|
1361
1356
|
// ─── Relayers ──────────────────────────────────────────────────────────────
|
package/dist/index.mjs
CHANGED
|
@@ -1202,14 +1202,7 @@ var IndexerClient = class {
|
|
|
1202
1202
|
async getBlock(numberOrHash) {
|
|
1203
1203
|
return this.getOrNull(`/blocks/${encodeURIComponent(String(numberOrHash))}`);
|
|
1204
1204
|
}
|
|
1205
|
-
// ─── Address
|
|
1206
|
-
/** Returns a paginated list of shielded commitments initiated by an address. */
|
|
1207
|
-
async getAddressCommitments(address, params) {
|
|
1208
|
-
const qs = this.buildQuery({ page: params?.page, limit: params?.limit });
|
|
1209
|
-
return this.get(
|
|
1210
|
-
`/address/${encodeURIComponent(address.toLowerCase())}/shielded${qs}`
|
|
1211
|
-
);
|
|
1212
|
-
}
|
|
1205
|
+
// ─── Address-scoped shielded activity ─────────────────────────────────────
|
|
1213
1206
|
/**
|
|
1214
1207
|
* Returns a paginated list of unshield events where the given address is the recipient.
|
|
1215
1208
|
* Accepts a 0x-prefixed EVM address or an SS58 Substrate address.
|
|
@@ -1221,14 +1214,16 @@ var IndexerClient = class {
|
|
|
1221
1214
|
);
|
|
1222
1215
|
}
|
|
1223
1216
|
/**
|
|
1224
|
-
* Returns
|
|
1225
|
-
*
|
|
1226
|
-
*
|
|
1217
|
+
* Returns the shielded-pool BOUNDARY activity for an address: shields it
|
|
1218
|
+
* deposited and unshields it received, tagged `kind: 'shield' | 'unshield'`.
|
|
1219
|
+
* Only boundary fields are returned (block, asset, amount for unshields,
|
|
1220
|
+
* timestamp, tx hash) — note internals are never served per-address, and
|
|
1221
|
+
* private transfers carry no address at all (PIR-A).
|
|
1227
1222
|
*/
|
|
1228
1223
|
async getAddressShieldedActivity(address, params) {
|
|
1229
1224
|
const qs = this.buildQuery({ page: params?.page, limit: params?.limit });
|
|
1230
1225
|
return this.get(
|
|
1231
|
-
`/shielded/address/${encodeURIComponent(address
|
|
1226
|
+
`/shielded/address/${encodeURIComponent(address)}${qs}`
|
|
1232
1227
|
);
|
|
1233
1228
|
}
|
|
1234
1229
|
// ─── Relayers ──────────────────────────────────────────────────────────────
|