@pear-protocol/symmio-client 0.3.25 → 0.3.27
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 +4 -0
- package/dist/index.d.mts +326 -7
- package/dist/index.d.ts +326 -7
- package/dist/index.js +360 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +353 -22
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +385 -1
- package/dist/react/index.d.ts +385 -1
- package/dist/react/index.js +829 -49
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +819 -51
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/provider.js +7 -1
- package/dist/react/provider.js.map +1 -1
- package/dist/react/provider.mjs +7 -1
- package/dist/react/provider.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,6 +93,10 @@ await sdk.withdraw.withdraw({
|
|
|
93
93
|
});
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
#### Instant Withdrawal (bridge + bot)
|
|
97
|
+
|
|
98
|
+
For the small-pool instant / 12h withdrawal flow (auth, fee options, bridge, and the orchestrated `useSymmInstantWithdraw` hook), see **[INSTANT_WITHDRAWAL.md](./INSTANT_WITHDRAWAL.md)**.
|
|
99
|
+
|
|
96
100
|
### Allocate / Deallocate
|
|
97
101
|
|
|
98
102
|
```typescript
|
package/dist/index.d.mts
CHANGED
|
@@ -234,6 +234,24 @@ type WithdrawParams = {
|
|
|
234
234
|
account: Address;
|
|
235
235
|
amount: bigint;
|
|
236
236
|
};
|
|
237
|
+
type TransferToBridgeParams = {
|
|
238
|
+
amount: bigint;
|
|
239
|
+
/** Destination bridge contract (the InstantWithdrawal address). */
|
|
240
|
+
bridgeAddress: Address;
|
|
241
|
+
};
|
|
242
|
+
type BridgeWithdrawParams = {
|
|
243
|
+
amount: bigint;
|
|
244
|
+
/** Destination bridge contract (the InstantWithdrawal address). */
|
|
245
|
+
bridgeAddress: Address;
|
|
246
|
+
/**
|
|
247
|
+
* Optional deallocate batched before the transfer (allocated → balance).
|
|
248
|
+
* Omit when the funds are already in the account's free balance.
|
|
249
|
+
*/
|
|
250
|
+
deallocate?: DeallocateParams;
|
|
251
|
+
};
|
|
252
|
+
type ProcessWithdrawalParams = {
|
|
253
|
+
bridgeId: bigint;
|
|
254
|
+
};
|
|
237
255
|
type AllocateParams = {
|
|
238
256
|
amount: bigint;
|
|
239
257
|
};
|
|
@@ -246,6 +264,196 @@ type InternalTransferParams = {
|
|
|
246
264
|
amount: bigint;
|
|
247
265
|
};
|
|
248
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Types for the Symmio Instant Withdrawal bot API and bridge flow.
|
|
269
|
+
*
|
|
270
|
+
* Field names mirror the live OpenAPI spec exactly (which mixes camelCase
|
|
271
|
+
* and snake_case across endpoints), so the shapes can be sent/received
|
|
272
|
+
* without remapping. Where the wire format is snake_case we also provide a
|
|
273
|
+
* normalized camelCase view for ergonomics (see `WithdrawalConfig`).
|
|
274
|
+
*
|
|
275
|
+
* Amounts are in wei. The API serializes them as JSON integers; on Base the
|
|
276
|
+
* collateral (USDC, 6 decimals) keeps these well within the JS safe-integer
|
|
277
|
+
* range, so `number` is used for response fields. Requests send amounts as
|
|
278
|
+
* base-10 integer strings to avoid any precision loss.
|
|
279
|
+
*/
|
|
280
|
+
declare enum BridgeState {
|
|
281
|
+
PENDING = "pending",
|
|
282
|
+
EXECUTED = "executed",
|
|
283
|
+
SETTLED = "settled",
|
|
284
|
+
SUSPEND = "suspend"
|
|
285
|
+
}
|
|
286
|
+
declare enum BridgeType {
|
|
287
|
+
INSTANT = "instant",
|
|
288
|
+
AFTER_COOL_DOWN = "after_cool_down",
|
|
289
|
+
NO_POLICY = "no_policy"
|
|
290
|
+
}
|
|
291
|
+
type IWSignInMessageParams = {
|
|
292
|
+
address: Address;
|
|
293
|
+
domain: string;
|
|
294
|
+
uri: string;
|
|
295
|
+
statement?: string;
|
|
296
|
+
version?: string;
|
|
297
|
+
};
|
|
298
|
+
type IWCustomSiweMessage = {
|
|
299
|
+
domain: string;
|
|
300
|
+
address: string;
|
|
301
|
+
uri: string;
|
|
302
|
+
version: string;
|
|
303
|
+
chainId: number;
|
|
304
|
+
issuedAt: string;
|
|
305
|
+
nonce: string;
|
|
306
|
+
statement?: string;
|
|
307
|
+
expirationTime?: string;
|
|
308
|
+
};
|
|
309
|
+
type IWSignInMessageResponse = {
|
|
310
|
+
message: string;
|
|
311
|
+
params: IWCustomSiweMessage;
|
|
312
|
+
};
|
|
313
|
+
type IWLoginResponse = {
|
|
314
|
+
accessToken: string;
|
|
315
|
+
tokenType: string;
|
|
316
|
+
};
|
|
317
|
+
type FeeOption = {
|
|
318
|
+
/** total fee in wei */
|
|
319
|
+
fee: number;
|
|
320
|
+
/** cooldown period in seconds */
|
|
321
|
+
cooldown: number;
|
|
322
|
+
/** checksummed account address */
|
|
323
|
+
user: Address;
|
|
324
|
+
/** requested amount in wei */
|
|
325
|
+
amount: number;
|
|
326
|
+
/** Unix epoch (seconds) when this option expires */
|
|
327
|
+
validTime: number;
|
|
328
|
+
};
|
|
329
|
+
type FeeOptionsResponse = {
|
|
330
|
+
count: number;
|
|
331
|
+
options: FeeOption[];
|
|
332
|
+
};
|
|
333
|
+
type UnlockAccountResponse = {
|
|
334
|
+
message: string;
|
|
335
|
+
};
|
|
336
|
+
type MaxInstantValueResponse = {
|
|
337
|
+
/** maximum instant-withdrawable amount in wei (0 if not allowed) */
|
|
338
|
+
amount: number;
|
|
339
|
+
};
|
|
340
|
+
/** Raw `/v1/withdrawal-config` payload (snake_case wire format). */
|
|
341
|
+
type WithdrawalConfigResponse = {
|
|
342
|
+
operator_fee: number;
|
|
343
|
+
max_instant_amount: number;
|
|
344
|
+
instant_fee_rate: number;
|
|
345
|
+
policy_valid_time: number;
|
|
346
|
+
min_withdrawal_cooldown: number;
|
|
347
|
+
};
|
|
348
|
+
/** Normalized camelCase view of the withdrawal config. */
|
|
349
|
+
type WithdrawalConfig = {
|
|
350
|
+
operatorFee: number;
|
|
351
|
+
maxInstantAmount: number;
|
|
352
|
+
instantFeeRate: number;
|
|
353
|
+
policyValidTime: number;
|
|
354
|
+
minWithdrawalCooldown: number;
|
|
355
|
+
};
|
|
356
|
+
type EIP712TypeEntry = {
|
|
357
|
+
name: string;
|
|
358
|
+
type: string;
|
|
359
|
+
};
|
|
360
|
+
type EIP712SelectReceiverMessage = {
|
|
361
|
+
types: {
|
|
362
|
+
EIP712Domain: EIP712TypeEntry[];
|
|
363
|
+
SelectReceiver: EIP712TypeEntry[];
|
|
364
|
+
};
|
|
365
|
+
domain: {
|
|
366
|
+
name: string;
|
|
367
|
+
version: string;
|
|
368
|
+
chainId: number;
|
|
369
|
+
verifyingContract: Address;
|
|
370
|
+
};
|
|
371
|
+
primaryType: 'SelectReceiver';
|
|
372
|
+
message: {
|
|
373
|
+
receiver: Address;
|
|
374
|
+
bridgeId: number;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
type SelectReceiverMessageResponse = {
|
|
378
|
+
payload: EIP712SelectReceiverMessage;
|
|
379
|
+
};
|
|
380
|
+
type SpecifiedReceiver = {
|
|
381
|
+
/** checksummed Ethereum address */
|
|
382
|
+
address: Address;
|
|
383
|
+
/** EIP-712 signature hex */
|
|
384
|
+
signature: Hex;
|
|
385
|
+
};
|
|
386
|
+
type SelectFeePolicyRequest = {
|
|
387
|
+
symmioBridgeId: number;
|
|
388
|
+
cooldown: number;
|
|
389
|
+
feeAmount: number;
|
|
390
|
+
receiver?: SpecifiedReceiver | null;
|
|
391
|
+
};
|
|
392
|
+
type SelectFeePolicyResponse = {
|
|
393
|
+
bridge_id: number;
|
|
394
|
+
/** Unix epoch (seconds) when `processWithdrawal` will be called */
|
|
395
|
+
execution_time: number;
|
|
396
|
+
fee: number;
|
|
397
|
+
};
|
|
398
|
+
type BridgesRequest = {
|
|
399
|
+
bridge_state?: BridgeState | null;
|
|
400
|
+
bridge_type?: BridgeType | null;
|
|
401
|
+
};
|
|
402
|
+
type BridgeTransaction = {
|
|
403
|
+
bridge_id: number;
|
|
404
|
+
user_address: Address;
|
|
405
|
+
bridge_state: BridgeState;
|
|
406
|
+
bridge_type: BridgeType;
|
|
407
|
+
/** in wei */
|
|
408
|
+
bridge_amount: number;
|
|
409
|
+
/** in wei */
|
|
410
|
+
fee_amount: number;
|
|
411
|
+
/** Unix epoch seconds */
|
|
412
|
+
bridge_transaction_time: number;
|
|
413
|
+
/** Unix epoch seconds or null */
|
|
414
|
+
execution_time?: number | null;
|
|
415
|
+
};
|
|
416
|
+
type BridgesResponse = {
|
|
417
|
+
count: number;
|
|
418
|
+
bridges: BridgeTransaction[] | null;
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* Structured error codes returned via the shared `ErrorInfoContainer`.
|
|
422
|
+
* Mirrors section 5 of the UI Developer Guide.
|
|
423
|
+
*/
|
|
424
|
+
declare enum InstantWithdrawalErrorCode {
|
|
425
|
+
UNHANDLED = 1,
|
|
426
|
+
COULD_NOT_GET_EXPECTED_RESPONSE = 2,
|
|
427
|
+
MODEL_VALIDATION = 3,
|
|
428
|
+
NOT_FOUND = 4,
|
|
429
|
+
ALREADY_HAS_PENDING = 5,
|
|
430
|
+
NOT_ENOUGH_BALANCE = 6,
|
|
431
|
+
INVALID_BRIDGE_TRANSACTION = 7,
|
|
432
|
+
INVALID_BRIDGE_POLICY_OPTION = 8,
|
|
433
|
+
ALREADY_HAS_WITHDRAWAL_OPTION_OR_EXECUTED = 9,
|
|
434
|
+
LOW_AMOUNT_TO_BRIDGE = 10,
|
|
435
|
+
UNAUTHORIZED = 11,
|
|
436
|
+
INVALID_SIGNATURE = 12,
|
|
437
|
+
SIGNATURE_MISMATCH = 13,
|
|
438
|
+
EXPIRED_NONCE = 14,
|
|
439
|
+
NOT_AUTHENTICATED = 15,
|
|
440
|
+
CONTRACT_VALIDATION_FAILED = 16,
|
|
441
|
+
RPC_CONNECTION_FAILED = 17,
|
|
442
|
+
NONCE_MISMATCH = 18,
|
|
443
|
+
USER_CREATION_IN_PROGRESS = 19
|
|
444
|
+
}
|
|
445
|
+
/** Error thrown by the instant-withdrawal API client on a non-2xx response. */
|
|
446
|
+
declare class InstantWithdrawalError extends Error {
|
|
447
|
+
readonly code?: InstantWithdrawalErrorCode | number;
|
|
448
|
+
readonly status?: number;
|
|
449
|
+
readonly detail?: unknown;
|
|
450
|
+
constructor(message: string, options?: {
|
|
451
|
+
code?: InstantWithdrawalErrorCode | number;
|
|
452
|
+
status?: number;
|
|
453
|
+
detail?: unknown;
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
249
457
|
type Market = {
|
|
250
458
|
id: number;
|
|
251
459
|
name: string;
|
|
@@ -19267,6 +19475,30 @@ declare const ERC20ABI: readonly [{
|
|
|
19267
19475
|
readonly outputs: readonly [];
|
|
19268
19476
|
}];
|
|
19269
19477
|
|
|
19478
|
+
/**
|
|
19479
|
+
* InstantWithdrawal bridge contract ABI.
|
|
19480
|
+
*
|
|
19481
|
+
* The deployed address (Base `0xE0650873D8DadB54a6AC7c666BC98ab45f827b6D`) is a
|
|
19482
|
+
* TransparentUpgradeableProxy (ERC-1967) that delegates to an implementation
|
|
19483
|
+
* contract. The FE only ever calls `processWithdrawal(bridgeId)` directly (the
|
|
19484
|
+
* manual "Withdraw Now" path); the proxy forwards it to the implementation, so
|
|
19485
|
+
* this minimal fragment is sufficient for encoding.
|
|
19486
|
+
*
|
|
19487
|
+
* Replace/extend with the full implementation ABI if more on-chain reads/writes
|
|
19488
|
+
* are needed.
|
|
19489
|
+
*/
|
|
19490
|
+
declare const InstantWithdrawalABI: readonly [{
|
|
19491
|
+
readonly inputs: readonly [{
|
|
19492
|
+
readonly internalType: "uint256";
|
|
19493
|
+
readonly name: "bridgeId";
|
|
19494
|
+
readonly type: "uint256";
|
|
19495
|
+
}];
|
|
19496
|
+
readonly name: "processWithdrawal";
|
|
19497
|
+
readonly outputs: readonly [];
|
|
19498
|
+
readonly stateMutability: "nonpayable";
|
|
19499
|
+
readonly type: "function";
|
|
19500
|
+
}];
|
|
19501
|
+
|
|
19270
19502
|
/**
|
|
19271
19503
|
* Supported chain IDs for Symmio v0.8.5
|
|
19272
19504
|
*/
|
|
@@ -19302,6 +19534,11 @@ declare const CLEARING_HOUSE_ADDRESS: AddressMap;
|
|
|
19302
19534
|
* Signature Store — TOS signature storage.
|
|
19303
19535
|
*/
|
|
19304
19536
|
declare const SIGNATURE_STORE_ADDRESS: AddressMap;
|
|
19537
|
+
/**
|
|
19538
|
+
* Instant Withdrawal bridge contract — destination of `transferToBridge`
|
|
19539
|
+
* and target of the FE-facing `processWithdrawal(bridgeId)` call.
|
|
19540
|
+
*/
|
|
19541
|
+
declare const INSTANT_WITHDRAWAL_ADDRESS: AddressMap;
|
|
19305
19542
|
/**
|
|
19306
19543
|
* Default PartyB (solver) addresses per chain.
|
|
19307
19544
|
*/
|
|
@@ -19344,6 +19581,12 @@ declare const STANDARD_WITHDRAW_COOLDOWN = 43200;
|
|
|
19344
19581
|
/** Muon oracle configuration */
|
|
19345
19582
|
declare const MUON_BASE_URLS: string[];
|
|
19346
19583
|
declare const MUON_APP_NAME = "symmio";
|
|
19584
|
+
/**
|
|
19585
|
+
* Instant Withdrawal bot API base URLs per chain (SIWE → JWT).
|
|
19586
|
+
* Endpoints are prefixed with `/v1` — the trailing slash is required so
|
|
19587
|
+
* relative paths resolve correctly via `new URL(path, base)`.
|
|
19588
|
+
*/
|
|
19589
|
+
declare const INSTANT_WITHDRAWAL_BASE_URLS: Partial<Record<SupportedChainId, string>>;
|
|
19347
19590
|
|
|
19348
19591
|
declare class MuonClient {
|
|
19349
19592
|
private baseUrls;
|
|
@@ -19444,11 +19687,46 @@ declare function prepareWithdraw(multiAccount: Address, account: Address, params
|
|
|
19444
19687
|
* Withdraws collateral from an account.
|
|
19445
19688
|
*/
|
|
19446
19689
|
declare function withdraw(walletClient: WalletClient, publicClient: PublicClient, multiAccount: Address, params: WithdrawParams): Promise<Hex>;
|
|
19690
|
+
/**
|
|
19691
|
+
* Prepares a direct `transferToBridge` call on the Symmio Diamond. Use this
|
|
19692
|
+
* when the caller is the Party-A account itself (no MultiAccount proxy).
|
|
19693
|
+
*/
|
|
19694
|
+
declare function prepareTransferToBridge(symmioDiamond: Address, account: Address, params: TransferToBridgeParams): PreparedTransaction;
|
|
19695
|
+
/**
|
|
19696
|
+
* Prepares the MultiAccount sub-account bridge flow: optionally `deallocate`
|
|
19697
|
+
* (allocated → balance) then `transferToBridge`, batched in a single
|
|
19698
|
+
* `_call(subAccount, [...])` so the sub-account is `msg.sender` on the Diamond.
|
|
19699
|
+
*/
|
|
19700
|
+
declare function prepareBridgeWithdraw(multiAccount: Address, account: Address, subAccount: Address, params: BridgeWithdrawParams): PreparedTransaction;
|
|
19701
|
+
/**
|
|
19702
|
+
* Bridges collateral from a Party-A account directly to the bridge contract.
|
|
19703
|
+
*/
|
|
19704
|
+
declare function transferToBridge(walletClient: WalletClient, publicClient: PublicClient, symmioDiamond: Address, params: TransferToBridgeParams): Promise<Hex>;
|
|
19705
|
+
/**
|
|
19706
|
+
* Bridges collateral from a MultiAccount sub-account (with optional deallocate).
|
|
19707
|
+
*/
|
|
19708
|
+
declare function bridgeWithdraw(walletClient: WalletClient, publicClient: PublicClient, multiAccount: Address, subAccount: Address, params: BridgeWithdrawParams): Promise<Hex>;
|
|
19709
|
+
/**
|
|
19710
|
+
* Prepares a manual `processWithdrawal(bridgeId)` call on the InstantWithdrawal
|
|
19711
|
+
* contract — the FE "Withdraw Now" fallback when the bot is down or a scheduled
|
|
19712
|
+
* withdrawal hasn't executed after `execution_time` has passed.
|
|
19713
|
+
*/
|
|
19714
|
+
declare function prepareProcessWithdrawal(instantWithdrawal: Address, account: Address, params: ProcessWithdrawalParams): PreparedTransaction;
|
|
19715
|
+
/**
|
|
19716
|
+
* Executes `processWithdrawal(bridgeId)` on the InstantWithdrawal contract.
|
|
19717
|
+
*/
|
|
19718
|
+
declare function processWithdrawal(walletClient: WalletClient, publicClient: PublicClient, instantWithdrawal: Address, params: ProcessWithdrawalParams): Promise<Hex>;
|
|
19447
19719
|
|
|
19720
|
+
declare const withdraw$1_bridgeWithdraw: typeof bridgeWithdraw;
|
|
19721
|
+
declare const withdraw$1_prepareBridgeWithdraw: typeof prepareBridgeWithdraw;
|
|
19722
|
+
declare const withdraw$1_prepareProcessWithdrawal: typeof prepareProcessWithdrawal;
|
|
19723
|
+
declare const withdraw$1_prepareTransferToBridge: typeof prepareTransferToBridge;
|
|
19448
19724
|
declare const withdraw$1_prepareWithdraw: typeof prepareWithdraw;
|
|
19725
|
+
declare const withdraw$1_processWithdrawal: typeof processWithdrawal;
|
|
19726
|
+
declare const withdraw$1_transferToBridge: typeof transferToBridge;
|
|
19449
19727
|
declare const withdraw$1_withdraw: typeof withdraw;
|
|
19450
19728
|
declare namespace withdraw$1 {
|
|
19451
|
-
export { withdraw$1_prepareWithdraw as prepareWithdraw, withdraw$1_withdraw as withdraw };
|
|
19729
|
+
export { withdraw$1_bridgeWithdraw as bridgeWithdraw, withdraw$1_prepareBridgeWithdraw as prepareBridgeWithdraw, withdraw$1_prepareProcessWithdrawal as prepareProcessWithdrawal, withdraw$1_prepareTransferToBridge as prepareTransferToBridge, withdraw$1_prepareWithdraw as prepareWithdraw, withdraw$1_processWithdrawal as processWithdrawal, withdraw$1_transferToBridge as transferToBridge, withdraw$1_withdraw as withdraw };
|
|
19452
19730
|
}
|
|
19453
19731
|
|
|
19454
19732
|
/**
|
|
@@ -19720,11 +19998,11 @@ declare function createSiweMessage(params: CreateSiweMessageParams): SiweMessage
|
|
|
19720
19998
|
/**
|
|
19721
19999
|
* Fetches a nonce from the hedger for SIWE authentication.
|
|
19722
20000
|
*/
|
|
19723
|
-
declare function getNonce(chainId: number, subAccount: Address): Promise<string>;
|
|
20001
|
+
declare function getNonce$1(chainId: number, subAccount: Address): Promise<string>;
|
|
19724
20002
|
/**
|
|
19725
20003
|
* Exchanges a signed SIWE message for an access token from the hedger.
|
|
19726
20004
|
*/
|
|
19727
|
-
declare function login(chainId: number, params: InstantLoginParams): Promise<InstantAuthToken>;
|
|
20005
|
+
declare function login$1(chainId: number, params: InstantLoginParams): Promise<InstantAuthToken>;
|
|
19728
20006
|
/**
|
|
19729
20007
|
* Opens a position instantly via the hedger's off-chain endpoint.
|
|
19730
20008
|
*/
|
|
@@ -19745,13 +20023,54 @@ declare function getOpenInstantCloses(chainId: number, account: Address, accessT
|
|
|
19745
20023
|
declare const instant_cancelInstantClose: typeof cancelInstantClose;
|
|
19746
20024
|
declare const instant_createSiweMessage: typeof createSiweMessage;
|
|
19747
20025
|
declare const instant_getHedgerBaseUrl: typeof getHedgerBaseUrl;
|
|
19748
|
-
declare const instant_getNonce: typeof getNonce;
|
|
19749
20026
|
declare const instant_getOpenInstantCloses: typeof getOpenInstantCloses;
|
|
19750
20027
|
declare const instant_instantClose: typeof instantClose;
|
|
19751
20028
|
declare const instant_instantOpen: typeof instantOpen;
|
|
19752
|
-
declare const instant_login: typeof login;
|
|
19753
20029
|
declare namespace instant {
|
|
19754
|
-
export { instant_cancelInstantClose as cancelInstantClose, instant_createSiweMessage as createSiweMessage, instant_getHedgerBaseUrl as getHedgerBaseUrl,
|
|
20030
|
+
export { instant_cancelInstantClose as cancelInstantClose, instant_createSiweMessage as createSiweMessage, instant_getHedgerBaseUrl as getHedgerBaseUrl, getNonce$1 as getNonce, instant_getOpenInstantCloses as getOpenInstantCloses, instant_instantClose as instantClose, instant_instantOpen as instantOpen, login$1 as login };
|
|
20031
|
+
}
|
|
20032
|
+
|
|
20033
|
+
declare function getInstantWithdrawalBaseUrl(chainId: number): string;
|
|
20034
|
+
/** POST /v1/auth/nonce — request a one-time login nonce. */
|
|
20035
|
+
declare function getNonce(chainId: number, address: Address): Promise<string>;
|
|
20036
|
+
/** GET /v1/auth/sign-in-message — build the EIP-4361 message to sign. */
|
|
20037
|
+
declare function getSignInMessage(chainId: number, params: IWSignInMessageParams): Promise<IWSignInMessageResponse>;
|
|
20038
|
+
/** POST /v1/auth/login — exchange a signed SIWE message for a JWT. */
|
|
20039
|
+
declare function login(chainId: number, message: IWCustomSiweMessage, signature: string): Promise<IWLoginResponse>;
|
|
20040
|
+
/** GET /v1/auth/me — the address authenticated by the supplied token. */
|
|
20041
|
+
declare function getMe(chainId: number, token: string): Promise<Address>;
|
|
20042
|
+
/** POST /v1/fee-options — fetch + lock fee/cooldown options for an amount. */
|
|
20043
|
+
declare function getFeeOptions(chainId: number, account: Address, amount: bigint, token: string): Promise<FeeOptionsResponse>;
|
|
20044
|
+
/** POST /v1/unlock/{account} — clear any locked fee options. */
|
|
20045
|
+
declare function unlockAccount(chainId: number, account: Address, token: string): Promise<UnlockAccountResponse>;
|
|
20046
|
+
/** GET /v1/pending-fee-policy/{account} — currently locked options, if any. */
|
|
20047
|
+
declare function getPendingFeePolicy(chainId: number, account: Address, token: string): Promise<FeeOptionsResponse>;
|
|
20048
|
+
/** GET /v1/max-instant-value/{account} — max instant-withdrawable amount (wei). */
|
|
20049
|
+
declare function getMaxInstantValue(chainId: number, account: Address, token: string): Promise<bigint>;
|
|
20050
|
+
/** GET /v1/withdrawal-config — global withdrawal settings (no auth). */
|
|
20051
|
+
declare function getWithdrawalConfig(chainId: number): Promise<WithdrawalConfig>;
|
|
20052
|
+
/** GET /v1/get-select-receiver-message — EIP-712 payload to authorize a new receiver (no auth). */
|
|
20053
|
+
declare function getSelectReceiverMessage(chainId: number, receiver: Address, bridgeId: number): Promise<SelectReceiverMessageResponse>;
|
|
20054
|
+
/** POST /v1/select-fee-policy — submit the chosen fee policy for a bridge. */
|
|
20055
|
+
declare function selectFeePolicy(chainId: number, body: SelectFeePolicyRequest, token: string): Promise<SelectFeePolicyResponse>;
|
|
20056
|
+
/** POST /v1/bridges/{account}/{start}/{size} — paginated bridge history. */
|
|
20057
|
+
declare function getBridges(chainId: number, account: Address, start: number | null, size: number | null, filters: BridgesRequest, token: string): Promise<BridgesResponse>;
|
|
20058
|
+
|
|
20059
|
+
declare const instantWithdrawal_getBridges: typeof getBridges;
|
|
20060
|
+
declare const instantWithdrawal_getFeeOptions: typeof getFeeOptions;
|
|
20061
|
+
declare const instantWithdrawal_getInstantWithdrawalBaseUrl: typeof getInstantWithdrawalBaseUrl;
|
|
20062
|
+
declare const instantWithdrawal_getMaxInstantValue: typeof getMaxInstantValue;
|
|
20063
|
+
declare const instantWithdrawal_getMe: typeof getMe;
|
|
20064
|
+
declare const instantWithdrawal_getNonce: typeof getNonce;
|
|
20065
|
+
declare const instantWithdrawal_getPendingFeePolicy: typeof getPendingFeePolicy;
|
|
20066
|
+
declare const instantWithdrawal_getSelectReceiverMessage: typeof getSelectReceiverMessage;
|
|
20067
|
+
declare const instantWithdrawal_getSignInMessage: typeof getSignInMessage;
|
|
20068
|
+
declare const instantWithdrawal_getWithdrawalConfig: typeof getWithdrawalConfig;
|
|
20069
|
+
declare const instantWithdrawal_login: typeof login;
|
|
20070
|
+
declare const instantWithdrawal_selectFeePolicy: typeof selectFeePolicy;
|
|
20071
|
+
declare const instantWithdrawal_unlockAccount: typeof unlockAccount;
|
|
20072
|
+
declare namespace instantWithdrawal {
|
|
20073
|
+
export { instantWithdrawal_getBridges as getBridges, instantWithdrawal_getFeeOptions as getFeeOptions, instantWithdrawal_getInstantWithdrawalBaseUrl as getInstantWithdrawalBaseUrl, instantWithdrawal_getMaxInstantValue as getMaxInstantValue, instantWithdrawal_getMe as getMe, instantWithdrawal_getNonce as getNonce, instantWithdrawal_getPendingFeePolicy as getPendingFeePolicy, instantWithdrawal_getSelectReceiverMessage as getSelectReceiverMessage, instantWithdrawal_getSignInMessage as getSignInMessage, instantWithdrawal_getWithdrawalConfig as getWithdrawalConfig, instantWithdrawal_login as login, instantWithdrawal_selectFeePolicy as selectFeePolicy, instantWithdrawal_unlockAccount as unlockAccount };
|
|
19755
20074
|
}
|
|
19756
20075
|
|
|
19757
20076
|
/**
|
|
@@ -19937,4 +20256,4 @@ interface SymmUpnlWebSocketMessage {
|
|
|
19937
20256
|
}
|
|
19938
20257
|
declare function normalizeSymmUpnlWebSocketMessage(raw: unknown): SymmUpnlWebSocketMessage | undefined;
|
|
19939
20258
|
|
|
19940
|
-
export { type ADLAssurance, ALL_TRADING_SELECTORS, type Account, type AccountBalance, type AccumulatedFundingRate, type AddAccountParams, type AffiliateFeeConfig, AffiliateFeeLevel, type AggregatedPosition, type AllocateParams, ApprovalState, CHAIN_NAMES, CLEARING_HOUSE_ADDRESS, CLOSE_QUOTE_SELECTOR, COLLATERAL_ADDRESS, COLLATERAL_DECIMALS, type CancelQuoteParams, type ChainId, ClearingHouseABI, type ClearingHouseLiquidation, ClearingHouseLiquidationStatus, type ClosePositionParams, type CreateSiweMessageParams, DEFAULT_PARTY_B_ADDRESS, DEFAULT_PRECISION, type DeallocateParams, type DepositAndAllocateParams, type DepositParams, ERC20ABI, FALLBACK_CHAIN_ID, type InstantAuthToken, type InstantCloseParams, type InstantCloseResponse, InstantCloseStatus, type InstantErrorResponse, type InstantLoginParams, type InstantOpenParams, type InstantOpenResponse, type InsuranceVaultConfig, type InternalTransferParams, LIMIT_ORDER_DEADLINE, LiquidationStatus, MARKET_ORDER_DEADLINE, MARKET_PRICE_COEFFICIENT, MAX_LEVERAGE, MULTI_ACCOUNT_ADDRESS, MUON_APP_NAME, MUON_BASE_URLS, type Market, MultiAccountABI, type MuonBatchParams, type MuonBatchSig, MuonClient, type MuonClientConfig, type MuonDeallocateParams, type MuonQuoteParams, type MuonSingleUpnlAndPriceSig, type MuonSingleUpnlSig, type MuonSingleUpnlWithPendingBalanceSig, MuonVerifierABI, OrderType, PositionType, type PreparedTransaction, type Quote, QuoteStatus, type RegisterAffiliateParams, SEND_QUOTE_WITH_AFFILIATE_SELECTOR, SIGNATURE_STORE_ADDRESS, STANDARD_WITHDRAW_COOLDOWN, SYMMIO_DIAMOND_ADDRESS, type SchnorrSign, type SendQuoteParams, type SetAffiliateFeeParams, SignatureStoreABI, type SiweMessageResult, SoftLiquidationLevel, type SoftLiquidationThreshold, SupportedChainId, type SymbolCategory, type SymbolType, type SymmAccountBalanceInfoLike, type SymmAccountDataLike, type SymmAccountNumericValue, type SymmAccountOverview, type SymmAccountOverviewInput, type SymmDepositWithdrawalTotals, type SymmMarkPrices, type SymmPnlAssetLegLike, type SymmPnlNumericValue, type SymmPnlPositionLike, type SymmPositionPnlResult, type SymmUpnlWebSocketMessage, SymmioDiamondABI, type SymmioSDKConfig, SymmioSDKError, type TransactionConfig, type TransactionReceipt, type TransactionResult, V3_CHAIN_IDS, type WithdrawParams, account as accountActions, admin as adminActions, allocate$1 as allocateActions, applySlippage, approval as approvalActions, calculateGasMargin, cancel as cancelActions, close as closeActions, computeSymmAccountOverview, computeSymmAccountOverviewFromData, computeSymmNetDeposited, computeSymmPositionUpnl, computeSymmPositionsUpnl, delegation as delegationActions, deposit$1 as depositActions, encodeCall, formatPrice, fromWei, getAddress, getSymmAccountBalanceInfo, getSymmAccountData, instant as instantActions, normalizeSymmUpnlWebSocketMessage, signature as signatureActions, stats as statsActions, toWei, trade as tradeActions, validateAddress, validateAmount, validateChainId, validateDeadline, validateQuantity, withdraw$1 as withdrawActions, wrapInProxyCall };
|
|
20259
|
+
export { type ADLAssurance, ALL_TRADING_SELECTORS, type Account, type AccountBalance, type AccumulatedFundingRate, type AddAccountParams, type AffiliateFeeConfig, AffiliateFeeLevel, type AggregatedPosition, type AllocateParams, ApprovalState, BridgeState, type BridgeTransaction, BridgeType, type BridgeWithdrawParams, type BridgesRequest, type BridgesResponse, CHAIN_NAMES, CLEARING_HOUSE_ADDRESS, CLOSE_QUOTE_SELECTOR, COLLATERAL_ADDRESS, COLLATERAL_DECIMALS, type CancelQuoteParams, type ChainId, ClearingHouseABI, type ClearingHouseLiquidation, ClearingHouseLiquidationStatus, type ClosePositionParams, type CreateSiweMessageParams, DEFAULT_PARTY_B_ADDRESS, DEFAULT_PRECISION, type DeallocateParams, type DepositAndAllocateParams, type DepositParams, type EIP712SelectReceiverMessage, ERC20ABI, FALLBACK_CHAIN_ID, type FeeOption, type FeeOptionsResponse, INSTANT_WITHDRAWAL_ADDRESS, INSTANT_WITHDRAWAL_BASE_URLS, type IWCustomSiweMessage, type IWLoginResponse, type IWSignInMessageParams, type IWSignInMessageResponse, type InstantAuthToken, type InstantCloseParams, type InstantCloseResponse, InstantCloseStatus, type InstantErrorResponse, type InstantLoginParams, type InstantOpenParams, type InstantOpenResponse, InstantWithdrawalABI, InstantWithdrawalError, InstantWithdrawalErrorCode, type InsuranceVaultConfig, type InternalTransferParams, LIMIT_ORDER_DEADLINE, LiquidationStatus, MARKET_ORDER_DEADLINE, MARKET_PRICE_COEFFICIENT, MAX_LEVERAGE, MULTI_ACCOUNT_ADDRESS, MUON_APP_NAME, MUON_BASE_URLS, type Market, type MaxInstantValueResponse, MultiAccountABI, type MuonBatchParams, type MuonBatchSig, MuonClient, type MuonClientConfig, type MuonDeallocateParams, type MuonQuoteParams, type MuonSingleUpnlAndPriceSig, type MuonSingleUpnlSig, type MuonSingleUpnlWithPendingBalanceSig, MuonVerifierABI, OrderType, PositionType, type PreparedTransaction, type ProcessWithdrawalParams, type Quote, QuoteStatus, type RegisterAffiliateParams, SEND_QUOTE_WITH_AFFILIATE_SELECTOR, SIGNATURE_STORE_ADDRESS, STANDARD_WITHDRAW_COOLDOWN, SYMMIO_DIAMOND_ADDRESS, type SchnorrSign, type SelectFeePolicyRequest, type SelectFeePolicyResponse, type SelectReceiverMessageResponse, type SendQuoteParams, type SetAffiliateFeeParams, SignatureStoreABI, type SiweMessageResult, SoftLiquidationLevel, type SoftLiquidationThreshold, type SpecifiedReceiver, SupportedChainId, type SymbolCategory, type SymbolType, type SymmAccountBalanceInfoLike, type SymmAccountDataLike, type SymmAccountNumericValue, type SymmAccountOverview, type SymmAccountOverviewInput, type SymmDepositWithdrawalTotals, type SymmMarkPrices, type SymmPnlAssetLegLike, type SymmPnlNumericValue, type SymmPnlPositionLike, type SymmPositionPnlResult, type SymmUpnlWebSocketMessage, SymmioDiamondABI, type SymmioSDKConfig, SymmioSDKError, type TransactionConfig, type TransactionReceipt, type TransactionResult, type TransferToBridgeParams, type UnlockAccountResponse, V3_CHAIN_IDS, type WithdrawParams, type WithdrawalConfig, type WithdrawalConfigResponse, account as accountActions, admin as adminActions, allocate$1 as allocateActions, applySlippage, approval as approvalActions, calculateGasMargin, cancel as cancelActions, close as closeActions, computeSymmAccountOverview, computeSymmAccountOverviewFromData, computeSymmNetDeposited, computeSymmPositionUpnl, computeSymmPositionsUpnl, delegation as delegationActions, deposit$1 as depositActions, encodeCall, formatPrice, fromWei, getAddress, getSymmAccountBalanceInfo, getSymmAccountData, instant as instantActions, instantWithdrawal as instantWithdrawalActions, normalizeSymmUpnlWebSocketMessage, signature as signatureActions, stats as statsActions, toWei, trade as tradeActions, validateAddress, validateAmount, validateChainId, validateDeadline, validateQuantity, withdraw$1 as withdrawActions, wrapInProxyCall };
|