@veridex/sdk 1.0.0-beta.17 → 1.0.0-beta.18
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/README.md +163 -111
- package/dist/chains/aptos/index.d.mts +1 -1
- package/dist/chains/aptos/index.d.ts +1 -1
- package/dist/chains/evm/index.d.mts +2 -2
- package/dist/chains/evm/index.d.ts +2 -2
- package/dist/chains/solana/index.d.mts +1 -1
- package/dist/chains/solana/index.d.ts +1 -1
- package/dist/chains/stacks/index.d.mts +1 -1
- package/dist/chains/stacks/index.d.ts +1 -1
- package/dist/chains/starknet/index.d.mts +1 -1
- package/dist/chains/starknet/index.d.ts +1 -1
- package/dist/chains/sui/index.d.mts +1 -1
- package/dist/chains/sui/index.d.ts +1 -1
- package/dist/{index-CYOyIE3b.d.mts → index-Dy29mvBf.d.mts} +1 -1
- package/dist/{index-BXcR_ypI.d.ts → index-eXXqodd0.d.ts} +1 -1
- package/dist/index.d.mts +107 -5
- package/dist/index.d.ts +107 -5
- package/dist/index.js +198 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +185 -1
- package/dist/index.mjs.map +1 -1
- package/dist/queries/index.js +36 -1
- package/dist/queries/index.js.map +1 -1
- package/dist/queries/index.mjs +36 -1
- package/dist/queries/index.mjs.map +1 -1
- package/dist/{types-DE2ICQik.d.mts → types-DakHNZIP.d.mts} +2 -0
- package/dist/{types-DE2ICQik.d.ts → types-DakHNZIP.d.ts} +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.mts
CHANGED
|
@@ -25,6 +25,8 @@ interface ChainConfig {
|
|
|
25
25
|
wormholeVerifier?: string;
|
|
26
26
|
/** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */
|
|
27
27
|
vaultVaa?: string;
|
|
28
|
+
/** Agent marketplace contract (Monad Agent Gateway) */
|
|
29
|
+
serviceDirectory?: string;
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
32
|
interface PasskeyCredential {
|
package/dist/types.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ interface ChainConfig {
|
|
|
25
25
|
wormholeVerifier?: string;
|
|
26
26
|
/** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */
|
|
27
27
|
vaultVaa?: string;
|
|
28
|
+
/** Agent marketplace contract (Monad Agent Gateway) */
|
|
29
|
+
serviceDirectory?: string;
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
32
|
interface PasskeyCredential {
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["/**\n * Veridex Protocol SDK - Type Definitions\n */\n\n// ============================================================================\n// Configuration Types\n// ============================================================================\n\nexport interface VeridexConfig {\n hubChainId: number;\n hubRpcUrl: string;\n hubContractAddress: string;\n relayerUrl?: string;\n}\n\nexport interface ChainConfig {\n name: string;\n chainId: number;\n wormholeChainId: number;\n hubChainId?: number; // Wormhole chain ID of the Hub (for cross-chain auth)\n rpcUrl: string;\n explorerUrl: string;\n isEvm: boolean;\n contracts: {\n hub?: string;\n vaultFactory?: string;\n vaultImplementation?: string;\n wormholeCoreBridge: string;\n tokenBridge?: string;\n /** Wormhole guardian signature verifier (Stacks Phase 2) */\n wormholeVerifier?: string;\n /** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */\n vaultVaa?: string;\n };\n}\n\n// ============================================================================\n// Credential Types\n// ============================================================================\n\nexport interface PasskeyCredential {\n credentialId: string;\n publicKeyX: bigint;\n publicKeyY: bigint;\n keyHash: string;\n}\n\nexport interface WebAuthnSignature {\n authenticatorData: string;\n clientDataJSON: string;\n challengeIndex: number;\n typeIndex: number;\n r: bigint;\n s: bigint;\n}\n\n// ============================================================================\n// Action Types\n// ============================================================================\n\nexport interface TransferParams {\n targetChain: number;\n token: string; // address or \"native\"\n recipient: string;\n amount: bigint;\n}\n\nexport interface ExecuteParams {\n targetChain: number;\n target: string;\n value: bigint;\n data: string;\n}\n\nexport interface BridgeParams {\n sourceChain: number; // Chain where vault holds the tokens\n token: string; // Token address (or \"native\" for native token)\n amount: bigint;\n destinationChain: number; // Wormhole chain ID of destination\n recipient: string; // Recipient address on destination chain (hex string)\n}\n\nexport interface DispatchResult {\n transactionHash: string;\n sequence: bigint;\n userKeyHash: string;\n targetChain: number;\n}\n\n// ============================================================================\n// Action Payload Types\n// ============================================================================\n\nexport interface TransferAction {\n type: 'transfer';\n token: string;\n recipient: string;\n amount: bigint;\n}\n\nexport interface BridgeAction {\n type: 'bridge';\n token: string;\n amount: bigint;\n targetChain: number;\n recipient: string;\n}\n\n// ============================================================================\n// Query Types (Issue #9/#10/#11/#12)\n// ============================================================================\n\n/**\n * Wormhole Query proof for optimistic execution\n * Allows ~5-7 second latency vs ~120+ seconds for VAA\n */\nexport interface QueryProof {\n /** Raw query response bytes from Wormhole Guardians */\n queryResponse: string; // hex\n /** Guardian signatures (13/19 quorum) */\n signatures: string; // hex\n}\n\n/**\n * User preference for execution path\n */\nexport type ExecutionPath = 'query' | 'vaa' | 'auto';\n\n/**\n * Result from query-based submission\n */\nexport interface QuerySubmissionResult {\n /** Whether submission succeeded */\n success: boolean;\n /** Transaction hash on spoke chain */\n txHash?: string;\n /** Execution path used ('query' or 'vaa') */\n path: ExecutionPath;\n /** Latency in milliseconds */\n latencyMs?: number;\n /** Error message if failed */\n error?: string;\n /** Whether fallback to VAA was triggered */\n fellBack?: boolean;\n}\n\n// ============================================================================\n// Session Key Types (Issue #13)\n// ============================================================================\n\n/**\n * Session key structure for temporary authentication\n * Enables native L1 speed for repeat transactions without biometric auth\n */\nexport interface SessionKey {\n /** Hash of the temporary session public key */\n sessionKeyHash: string;\n /** Unix timestamp when session expires */\n expiry: number;\n /** Maximum transaction value for this session (0 = unlimited) */\n maxValue: bigint;\n /** Whether session was manually revoked */\n revoked: boolean;\n}\n\n/**\n * Result from session validation query\n */\nexport interface SessionValidationResult {\n /** Whether session is currently active */\n active: boolean;\n /** Session expiry timestamp (0 if inactive) */\n expiry: number;\n /** Maximum transaction value (0 if inactive) */\n maxValue: bigint;\n /** Index in sessions array */\n sessionIndex: number;\n}\n\n/**\n * Parameters for registering a new session\n */\nexport interface RegisterSessionParams {\n /** Signature for Passkey authentication */\n signature: WebAuthnSignature;\n /** User's Passkey public key X coordinate */\n publicKeyX: bigint;\n /** User's Passkey public key Y coordinate */\n publicKeyY: bigint;\n /** Hash of the temporary session public key */\n sessionKeyHash: string;\n /** Session duration in seconds (max 24 hours) */\n duration: number;\n /** Maximum transaction value (0 = unlimited) */\n maxValue: bigint;\n /** Whether to require user verification */\n requireUV: boolean;\n}\n\n/**\n * Parameters for revoking a session\n */\nexport interface RevokeSessionParams {\n /** Signature for Passkey authentication */\n signature: WebAuthnSignature;\n /** User's Passkey public key X coordinate */\n publicKeyX: bigint;\n /** User's Passkey public key Y coordinate */\n publicKeyY: bigint;\n /** Hash of the session key to revoke */\n sessionKeyHash: string;\n /** Whether to require user verification */\n requireUV: boolean;\n}\n\n// ============================================================================\n// Backup Passkey / Multi-Key Identity Types (Issue #22)\n// ============================================================================\n\n/**\n * Identity state for multi-key management\n * First passkey registered becomes the immutable identity root\n */\nexport interface IdentityState {\n /** Identity key hash (first passkey's keyHash) */\n identity: string;\n /** Number of authorized keys */\n keyCount: number;\n /** Maximum allowed keys per identity */\n maxKeys: number;\n /** Whether the specified key is the root identity */\n isRoot: boolean;\n}\n\n/**\n * Result from registering a backup passkey\n */\nexport interface AddBackupKeyResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the key was added to */\n identity: string;\n /** The new key hash that was added */\n newKeyHash: string;\n /** Total number of keys after addition */\n keyCount: number;\n}\n\n/**\n * Result from removing a passkey\n */\nexport interface RemoveKeyResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the key was removed from */\n identity: string;\n /** The key hash that was removed */\n removedKeyHash: string;\n /** Remaining number of keys after removal */\n keyCount: number;\n}\n\n/**\n * Authorized key information\n */\nexport interface AuthorizedKey {\n /** Key hash of the authorized passkey */\n keyHash: string;\n /** Whether this key is the root identity key */\n isRoot: boolean;\n}\n\n// =============================================================================\n// SOCIAL RECOVERY TYPES (Issue #23)\n// =============================================================================\n\n/**\n * Guardian configuration for an identity\n */\nexport interface GuardianConfig {\n /** Array of guardian key hashes */\n guardians: string[];\n /** Required approvals for recovery (M-of-N) */\n threshold: bigint;\n /** Whether guardians have been configured */\n isConfigured: boolean;\n}\n\n/**\n * Recovery status for an identity\n */\nexport interface RecoveryStatus {\n /** Whether a recovery is currently active */\n isActive: boolean;\n /** Proposed new owner key hash */\n newOwnerKeyHash: string;\n /** Timestamp when recovery was initiated */\n initiatedAt: bigint;\n /** Current number of guardian approvals */\n approvalCount: bigint;\n /** Required approvals for recovery */\n threshold: bigint;\n /** Timestamp when recovery can be executed (after timelock) */\n canExecuteAt: bigint;\n /** Timestamp when recovery expires */\n expiresAt: bigint;\n}\n\n/**\n * Result from setting up guardians\n */\nexport interface SetupGuardiansResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity guardians were set up for */\n identity: string;\n /** Array of guardian key hashes */\n guardians: string[];\n /** Required approvals for recovery */\n threshold: bigint;\n}\n\n/**\n * Result from adding a guardian\n */\nexport interface AddGuardianResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the guardian was added to */\n identity: string;\n /** The guardian key hash that was added */\n guardianKeyHash: string;\n}\n\n/**\n * Result from removing a guardian\n */\nexport interface RemoveGuardianResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the guardian was removed from */\n identity: string;\n /** The guardian key hash that was removed */\n guardianKeyHash: string;\n}\n\n/**\n * Result from initiating recovery\n */\nexport interface InitiateRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity being recovered */\n identity: string;\n /** Proposed new owner key hash */\n newOwnerKeyHash: string;\n /** Timestamp when recovery can be executed */\n canExecuteAt: bigint;\n}\n\n/**\n * Result from approving recovery\n */\nexport interface ApproveRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity being recovered */\n identity: string;\n /** The guardian who approved */\n guardianKeyHash: string;\n /** Current approval count */\n approvalCount: bigint;\n /** Required approvals */\n threshold: bigint;\n}\n\n/**\n * Result from executing recovery\n */\nexport interface ExecuteRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity that was recovered */\n identity: string;\n /** The new owner key hash */\n newOwnerKeyHash: string;\n}\n\n/**\n * Result from cancelling recovery\n */\nexport interface CancelRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity whose recovery was cancelled */\n identity: string;\n}\n\nexport interface ExecuteAction {\n type: 'execute';\n target: string;\n value: bigint;\n data: string;\n}\n\nexport interface ConfigAction {\n type: 'config';\n configType: number;\n configData: string;\n}\n\nexport type ActionPayload = TransferAction | BridgeAction | ExecuteAction | ConfigAction | { type: string; raw: string };\n\n// ============================================================================\n// VAA Types\n// ============================================================================\n\nexport interface VAA {\n version: number;\n guardianSetIndex: number;\n signatures: VAASignature[];\n timestamp: number;\n nonce: number;\n emitterChain: number;\n emitterAddress: string;\n sequence: bigint;\n consistencyLevel: number;\n payload: string;\n hash: string; // keccak256 of the body (for verification)\n}\n\nexport interface VAASignature {\n guardianIndex: number;\n signature: string;\n}\n\nexport interface VeridexPayload {\n version: number;\n userKeyHash: string;\n targetChain: number;\n nonce: bigint;\n publicKeyX: bigint;\n publicKeyY: bigint;\n actionPayload: string;\n}\n\n// ============================================================================\n// Vault Types\n// ============================================================================\n\nexport interface VaultInfo {\n address: string;\n ownerKeyHash: string;\n chain: string;\n wormholeChainId: number;\n}\n\n// ============================================================================\n// Test Result Types\n// ============================================================================\n\nexport interface TestResult {\n success: boolean;\n sourceChain: string;\n targetChain: string;\n txHash?: string;\n vaaSequence?: bigint;\n error?: string;\n duration?: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["/**\n * Veridex Protocol SDK - Type Definitions\n */\n\n// ============================================================================\n// Configuration Types\n// ============================================================================\n\nexport interface VeridexConfig {\n hubChainId: number;\n hubRpcUrl: string;\n hubContractAddress: string;\n relayerUrl?: string;\n}\n\nexport interface ChainConfig {\n name: string;\n chainId: number;\n wormholeChainId: number;\n hubChainId?: number; // Wormhole chain ID of the Hub (for cross-chain auth)\n rpcUrl: string;\n explorerUrl: string;\n isEvm: boolean;\n contracts: {\n hub?: string;\n vaultFactory?: string;\n vaultImplementation?: string;\n wormholeCoreBridge: string;\n tokenBridge?: string;\n /** Wormhole guardian signature verifier (Stacks Phase 2) */\n wormholeVerifier?: string;\n /** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */\n vaultVaa?: string;\n /** Agent marketplace contract (Monad Agent Gateway) */\n serviceDirectory?: string;\n };\n}\n\n// ============================================================================\n// Credential Types\n// ============================================================================\n\nexport interface PasskeyCredential {\n credentialId: string;\n publicKeyX: bigint;\n publicKeyY: bigint;\n keyHash: string;\n}\n\nexport interface WebAuthnSignature {\n authenticatorData: string;\n clientDataJSON: string;\n challengeIndex: number;\n typeIndex: number;\n r: bigint;\n s: bigint;\n}\n\n// ============================================================================\n// Action Types\n// ============================================================================\n\nexport interface TransferParams {\n targetChain: number;\n token: string; // address or \"native\"\n recipient: string;\n amount: bigint;\n}\n\nexport interface ExecuteParams {\n targetChain: number;\n target: string;\n value: bigint;\n data: string;\n}\n\nexport interface BridgeParams {\n sourceChain: number; // Chain where vault holds the tokens\n token: string; // Token address (or \"native\" for native token)\n amount: bigint;\n destinationChain: number; // Wormhole chain ID of destination\n recipient: string; // Recipient address on destination chain (hex string)\n}\n\nexport interface DispatchResult {\n transactionHash: string;\n sequence: bigint;\n userKeyHash: string;\n targetChain: number;\n}\n\n// ============================================================================\n// Action Payload Types\n// ============================================================================\n\nexport interface TransferAction {\n type: 'transfer';\n token: string;\n recipient: string;\n amount: bigint;\n}\n\nexport interface BridgeAction {\n type: 'bridge';\n token: string;\n amount: bigint;\n targetChain: number;\n recipient: string;\n}\n\n// ============================================================================\n// Query Types (Issue #9/#10/#11/#12)\n// ============================================================================\n\n/**\n * Wormhole Query proof for optimistic execution\n * Allows ~5-7 second latency vs ~120+ seconds for VAA\n */\nexport interface QueryProof {\n /** Raw query response bytes from Wormhole Guardians */\n queryResponse: string; // hex\n /** Guardian signatures (13/19 quorum) */\n signatures: string; // hex\n}\n\n/**\n * User preference for execution path\n */\nexport type ExecutionPath = 'query' | 'vaa' | 'auto';\n\n/**\n * Result from query-based submission\n */\nexport interface QuerySubmissionResult {\n /** Whether submission succeeded */\n success: boolean;\n /** Transaction hash on spoke chain */\n txHash?: string;\n /** Execution path used ('query' or 'vaa') */\n path: ExecutionPath;\n /** Latency in milliseconds */\n latencyMs?: number;\n /** Error message if failed */\n error?: string;\n /** Whether fallback to VAA was triggered */\n fellBack?: boolean;\n}\n\n// ============================================================================\n// Session Key Types (Issue #13)\n// ============================================================================\n\n/**\n * Session key structure for temporary authentication\n * Enables native L1 speed for repeat transactions without biometric auth\n */\nexport interface SessionKey {\n /** Hash of the temporary session public key */\n sessionKeyHash: string;\n /** Unix timestamp when session expires */\n expiry: number;\n /** Maximum transaction value for this session (0 = unlimited) */\n maxValue: bigint;\n /** Whether session was manually revoked */\n revoked: boolean;\n}\n\n/**\n * Result from session validation query\n */\nexport interface SessionValidationResult {\n /** Whether session is currently active */\n active: boolean;\n /** Session expiry timestamp (0 if inactive) */\n expiry: number;\n /** Maximum transaction value (0 if inactive) */\n maxValue: bigint;\n /** Index in sessions array */\n sessionIndex: number;\n}\n\n/**\n * Parameters for registering a new session\n */\nexport interface RegisterSessionParams {\n /** Signature for Passkey authentication */\n signature: WebAuthnSignature;\n /** User's Passkey public key X coordinate */\n publicKeyX: bigint;\n /** User's Passkey public key Y coordinate */\n publicKeyY: bigint;\n /** Hash of the temporary session public key */\n sessionKeyHash: string;\n /** Session duration in seconds (max 24 hours) */\n duration: number;\n /** Maximum transaction value (0 = unlimited) */\n maxValue: bigint;\n /** Whether to require user verification */\n requireUV: boolean;\n}\n\n/**\n * Parameters for revoking a session\n */\nexport interface RevokeSessionParams {\n /** Signature for Passkey authentication */\n signature: WebAuthnSignature;\n /** User's Passkey public key X coordinate */\n publicKeyX: bigint;\n /** User's Passkey public key Y coordinate */\n publicKeyY: bigint;\n /** Hash of the session key to revoke */\n sessionKeyHash: string;\n /** Whether to require user verification */\n requireUV: boolean;\n}\n\n// ============================================================================\n// Backup Passkey / Multi-Key Identity Types (Issue #22)\n// ============================================================================\n\n/**\n * Identity state for multi-key management\n * First passkey registered becomes the immutable identity root\n */\nexport interface IdentityState {\n /** Identity key hash (first passkey's keyHash) */\n identity: string;\n /** Number of authorized keys */\n keyCount: number;\n /** Maximum allowed keys per identity */\n maxKeys: number;\n /** Whether the specified key is the root identity */\n isRoot: boolean;\n}\n\n/**\n * Result from registering a backup passkey\n */\nexport interface AddBackupKeyResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the key was added to */\n identity: string;\n /** The new key hash that was added */\n newKeyHash: string;\n /** Total number of keys after addition */\n keyCount: number;\n}\n\n/**\n * Result from removing a passkey\n */\nexport interface RemoveKeyResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the key was removed from */\n identity: string;\n /** The key hash that was removed */\n removedKeyHash: string;\n /** Remaining number of keys after removal */\n keyCount: number;\n}\n\n/**\n * Authorized key information\n */\nexport interface AuthorizedKey {\n /** Key hash of the authorized passkey */\n keyHash: string;\n /** Whether this key is the root identity key */\n isRoot: boolean;\n}\n\n// =============================================================================\n// SOCIAL RECOVERY TYPES (Issue #23)\n// =============================================================================\n\n/**\n * Guardian configuration for an identity\n */\nexport interface GuardianConfig {\n /** Array of guardian key hashes */\n guardians: string[];\n /** Required approvals for recovery (M-of-N) */\n threshold: bigint;\n /** Whether guardians have been configured */\n isConfigured: boolean;\n}\n\n/**\n * Recovery status for an identity\n */\nexport interface RecoveryStatus {\n /** Whether a recovery is currently active */\n isActive: boolean;\n /** Proposed new owner key hash */\n newOwnerKeyHash: string;\n /** Timestamp when recovery was initiated */\n initiatedAt: bigint;\n /** Current number of guardian approvals */\n approvalCount: bigint;\n /** Required approvals for recovery */\n threshold: bigint;\n /** Timestamp when recovery can be executed (after timelock) */\n canExecuteAt: bigint;\n /** Timestamp when recovery expires */\n expiresAt: bigint;\n}\n\n/**\n * Result from setting up guardians\n */\nexport interface SetupGuardiansResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity guardians were set up for */\n identity: string;\n /** Array of guardian key hashes */\n guardians: string[];\n /** Required approvals for recovery */\n threshold: bigint;\n}\n\n/**\n * Result from adding a guardian\n */\nexport interface AddGuardianResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the guardian was added to */\n identity: string;\n /** The guardian key hash that was added */\n guardianKeyHash: string;\n}\n\n/**\n * Result from removing a guardian\n */\nexport interface RemoveGuardianResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity the guardian was removed from */\n identity: string;\n /** The guardian key hash that was removed */\n guardianKeyHash: string;\n}\n\n/**\n * Result from initiating recovery\n */\nexport interface InitiateRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity being recovered */\n identity: string;\n /** Proposed new owner key hash */\n newOwnerKeyHash: string;\n /** Timestamp when recovery can be executed */\n canExecuteAt: bigint;\n}\n\n/**\n * Result from approving recovery\n */\nexport interface ApproveRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity being recovered */\n identity: string;\n /** The guardian who approved */\n guardianKeyHash: string;\n /** Current approval count */\n approvalCount: bigint;\n /** Required approvals */\n threshold: bigint;\n}\n\n/**\n * Result from executing recovery\n */\nexport interface ExecuteRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity that was recovered */\n identity: string;\n /** The new owner key hash */\n newOwnerKeyHash: string;\n}\n\n/**\n * Result from cancelling recovery\n */\nexport interface CancelRecoveryResult {\n /** Transaction hash on Hub chain */\n transactionHash: string;\n /** Wormhole sequence number for cross-chain sync */\n sequence: bigint;\n /** The identity whose recovery was cancelled */\n identity: string;\n}\n\nexport interface ExecuteAction {\n type: 'execute';\n target: string;\n value: bigint;\n data: string;\n}\n\nexport interface ConfigAction {\n type: 'config';\n configType: number;\n configData: string;\n}\n\nexport type ActionPayload = TransferAction | BridgeAction | ExecuteAction | ConfigAction | { type: string; raw: string };\n\n// ============================================================================\n// VAA Types\n// ============================================================================\n\nexport interface VAA {\n version: number;\n guardianSetIndex: number;\n signatures: VAASignature[];\n timestamp: number;\n nonce: number;\n emitterChain: number;\n emitterAddress: string;\n sequence: bigint;\n consistencyLevel: number;\n payload: string;\n hash: string; // keccak256 of the body (for verification)\n}\n\nexport interface VAASignature {\n guardianIndex: number;\n signature: string;\n}\n\nexport interface VeridexPayload {\n version: number;\n userKeyHash: string;\n targetChain: number;\n nonce: bigint;\n publicKeyX: bigint;\n publicKeyY: bigint;\n actionPayload: string;\n}\n\n// ============================================================================\n// Vault Types\n// ============================================================================\n\nexport interface VaultInfo {\n address: string;\n ownerKeyHash: string;\n chain: string;\n wormholeChainId: number;\n}\n\n// ============================================================================\n// Test Result Types\n// ============================================================================\n\nexport interface TestResult {\n success: boolean;\n sourceChain: string;\n targetChain: string;\n txHash?: string;\n vaaSequence?: bigint;\n error?: string;\n duration?: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED