@veridex/sdk 1.0.0-beta.1
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/CHANGELOG.md +73 -0
- package/LICENSE +21 -0
- package/README.md +212 -0
- package/dist/chains/aptos/index.d.mts +140 -0
- package/dist/chains/aptos/index.d.ts +140 -0
- package/dist/chains/aptos/index.js +563 -0
- package/dist/chains/aptos/index.js.map +1 -0
- package/dist/chains/aptos/index.mjs +536 -0
- package/dist/chains/aptos/index.mjs.map +1 -0
- package/dist/chains/evm/index.d.mts +5 -0
- package/dist/chains/evm/index.d.ts +5 -0
- package/dist/chains/evm/index.js +1233 -0
- package/dist/chains/evm/index.js.map +1 -0
- package/dist/chains/evm/index.mjs +1205 -0
- package/dist/chains/evm/index.mjs.map +1 -0
- package/dist/chains/solana/index.d.mts +116 -0
- package/dist/chains/solana/index.d.ts +116 -0
- package/dist/chains/solana/index.js +513 -0
- package/dist/chains/solana/index.js.map +1 -0
- package/dist/chains/solana/index.mjs +491 -0
- package/dist/chains/solana/index.mjs.map +1 -0
- package/dist/chains/starknet/index.d.mts +172 -0
- package/dist/chains/starknet/index.d.ts +172 -0
- package/dist/chains/starknet/index.js +534 -0
- package/dist/chains/starknet/index.js.map +1 -0
- package/dist/chains/starknet/index.mjs +507 -0
- package/dist/chains/starknet/index.mjs.map +1 -0
- package/dist/chains/sui/index.d.mts +182 -0
- package/dist/chains/sui/index.d.ts +182 -0
- package/dist/chains/sui/index.js +560 -0
- package/dist/chains/sui/index.js.map +1 -0
- package/dist/chains/sui/index.mjs +533 -0
- package/dist/chains/sui/index.mjs.map +1 -0
- package/dist/constants.d.mts +150 -0
- package/dist/constants.d.ts +150 -0
- package/dist/constants.js +430 -0
- package/dist/constants.js.map +1 -0
- package/dist/constants.mjs +392 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/index-0NXfbk0z.d.ts +637 -0
- package/dist/index-D0dLVjTA.d.mts +637 -0
- package/dist/index.d.mts +3101 -0
- package/dist/index.d.ts +3101 -0
- package/dist/index.js +13186 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13011 -0
- package/dist/index.mjs.map +1 -0
- package/dist/payload.d.mts +125 -0
- package/dist/payload.d.ts +125 -0
- package/dist/payload.js +315 -0
- package/dist/payload.js.map +1 -0
- package/dist/payload.mjs +269 -0
- package/dist/payload.mjs.map +1 -0
- package/dist/queries/index.d.mts +148 -0
- package/dist/queries/index.d.ts +148 -0
- package/dist/queries/index.js +1533 -0
- package/dist/queries/index.js.map +1 -0
- package/dist/queries/index.mjs +1508 -0
- package/dist/queries/index.mjs.map +1 -0
- package/dist/types-ChIsqCiw.d.mts +565 -0
- package/dist/types-ChIsqCiw.d.ts +565 -0
- package/dist/types-FJL7j6gQ.d.mts +172 -0
- package/dist/types-FJL7j6gQ.d.ts +172 -0
- package/dist/types.d.mts +407 -0
- package/dist/types.d.ts +407 -0
- package/dist/types.js +19 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +1 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.d.mts +81 -0
- package/dist/utils.d.ts +81 -0
- package/dist/utils.js +430 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +390 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/wormhole.d.mts +167 -0
- package/dist/wormhole.d.ts +167 -0
- package/dist/wormhole.js +468 -0
- package/dist/wormhole.js.map +1 -0
- package/dist/wormhole.mjs +422 -0
- package/dist/wormhole.mjs.map +1 -0
- package/package.json +151 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { S as SessionKey } from '../../types-FJL7j6gQ.mjs';
|
|
2
|
+
import { C as ChainClient, a as ChainConfig, T as TransferParams, E as ExecuteParams, B as BridgeParams, W as WebAuthnSignature, D as DispatchResult, V as VaultCreationResult, R as RegisterSessionParams, b as RevokeSessionParams, S as SessionValidationResult } from '../../types-ChIsqCiw.mjs';
|
|
3
|
+
import { RpcProvider } from 'starknet';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Veridex Protocol SDK - Starknet Chain Client
|
|
7
|
+
*
|
|
8
|
+
* Production-grade implementation of ChainClient interface for Starknet.
|
|
9
|
+
* Supports custom bridge attestation, gasless execution via Hub dispatch.
|
|
10
|
+
*
|
|
11
|
+
* Security:
|
|
12
|
+
* - Native starknet::eth_signature::verify_eth_signature for validation
|
|
13
|
+
* - Custom bridge with multi-relayer threshold attestations
|
|
14
|
+
* - Replay protection via nonce verification on Hub
|
|
15
|
+
* - Bridge validates source_chain == hub_chain_id (10004 = Base Sepolia)
|
|
16
|
+
*
|
|
17
|
+
* Architecture:
|
|
18
|
+
* - Starknet actions MUST be dispatched via Hub (Base Sepolia)
|
|
19
|
+
* - Hub publishes Wormhole message → relayer monitors → relayer submits attestation
|
|
20
|
+
* - Bridge accumulates attestations → threshold reached → spoke executes
|
|
21
|
+
* - Spoke validates source_chain == hubChainId (NOT targetChain)
|
|
22
|
+
*
|
|
23
|
+
* Custom Bridge:
|
|
24
|
+
* - Bridge address: 0x2c458c1ae64556482b05cc2d3ee5b032ed114d68429dda2062c9849a5a725f8
|
|
25
|
+
* - Chain ID: 50001 (custom range 50000+, reserved for non-Wormhole chains)
|
|
26
|
+
* - Hub Chain ID: 10004 (Base Sepolia - what bridge validates as source)
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
interface StarknetClientConfig {
|
|
30
|
+
wormholeChainId: number;
|
|
31
|
+
rpcUrl: string;
|
|
32
|
+
spokeContractAddress?: string;
|
|
33
|
+
bridgeContractAddress?: string;
|
|
34
|
+
network?: 'mainnet' | 'sepolia' | 'testnet';
|
|
35
|
+
hubRpcUrl?: string;
|
|
36
|
+
hubContractAddress?: string;
|
|
37
|
+
}
|
|
38
|
+
declare class StarknetClient implements ChainClient {
|
|
39
|
+
private config;
|
|
40
|
+
private provider;
|
|
41
|
+
private hubRpcUrl?;
|
|
42
|
+
private hubContractAddress?;
|
|
43
|
+
constructor(config: StarknetClientConfig);
|
|
44
|
+
getConfig(): ChainConfig;
|
|
45
|
+
getNonce(_userKeyHash: string): Promise<bigint>;
|
|
46
|
+
getMessageFee(): Promise<bigint>;
|
|
47
|
+
buildTransferPayload(params: TransferParams): Promise<string>;
|
|
48
|
+
buildExecutePayload(params: ExecuteParams): Promise<string>;
|
|
49
|
+
buildBridgePayload(params: BridgeParams): Promise<string>;
|
|
50
|
+
dispatch(signature: WebAuthnSignature, publicKeyX: bigint, publicKeyY: bigint, targetChain: number, actionPayload: string, nonce: bigint, signer: any): Promise<DispatchResult>;
|
|
51
|
+
dispatchGasless(signature: WebAuthnSignature, publicKeyX: bigint, publicKeyY: bigint, targetChain: number, actionPayload: string, nonce: bigint, relayerUrl: string): Promise<DispatchResult>;
|
|
52
|
+
computeVaultAddress(userKeyHash: string): string;
|
|
53
|
+
vaultExists(userKeyHash: string): Promise<boolean>;
|
|
54
|
+
createVault(userKeyHash: string, signer: any): Promise<VaultCreationResult>;
|
|
55
|
+
createVaultSponsored?(userKeyHash: string, sponsorPrivateKey: string, rpcUrl?: string): Promise<VaultCreationResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a vault via the relayer (sponsored/gasless)
|
|
58
|
+
* This is the recommended way to create Starknet vaults
|
|
59
|
+
*
|
|
60
|
+
* The relayer will dispatch a vault creation action from Hub via custom bridge to Starknet spoke
|
|
61
|
+
*/
|
|
62
|
+
createVaultViaRelayer(userKeyHash: string, relayerUrl: string): Promise<VaultCreationResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Get vault info via relayer (includes existence check)
|
|
65
|
+
*/
|
|
66
|
+
getVaultViaRelayer(userKeyHash: string, relayerUrl: string): Promise<{
|
|
67
|
+
vaultAddress: string;
|
|
68
|
+
exists: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
estimateVaultCreationGas(_userKeyHash: string): Promise<bigint>;
|
|
71
|
+
getFactoryAddress(): string | undefined;
|
|
72
|
+
getImplementationAddress(): string | undefined;
|
|
73
|
+
getNativeBalance(address: string): Promise<bigint>;
|
|
74
|
+
getProvider(): RpcProvider;
|
|
75
|
+
/**
|
|
76
|
+
* Register a session key on the Hub (must be called via Hub client)
|
|
77
|
+
* Starknet spokes validate sessions via CCQ, but registration happens on Hub
|
|
78
|
+
*
|
|
79
|
+
* @throws Error - Session management must be done via Hub chain
|
|
80
|
+
*/
|
|
81
|
+
registerSession(_params: RegisterSessionParams): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Revoke a session key on the Hub (must be called via Hub client)
|
|
84
|
+
*
|
|
85
|
+
* @throws Error - Session management must be done via Hub chain
|
|
86
|
+
*/
|
|
87
|
+
revokeSession(_params: RevokeSessionParams): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Check if a session is active by querying the Hub
|
|
90
|
+
* This method queries the Hub contract directly for session validation
|
|
91
|
+
*
|
|
92
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
93
|
+
* @param sessionKeyHash - Hash of session key to validate
|
|
94
|
+
* @returns Session validation result with expiry and limits
|
|
95
|
+
*/
|
|
96
|
+
isSessionActive(userKeyHash: string, sessionKeyHash: string): Promise<SessionValidationResult>;
|
|
97
|
+
/**
|
|
98
|
+
* Get all sessions for a user from the Hub
|
|
99
|
+
*
|
|
100
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
101
|
+
* @returns Array of all sessions (active and expired/revoked)
|
|
102
|
+
*/
|
|
103
|
+
getUserSessions(userKeyHash: string): Promise<SessionKey[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Get user state from Hub (comprehensive state query)
|
|
106
|
+
* Returns key hash, nonce, and last action hash for CCQ validation
|
|
107
|
+
*
|
|
108
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
109
|
+
* @returns User state with nonce and last action hash
|
|
110
|
+
*/
|
|
111
|
+
getUserState(userKeyHash: string): Promise<{
|
|
112
|
+
keyHash: string;
|
|
113
|
+
nonce: bigint;
|
|
114
|
+
lastActionHash: string;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* Get user's last action hash from Hub
|
|
118
|
+
* Used for optimistic execution and nonce validation
|
|
119
|
+
*
|
|
120
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
121
|
+
* @returns Last action hash (zero hash if no actions)
|
|
122
|
+
*/
|
|
123
|
+
getUserLastActionHash(userKeyHash: string): Promise<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Execute with query-based validation (faster than VAA, ~23s vs 60-90s)
|
|
126
|
+
* Uses Wormhole CCQ to validate Hub state, then executes on Starknet
|
|
127
|
+
*
|
|
128
|
+
* @param params Query execution parameters with CCQ response
|
|
129
|
+
* @returns Dispatch result with transaction hash
|
|
130
|
+
*
|
|
131
|
+
* @remarks
|
|
132
|
+
* Query-based execution flow:
|
|
133
|
+
* 1. Query Hub state via Wormhole CCQ
|
|
134
|
+
* 2. Validate Guardian signatures on query response
|
|
135
|
+
* 3. Execute on Starknet with validated state
|
|
136
|
+
* 4. Hub state must be < 60s stale (enforced by QueryVerifier)
|
|
137
|
+
*/
|
|
138
|
+
executeWithQuery(_params: {
|
|
139
|
+
userKeyHash: string;
|
|
140
|
+
queryResponse: Uint8Array;
|
|
141
|
+
actionType: number;
|
|
142
|
+
actionPayload: Uint8Array;
|
|
143
|
+
relayerUrl?: string;
|
|
144
|
+
}): Promise<DispatchResult>;
|
|
145
|
+
private computeKeyHash;
|
|
146
|
+
private buildMessageHash;
|
|
147
|
+
/**
|
|
148
|
+
* Get vault address by owner key hash
|
|
149
|
+
*
|
|
150
|
+
* @param ownerKeyHash - Owner's passkey hash
|
|
151
|
+
* @returns Vault address on Starknet (felt252 as hex string)
|
|
152
|
+
*/
|
|
153
|
+
getVaultAddress(ownerKeyHash: string): Promise<string | null>;
|
|
154
|
+
/**
|
|
155
|
+
* Check if vault exists and get basic info
|
|
156
|
+
*
|
|
157
|
+
* @param ownerKeyHash - Owner's passkey hash
|
|
158
|
+
* @returns Vault info or null if not found
|
|
159
|
+
*/
|
|
160
|
+
getVaultInfo(ownerKeyHash: string): Promise<{
|
|
161
|
+
address: string;
|
|
162
|
+
ownerKeyHash: string;
|
|
163
|
+
} | null>;
|
|
164
|
+
/**
|
|
165
|
+
* Check if spoke contract is paused
|
|
166
|
+
*
|
|
167
|
+
* @returns Whether the protocol is paused
|
|
168
|
+
*/
|
|
169
|
+
isProtocolPaused(): Promise<boolean>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { StarknetClient, type StarknetClientConfig };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { S as SessionKey } from '../../types-FJL7j6gQ.js';
|
|
2
|
+
import { C as ChainClient, a as ChainConfig, T as TransferParams, E as ExecuteParams, B as BridgeParams, W as WebAuthnSignature, D as DispatchResult, V as VaultCreationResult, R as RegisterSessionParams, b as RevokeSessionParams, S as SessionValidationResult } from '../../types-ChIsqCiw.js';
|
|
3
|
+
import { RpcProvider } from 'starknet';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Veridex Protocol SDK - Starknet Chain Client
|
|
7
|
+
*
|
|
8
|
+
* Production-grade implementation of ChainClient interface for Starknet.
|
|
9
|
+
* Supports custom bridge attestation, gasless execution via Hub dispatch.
|
|
10
|
+
*
|
|
11
|
+
* Security:
|
|
12
|
+
* - Native starknet::eth_signature::verify_eth_signature for validation
|
|
13
|
+
* - Custom bridge with multi-relayer threshold attestations
|
|
14
|
+
* - Replay protection via nonce verification on Hub
|
|
15
|
+
* - Bridge validates source_chain == hub_chain_id (10004 = Base Sepolia)
|
|
16
|
+
*
|
|
17
|
+
* Architecture:
|
|
18
|
+
* - Starknet actions MUST be dispatched via Hub (Base Sepolia)
|
|
19
|
+
* - Hub publishes Wormhole message → relayer monitors → relayer submits attestation
|
|
20
|
+
* - Bridge accumulates attestations → threshold reached → spoke executes
|
|
21
|
+
* - Spoke validates source_chain == hubChainId (NOT targetChain)
|
|
22
|
+
*
|
|
23
|
+
* Custom Bridge:
|
|
24
|
+
* - Bridge address: 0x2c458c1ae64556482b05cc2d3ee5b032ed114d68429dda2062c9849a5a725f8
|
|
25
|
+
* - Chain ID: 50001 (custom range 50000+, reserved for non-Wormhole chains)
|
|
26
|
+
* - Hub Chain ID: 10004 (Base Sepolia - what bridge validates as source)
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
interface StarknetClientConfig {
|
|
30
|
+
wormholeChainId: number;
|
|
31
|
+
rpcUrl: string;
|
|
32
|
+
spokeContractAddress?: string;
|
|
33
|
+
bridgeContractAddress?: string;
|
|
34
|
+
network?: 'mainnet' | 'sepolia' | 'testnet';
|
|
35
|
+
hubRpcUrl?: string;
|
|
36
|
+
hubContractAddress?: string;
|
|
37
|
+
}
|
|
38
|
+
declare class StarknetClient implements ChainClient {
|
|
39
|
+
private config;
|
|
40
|
+
private provider;
|
|
41
|
+
private hubRpcUrl?;
|
|
42
|
+
private hubContractAddress?;
|
|
43
|
+
constructor(config: StarknetClientConfig);
|
|
44
|
+
getConfig(): ChainConfig;
|
|
45
|
+
getNonce(_userKeyHash: string): Promise<bigint>;
|
|
46
|
+
getMessageFee(): Promise<bigint>;
|
|
47
|
+
buildTransferPayload(params: TransferParams): Promise<string>;
|
|
48
|
+
buildExecutePayload(params: ExecuteParams): Promise<string>;
|
|
49
|
+
buildBridgePayload(params: BridgeParams): Promise<string>;
|
|
50
|
+
dispatch(signature: WebAuthnSignature, publicKeyX: bigint, publicKeyY: bigint, targetChain: number, actionPayload: string, nonce: bigint, signer: any): Promise<DispatchResult>;
|
|
51
|
+
dispatchGasless(signature: WebAuthnSignature, publicKeyX: bigint, publicKeyY: bigint, targetChain: number, actionPayload: string, nonce: bigint, relayerUrl: string): Promise<DispatchResult>;
|
|
52
|
+
computeVaultAddress(userKeyHash: string): string;
|
|
53
|
+
vaultExists(userKeyHash: string): Promise<boolean>;
|
|
54
|
+
createVault(userKeyHash: string, signer: any): Promise<VaultCreationResult>;
|
|
55
|
+
createVaultSponsored?(userKeyHash: string, sponsorPrivateKey: string, rpcUrl?: string): Promise<VaultCreationResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a vault via the relayer (sponsored/gasless)
|
|
58
|
+
* This is the recommended way to create Starknet vaults
|
|
59
|
+
*
|
|
60
|
+
* The relayer will dispatch a vault creation action from Hub via custom bridge to Starknet spoke
|
|
61
|
+
*/
|
|
62
|
+
createVaultViaRelayer(userKeyHash: string, relayerUrl: string): Promise<VaultCreationResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Get vault info via relayer (includes existence check)
|
|
65
|
+
*/
|
|
66
|
+
getVaultViaRelayer(userKeyHash: string, relayerUrl: string): Promise<{
|
|
67
|
+
vaultAddress: string;
|
|
68
|
+
exists: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
estimateVaultCreationGas(_userKeyHash: string): Promise<bigint>;
|
|
71
|
+
getFactoryAddress(): string | undefined;
|
|
72
|
+
getImplementationAddress(): string | undefined;
|
|
73
|
+
getNativeBalance(address: string): Promise<bigint>;
|
|
74
|
+
getProvider(): RpcProvider;
|
|
75
|
+
/**
|
|
76
|
+
* Register a session key on the Hub (must be called via Hub client)
|
|
77
|
+
* Starknet spokes validate sessions via CCQ, but registration happens on Hub
|
|
78
|
+
*
|
|
79
|
+
* @throws Error - Session management must be done via Hub chain
|
|
80
|
+
*/
|
|
81
|
+
registerSession(_params: RegisterSessionParams): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Revoke a session key on the Hub (must be called via Hub client)
|
|
84
|
+
*
|
|
85
|
+
* @throws Error - Session management must be done via Hub chain
|
|
86
|
+
*/
|
|
87
|
+
revokeSession(_params: RevokeSessionParams): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Check if a session is active by querying the Hub
|
|
90
|
+
* This method queries the Hub contract directly for session validation
|
|
91
|
+
*
|
|
92
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
93
|
+
* @param sessionKeyHash - Hash of session key to validate
|
|
94
|
+
* @returns Session validation result with expiry and limits
|
|
95
|
+
*/
|
|
96
|
+
isSessionActive(userKeyHash: string, sessionKeyHash: string): Promise<SessionValidationResult>;
|
|
97
|
+
/**
|
|
98
|
+
* Get all sessions for a user from the Hub
|
|
99
|
+
*
|
|
100
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
101
|
+
* @returns Array of all sessions (active and expired/revoked)
|
|
102
|
+
*/
|
|
103
|
+
getUserSessions(userKeyHash: string): Promise<SessionKey[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Get user state from Hub (comprehensive state query)
|
|
106
|
+
* Returns key hash, nonce, and last action hash for CCQ validation
|
|
107
|
+
*
|
|
108
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
109
|
+
* @returns User state with nonce and last action hash
|
|
110
|
+
*/
|
|
111
|
+
getUserState(userKeyHash: string): Promise<{
|
|
112
|
+
keyHash: string;
|
|
113
|
+
nonce: bigint;
|
|
114
|
+
lastActionHash: string;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* Get user's last action hash from Hub
|
|
118
|
+
* Used for optimistic execution and nonce validation
|
|
119
|
+
*
|
|
120
|
+
* @param userKeyHash - Hash of user's Passkey public key
|
|
121
|
+
* @returns Last action hash (zero hash if no actions)
|
|
122
|
+
*/
|
|
123
|
+
getUserLastActionHash(userKeyHash: string): Promise<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Execute with query-based validation (faster than VAA, ~23s vs 60-90s)
|
|
126
|
+
* Uses Wormhole CCQ to validate Hub state, then executes on Starknet
|
|
127
|
+
*
|
|
128
|
+
* @param params Query execution parameters with CCQ response
|
|
129
|
+
* @returns Dispatch result with transaction hash
|
|
130
|
+
*
|
|
131
|
+
* @remarks
|
|
132
|
+
* Query-based execution flow:
|
|
133
|
+
* 1. Query Hub state via Wormhole CCQ
|
|
134
|
+
* 2. Validate Guardian signatures on query response
|
|
135
|
+
* 3. Execute on Starknet with validated state
|
|
136
|
+
* 4. Hub state must be < 60s stale (enforced by QueryVerifier)
|
|
137
|
+
*/
|
|
138
|
+
executeWithQuery(_params: {
|
|
139
|
+
userKeyHash: string;
|
|
140
|
+
queryResponse: Uint8Array;
|
|
141
|
+
actionType: number;
|
|
142
|
+
actionPayload: Uint8Array;
|
|
143
|
+
relayerUrl?: string;
|
|
144
|
+
}): Promise<DispatchResult>;
|
|
145
|
+
private computeKeyHash;
|
|
146
|
+
private buildMessageHash;
|
|
147
|
+
/**
|
|
148
|
+
* Get vault address by owner key hash
|
|
149
|
+
*
|
|
150
|
+
* @param ownerKeyHash - Owner's passkey hash
|
|
151
|
+
* @returns Vault address on Starknet (felt252 as hex string)
|
|
152
|
+
*/
|
|
153
|
+
getVaultAddress(ownerKeyHash: string): Promise<string | null>;
|
|
154
|
+
/**
|
|
155
|
+
* Check if vault exists and get basic info
|
|
156
|
+
*
|
|
157
|
+
* @param ownerKeyHash - Owner's passkey hash
|
|
158
|
+
* @returns Vault info or null if not found
|
|
159
|
+
*/
|
|
160
|
+
getVaultInfo(ownerKeyHash: string): Promise<{
|
|
161
|
+
address: string;
|
|
162
|
+
ownerKeyHash: string;
|
|
163
|
+
} | null>;
|
|
164
|
+
/**
|
|
165
|
+
* Check if spoke contract is paused
|
|
166
|
+
*
|
|
167
|
+
* @returns Whether the protocol is paused
|
|
168
|
+
*/
|
|
169
|
+
isProtocolPaused(): Promise<boolean>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { StarknetClient, type StarknetClientConfig };
|