@orbinum/sdk 0.7.2 → 0.7.4
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 +58 -3
- package/dist/index.d.ts +58 -3
- package/dist/index.js +20 -0
- package/dist/index.mjs +20 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -494,7 +494,13 @@ interface ShieldedCommitment {
|
|
|
494
494
|
blockNumber: number;
|
|
495
495
|
extrinsicIndex: number | null;
|
|
496
496
|
leafIndex: number;
|
|
497
|
-
/**
|
|
497
|
+
/**
|
|
498
|
+
* Asset ID as decimal string.
|
|
499
|
+
* For `source: 'shield'` and `source: 'unshield'` this reflects the real asset.
|
|
500
|
+
* For `source: 'transfer'` it is always `"0"` — the chain intentionally omits the asset ID
|
|
501
|
+
* from `CommitmentsInserted` events to prevent graph correlation across assets.
|
|
502
|
+
* The true asset is recoverable only by decrypting `encryptedMemo`.
|
|
503
|
+
*/
|
|
498
504
|
assetId: string;
|
|
499
505
|
/** Origin of the commitment: direct shield, output of private transfer, or change from unshield. */
|
|
500
506
|
source: 'shield' | 'transfer' | 'unshield';
|
|
@@ -519,6 +525,18 @@ interface PrivateTransferTimestamp {
|
|
|
519
525
|
/** Blake2-256 hash of the raw extrinsic, 0x-prefixed. Null if the extrinsic was not decoded. */
|
|
520
526
|
hash: string | null;
|
|
521
527
|
timestampMs: number | null;
|
|
528
|
+
/**
|
|
529
|
+
* Subset of the queried nullifiers that were spent in this specific extrinsic.
|
|
530
|
+
* Returned by `getTransfersByNullifiers`. Use to identify which input vault notes
|
|
531
|
+
* belong to this transfer for local reconstruction.
|
|
532
|
+
*/
|
|
533
|
+
matchedNullifiers?: string[];
|
|
534
|
+
/**
|
|
535
|
+
* Subset of the queried commitments that were inserted in this specific extrinsic.
|
|
536
|
+
* Returned by `getTransfersByCommitments`. Use to identify which output vault notes
|
|
537
|
+
* (change notes or received notes) belong to this transfer.
|
|
538
|
+
*/
|
|
539
|
+
matchedCommitments?: string[];
|
|
522
540
|
}
|
|
523
541
|
/** An unshield event stored by the indexer. */
|
|
524
542
|
interface Unshield {
|
|
@@ -681,6 +699,24 @@ type ShieldedAddressEvent = ({
|
|
|
681
699
|
} & Unshield) | ({
|
|
682
700
|
kind: 'transfer';
|
|
683
701
|
} & PrivateTransferTimestamp);
|
|
702
|
+
/** A validator node indexed from pallet-validator-set events. */
|
|
703
|
+
interface IndexedValidator {
|
|
704
|
+
account: string;
|
|
705
|
+
/** Current lifecycle status of the validator. */
|
|
706
|
+
status: 'pending' | 'approved' | 'rejected' | 'removed';
|
|
707
|
+
/** Reserved bond amount as decimal string (bigint-safe). Null if no bond was reserved. */
|
|
708
|
+
bondAmount: string | null;
|
|
709
|
+
requestedAtBlock: number | null;
|
|
710
|
+
approvedAtBlock: number | null;
|
|
711
|
+
removedAtBlock: number | null;
|
|
712
|
+
timestampMs: number | null;
|
|
713
|
+
}
|
|
714
|
+
/** A session rotation event indexed from pallet-session NewSession events. */
|
|
715
|
+
interface IndexedSession {
|
|
716
|
+
sessionIndex: number;
|
|
717
|
+
blockNumber: number;
|
|
718
|
+
timestampMs: number | null;
|
|
719
|
+
}
|
|
684
720
|
/**
|
|
685
721
|
* Lightweight hint returned by the stealth scan endpoint.
|
|
686
722
|
* Contains only the fields required for a wallet to:
|
|
@@ -691,7 +727,13 @@ type ShieldedAddressEvent = ({
|
|
|
691
727
|
interface StealthScanHint {
|
|
692
728
|
leafIndex: number;
|
|
693
729
|
commitmentHex: string;
|
|
694
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Asset ID as decimal string.
|
|
732
|
+
* For shield-origin commitments this is the real asset ID.
|
|
733
|
+
* For transfer-origin commitments this is always `"0"` — the chain does not emit the asset ID
|
|
734
|
+
* in `CommitmentsInserted` events by design (privacy: prevents cross-asset graph correlation).
|
|
735
|
+
* Recover the true asset by decrypting `encryptedMemo`.
|
|
736
|
+
*/
|
|
695
737
|
assetId: string;
|
|
696
738
|
/** Ephemeral public key (last 32 bytes of encrypted_memo), 0x-prefixed. null if memo absent. */
|
|
697
739
|
ephPkHex: string | null;
|
|
@@ -845,6 +887,19 @@ declare class IndexerClient {
|
|
|
845
887
|
}): Promise<PaginatedResult<RegisteredAsset>>;
|
|
846
888
|
/** Returns a single registered asset by its ID, or null if not found. */
|
|
847
889
|
getRegisteredAsset(assetId: string): Promise<RegisteredAsset | null>;
|
|
890
|
+
/** Returns a paginated list of validators. Filter by lifecycle status with `status`. */
|
|
891
|
+
getValidators(params?: {
|
|
892
|
+
page?: number;
|
|
893
|
+
limit?: number;
|
|
894
|
+
status?: 'pending' | 'approved' | 'rejected' | 'removed';
|
|
895
|
+
}): Promise<PaginatedResult<IndexedValidator>>;
|
|
896
|
+
/** Returns a single validator by account address, or null if not found. */
|
|
897
|
+
getValidator(account: string): Promise<IndexedValidator | null>;
|
|
898
|
+
/** Returns a paginated list of session rotations, ordered by most recent first. */
|
|
899
|
+
getSessions(params?: {
|
|
900
|
+
page?: number;
|
|
901
|
+
limit?: number;
|
|
902
|
+
}): Promise<PaginatedResult<IndexedSession>>;
|
|
848
903
|
/** Returns aggregated indexer statistics. */
|
|
849
904
|
getStats(): Promise<IndexerStats>;
|
|
850
905
|
/** Returns true if the indexer health endpoint responds OK. */
|
|
@@ -4339,4 +4394,4 @@ interface ExtrinsicFailedData {
|
|
|
4339
4394
|
dispatch_info: DispatchInfo;
|
|
4340
4395
|
}
|
|
4341
4396
|
|
|
4342
|
-
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, 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, 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, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, 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, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
|
4397
|
+
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, 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, 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, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, 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, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
package/dist/index.d.ts
CHANGED
|
@@ -494,7 +494,13 @@ interface ShieldedCommitment {
|
|
|
494
494
|
blockNumber: number;
|
|
495
495
|
extrinsicIndex: number | null;
|
|
496
496
|
leafIndex: number;
|
|
497
|
-
/**
|
|
497
|
+
/**
|
|
498
|
+
* Asset ID as decimal string.
|
|
499
|
+
* For `source: 'shield'` and `source: 'unshield'` this reflects the real asset.
|
|
500
|
+
* For `source: 'transfer'` it is always `"0"` — the chain intentionally omits the asset ID
|
|
501
|
+
* from `CommitmentsInserted` events to prevent graph correlation across assets.
|
|
502
|
+
* The true asset is recoverable only by decrypting `encryptedMemo`.
|
|
503
|
+
*/
|
|
498
504
|
assetId: string;
|
|
499
505
|
/** Origin of the commitment: direct shield, output of private transfer, or change from unshield. */
|
|
500
506
|
source: 'shield' | 'transfer' | 'unshield';
|
|
@@ -519,6 +525,18 @@ interface PrivateTransferTimestamp {
|
|
|
519
525
|
/** Blake2-256 hash of the raw extrinsic, 0x-prefixed. Null if the extrinsic was not decoded. */
|
|
520
526
|
hash: string | null;
|
|
521
527
|
timestampMs: number | null;
|
|
528
|
+
/**
|
|
529
|
+
* Subset of the queried nullifiers that were spent in this specific extrinsic.
|
|
530
|
+
* Returned by `getTransfersByNullifiers`. Use to identify which input vault notes
|
|
531
|
+
* belong to this transfer for local reconstruction.
|
|
532
|
+
*/
|
|
533
|
+
matchedNullifiers?: string[];
|
|
534
|
+
/**
|
|
535
|
+
* Subset of the queried commitments that were inserted in this specific extrinsic.
|
|
536
|
+
* Returned by `getTransfersByCommitments`. Use to identify which output vault notes
|
|
537
|
+
* (change notes or received notes) belong to this transfer.
|
|
538
|
+
*/
|
|
539
|
+
matchedCommitments?: string[];
|
|
522
540
|
}
|
|
523
541
|
/** An unshield event stored by the indexer. */
|
|
524
542
|
interface Unshield {
|
|
@@ -681,6 +699,24 @@ type ShieldedAddressEvent = ({
|
|
|
681
699
|
} & Unshield) | ({
|
|
682
700
|
kind: 'transfer';
|
|
683
701
|
} & PrivateTransferTimestamp);
|
|
702
|
+
/** A validator node indexed from pallet-validator-set events. */
|
|
703
|
+
interface IndexedValidator {
|
|
704
|
+
account: string;
|
|
705
|
+
/** Current lifecycle status of the validator. */
|
|
706
|
+
status: 'pending' | 'approved' | 'rejected' | 'removed';
|
|
707
|
+
/** Reserved bond amount as decimal string (bigint-safe). Null if no bond was reserved. */
|
|
708
|
+
bondAmount: string | null;
|
|
709
|
+
requestedAtBlock: number | null;
|
|
710
|
+
approvedAtBlock: number | null;
|
|
711
|
+
removedAtBlock: number | null;
|
|
712
|
+
timestampMs: number | null;
|
|
713
|
+
}
|
|
714
|
+
/** A session rotation event indexed from pallet-session NewSession events. */
|
|
715
|
+
interface IndexedSession {
|
|
716
|
+
sessionIndex: number;
|
|
717
|
+
blockNumber: number;
|
|
718
|
+
timestampMs: number | null;
|
|
719
|
+
}
|
|
684
720
|
/**
|
|
685
721
|
* Lightweight hint returned by the stealth scan endpoint.
|
|
686
722
|
* Contains only the fields required for a wallet to:
|
|
@@ -691,7 +727,13 @@ type ShieldedAddressEvent = ({
|
|
|
691
727
|
interface StealthScanHint {
|
|
692
728
|
leafIndex: number;
|
|
693
729
|
commitmentHex: string;
|
|
694
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Asset ID as decimal string.
|
|
732
|
+
* For shield-origin commitments this is the real asset ID.
|
|
733
|
+
* For transfer-origin commitments this is always `"0"` — the chain does not emit the asset ID
|
|
734
|
+
* in `CommitmentsInserted` events by design (privacy: prevents cross-asset graph correlation).
|
|
735
|
+
* Recover the true asset by decrypting `encryptedMemo`.
|
|
736
|
+
*/
|
|
695
737
|
assetId: string;
|
|
696
738
|
/** Ephemeral public key (last 32 bytes of encrypted_memo), 0x-prefixed. null if memo absent. */
|
|
697
739
|
ephPkHex: string | null;
|
|
@@ -845,6 +887,19 @@ declare class IndexerClient {
|
|
|
845
887
|
}): Promise<PaginatedResult<RegisteredAsset>>;
|
|
846
888
|
/** Returns a single registered asset by its ID, or null if not found. */
|
|
847
889
|
getRegisteredAsset(assetId: string): Promise<RegisteredAsset | null>;
|
|
890
|
+
/** Returns a paginated list of validators. Filter by lifecycle status with `status`. */
|
|
891
|
+
getValidators(params?: {
|
|
892
|
+
page?: number;
|
|
893
|
+
limit?: number;
|
|
894
|
+
status?: 'pending' | 'approved' | 'rejected' | 'removed';
|
|
895
|
+
}): Promise<PaginatedResult<IndexedValidator>>;
|
|
896
|
+
/** Returns a single validator by account address, or null if not found. */
|
|
897
|
+
getValidator(account: string): Promise<IndexedValidator | null>;
|
|
898
|
+
/** Returns a paginated list of session rotations, ordered by most recent first. */
|
|
899
|
+
getSessions(params?: {
|
|
900
|
+
page?: number;
|
|
901
|
+
limit?: number;
|
|
902
|
+
}): Promise<PaginatedResult<IndexedSession>>;
|
|
848
903
|
/** Returns aggregated indexer statistics. */
|
|
849
904
|
getStats(): Promise<IndexerStats>;
|
|
850
905
|
/** Returns true if the indexer health endpoint responds OK. */
|
|
@@ -4339,4 +4394,4 @@ interface ExtrinsicFailedData {
|
|
|
4339
4394
|
dispatch_info: DispatchInfo;
|
|
4340
4395
|
}
|
|
4341
4396
|
|
|
4342
|
-
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, 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, 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, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, 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, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
|
4397
|
+
export { type AccountListing, type AccountMappedData, type AccountMappedEvent, type AccountMappingCall, type AccountMappingEvent, AccountMappingModule, AccountMappingPrecompile, type AccountMetadata, type AccountUnmappedEvent, type ActiveVersionSetEvent, 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, 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, buildDummyTransferInput, bytesToBigintLE, computeNullifier, computePathIndices, createNoteDisclosureKey, decodeNoteDisclosureKey, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, deriveSpendingKeyFromSignature, deriveSpendingKeyMessage, deriveStealthOwnerPk, deriveStealthSk, 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, randomBlinding, recoverOwnerPkPoint, selectNotes, shortHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, vaultReplacer, vaultReviver };
|
package/dist/index.js
CHANGED
|
@@ -1341,6 +1341,26 @@ var IndexerClient = class {
|
|
|
1341
1341
|
async getRegisteredAsset(assetId) {
|
|
1342
1342
|
return this.getOrNull(`/shielded/assets/${encodeURIComponent(assetId)}`);
|
|
1343
1343
|
}
|
|
1344
|
+
// ─── Validators ────────────────────────────────────────────────────────────
|
|
1345
|
+
/** Returns a paginated list of validators. Filter by lifecycle status with `status`. */
|
|
1346
|
+
async getValidators(params) {
|
|
1347
|
+
const qs = this.buildQuery({
|
|
1348
|
+
page: params?.page,
|
|
1349
|
+
limit: params?.limit,
|
|
1350
|
+
status: params?.status
|
|
1351
|
+
});
|
|
1352
|
+
return this.get(`/validators${qs}`);
|
|
1353
|
+
}
|
|
1354
|
+
/** Returns a single validator by account address, or null if not found. */
|
|
1355
|
+
async getValidator(account) {
|
|
1356
|
+
return this.getOrNull(`/validators/${encodeURIComponent(account)}`);
|
|
1357
|
+
}
|
|
1358
|
+
// ─── Sessions ──────────────────────────────────────────────────────────────
|
|
1359
|
+
/** Returns a paginated list of session rotations, ordered by most recent first. */
|
|
1360
|
+
async getSessions(params) {
|
|
1361
|
+
const qs = this.buildQuery({ page: params?.page, limit: params?.limit });
|
|
1362
|
+
return this.get(`/sessions${qs}`);
|
|
1363
|
+
}
|
|
1344
1364
|
// ─── Stats & Health ────────────────────────────────────────────────────────
|
|
1345
1365
|
/** Returns aggregated indexer statistics. */
|
|
1346
1366
|
async getStats() {
|
package/dist/index.mjs
CHANGED
|
@@ -1214,6 +1214,26 @@ var IndexerClient = class {
|
|
|
1214
1214
|
async getRegisteredAsset(assetId) {
|
|
1215
1215
|
return this.getOrNull(`/shielded/assets/${encodeURIComponent(assetId)}`);
|
|
1216
1216
|
}
|
|
1217
|
+
// ─── Validators ────────────────────────────────────────────────────────────
|
|
1218
|
+
/** Returns a paginated list of validators. Filter by lifecycle status with `status`. */
|
|
1219
|
+
async getValidators(params) {
|
|
1220
|
+
const qs = this.buildQuery({
|
|
1221
|
+
page: params?.page,
|
|
1222
|
+
limit: params?.limit,
|
|
1223
|
+
status: params?.status
|
|
1224
|
+
});
|
|
1225
|
+
return this.get(`/validators${qs}`);
|
|
1226
|
+
}
|
|
1227
|
+
/** Returns a single validator by account address, or null if not found. */
|
|
1228
|
+
async getValidator(account) {
|
|
1229
|
+
return this.getOrNull(`/validators/${encodeURIComponent(account)}`);
|
|
1230
|
+
}
|
|
1231
|
+
// ─── Sessions ──────────────────────────────────────────────────────────────
|
|
1232
|
+
/** Returns a paginated list of session rotations, ordered by most recent first. */
|
|
1233
|
+
async getSessions(params) {
|
|
1234
|
+
const qs = this.buildQuery({ page: params?.page, limit: params?.limit });
|
|
1235
|
+
return this.get(`/sessions${qs}`);
|
|
1236
|
+
}
|
|
1217
1237
|
// ─── Stats & Health ────────────────────────────────────────────────────────
|
|
1218
1238
|
/** Returns aggregated indexer statistics. */
|
|
1219
1239
|
async getStats() {
|