@veridex/sdk 1.0.0-beta.15 → 1.0.0-beta.17

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.
@@ -77,6 +77,10 @@ interface ChainConfig {
77
77
  vaultImplementation?: string;
78
78
  wormholeCoreBridge: string;
79
79
  tokenBridge?: string;
80
+ /** Wormhole guardian signature verifier (Stacks Phase 2) */
81
+ wormholeVerifier?: string;
82
+ /** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */
83
+ vaultVaa?: string;
80
84
  };
81
85
  }
82
86
  /**
@@ -562,4 +566,4 @@ interface BridgeResult extends DispatchResult {
562
566
  timestamp: number;
563
567
  }
564
568
 
565
- export type { AuthorizedKey as A, BridgeParams as B, ChainClient as C, DispatchResult as D, ExecuteParams as E, IdentityState as I, PasskeyCredential as P, RegisterSessionParams as R, SessionValidationResult as S, TransferParams as T, UnifiedIdentity as U, VaultCreationResult as V, WebAuthnSignature as W, ChainConfig as a, RevokeSessionParams as b, WalletManagerConfig as c, ChainAddress as d, VAA as e, VeridexPayload as f, PreparedTransfer as g, PreparedBridge as h, VeridexConfig as i, BridgeResult as j, TransferResult as k, ReceiveAddress as l, VaultInfo as m, AddBackupKeyResult as n, RemoveKeyResult as o, ConfigParams as p, TransferAction as q, BridgeAction as r, ExecuteAction as s, ConfigAction as t, ActionPayload as u, VAASignature as v, TestResult as w, TransactionHistoryEntry as x, CrossChainFees as y };
569
+ export type { AuthorizedKey as A, BridgeParams as B, ChainAddress as C, DispatchResult as D, ExecuteParams as E, IdentityState as I, PasskeyCredential as P, ReceiveAddress as R, SessionValidationResult as S, TransferParams as T, UnifiedIdentity as U, VAA as V, WalletManagerConfig as W, ChainConfig as a, VeridexPayload as b, PreparedTransfer as c, PreparedBridge as d, VeridexConfig as e, ChainClient as f, BridgeResult as g, TransferResult as h, VaultInfo as i, VaultCreationResult as j, AddBackupKeyResult as k, RemoveKeyResult as l, ConfigParams as m, TransferAction as n, BridgeAction as o, ExecuteAction as p, ConfigAction as q, ActionPayload as r, VAASignature as s, TestResult as t, TransactionHistoryEntry as u, CrossChainFees as v, WebAuthnSignature as w, RegisterSessionParams as x, RevokeSessionParams as y };
@@ -77,6 +77,10 @@ interface ChainConfig {
77
77
  vaultImplementation?: string;
78
78
  wormholeCoreBridge: string;
79
79
  tokenBridge?: string;
80
+ /** Wormhole guardian signature verifier (Stacks Phase 2) */
81
+ wormholeVerifier?: string;
82
+ /** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */
83
+ vaultVaa?: string;
80
84
  };
81
85
  }
