@0xmonaco/types 0.8.7-develop.0e951a5 → 0.8.7-develop.5d0e403
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +7 -0
- package/dist/applications/index.d.ts +47 -5
- package/dist/applications/index.js +2 -1
- package/dist/applications/requests.d.ts +78 -0
- package/dist/applications/requests.js +7 -0
- package/dist/applications/responses.d.ts +211 -1
- package/dist/applications/responses.js +3 -1
- package/dist/auth/index.d.ts +6 -12
- package/dist/auth/index.js +2 -2
- package/dist/auth/responses.d.ts +0 -11
- package/dist/delegated-agents/index.d.ts +17 -1
- package/dist/faucet/index.d.ts +54 -0
- package/dist/faucet/index.js +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/margin-accounts/index.d.ts +3 -3
- package/dist/market/index.d.ts +83 -0
- package/dist/positions/index.d.ts +1 -0
- package/dist/profile/index.d.ts +11 -5
- package/dist/sdk/index.d.ts +12 -0
- package/dist/sub-accounts/index.d.ts +145 -0
- package/dist/sub-accounts/index.js +9 -0
- package/dist/trading/index.d.ts +4 -0
- package/dist/trading/responses.d.ts +8 -2
- package/dist/validation/margin-accounts.d.ts +1 -1
- package/dist/validation/margin-accounts.js +1 -1
- package/dist/validation/trading.d.ts +8 -0
- package/dist/validation/trading.js +42 -0
- package/dist/whitelist/index.d.ts +44 -0
- package/dist/whitelist/index.js +10 -0
- package/dist/wire/assert.d.ts +54 -0
- package/dist/wire/assert.js +0 -0
- package/dist/wire/coverage.d.ts +1 -0
- package/dist/wire/coverage.js +0 -0
- package/dist/wire/index.d.ts +14 -0
- package/dist/wire/index.js +0 -0
- package/dist/wire/schema.d.ts +8419 -0
- package/dist/wire/schema.js +4 -0
- package/dist/withdrawals/index.d.ts +43 -0
- package/dist/withdrawals/index.js +0 -0
- package/package.json +6 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BaseAPI } from "../api";
|
|
2
|
+
/**
|
|
3
|
+
* Request body for `POST /api/v1/withdrawals`.
|
|
4
|
+
*
|
|
5
|
+
* Initiating a withdrawal debits the caller's balance via the matching engine
|
|
6
|
+
* and returns pre-signed `executeSignedWithdrawal` calldata. Master accounts
|
|
7
|
+
* with the withdraw permission only.
|
|
8
|
+
*/
|
|
9
|
+
export interface InitiateWithdrawalRequest {
|
|
10
|
+
/** UUID of the asset to withdraw. */
|
|
11
|
+
assetId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Raw token amount in the smallest unit (e.g. wei) as a stringified positive
|
|
14
|
+
* integer.
|
|
15
|
+
*/
|
|
16
|
+
amount: string;
|
|
17
|
+
/** On-chain address that will receive the withdrawal (EVM, 0x-prefixed). */
|
|
18
|
+
destination: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Response shape shared by `POST /api/v1/withdrawals` and
|
|
22
|
+
* `GET /api/v1/withdrawals/{withdrawalIndex}`. Field names match the wire
|
|
23
|
+
* (snake_case) form returned by the gateway.
|
|
24
|
+
*/
|
|
25
|
+
export interface WithdrawalResponse {
|
|
26
|
+
/** Allocated withdrawal index — matches `executeSignedWithdrawal.index` on-chain. */
|
|
27
|
+
withdrawal_index: number;
|
|
28
|
+
/** 0x-prefixed lowercase address of the vault contract the calldata is submitted to. */
|
|
29
|
+
vault_address: string;
|
|
30
|
+
/** 0x-prefixed ABI-encoded, signed `executeSignedWithdrawal(...)` calldata; submit as `tx.data`. */
|
|
31
|
+
calldata: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Low-level withdrawals API: allocate a withdrawal and fetch its signed
|
|
35
|
+
* calldata. Does not submit on-chain — see the vault API for the high-level
|
|
36
|
+
* flow that also broadcasts the transaction.
|
|
37
|
+
*/
|
|
38
|
+
export interface WithdrawalsAPI extends BaseAPI {
|
|
39
|
+
/** Initiate a withdrawal and return the signed calldata. Authenticated. */
|
|
40
|
+
initiateWithdrawal(request: InitiateWithdrawalRequest): Promise<WithdrawalResponse>;
|
|
41
|
+
/** Re-fetch a previously-initiated withdrawal's signed calldata. Public — no auth. */
|
|
42
|
+
getWithdrawal(withdrawalIndex: number): Promise<WithdrawalResponse>;
|
|
43
|
+
}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "0.8.7-develop.
|
|
3
|
+
"version": "0.8.7-develop.5d0e403",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lint": "biome lint ."
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@0xmonaco/contracts": "0.8.7-develop.
|
|
23
|
+
"@0xmonaco/contracts": "0.8.7-develop.5d0e403",
|
|
24
24
|
"zod": "^4.1.12"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
".": {
|
|
31
31
|
"types": "./dist/index.d.ts",
|
|
32
32
|
"default": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./wire": {
|
|
35
|
+
"types": "./dist/wire/index.d.ts",
|
|
36
|
+
"default": "./dist/wire/index.js"
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
}
|