@0xmonaco/types 0.8.7 → 0.8.10

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.
Files changed (48) hide show
  1. package/dist/api/index.d.ts +13 -5
  2. package/dist/api/index.js +1 -1
  3. package/dist/applications/index.d.ts +47 -5
  4. package/dist/applications/index.js +2 -1
  5. package/dist/applications/requests.d.ts +78 -0
  6. package/dist/applications/requests.js +7 -0
  7. package/dist/applications/responses.d.ts +211 -1
  8. package/dist/applications/responses.js +3 -1
  9. package/dist/auth/index.d.ts +29 -31
  10. package/dist/auth/index.js +2 -2
  11. package/dist/auth/responses.d.ts +23 -20
  12. package/dist/delegated-agents/index.d.ts +17 -1
  13. package/dist/faucet/index.d.ts +54 -0
  14. package/dist/faucet/index.js +10 -0
  15. package/dist/index.d.ts +4 -0
  16. package/dist/index.js +4 -0
  17. package/dist/margin-accounts/index.d.ts +11 -14
  18. package/dist/market/index.d.ts +83 -0
  19. package/dist/positions/index.d.ts +1 -0
  20. package/dist/profile/index.d.ts +88 -1
  21. package/dist/sdk/index.d.ts +40 -2
  22. package/dist/sub-accounts/index.d.ts +145 -0
  23. package/dist/sub-accounts/index.js +9 -0
  24. package/dist/trading/index.d.ts +6 -6
  25. package/dist/trading/responses.d.ts +8 -27
  26. package/dist/validation/margin-accounts.d.ts +7 -9
  27. package/dist/validation/margin-accounts.js +7 -9
  28. package/dist/validation/profile.d.ts +7 -0
  29. package/dist/validation/profile.js +7 -0
  30. package/dist/validation/trading.d.ts +8 -33
  31. package/dist/validation/trading.js +42 -33
  32. package/dist/whitelist/index.d.ts +44 -0
  33. package/dist/whitelist/index.js +10 -0
  34. package/dist/wire/assert.d.ts +54 -0
  35. package/dist/wire/assert.js +0 -0
  36. package/dist/wire/audit.d.ts +47 -0
  37. package/dist/wire/audit.js +43 -0
  38. package/dist/wire/coverage.d.ts +1 -0
  39. package/dist/wire/coverage.js +0 -0
  40. package/dist/wire/index.d.ts +21 -0
  41. package/dist/wire/index.js +2 -0
  42. package/dist/wire/operations.d.ts +15 -0
  43. package/dist/wire/operations.js +93 -0
  44. package/dist/wire/schema.d.ts +8352 -0
  45. package/dist/wire/schema.js +4 -0
  46. package/dist/withdrawals/index.d.ts +43 -0
  47. package/dist/withdrawals/index.js +0 -0
  48. package/package.json +6 -2
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
@@ -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",
3
+ "version": "0.8.10",
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",
23
+ "@0xmonaco/contracts": "0.8.10",
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
  }