82
86
  /**
@@ -562,4 +566,4 @@ interface BridgeResult extends DispatchResult {
562
566
  timestamp: number;
563
567
  }
564
568
 
565
- export type { AuthorizedKey as A, BridgeParams as B, ChainClient as C, DispatchResult as D, ExecuteParams as E, IdentityState as I, PasskeyCredential as P, RegisterSessionParams as R, SessionValidationResult as S, TransferParams as T, UnifiedIdentity as U, VaultCreationResult as V, WebAuthnSignature as W, ChainConfig as a, RevokeSessionParams as b, WalletManagerConfig as c, ChainAddress as d, VAA as e, VeridexPayload as f, PreparedTransfer as g, PreparedBridge as h, VeridexConfig as i, BridgeResult as j, TransferResult as k, ReceiveAddress as l, VaultInfo as m, AddBackupKeyResult as n, RemoveKeyResult as o, ConfigParams as p, TransferAction as q, BridgeAction as r, ExecuteAction as s, ConfigAction as t, ActionPayload as u, VAASignature as v, TestResult as w, TransactionHistoryEntry as x, CrossChainFees as y };
569
+ export type { AuthorizedKey as A, BridgeParams as B, ChainAddress as C, DispatchResult as D, ExecuteParams as E, IdentityState as I, PasskeyCredential as P, ReceiveAddress as R, SessionValidationResult as S, TransferParams as T, UnifiedIdentity as U, VAA as V, WalletManagerConfig as W, ChainConfig as a, VeridexPayload as b, PreparedTransfer as c, PreparedBridge as d, VeridexConfig as e, ChainClient as f, BridgeResult as g, TransferResult as h, VaultInfo as i, VaultCreationResult as j, AddBackupKeyResult as k, RemoveKeyResult as l, ConfigParams as m, TransferAction as n, BridgeAction as o, ExecuteAction as p, ConfigAction as q, ActionPayload as r, VAASignature as s, TestResult as t, TransactionHistoryEntry as u, CrossChainFees as v, WebAuthnSignature as w, RegisterSessionParams as x, RevokeSessionParams as y };
@@ -169,4 +169,4 @@ declare enum SessionErrorCode {
169
169
  REVOCATION_FAILED = "REVOCATION_FAILED"
170
170
  }
171
171
 
172
- export { type ActionParams as A, type SessionKey as S, type SessionStorage as a, type SessionConfig as b, type SessionSignature as c, type SessionManagerConfig as d, type SessionEvent as e, type SessionEventCallback as f, type SessionSignedAction as g, SessionErrorCode as h, SessionError as i };
172
+ export { type ActionParams as A, type SessionStorage as S, type SessionKey as a, type SessionConfig as b, type SessionSignature as c, type SessionManagerConfig as d, type SessionEvent as e, type SessionEventCallback as f, type SessionSignedAction as g, SessionErrorCode as h, SessionError as i };
@@ -169,4 +169,4 @@ declare enum SessionErrorCode {
169
169
  REVOCATION_FAILED = "REVOCATION_FAILED"
170
170
  }
171
171
 
172
- export { type ActionParams as A, type SessionKey as S, type SessionStorage as a, type SessionConfig as b, type SessionSignature as c, type SessionManagerConfig as d, type SessionEvent as e, type SessionEventCallback as f, type SessionSignedAction as g, SessionErrorCode as h, SessionError as i };
172
+ export { type ActionParams as A, type SessionStorage as S, type SessionKey as a, type SessionConfig as b, type SessionSignature as c, type SessionManagerConfig as d, type SessionEvent as e, type SessionEventCallback as f, type SessionSignedAction as g, SessionErrorCode as h, SessionError as i };
package/dist/types.d.mts CHANGED
@@ -21,6 +21,10 @@ interface ChainConfig {
21
21
  vaultImplementation?: string;
22
22
  wormholeCoreBridge: string;
23
23
  tokenBridge?: string;
24
+ /** Wormhole guardian signature verifier (Stacks Phase 2) */
25
+ wormholeVerifier?: string;
26
+ /** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */
27
+ vaultVaa?: string;
24
28
  };
25
29
  }
26
30
  interface PasskeyCredential {
package/dist/types.d.ts CHANGED
@@ -21,6 +21,10 @@ interface ChainConfig {
21
21
  vaultImplementation?: string;
22
22
  wormholeCoreBridge: string;
23
23
  tokenBridge?: string;
24
+ /** Wormhole guardian signature verifier (Stacks Phase 2) */
25
+ wormholeVerifier?: string;
26
+ /** VAA-authorized vault for cross-chain transfers (Stacks Phase 2) */
27
+ vaultVaa?: string;
24
28
  };
25
29
  }
26
30
  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 };\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 };\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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veridex/sdk",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.17",
4
4
  "description": "Veridex Protocol SDK - Client library for Passkey-based cross-chain authentication",
5
5
  "author": "Veridex Protocol <team@veridex.network>",
6
6
  "license": "MIT",
@@ -78,6 +78,11 @@
78
78
  "import": "./dist/chains/starknet/index.mjs",
79
79
  "require": "./dist/chains/starknet/index.js"
80
80
  },
81
+ "./chains/stacks": {
82
+ "types": "./dist/chains/stacks/index.d.ts",
83
+ "import": "./dist/chains/stacks/index.mjs",
84
+ "require": "./dist/chains/stacks/index.js"
85
+ },
81
86
  "./queries": {
82
87
  "types": "./dist/queries/index.d.ts",
83
88
  "import": "./dist/queries/index.mjs",
@@ -136,6 +141,7 @@
136
141
  "aptos",
137
142
  "sui",
138
143
  "starknet",
144
+ "stacks",
139
145
  "authentication",
140
146
  "gasless",
141
147
  "session-keys",