@orbinum/sdk 0.9.0 → 0.10.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 +54 -3
- package/dist/index.d.ts +54 -3
- package/dist/index.js +34 -2
- package/dist/index.mjs +34 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -542,6 +542,35 @@ interface SpentNullifier {
|
|
|
542
542
|
txType: 'unshield' | 'private_transfer';
|
|
543
543
|
timestampMs: number | null;
|
|
544
544
|
}
|
|
545
|
+
/** One sealed, immutable chunk of the spent-nullifier set (manifest entry). */
|
|
546
|
+
interface NullifierChunkInfo {
|
|
547
|
+
idx: number;
|
|
548
|
+
/** Exact number of nullifiers in the chunk. */
|
|
549
|
+
count: number;
|
|
550
|
+
/** sha256 (hex) of the chunk's nullifier hexes sorted ascending — goes in the chunk URL. */
|
|
551
|
+
digest: string;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Universal index of the sealed nullifier chunks — identical for every caller.
|
|
555
|
+
* No client-supplied position parameter exists anywhere in the chunk flow, so
|
|
556
|
+
* the PIR-A property of `/nullifiers/all` is preserved while transfers become
|
|
557
|
+
* incremental (clients persist chunks locally and only fetch new ones).
|
|
558
|
+
*/
|
|
559
|
+
interface NullifierManifest {
|
|
560
|
+
/** Bumped by the operator on semantic corrections; a change means: resync from zero. */
|
|
561
|
+
generation: string;
|
|
562
|
+
/** Target chunk size (informational; each chunk's exact size is its `count`). */
|
|
563
|
+
chunkSize: number;
|
|
564
|
+
chunks: NullifierChunkInfo[];
|
|
565
|
+
/** Σ sealed counts + current tail size. */
|
|
566
|
+
total: number;
|
|
567
|
+
}
|
|
568
|
+
/** The mutable remainder of the nullifier set after the last sealed chunk. */
|
|
569
|
+
interface NullifierTail {
|
|
570
|
+
/** Number of sealed chunks the tail starts after (detects a chunk sealed mid-sync). */
|
|
571
|
+
afterChunks: number;
|
|
572
|
+
data: string[];
|
|
573
|
+
}
|
|
545
574
|
/** Temporal metadata for a private transfer. No graph data (inputs ↔ outputs) exposed. */
|
|
546
575
|
interface PrivateTransferTimestamp {
|
|
547
576
|
blockNumber: number;
|
|
@@ -840,10 +869,32 @@ declare class IndexerClient {
|
|
|
840
869
|
* The server sees an identical GET request regardless of which notes the wallet holds —
|
|
841
870
|
* the intersection is computed locally (PIR-A privacy model).
|
|
842
871
|
*
|
|
843
|
-
*
|
|
844
|
-
*
|
|
872
|
+
* Kept as the FALLBACK for readers that don't serve sealed chunks yet (and for
|
|
873
|
+
* small sets). New integrations should prefer the incremental chunk flow:
|
|
874
|
+
* `getNullifierManifest` → `getNullifierChunk` for missing chunks →
|
|
875
|
+
* `getNullifierTail`, persisting the set locally between rescans.
|
|
845
876
|
*/
|
|
846
877
|
getAllSpentNullifiers(): Promise<Set<string>>;
|
|
878
|
+
/**
|
|
879
|
+
* Universal index of the sealed nullifier chunks — identical request and
|
|
880
|
+
* response for every caller (no client-supplied position: PIR-A preserved).
|
|
881
|
+
*
|
|
882
|
+
* Returns `null` when the reader does not serve chunks yet (404) — the
|
|
883
|
+
* caller should fall back to `getAllSpentNullifiers`.
|
|
884
|
+
*/
|
|
885
|
+
getNullifierManifest(): Promise<NullifierManifest | null>;
|
|
886
|
+
/**
|
|
887
|
+
* One sealed, immutable chunk of the spent-nullifier set (ascending hex,
|
|
888
|
+
* lowercased). The digest comes from the manifest and lives in the URL, so
|
|
889
|
+
* a corrected chunk is a different URL — safe to cache forever client-side.
|
|
890
|
+
*/
|
|
891
|
+
getNullifierChunk(idx: number, digest: string): Promise<string[]>;
|
|
892
|
+
/**
|
|
893
|
+
* The mutable remainder of the nullifier set after the last sealed chunk.
|
|
894
|
+
* Identical request for every caller (no input). `afterChunks` lets the
|
|
895
|
+
* client detect a chunk sealed between its manifest fetch and this one.
|
|
896
|
+
*/
|
|
897
|
+
getNullifierTail(): Promise<NullifierTail>;
|
|
847
898
|
/** Server-enforced max items per by-nullifiers / by-commitments request. */
|
|
848
899
|
private static readonly TRANSFER_LOOKUP_CHUNK;
|
|
849
900
|
/**
|
|
@@ -4526,4 +4577,4 @@ interface ExtrinsicFailedData {
|
|
|
4526
4577
|
dispatch_info: DispatchInfo;
|
|
4527
4578
|
}
|
|
4528
4579
|
|
|
4529
|
-
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, type ActivityBucket, type AddChainLinkArgs, type AddChainLinkParams, type AddSupportedChainArgs, type AliasFullIdentity, type AliasInfo, type AliasListedForSaleEvent, type AliasOnSaleData, type AliasRegisteredData, type AliasRegisteredEvent, type AliasReleasedEvent, type AliasSaleCancelledEvent, type AliasSoldData, type AliasSoldEvent, type AliasTransferredData, type AliasTransferredEvent, type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BatchRegisterVerificationKeysArgs, type BatchVerificationKeysRegisteredEvent, type BlockInfo, type BuyAliasArgs, type Bytes32, type ChainInfo, type ChainLink, type ChainLinkAddedEvent, type ChainLinkRemovedEvent, CircuitId, CircuitId as CircuitIdType, type ClaimShieldedFeesParams, type ClientProviderConfig, type CommitmentsInsertedEvent, type CommitmentsInsertedEventData, type ConnectionStatus, CryptoPrecompiles, type DecodedAddChainLinkArgs, type DecodedBatchArgs, type DecodedDispatchAsPrivateLinkArgs, type DecodedEthereumTransactArgs, type DecodedEvmCallArgs, type DecodedPrecompile, type DecodedPrivateTransferArgs, type DecodedPutAliasForSaleArgs, type DecodedRegisterAliasArgs, type DecodedRemarkArgs, type DecodedRevealPrivateLinkArgs, type DecodedSetAccountMetadataArgs, type DecodedShieldArgs, type DecodedShieldBatchArgs, type DecodedShieldBatchOperation, type DecodedSudoArgs, type DecodedTransferAllArgs, type DecodedTransferArgs, type DecodedTransferKeepAliveArgs, type DecodedUnshieldArgs, type DecryptedMemo, type DispatchAsLinkedAccountArgs, type DispatchAsLinkedParams, type DispatchAsPrivateLinkArgs, type DispatchError, type DispatchInfo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, type EncryptedNoteRecord, type EndowedEventData, type EthereumExecutedData, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, type EvmExecutedData, type EvmExitReason, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFailedData, type ExtrinsicSuccessData, type FeeClaimProofInputs, type FormatOptions, type IndexedBlock, type IndexedEvmTx, type IndexedExtrinsic, type IndexedSession, type IndexedValidator, type IndexerActivity, IndexerClient, type IndexerClientConfig, type IndexerStats, KNOWN_PRECOMPILES, type KnownPrecompileInfo, type ListingInfo, type MerkleRoot, type MerkleRootUpdatedData, type MerkleRootUpdatedEvent, type MerkleTreeInfo, type MetadataUpdatedEvent, NoteBuilder, type NoteDisclosure, type NoteInput, type NoteStatusUpdate, type NullifierStatusResult, type NullifiersSpentEvent, type NullifiersSpentEventData, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, PRECOMPILE_ADDR, type PaginatedResult, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateChainLinkAddedEvent, type PrivateChainLinkRemovedEvent, type PrivateChainLinkRevealedEvent, type PrivateLink, type PrivateLinkDispatchExecutedEvent, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type PrivateTransferTimestamp, type ProofVerificationFailedEvent, type ProofVerifiedEvent, type ProxyCallExecutedEvent, type PutAliasOnSaleArgs, type PutOnSaleParams, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type RegisterAliasArgs, type RegisterAssetArgs, type RegisterPrivateLinkArgs, type RegisterVerificationKeyArgs, type RegisteredAsset, type RelayFeeEvent, type RelayFeeSummaryEntry, type Relayer, type RelayerInfo, RelayerStatusModule, type RemoveChainLinkArgs, type RemovePrivateLinkArgs, type RemoveSupportedChainArgs, type RemoveVerificationKeyArgs, type ReservedEventData, type ResolvedAlias, type RevealPrivateLinkArgs, type RpcV2MerkleProof, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, SLIP0044_NAMESPACE, type ScanCommitment, type SetAccountMetadataArgs, type SetActiveVersionArgs, type SetMetadataParams, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedAddressEvent, type ShieldedCommitment, type ShieldedEvent, type ShieldedEventData, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, SignatureScheme, type SpentNullifier, type StatusChangeEvent, type StatusListener, type StealthScanHint, SubstrateClient, type SupportedChain, type SupportedChainAddedEvent, type SupportedChainRemovedEvent, type SystemHealth, type TokenInfo, type TokenTransfer, type TransferAliasArgs, type TransferEventData, type TransferInputNote, type TransferOutputNote, type TxResult, type UnsafeTxOptions, type Unshield, type UnshieldArgs, type UnshieldParams, type UnshieldProofInputs, type UnshieldedEvent, type UnshieldedEventData, type UnverifyAssetArgs, VaultLockedError, type VerificationKeyRegisteredEvent, type VerificationKeyRemovedEvent, type VerifyAssetArgs, type VerifyProofArgs, type VkEntry, type ZkNote, type ZkVerifierCall, type ZkVerifierCircuitVersionInfo, type ZkVerifierEvent, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, applyNoteStatus, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewingPublicKey, deriveViewingSecretKey, encryptJson, encryptNote, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, formatBalance, formatORB, fromBase64, fromHex, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getPrecompileLabel, hexToBigint, hexToNumber, implicitSubstrateToEvm, isEvmAddress, isImplicitEvmAccount, isSs58, isSubstrateAddress, isUnifiedAddress, leHexToBigint, mapExtrinsicArgs, mapZkEventData, normalizeEvmAddress, noteBlindTag, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
|
4580
|
+
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, type ActivityBucket, type AddChainLinkArgs, type AddChainLinkParams, type AddSupportedChainArgs, type AliasFullIdentity, type AliasInfo, type AliasListedForSaleEvent, type AliasOnSaleData, type AliasRegisteredData, type AliasRegisteredEvent, type AliasReleasedEvent, type AliasSaleCancelledEvent, type AliasSoldData, type AliasSoldEvent, type AliasTransferredData, type AliasTransferredEvent, type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BatchRegisterVerificationKeysArgs, type BatchVerificationKeysRegisteredEvent, type BlockInfo, type BuyAliasArgs, type Bytes32, type ChainInfo, type ChainLink, type ChainLinkAddedEvent, type ChainLinkRemovedEvent, CircuitId, CircuitId as CircuitIdType, type ClaimShieldedFeesParams, type ClientProviderConfig, type CommitmentsInsertedEvent, type CommitmentsInsertedEventData, type ConnectionStatus, CryptoPrecompiles, type DecodedAddChainLinkArgs, type DecodedBatchArgs, type DecodedDispatchAsPrivateLinkArgs, type DecodedEthereumTransactArgs, type DecodedEvmCallArgs, type DecodedPrecompile, type DecodedPrivateTransferArgs, type DecodedPutAliasForSaleArgs, type DecodedRegisterAliasArgs, type DecodedRemarkArgs, type DecodedRevealPrivateLinkArgs, type DecodedSetAccountMetadataArgs, type DecodedShieldArgs, type DecodedShieldBatchArgs, type DecodedShieldBatchOperation, type DecodedSudoArgs, type DecodedTransferAllArgs, type DecodedTransferArgs, type DecodedTransferKeepAliveArgs, type DecodedUnshieldArgs, type DecryptedMemo, type DispatchAsLinkedAccountArgs, type DispatchAsLinkedParams, type DispatchAsPrivateLinkArgs, type DispatchError, type DispatchInfo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, type EncryptedNoteRecord, type EndowedEventData, type EthereumExecutedData, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, type EvmExecutedData, type EvmExitReason, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFailedData, type ExtrinsicSuccessData, type FeeClaimProofInputs, type FormatOptions, type IndexedBlock, type IndexedEvmTx, type IndexedExtrinsic, type IndexedSession, type IndexedValidator, type IndexerActivity, IndexerClient, type IndexerClientConfig, type IndexerStats, KNOWN_PRECOMPILES, type KnownPrecompileInfo, type ListingInfo, type MerkleRoot, type MerkleRootUpdatedData, type MerkleRootUpdatedEvent, type MerkleTreeInfo, type MetadataUpdatedEvent, NoteBuilder, type NoteDisclosure, type NoteInput, type NoteStatusUpdate, type NullifierChunkInfo, type NullifierManifest, type NullifierStatusResult, type NullifierTail, type NullifiersSpentEvent, type NullifiersSpentEventData, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, PRECOMPILE_ADDR, type PaginatedResult, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateChainLinkAddedEvent, type PrivateChainLinkRemovedEvent, type PrivateChainLinkRevealedEvent, type PrivateLink, type PrivateLinkDispatchExecutedEvent, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type PrivateTransferTimestamp, type ProofVerificationFailedEvent, type ProofVerifiedEvent, type ProxyCallExecutedEvent, type PutAliasOnSaleArgs, type PutOnSaleParams, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type RegisterAliasArgs, type RegisterAssetArgs, type RegisterPrivateLinkArgs, type RegisterVerificationKeyArgs, type RegisteredAsset, type RelayFeeEvent, type RelayFeeSummaryEntry, type Relayer, type RelayerInfo, RelayerStatusModule, type RemoveChainLinkArgs, type RemovePrivateLinkArgs, type RemoveSupportedChainArgs, type RemoveVerificationKeyArgs, type ReservedEventData, type ResolvedAlias, type RevealPrivateLinkArgs, type RpcV2MerkleProof, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, SLIP0044_NAMESPACE, type ScanCommitment, type SetAccountMetadataArgs, type SetActiveVersionArgs, type SetMetadataParams, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedAddressEvent, type ShieldedCommitment, type ShieldedEvent, type ShieldedEventData, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, SignatureScheme, type SpentNullifier, type StatusChangeEvent, type StatusListener, type StealthScanHint, SubstrateClient, type SupportedChain, type SupportedChainAddedEvent, type SupportedChainRemovedEvent, type SystemHealth, type TokenInfo, type TokenTransfer, type TransferAliasArgs, type TransferEventData, type TransferInputNote, type TransferOutputNote, type TxResult, type UnsafeTxOptions, type Unshield, type UnshieldArgs, type UnshieldParams, type UnshieldProofInputs, type UnshieldedEvent, type UnshieldedEventData, type UnverifyAssetArgs, VaultLockedError, type VerificationKeyRegisteredEvent, type VerificationKeyRemovedEvent, type VerifyAssetArgs, type VerifyProofArgs, type VkEntry, type ZkNote, type ZkVerifierCall, type ZkVerifierCircuitVersionInfo, type ZkVerifierEvent, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, applyNoteStatus, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewingPublicKey, deriveViewingSecretKey, encryptJson, encryptNote, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, formatBalance, formatORB, fromBase64, fromHex, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getPrecompileLabel, hexToBigint, hexToNumber, implicitSubstrateToEvm, isEvmAddress, isImplicitEvmAccount, isSs58, isSubstrateAddress, isUnifiedAddress, leHexToBigint, mapExtrinsicArgs, mapZkEventData, normalizeEvmAddress, noteBlindTag, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
package/dist/index.d.ts
CHANGED
|
@@ -542,6 +542,35 @@ interface SpentNullifier {
|
|
|
542
542
|
txType: 'unshield' | 'private_transfer';
|
|
543
543
|
timestampMs: number | null;
|
|
544
544
|
}
|
|
545
|
+
/** One sealed, immutable chunk of the spent-nullifier set (manifest entry). */
|
|
546
|
+
interface NullifierChunkInfo {
|
|
547
|
+
idx: number;
|
|
548
|
+
/** Exact number of nullifiers in the chunk. */
|
|
549
|
+
count: number;
|
|
550
|
+
/** sha256 (hex) of the chunk's nullifier hexes sorted ascending — goes in the chunk URL. */
|
|
551
|
+
digest: string;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Universal index of the sealed nullifier chunks — identical for every caller.
|
|
555
|
+
* No client-supplied position parameter exists anywhere in the chunk flow, so
|
|
556
|
+
* the PIR-A property of `/nullifiers/all` is preserved while transfers become
|
|
557
|
+
* incremental (clients persist chunks locally and only fetch new ones).
|
|
558
|
+
*/
|
|
559
|
+
interface NullifierManifest {
|
|
560
|
+
/** Bumped by the operator on semantic corrections; a change means: resync from zero. */
|
|
561
|
+
generation: string;
|
|
562
|
+
/** Target chunk size (informational; each chunk's exact size is its `count`). */
|
|
563
|
+
chunkSize: number;
|
|
564
|
+
chunks: NullifierChunkInfo[];
|
|
565
|
+
/** Σ sealed counts + current tail size. */
|
|
566
|
+
total: number;
|
|
567
|
+
}
|
|
568
|
+
/** The mutable remainder of the nullifier set after the last sealed chunk. */
|
|
569
|
+
interface NullifierTail {
|
|
570
|
+
/** Number of sealed chunks the tail starts after (detects a chunk sealed mid-sync). */
|
|
571
|
+
afterChunks: number;
|
|
572
|
+
data: string[];
|
|
573
|
+
}
|
|
545
574
|
/** Temporal metadata for a private transfer. No graph data (inputs ↔ outputs) exposed. */
|
|
546
575
|
interface PrivateTransferTimestamp {
|
|
547
576
|
blockNumber: number;
|
|
@@ -840,10 +869,32 @@ declare class IndexerClient {
|
|
|
840
869
|
* The server sees an identical GET request regardless of which notes the wallet holds —
|
|
841
870
|
* the intersection is computed locally (PIR-A privacy model).
|
|
842
871
|
*
|
|
843
|
-
*
|
|
844
|
-
*
|
|
872
|
+
* Kept as the FALLBACK for readers that don't serve sealed chunks yet (and for
|
|
873
|
+
* small sets). New integrations should prefer the incremental chunk flow:
|
|
874
|
+
* `getNullifierManifest` → `getNullifierChunk` for missing chunks →
|
|
875
|
+
* `getNullifierTail`, persisting the set locally between rescans.
|
|
845
876
|
*/
|
|
846
877
|
getAllSpentNullifiers(): Promise<Set<string>>;
|
|
878
|
+
/**
|
|
879
|
+
* Universal index of the sealed nullifier chunks — identical request and
|
|
880
|
+
* response for every caller (no client-supplied position: PIR-A preserved).
|
|
881
|
+
*
|
|
882
|
+
* Returns `null` when the reader does not serve chunks yet (404) — the
|
|
883
|
+
* caller should fall back to `getAllSpentNullifiers`.
|
|
884
|
+
*/
|
|
885
|
+
getNullifierManifest(): Promise<NullifierManifest | null>;
|
|
886
|
+
/**
|
|
887
|
+
* One sealed, immutable chunk of the spent-nullifier set (ascending hex,
|
|
888
|
+
* lowercased). The digest comes from the manifest and lives in the URL, so
|
|
889
|
+
* a corrected chunk is a different URL — safe to cache forever client-side.
|
|
890
|
+
*/
|
|
891
|
+
getNullifierChunk(idx: number, digest: string): Promise<string[]>;
|
|
892
|
+
/**
|
|
893
|
+
* The mutable remainder of the nullifier set after the last sealed chunk.
|
|
894
|
+
* Identical request for every caller (no input). `afterChunks` lets the
|
|
895
|
+
* client detect a chunk sealed between its manifest fetch and this one.
|
|
896
|
+
*/
|
|
897
|
+
getNullifierTail(): Promise<NullifierTail>;
|
|
847
898
|
/** Server-enforced max items per by-nullifiers / by-commitments request. */
|
|
848
899
|
private static readonly TRANSFER_LOOKUP_CHUNK;
|
|
849
900
|
/**
|
|
@@ -4526,4 +4577,4 @@ interface ExtrinsicFailedData {
|
|
|
4526
4577
|
dispatch_info: DispatchInfo;
|
|
4527
4578
|
}
|
|
4528
4579
|
|
|
4529
|
-
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, type ActivityBucket, type AddChainLinkArgs, type AddChainLinkParams, type AddSupportedChainArgs, type AliasFullIdentity, type AliasInfo, type AliasListedForSaleEvent, type AliasOnSaleData, type AliasRegisteredData, type AliasRegisteredEvent, type AliasReleasedEvent, type AliasSaleCancelledEvent, type AliasSoldData, type AliasSoldEvent, type AliasTransferredData, type AliasTransferredEvent, type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BatchRegisterVerificationKeysArgs, type BatchVerificationKeysRegisteredEvent, type BlockInfo, type BuyAliasArgs, type Bytes32, type ChainInfo, type ChainLink, type ChainLinkAddedEvent, type ChainLinkRemovedEvent, CircuitId, CircuitId as CircuitIdType, type ClaimShieldedFeesParams, type ClientProviderConfig, type CommitmentsInsertedEvent, type CommitmentsInsertedEventData, type ConnectionStatus, CryptoPrecompiles, type DecodedAddChainLinkArgs, type DecodedBatchArgs, type DecodedDispatchAsPrivateLinkArgs, type DecodedEthereumTransactArgs, type DecodedEvmCallArgs, type DecodedPrecompile, type DecodedPrivateTransferArgs, type DecodedPutAliasForSaleArgs, type DecodedRegisterAliasArgs, type DecodedRemarkArgs, type DecodedRevealPrivateLinkArgs, type DecodedSetAccountMetadataArgs, type DecodedShieldArgs, type DecodedShieldBatchArgs, type DecodedShieldBatchOperation, type DecodedSudoArgs, type DecodedTransferAllArgs, type DecodedTransferArgs, type DecodedTransferKeepAliveArgs, type DecodedUnshieldArgs, type DecryptedMemo, type DispatchAsLinkedAccountArgs, type DispatchAsLinkedParams, type DispatchAsPrivateLinkArgs, type DispatchError, type DispatchInfo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, type EncryptedNoteRecord, type EndowedEventData, type EthereumExecutedData, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, type EvmExecutedData, type EvmExitReason, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFailedData, type ExtrinsicSuccessData, type FeeClaimProofInputs, type FormatOptions, type IndexedBlock, type IndexedEvmTx, type IndexedExtrinsic, type IndexedSession, type IndexedValidator, type IndexerActivity, IndexerClient, type IndexerClientConfig, type IndexerStats, KNOWN_PRECOMPILES, type KnownPrecompileInfo, type ListingInfo, type MerkleRoot, type MerkleRootUpdatedData, type MerkleRootUpdatedEvent, type MerkleTreeInfo, type MetadataUpdatedEvent, NoteBuilder, type NoteDisclosure, type NoteInput, type NoteStatusUpdate, type NullifierStatusResult, type NullifiersSpentEvent, type NullifiersSpentEventData, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, PRECOMPILE_ADDR, type PaginatedResult, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateChainLinkAddedEvent, type PrivateChainLinkRemovedEvent, type PrivateChainLinkRevealedEvent, type PrivateLink, type PrivateLinkDispatchExecutedEvent, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type PrivateTransferTimestamp, type ProofVerificationFailedEvent, type ProofVerifiedEvent, type ProxyCallExecutedEvent, type PutAliasOnSaleArgs, type PutOnSaleParams, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type RegisterAliasArgs, type RegisterAssetArgs, type RegisterPrivateLinkArgs, type RegisterVerificationKeyArgs, type RegisteredAsset, type RelayFeeEvent, type RelayFeeSummaryEntry, type Relayer, type RelayerInfo, RelayerStatusModule, type RemoveChainLinkArgs, type RemovePrivateLinkArgs, type RemoveSupportedChainArgs, type RemoveVerificationKeyArgs, type ReservedEventData, type ResolvedAlias, type RevealPrivateLinkArgs, type RpcV2MerkleProof, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, SLIP0044_NAMESPACE, type ScanCommitment, type SetAccountMetadataArgs, type SetActiveVersionArgs, type SetMetadataParams, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedAddressEvent, type ShieldedCommitment, type ShieldedEvent, type ShieldedEventData, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, SignatureScheme, type SpentNullifier, type StatusChangeEvent, type StatusListener, type StealthScanHint, SubstrateClient, type SupportedChain, type SupportedChainAddedEvent, type SupportedChainRemovedEvent, type SystemHealth, type TokenInfo, type TokenTransfer, type TransferAliasArgs, type TransferEventData, type TransferInputNote, type TransferOutputNote, type TxResult, type UnsafeTxOptions, type Unshield, type UnshieldArgs, type UnshieldParams, type UnshieldProofInputs, type UnshieldedEvent, type UnshieldedEventData, type UnverifyAssetArgs, VaultLockedError, type VerificationKeyRegisteredEvent, type VerificationKeyRemovedEvent, type VerifyAssetArgs, type VerifyProofArgs, type VkEntry, type ZkNote, type ZkVerifierCall, type ZkVerifierCircuitVersionInfo, type ZkVerifierEvent, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, applyNoteStatus, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewingPublicKey, deriveViewingSecretKey, encryptJson, encryptNote, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, formatBalance, formatORB, fromBase64, fromHex, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getPrecompileLabel, hexToBigint, hexToNumber, implicitSubstrateToEvm, isEvmAddress, isImplicitEvmAccount, isSs58, isSubstrateAddress, isUnifiedAddress, leHexToBigint, mapExtrinsicArgs, mapZkEventData, normalizeEvmAddress, noteBlindTag, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
|
4580
|
+
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, type ActivityBucket, type AddChainLinkArgs, type AddChainLinkParams, type AddSupportedChainArgs, type AliasFullIdentity, type AliasInfo, type AliasListedForSaleEvent, type AliasOnSaleData, type AliasRegisteredData, type AliasRegisteredEvent, type AliasReleasedEvent, type AliasSaleCancelledEvent, type AliasSoldData, type AliasSoldEvent, type AliasTransferredData, type AliasTransferredEvent, type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BatchRegisterVerificationKeysArgs, type BatchVerificationKeysRegisteredEvent, type BlockInfo, type BuyAliasArgs, type Bytes32, type ChainInfo, type ChainLink, type ChainLinkAddedEvent, type ChainLinkRemovedEvent, CircuitId, CircuitId as CircuitIdType, type ClaimShieldedFeesParams, type ClientProviderConfig, type CommitmentsInsertedEvent, type CommitmentsInsertedEventData, type ConnectionStatus, CryptoPrecompiles, type DecodedAddChainLinkArgs, type DecodedBatchArgs, type DecodedDispatchAsPrivateLinkArgs, type DecodedEthereumTransactArgs, type DecodedEvmCallArgs, type DecodedPrecompile, type DecodedPrivateTransferArgs, type DecodedPutAliasForSaleArgs, type DecodedRegisterAliasArgs, type DecodedRemarkArgs, type DecodedRevealPrivateLinkArgs, type DecodedSetAccountMetadataArgs, type DecodedShieldArgs, type DecodedShieldBatchArgs, type DecodedShieldBatchOperation, type DecodedSudoArgs, type DecodedTransferAllArgs, type DecodedTransferArgs, type DecodedTransferKeepAliveArgs, type DecodedUnshieldArgs, type DecryptedMemo, type DispatchAsLinkedAccountArgs, type DispatchAsLinkedParams, type DispatchAsPrivateLinkArgs, type DispatchError, type DispatchInfo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, type EncryptedNoteRecord, type EndowedEventData, type EthereumExecutedData, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, type EvmExecutedData, type EvmExitReason, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFailedData, type ExtrinsicSuccessData, type FeeClaimProofInputs, type FormatOptions, type IndexedBlock, type IndexedEvmTx, type IndexedExtrinsic, type IndexedSession, type IndexedValidator, type IndexerActivity, IndexerClient, type IndexerClientConfig, type IndexerStats, KNOWN_PRECOMPILES, type KnownPrecompileInfo, type ListingInfo, type MerkleRoot, type MerkleRootUpdatedData, type MerkleRootUpdatedEvent, type MerkleTreeInfo, type MetadataUpdatedEvent, NoteBuilder, type NoteDisclosure, type NoteInput, type NoteStatusUpdate, type NullifierChunkInfo, type NullifierManifest, type NullifierStatusResult, type NullifierTail, type NullifiersSpentEvent, type NullifiersSpentEventData, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, PRECOMPILE_ADDR, type PaginatedResult, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateChainLinkAddedEvent, type PrivateChainLinkRemovedEvent, type PrivateChainLinkRevealedEvent, type PrivateLink, type PrivateLinkDispatchExecutedEvent, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type PrivateTransferTimestamp, type ProofVerificationFailedEvent, type ProofVerifiedEvent, type ProxyCallExecutedEvent, type PutAliasOnSaleArgs, type PutOnSaleParams, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type RegisterAliasArgs, type RegisterAssetArgs, type RegisterPrivateLinkArgs, type RegisterVerificationKeyArgs, type RegisteredAsset, type RelayFeeEvent, type RelayFeeSummaryEntry, type Relayer, type RelayerInfo, RelayerStatusModule, type RemoveChainLinkArgs, type RemovePrivateLinkArgs, type RemoveSupportedChainArgs, type RemoveVerificationKeyArgs, type ReservedEventData, type ResolvedAlias, type RevealPrivateLinkArgs, type RpcV2MerkleProof, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, SLIP0044_NAMESPACE, type ScanCommitment, type SetAccountMetadataArgs, type SetActiveVersionArgs, type SetMetadataParams, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedAddressEvent, type ShieldedCommitment, type ShieldedEvent, type ShieldedEventData, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, SignatureScheme, type SpentNullifier, type StatusChangeEvent, type StatusListener, type StealthScanHint, SubstrateClient, type SupportedChain, type SupportedChainAddedEvent, type SupportedChainRemovedEvent, type SystemHealth, type TokenInfo, type TokenTransfer, type TransferAliasArgs, type TransferEventData, type TransferInputNote, type TransferOutputNote, type TxResult, type UnsafeTxOptions, type Unshield, type UnshieldArgs, type UnshieldParams, type UnshieldProofInputs, type UnshieldedEvent, type UnshieldedEventData, type UnverifyAssetArgs, VaultLockedError, type VerificationKeyRegisteredEvent, type VerificationKeyRemovedEvent, type VerifyAssetArgs, type VerifyProofArgs, type VkEntry, type ZkNote, type ZkVerifierCall, type ZkVerifierCircuitVersionInfo, type ZkVerifierEvent, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, applyNoteStatus, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewingPublicKey, deriveViewingSecretKey, encryptJson, encryptNote, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, formatBalance, formatORB, fromBase64, fromHex, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getPrecompileLabel, hexToBigint, hexToNumber, implicitSubstrateToEvm, isEvmAddress, isImplicitEvmAccount, isSs58, isSubstrateAddress, isUnifiedAddress, leHexToBigint, mapExtrinsicArgs, mapZkEventData, normalizeEvmAddress, noteBlindTag, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
package/dist/index.js
CHANGED
|
@@ -1242,13 +1242,45 @@ var IndexerClient = class _IndexerClient {
|
|
|
1242
1242
|
* The server sees an identical GET request regardless of which notes the wallet holds —
|
|
1243
1243
|
* the intersection is computed locally (PIR-A privacy model).
|
|
1244
1244
|
*
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1245
|
+
* Kept as the FALLBACK for readers that don't serve sealed chunks yet (and for
|
|
1246
|
+
* small sets). New integrations should prefer the incremental chunk flow:
|
|
1247
|
+
* `getNullifierManifest` → `getNullifierChunk` for missing chunks →
|
|
1248
|
+
* `getNullifierTail`, persisting the set locally between rescans.
|
|
1247
1249
|
*/
|
|
1248
1250
|
async getAllSpentNullifiers() {
|
|
1249
1251
|
const res = await this.get("/shielded/nullifiers/all");
|
|
1250
1252
|
return new Set(res.data.map((h) => h.toLowerCase()));
|
|
1251
1253
|
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Universal index of the sealed nullifier chunks — identical request and
|
|
1256
|
+
* response for every caller (no client-supplied position: PIR-A preserved).
|
|
1257
|
+
*
|
|
1258
|
+
* Returns `null` when the reader does not serve chunks yet (404) — the
|
|
1259
|
+
* caller should fall back to `getAllSpentNullifiers`.
|
|
1260
|
+
*/
|
|
1261
|
+
async getNullifierManifest() {
|
|
1262
|
+
return this.getOrNull("/shielded/nullifiers/manifest");
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* One sealed, immutable chunk of the spent-nullifier set (ascending hex,
|
|
1266
|
+
* lowercased). The digest comes from the manifest and lives in the URL, so
|
|
1267
|
+
* a corrected chunk is a different URL — safe to cache forever client-side.
|
|
1268
|
+
*/
|
|
1269
|
+
async getNullifierChunk(idx, digest) {
|
|
1270
|
+
const res = await this.get(
|
|
1271
|
+
`/shielded/nullifiers/chunks/${idx}/${encodeURIComponent(digest)}`
|
|
1272
|
+
);
|
|
1273
|
+
return res.data.map((h) => h.toLowerCase());
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* The mutable remainder of the nullifier set after the last sealed chunk.
|
|
1277
|
+
* Identical request for every caller (no input). `afterChunks` lets the
|
|
1278
|
+
* client detect a chunk sealed between its manifest fetch and this one.
|
|
1279
|
+
*/
|
|
1280
|
+
async getNullifierTail() {
|
|
1281
|
+
const res = await this.get("/shielded/nullifiers/tail");
|
|
1282
|
+
return { afterChunks: res.afterChunks, data: res.data.map((h) => h.toLowerCase()) };
|
|
1283
|
+
}
|
|
1252
1284
|
// ─── Private transfers ─────────────────────────────────────────────────────
|
|
1253
1285
|
/** Server-enforced max items per by-nullifiers / by-commitments request. */
|
|
1254
1286
|
static TRANSFER_LOOKUP_CHUNK = 50;
|
package/dist/index.mjs
CHANGED
|
@@ -1112,13 +1112,45 @@ var IndexerClient = class _IndexerClient {
|
|
|
1112
1112
|
* The server sees an identical GET request regardless of which notes the wallet holds —
|
|
1113
1113
|
* the intersection is computed locally (PIR-A privacy model).
|
|
1114
1114
|
*
|
|
1115
|
-
*
|
|
1116
|
-
*
|
|
1115
|
+
* Kept as the FALLBACK for readers that don't serve sealed chunks yet (and for
|
|
1116
|
+
* small sets). New integrations should prefer the incremental chunk flow:
|
|
1117
|
+
* `getNullifierManifest` → `getNullifierChunk` for missing chunks →
|
|
1118
|
+
* `getNullifierTail`, persisting the set locally between rescans.
|
|
1117
1119
|
*/
|
|
1118
1120
|
async getAllSpentNullifiers() {
|
|
1119
1121
|
const res = await this.get("/shielded/nullifiers/all");
|
|
1120
1122
|
return new Set(res.data.map((h) => h.toLowerCase()));
|
|
1121
1123
|
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Universal index of the sealed nullifier chunks — identical request and
|
|
1126
|
+
* response for every caller (no client-supplied position: PIR-A preserved).
|
|
1127
|
+
*
|
|
1128
|
+
* Returns `null` when the reader does not serve chunks yet (404) — the
|
|
1129
|
+
* caller should fall back to `getAllSpentNullifiers`.
|
|
1130
|
+
*/
|
|
1131
|
+
async getNullifierManifest() {
|
|
1132
|
+
return this.getOrNull("/shielded/nullifiers/manifest");
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* One sealed, immutable chunk of the spent-nullifier set (ascending hex,
|
|
1136
|
+
* lowercased). The digest comes from the manifest and lives in the URL, so
|
|
1137
|
+
* a corrected chunk is a different URL — safe to cache forever client-side.
|
|
1138
|
+
*/
|
|
1139
|
+
async getNullifierChunk(idx, digest) {
|
|
1140
|
+
const res = await this.get(
|
|
1141
|
+
`/shielded/nullifiers/chunks/${idx}/${encodeURIComponent(digest)}`
|
|
1142
|
+
);
|
|
1143
|
+
return res.data.map((h) => h.toLowerCase());
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* The mutable remainder of the nullifier set after the last sealed chunk.
|
|
1147
|
+
* Identical request for every caller (no input). `afterChunks` lets the
|
|
1148
|
+
* client detect a chunk sealed between its manifest fetch and this one.
|
|
1149
|
+
*/
|
|
1150
|
+
async getNullifierTail() {
|
|
1151
|
+
const res = await this.get("/shielded/nullifiers/tail");
|
|
1152
|
+
return { afterChunks: res.afterChunks, data: res.data.map((h) => h.toLowerCase()) };
|
|
1153
|
+
}
|
|
1122
1154
|
// ─── Private transfers ─────────────────────────────────────────────────────
|
|
1123
1155
|
/** Server-enforced max items per by-nullifiers / by-commitments request. */
|
|
1124
1156
|
static TRANSFER_LOOKUP_CHUNK = 50;
|