@totalis/hip4-client 0.84.0 → 0.85.0
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 +48 -0
- package/README.md +25 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/flow-errors.d.ts +18 -1
- package/dist/flow-errors.js +20 -0
- package/dist/generated/account-read.d.ts +1 -0
- package/dist/generated/client.d.ts +2 -1
- package/dist/generated/errors.d.ts +46 -44
- package/dist/generated/errors.js +112 -43
- package/dist/generated/openapi.d.ts +187 -12
- package/dist/generated/version.d.ts +5 -5
- package/dist/generated/version.js +6 -4
- package/dist/maker.js +2 -2
- package/dist/totalis.d.ts +89 -7
- package/dist/totalis.js +198 -17
- package/dist/typed-data.d.ts +43 -0
- package/dist/typed-data.js +17 -0
- package/package.json +1 -1
|
@@ -664,7 +664,7 @@ export type paths = {
|
|
|
664
664
|
};
|
|
665
665
|
/**
|
|
666
666
|
* Get suggested combo
|
|
667
|
-
* @description
|
|
667
|
+
* @description Suggested Combos, each priced by the best recent maker quote on its own house entry RFQ: one per discovery category with legs to suggest (Sports, Finance, Esports first, then the rest by name), then a mix whose legs each come from a different category. A category nothing prices is left out. A stale suggestion refreshes in the background; takers requote before trading.
|
|
668
668
|
*/
|
|
669
669
|
readonly get: operations["getSuggestedCombo"];
|
|
670
670
|
readonly put?: never;
|
|
@@ -1215,6 +1215,30 @@ export type paths = {
|
|
|
1215
1215
|
readonly patch?: never;
|
|
1216
1216
|
readonly trace?: never;
|
|
1217
1217
|
};
|
|
1218
|
+
readonly "/v1/me/wallet-approval": {
|
|
1219
|
+
readonly parameters: {
|
|
1220
|
+
readonly query?: never;
|
|
1221
|
+
readonly header?: never;
|
|
1222
|
+
readonly path?: never;
|
|
1223
|
+
readonly cookie?: never;
|
|
1224
|
+
};
|
|
1225
|
+
/**
|
|
1226
|
+
* Get my wallet approval
|
|
1227
|
+
* @description The account wallet's USDC approval to WalletAccept, which pays a `WALLET_APPROVAL` acceptance's shortfall from the wallet, and its USDC permit nonce, read together at one HyperEVM block.
|
|
1228
|
+
*/
|
|
1229
|
+
readonly get: operations["getWalletApproval"];
|
|
1230
|
+
readonly put?: never;
|
|
1231
|
+
/**
|
|
1232
|
+
* Relay the account wallet's USDC permit to WalletAccept
|
|
1233
|
+
* @description Relays the account wallet's USDC permit setting its approval to the active vault's WalletAccept to `value`, with Totalis paying the gas; `value` 0 revokes it.
|
|
1234
|
+
*/
|
|
1235
|
+
readonly post: operations["approveWallet"];
|
|
1236
|
+
readonly delete?: never;
|
|
1237
|
+
readonly options?: never;
|
|
1238
|
+
readonly head?: never;
|
|
1239
|
+
readonly patch?: never;
|
|
1240
|
+
readonly trace?: never;
|
|
1241
|
+
};
|
|
1218
1242
|
readonly "/v1/me/copy-budget": {
|
|
1219
1243
|
readonly parameters: {
|
|
1220
1244
|
readonly query?: never;
|
|
@@ -2753,6 +2777,58 @@ export type components = {
|
|
|
2753
2777
|
/** @description The account's EIP-712 signature over AgentGrant(account, agent, 0, nonce). */
|
|
2754
2778
|
readonly signature: components["schemas"]["Signature65"];
|
|
2755
2779
|
};
|
|
2780
|
+
/** WalletApproval */
|
|
2781
|
+
readonly WalletApproval: {
|
|
2782
|
+
/** @description HyperEVM chain the approval is on. */
|
|
2783
|
+
readonly chain_id: components["schemas"]["UInt64String"];
|
|
2784
|
+
/** @description The vault whose WalletAccept is `spender`, GET /v1/deployment `vault_address`; an approval read for another vault does not fund an accept through this one. */
|
|
2785
|
+
readonly vault: components["schemas"]["Address"];
|
|
2786
|
+
/** @description The USDC contract the permit is signed for; its EIP-712 domain is GET /v1/deployment `usdc.eip712_domain`. */
|
|
2787
|
+
readonly token: components["schemas"]["Address"];
|
|
2788
|
+
/** @description WalletAccept, the permit's spender. */
|
|
2789
|
+
readonly spender: components["schemas"]["Address"];
|
|
2790
|
+
/** @description The account wallet, the permit's owner. */
|
|
2791
|
+
readonly account: components["schemas"]["Address"];
|
|
2792
|
+
/** @description Atomic USDC (6 decimals) the wallet still lets WalletAccept pull, as USDC `allowance(account, spender)`; null when unread. */
|
|
2793
|
+
readonly approved: components["schemas"]["Uint"] | null;
|
|
2794
|
+
/** @description The wallet's next USDC permit nonce, as USDC `nonces(account)`; null when unread. */
|
|
2795
|
+
readonly nonce: components["schemas"]["Uint"] | null;
|
|
2796
|
+
/** @description HyperEVM block both values were read at; null when unread. */
|
|
2797
|
+
readonly block: components["schemas"]["UInt64String"] | null;
|
|
2798
|
+
};
|
|
2799
|
+
/** WalletApprovalCommand */
|
|
2800
|
+
readonly WalletApprovalCommand: {
|
|
2801
|
+
/** @description Atomic USDC (6 decimals) the approval becomes; 0 revokes it. */
|
|
2802
|
+
readonly value: components["schemas"]["Uint"];
|
|
2803
|
+
/** @description The permit nonce signed, GET /v1/me/wallet-approval `nonce`. */
|
|
2804
|
+
readonly nonce: components["schemas"]["Uint"];
|
|
2805
|
+
/** @description Unix seconds after which USDC refuses the permit; a permit sent after it ends PERMIT_EXPIRED. */
|
|
2806
|
+
readonly deadline: components["schemas"]["UInt64String"];
|
|
2807
|
+
/** @description The account wallet's EIP-712 signature over USDC's EIP-2612 Permit(owner, spender, value, nonce, deadline) in the USDC domain GET /v1/deployment publishes, with the account wallet as owner and GET /v1/me/wallet-approval `spender` and `nonce`. */
|
|
2808
|
+
readonly signature: components["schemas"]["Signature65"];
|
|
2809
|
+
};
|
|
2810
|
+
/** WalletApprovalRequest */
|
|
2811
|
+
readonly WalletApprovalRequest: {
|
|
2812
|
+
/** @description The Idempotency-Key that first sent this permit. */
|
|
2813
|
+
readonly request_id: components["schemas"]["Uuid"];
|
|
2814
|
+
/** @description The USDC_PERMIT operation that relays it. */
|
|
2815
|
+
readonly operation_id: components["schemas"]["Hash32"];
|
|
2816
|
+
/** @description The approval it sets, atomic USDC; 0 is a revoke. */
|
|
2817
|
+
readonly value: components["schemas"]["Uint"];
|
|
2818
|
+
/** @description The permit nonce it was signed with. */
|
|
2819
|
+
readonly nonce: components["schemas"]["Uint"];
|
|
2820
|
+
/** @description The permit's deadline, Unix seconds. */
|
|
2821
|
+
readonly deadline: components["schemas"]["UInt64String"];
|
|
2822
|
+
/** @description Its operation's status. Only COMMITTED set the approval; REVERTED and EXPIRED_UNEXECUTED changed nothing. */
|
|
2823
|
+
readonly status: components["schemas"]["OperationState"];
|
|
2824
|
+
/** @description HyperEVM hash of the transaction carrying it; null before it is broadcast. */
|
|
2825
|
+
readonly transaction_hash: components["schemas"]["Hash32"] | null;
|
|
2826
|
+
/**
|
|
2827
|
+
* @description Why it changed nothing, present only once status is REVERTED or EXPIRED_UNEXECUTED. `PERMIT_EXPIRED`: its deadline passed first. `PERMIT_NONCE_USED`: another permit used its nonce first; read the approval before signing again, as it may already be what you wanted. `PERMIT_REVERTED`: USDC refused it for another reason.
|
|
2828
|
+
* @enum {unknown}
|
|
2829
|
+
*/
|
|
2830
|
+
readonly failure_reason?: "PERMIT_EXPIRED" | "PERMIT_NONCE_USED" | "PERMIT_REVERTED";
|
|
2831
|
+
};
|
|
2756
2832
|
/** VaultAgentGrant */
|
|
2757
2833
|
readonly VaultAgentGrant: {
|
|
2758
2834
|
/** @description The key a device of the account holds; not the account, not a copy agent. */
|
|
@@ -2947,11 +3023,16 @@ export type components = {
|
|
|
2947
3023
|
readonly AcceptQuoteCommand: {
|
|
2948
3024
|
/** @description Your EIP-712 signature over the quote. For an entry quote, sign its `entry` terms as `TakerAccept`. For a cash-out quote, the owner signs `quote_id` as `SellBack` or `CashoutTransfer`, the same digest the maker signs. */
|
|
2949
3025
|
readonly taker_signature: components["schemas"]["ContractSignature"];
|
|
2950
|
-
/** @description Entry quotes only; not allowed on a cash-out.
|
|
2951
|
-
readonly funding?: components["schemas"]["WalletFunding"];
|
|
3026
|
+
/** @description Entry quotes only; not allowed on a cash-out. Pays the part of the stake your vault balance is short from your account wallet: `WALLET` with a USDC authorization for the exact shortfall, or `WALLET_APPROVAL` from the wallet's approval to WalletAccept. Omit it when your vault balance covers the stake. The acceptance keeps the route it was admitted with; a replay never switches it. */
|
|
3027
|
+
readonly funding?: components["schemas"]["WalletFunding"] | components["schemas"]["WalletApprovalFunding"];
|
|
2952
3028
|
};
|
|
2953
3029
|
/** @description The one record of a taker accepting a quote. */
|
|
2954
3030
|
readonly Acceptance: {
|
|
3031
|
+
/**
|
|
3032
|
+
* @description Only on an acceptance funded `WALLET_APPROVAL` whose operation ended `EXPIRED_UNEXECUTED` with `failure_reason` INSUFFICIENT_CASH because the wallet fell short. `INSUFFICIENT_APPROVAL`: the wallet's approval to WalletAccept was below the shortfall; approve more (GET /v1/me/wallet-approval). `INSUFFICIENT_WALLET_USDC`: the wallet held less USDC than the shortfall, including a HyperCore move that did not land by `fund_by`. Absent when vault cash fell short or the venue could not tell.
|
|
3033
|
+
* @enum {unknown}
|
|
3034
|
+
*/
|
|
3035
|
+
readonly funding_failure_reason?: "INSUFFICIENT_APPROVAL" | "INSUFFICIENT_WALLET_USDC";
|
|
2955
3036
|
/** @description The database clock that sets `fund_by` and `deadline`, read with this acceptance, as an RFC3339 UTC timestamp. Judge them against it, not the local clock: the venue's time now is at most `server_time` plus the time elapsed since you sent the request (take the larger of a monotonic and a wall clock's elapsed time). Setting your clock to `server_time` when the response arrives reads early by the response's delay and can send too late. The accept response is held for the maker's answer, so a `GET /v1/rfqs/{rfq_id}/quotes` sent alongside it gives a tighter bound from its own `server_time`; keep the tightest. Send nothing timed by `fund_by` without a response to judge it by. */
|
|
2956
3037
|
readonly server_time: components["schemas"]["$defs-Timestamp"];
|
|
2957
3038
|
} & WithRequired<components["schemas"]["AcceptanceFields"], "acceptance_id">;
|
|
@@ -3254,7 +3335,7 @@ export type components = {
|
|
|
3254
3335
|
* @description Internal chain-agent registry; not a public HTTP command.
|
|
3255
3336
|
* @enum {string}
|
|
3256
3337
|
*/
|
|
3257
|
-
readonly HyperevmKeeperOperationKind: "DEPOSIT_USER_AUTHORIZED" | "WITHDRAW_USER" | "ACCEPT" | "SETTLE" | "CACHE_SETTLEMENT" | "CLAIM" | "SELL_BACK" | "TRANSFER_TICKET" | "ATTEST" | "SYNC" | "TOTALIS_PAYOUT" | "CORE_EXIT" | "SET_AGENT";
|
|
3338
|
+
readonly HyperevmKeeperOperationKind: "DEPOSIT_USER_AUTHORIZED" | "WITHDRAW_USER" | "ACCEPT" | "SETTLE" | "CACHE_SETTLEMENT" | "CLAIM" | "SELL_BACK" | "TRANSFER_TICKET" | "ATTEST" | "SYNC" | "TOTALIS_PAYOUT" | "CORE_EXIT" | "SET_AGENT" | "USDC_PERMIT";
|
|
3258
3339
|
readonly Hash32: string;
|
|
3259
3340
|
readonly Uint256: string;
|
|
3260
3341
|
/**
|
|
@@ -3287,6 +3368,8 @@ export type components = {
|
|
|
3287
3368
|
};
|
|
3288
3369
|
/** SuggestedCombo */
|
|
3289
3370
|
readonly SuggestedCombo: {
|
|
3371
|
+
/** @description Discovery category every leg was drawn from, Crypto's markets counting as Finance. Absent on the mix, whose legs each come from a different category. */
|
|
3372
|
+
readonly category?: string;
|
|
3290
3373
|
readonly legs: readonly components["schemas"]["$defs-Leg"][];
|
|
3291
3374
|
/** @description Browse contract 4 discovery card each leg was picked from, in leg order, as read when the suggestion was quoted. Lets a client draw a leg that is not on its own page; its prices are not current. */
|
|
3292
3375
|
readonly cards: readonly components["schemas"]["Card"][];
|
|
@@ -4739,6 +4822,8 @@ export type components = {
|
|
|
4739
4822
|
/** @description true to show the X handle on the public trader profile, false to hide it. */
|
|
4740
4823
|
readonly shown: boolean;
|
|
4741
4824
|
};
|
|
4825
|
+
/** @enum {unknown} */
|
|
4826
|
+
readonly OperationState: "QUEUED" | "IN_FLIGHT" | "RETRYABLE" | "UNKNOWN" | "COMMITTED" | "REVERTED" | "EXPIRED_UNEXECUTED";
|
|
4742
4827
|
/** @description 1 to 1000 characters after surrounding whitespace is trimmed. Newlines are kept; other control characters are refused. */
|
|
4743
4828
|
readonly CommentBody: string;
|
|
4744
4829
|
/**
|
|
@@ -4821,10 +4906,10 @@ export type components = {
|
|
|
4821
4906
|
/** @description `true` if a lease was armed and is now released, `false` if none was. Either way your quotes now stand until their own expiry. */
|
|
4822
4907
|
readonly released: boolean;
|
|
4823
4908
|
};
|
|
4824
|
-
/** @description A USDC EIP-3009 ReceiveWithAuthorization moving value from the caller's
|
|
4909
|
+
/** @description A USDC EIP-3009 ReceiveWithAuthorization moving value from the caller's account wallet into the vault. The venue fills `from` and `account` with that wallet; sign the message with both set to it. */
|
|
4825
4910
|
readonly WalletFunding: {
|
|
4826
4911
|
/**
|
|
4827
|
-
* @description Funding source: WALLET pays the shortfall from the caller's
|
|
4912
|
+
* @description Funding source: WALLET pays the shortfall from the caller's account wallet with a signed authorization.
|
|
4828
4913
|
* @constant
|
|
4829
4914
|
*/
|
|
4830
4915
|
readonly kind: "WALLET";
|
|
@@ -4834,11 +4919,19 @@ export type components = {
|
|
|
4834
4919
|
readonly valid_after: components["schemas"]["UInt64String"];
|
|
4835
4920
|
/** @description EIP-3009 validBefore in Unix seconds; must be at or after the quote's `entry.expiry`, as the accept can execute until then, and at most 900 seconds after `valid_after`. */
|
|
4836
4921
|
readonly valid_before: components["schemas"]["UInt64String"];
|
|
4837
|
-
/** @description Random 32 bytes; the EIP-3009 nonce is `keccak256(abi.encode(vault, chainId, from, salt, account))`, with `from` and `account` the
|
|
4922
|
+
/** @description Random 32 bytes; the EIP-3009 nonce is `keccak256(abi.encode(vault, chainId, from, salt, account))`, with `from` and `account` the account wallet. */
|
|
4838
4923
|
readonly salt: components["schemas"]["Bytes32"];
|
|
4839
|
-
/** @description 65-byte ECDSA signature by the
|
|
4924
|
+
/** @description 65-byte ECDSA signature by the account wallet over the USDC ReceiveWithAuthorization message, with the vault as payee. */
|
|
4840
4925
|
readonly authorization_signature: components["schemas"]["Signature65"];
|
|
4841
4926
|
};
|
|
4927
|
+
/** @description Pays the part of the stake your vault balance is short at execution from your account wallet's USDC approval to WalletAccept (GET /v1/me/wallet-approval), with no signature. It routes the accept through WalletAccept; it is not consent the chain checks: once the approval exists, anyone can relay any live acceptance named to your account through WalletAccept. */
|
|
4928
|
+
readonly WalletApprovalFunding: {
|
|
4929
|
+
/**
|
|
4930
|
+
* @description Funding source: WALLET_APPROVAL pays the shortfall from the account wallet's approval to WalletAccept.
|
|
4931
|
+
* @constant
|
|
4932
|
+
*/
|
|
4933
|
+
readonly kind: "WALLET_APPROVAL";
|
|
4934
|
+
};
|
|
4842
4935
|
readonly AcceptanceFields: {
|
|
4843
4936
|
/** @description The `Idempotency-Key` the taker sent with the accept, which names this acceptance. Never sent to the maker. */
|
|
4844
4937
|
readonly acceptance_id?: components["schemas"]["Uuid"];
|
|
@@ -5511,8 +5604,6 @@ export type components = {
|
|
|
5511
5604
|
*/
|
|
5512
5605
|
readonly projection_state: "CURRENT" | "STALE";
|
|
5513
5606
|
};
|
|
5514
|
-
/** @enum {unknown} */
|
|
5515
|
-
readonly OperationState: "QUEUED" | "IN_FLIGHT" | "RETRYABLE" | "UNKNOWN" | "COMMITTED" | "REVERTED" | "EXPIRED_UNEXECUTED";
|
|
5516
5607
|
/**
|
|
5517
5608
|
* @description Why an operation ended EXPIRED_UNEXECUTED; nothing it would have done happened. INSUFFICIENT_CASH: an ACCEPT whose taker's money (free vault Cash, or the wallet USDC its funding draws) did not cover the stake when it was to execute, for a funded accept by two seconds after its `fund_by`; the RFQ fails with the same `terminal_reason`. DEADLINE_BEFORE_CLAIM: the venue reached it too late, with too little of its signed deadline left to sign and send it. AUTHORIZATION_TOO_CLOSE: when the venue took it, the chain's clock left too little of its signed deadline to send it. SIGNER_QUOTE_LIFE: its signed deadline could not cover the wait for its place in the sender's queue. SIMULATION_REVERTED: simulated before sending, the vault would have rejected it, for a reason other than INSUFFICIENT_CASH. QUARANTINE_EXPIRED: it was held for review after the signer refused it or its retries ran out, and its signed deadline passed meanwhile. ATTESTATION_EXPIRED: a maker's self-funded attestation expired before its signed transaction arrived. For an ACCEPT every reason but INSUFFICIENT_CASH fails the RFQ as EXPIRED_UNEXECUTED.
|
|
5518
5609
|
* @enum {string}
|
|
@@ -6888,6 +6979,7 @@ export interface operations {
|
|
|
6888
6979
|
readonly 400: components["responses"]["Error"];
|
|
6889
6980
|
readonly 401: components["responses"]["Error"];
|
|
6890
6981
|
readonly 403: components["responses"]["Error"];
|
|
6982
|
+
readonly 404: components["responses"]["Error"];
|
|
6891
6983
|
readonly 429: components["responses"]["RateLimited"];
|
|
6892
6984
|
/** @description P&L is temporarily unavailable; resend after `Retry-After`. */
|
|
6893
6985
|
readonly 503: components["responses"]["Unavailable"];
|
|
@@ -7242,6 +7334,7 @@ export interface operations {
|
|
|
7242
7334
|
readonly 400: components["responses"]["Error"];
|
|
7243
7335
|
readonly 401: components["responses"]["Error"];
|
|
7244
7336
|
readonly 403: components["responses"]["Error"];
|
|
7337
|
+
readonly 404: components["responses"]["Error"];
|
|
7245
7338
|
readonly 429: components["responses"]["RateLimited"];
|
|
7246
7339
|
readonly 503: components["responses"]["Unavailable"];
|
|
7247
7340
|
};
|
|
@@ -7273,6 +7366,7 @@ export interface operations {
|
|
|
7273
7366
|
readonly 400: components["responses"]["Error"];
|
|
7274
7367
|
readonly 401: components["responses"]["Error"];
|
|
7275
7368
|
readonly 403: components["responses"]["Error"];
|
|
7369
|
+
readonly 404: components["responses"]["Error"];
|
|
7276
7370
|
readonly 429: components["responses"]["RateLimited"];
|
|
7277
7371
|
readonly 503: components["responses"]["Unavailable"];
|
|
7278
7372
|
};
|
|
@@ -7298,6 +7392,7 @@ export interface operations {
|
|
|
7298
7392
|
readonly 400: components["responses"]["Error"];
|
|
7299
7393
|
readonly 401: components["responses"]["Error"];
|
|
7300
7394
|
readonly 403: components["responses"]["Error"];
|
|
7395
|
+
readonly 404: components["responses"]["Error"];
|
|
7301
7396
|
readonly 429: components["responses"]["RateLimited"];
|
|
7302
7397
|
readonly 503: components["responses"]["Unavailable"];
|
|
7303
7398
|
};
|
|
@@ -7323,6 +7418,7 @@ export interface operations {
|
|
|
7323
7418
|
readonly 400: components["responses"]["Error"];
|
|
7324
7419
|
readonly 401: components["responses"]["Error"];
|
|
7325
7420
|
readonly 403: components["responses"]["Error"];
|
|
7421
|
+
readonly 404: components["responses"]["Error"];
|
|
7326
7422
|
readonly 429: components["responses"]["RateLimited"];
|
|
7327
7423
|
readonly 503: components["responses"]["Unavailable"];
|
|
7328
7424
|
};
|
|
@@ -7817,7 +7913,7 @@ export interface operations {
|
|
|
7817
7913
|
};
|
|
7818
7914
|
content: {
|
|
7819
7915
|
readonly "application/json": {
|
|
7820
|
-
/** @description
|
|
7916
|
+
/** @description One per category in display order, then the mix; empty when none is quoted. */
|
|
7821
7917
|
readonly combos: readonly components["schemas"]["SuggestedCombo"][];
|
|
7822
7918
|
/**
|
|
7823
7919
|
* @deprecated
|
|
@@ -8153,6 +8249,7 @@ export interface operations {
|
|
|
8153
8249
|
readonly 400: components["responses"]["Error"];
|
|
8154
8250
|
readonly 401: components["responses"]["Error"];
|
|
8155
8251
|
readonly 403: components["responses"]["Error"];
|
|
8252
|
+
readonly 404: components["responses"]["Error"];
|
|
8156
8253
|
readonly 429: components["responses"]["RateLimited"];
|
|
8157
8254
|
readonly 503: components["responses"]["Unavailable"];
|
|
8158
8255
|
};
|
|
@@ -8206,6 +8303,7 @@ export interface operations {
|
|
|
8206
8303
|
readonly 400: components["responses"]["Error"];
|
|
8207
8304
|
readonly 401: components["responses"]["Error"];
|
|
8208
8305
|
readonly 403: components["responses"]["Error"];
|
|
8306
|
+
readonly 404: components["responses"]["Error"];
|
|
8209
8307
|
readonly 429: components["responses"]["RateLimited"];
|
|
8210
8308
|
readonly 503: components["responses"]["Unavailable"];
|
|
8211
8309
|
};
|
|
@@ -9243,6 +9341,76 @@ export interface operations {
|
|
|
9243
9341
|
readonly 503: components["responses"]["Unavailable"];
|
|
9244
9342
|
};
|
|
9245
9343
|
};
|
|
9344
|
+
readonly getWalletApproval: {
|
|
9345
|
+
readonly parameters: {
|
|
9346
|
+
readonly query?: never;
|
|
9347
|
+
readonly header?: never;
|
|
9348
|
+
readonly path?: never;
|
|
9349
|
+
readonly cookie?: never;
|
|
9350
|
+
};
|
|
9351
|
+
readonly requestBody?: never;
|
|
9352
|
+
readonly responses: {
|
|
9353
|
+
/** @description The approval and permit nonce; `approved`, `nonce` and `block` are null when HyperEVM could not be read, never 0. */
|
|
9354
|
+
readonly 200: {
|
|
9355
|
+
headers: {
|
|
9356
|
+
/** @description no-store: the approval is read fresh from HyperEVM for each request. */
|
|
9357
|
+
readonly "Cache-Control"?: "no-store";
|
|
9358
|
+
readonly [name: string]: unknown;
|
|
9359
|
+
};
|
|
9360
|
+
content: {
|
|
9361
|
+
readonly "application/json": components["schemas"]["WalletApproval"];
|
|
9362
|
+
};
|
|
9363
|
+
};
|
|
9364
|
+
readonly 401: components["responses"]["Error"];
|
|
9365
|
+
readonly 403: components["responses"]["Error"];
|
|
9366
|
+
readonly 404: components["responses"]["Error"];
|
|
9367
|
+
readonly 429: components["responses"]["RateLimited"];
|
|
9368
|
+
/** @description `CONTRACT_UNAVAILABLE`: this deployment has no WalletAccept. */
|
|
9369
|
+
readonly 503: components["responses"]["Unavailable"];
|
|
9370
|
+
};
|
|
9371
|
+
};
|
|
9372
|
+
readonly approveWallet: {
|
|
9373
|
+
readonly parameters: {
|
|
9374
|
+
readonly query?: never;
|
|
9375
|
+
readonly header: {
|
|
9376
|
+
/**
|
|
9377
|
+
* @description Lowercase UUIDv7 naming this command, unique per caller and route. A retry with the same key and body returns the original result; the same key with a different body returns `409 IDEMPOTENCY_KEY_REUSED`.
|
|
9378
|
+
* @example 0198a6f6-82a5-7abc-9f2a-4f0fb437493e
|
|
9379
|
+
*/
|
|
9380
|
+
readonly "Idempotency-Key": components["parameters"]["IdempotencyKey"];
|
|
9381
|
+
};
|
|
9382
|
+
readonly path?: never;
|
|
9383
|
+
readonly cookie?: never;
|
|
9384
|
+
};
|
|
9385
|
+
readonly requestBody: {
|
|
9386
|
+
readonly content: {
|
|
9387
|
+
readonly "application/json": components["schemas"]["WalletApprovalCommand"];
|
|
9388
|
+
};
|
|
9389
|
+
};
|
|
9390
|
+
readonly responses: {
|
|
9391
|
+
/** @description Admitted, not yet on chain: the permit request as it stands. The approval, or a revoke, takes effect only once its operation is COMMITTED; until then the old approval stands. Follow the operation on the account stream (`OPERATION_UPDATED`, kind `USDC_PERMIT`) or resend this request: the same Idempotency-Key and body return the request as it stands before anything else is checked, so save both before the first send. The same permit under another key returns the request it already started. */
|
|
9392
|
+
readonly 202: {
|
|
9393
|
+
headers: {
|
|
9394
|
+
readonly [name: string]: unknown;
|
|
9395
|
+
};
|
|
9396
|
+
content: {
|
|
9397
|
+
readonly "application/json": components["schemas"]["WalletApprovalRequest"];
|
|
9398
|
+
};
|
|
9399
|
+
};
|
|
9400
|
+
/** @description `INVALID_REQUEST`: a malformed body. The deadline is USDC's to judge: a permit whose `deadline` has passed is admitted, and its operation ends `PERMIT_EXPIRED` having changed nothing. */
|
|
9401
|
+
readonly 400: components["responses"]["Error"];
|
|
9402
|
+
readonly 401: components["responses"]["Error"];
|
|
9403
|
+
/** @description Sessions and the account's own participant keys only; a partner server key cannot approve. */
|
|
9404
|
+
readonly 403: components["responses"]["Error"];
|
|
9405
|
+
readonly 404: components["responses"]["Error"];
|
|
9406
|
+
readonly 409: components["responses"]["Error"];
|
|
9407
|
+
/** @description `INVALID_SIGNATURE`: the signature does not recover to the account wallet over this permit. */
|
|
9408
|
+
readonly 422: components["responses"]["Error"];
|
|
9409
|
+
readonly 429: components["responses"]["RateLimited"];
|
|
9410
|
+
/** @description `CONTRACT_UNAVAILABLE`: this deployment has no WalletAccept. `FINANCIAL_ACTIONS_DISABLED`: financial actions are disabled. */
|
|
9411
|
+
readonly 503: components["responses"]["Unavailable"];
|
|
9412
|
+
};
|
|
9413
|
+
};
|
|
9246
9414
|
readonly getCopyBudget: {
|
|
9247
9415
|
readonly parameters: {
|
|
9248
9416
|
readonly query?: never;
|
|
@@ -10026,7 +10194,7 @@ export interface operations {
|
|
|
10026
10194
|
readonly 409: components["responses"]["Error"];
|
|
10027
10195
|
readonly 422: components["responses"]["Error"];
|
|
10028
10196
|
readonly 429: components["responses"]["RateLimited"];
|
|
10029
|
-
/** @description `EXECUTION_BACKLOG_FULL`: the venue's on-chain queue could not send this trade before the quote expires, so nothing was created and the maker was not asked. Wait `Retry-After` seconds and accept a fresh quote. */
|
|
10197
|
+
/** @description `EXECUTION_BACKLOG_FULL`: the venue's on-chain queue could not send this trade before the quote expires, so nothing was created and the maker was not asked. Wait `Retry-After` seconds and accept a fresh quote. `CONTRACT_UNAVAILABLE`: funding `WALLET_APPROVAL` on a deployment with no WalletAccept. */
|
|
10030
10198
|
readonly 503: components["responses"]["Unavailable"];
|
|
10031
10199
|
};
|
|
10032
10200
|
};
|
|
@@ -10909,6 +11077,7 @@ export interface operations {
|
|
|
10909
11077
|
};
|
|
10910
11078
|
readonly 401: components["responses"]["Error"];
|
|
10911
11079
|
readonly 403: components["responses"]["Error"];
|
|
11080
|
+
readonly 404: components["responses"]["Error"];
|
|
10912
11081
|
readonly 429: components["responses"]["RateLimited"];
|
|
10913
11082
|
readonly 503: components["responses"]["Unavailable"];
|
|
10914
11083
|
};
|
|
@@ -10945,6 +11114,7 @@ export interface operations {
|
|
|
10945
11114
|
readonly 400: components["responses"]["Error"];
|
|
10946
11115
|
readonly 401: components["responses"]["Error"];
|
|
10947
11116
|
readonly 403: components["responses"]["Error"];
|
|
11117
|
+
readonly 404: components["responses"]["Error"];
|
|
10948
11118
|
readonly 429: components["responses"]["RateLimited"];
|
|
10949
11119
|
readonly 503: components["responses"]["Unavailable"];
|
|
10950
11120
|
};
|
|
@@ -11160,6 +11330,7 @@ export interface operations {
|
|
|
11160
11330
|
readonly 400: components["responses"]["Error"];
|
|
11161
11331
|
readonly 401: components["responses"]["Error"];
|
|
11162
11332
|
readonly 403: components["responses"]["Error"];
|
|
11333
|
+
readonly 404: components["responses"]["Error"];
|
|
11163
11334
|
/** @description Admission needs a fresh HyperCore `userRole` of `user`, or of `missing` with `activation_fee_accepted` true, and at most one unresolved exit per account. `STATE_CONFLICT`: too little free vault cash. */
|
|
11164
11335
|
readonly 409: components["responses"]["Error"];
|
|
11165
11336
|
readonly 429: components["responses"]["RateLimited"];
|
|
@@ -11258,6 +11429,7 @@ export interface operations {
|
|
|
11258
11429
|
};
|
|
11259
11430
|
readonly 401: components["responses"]["Error"];
|
|
11260
11431
|
readonly 403: components["responses"]["Error"];
|
|
11432
|
+
readonly 404: components["responses"]["Error"];
|
|
11261
11433
|
readonly 429: components["responses"]["RateLimited"];
|
|
11262
11434
|
readonly 503: components["responses"]["Unavailable"];
|
|
11263
11435
|
};
|
|
@@ -11295,6 +11467,7 @@ export interface operations {
|
|
|
11295
11467
|
readonly 401: components["responses"]["Error"];
|
|
11296
11468
|
/** @description Wallet sessions and Totalis app sessions only: an API key cannot deposit. */
|
|
11297
11469
|
readonly 403: components["responses"]["Error"];
|
|
11470
|
+
readonly 404: components["responses"]["Error"];
|
|
11298
11471
|
/** @description The wallet must hold the amount beyond its other pending work. */
|
|
11299
11472
|
readonly 409: components["responses"]["Error"];
|
|
11300
11473
|
readonly 422: components["responses"]["Error"];
|
|
@@ -11333,6 +11506,7 @@ export interface operations {
|
|
|
11333
11506
|
readonly 400: components["responses"]["Error"];
|
|
11334
11507
|
readonly 401: components["responses"]["Error"];
|
|
11335
11508
|
readonly 403: components["responses"]["Error"];
|
|
11509
|
+
readonly 404: components["responses"]["Error"];
|
|
11336
11510
|
readonly 409: components["responses"]["Error"];
|
|
11337
11511
|
readonly 422: components["responses"]["Error"];
|
|
11338
11512
|
readonly 429: components["responses"]["RateLimited"];
|
|
@@ -11371,6 +11545,7 @@ export interface operations {
|
|
|
11371
11545
|
readonly 400: components["responses"]["Error"];
|
|
11372
11546
|
readonly 401: components["responses"]["Error"];
|
|
11373
11547
|
readonly 403: components["responses"]["Error"];
|
|
11548
|
+
readonly 404: components["responses"]["Error"];
|
|
11374
11549
|
readonly 409: components["responses"]["Error"];
|
|
11375
11550
|
readonly 429: components["responses"]["RateLimited"];
|
|
11376
11551
|
readonly 503: components["responses"]["Unavailable"];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const sdkVersion = "
|
|
2
|
-
export declare const openapiSha256 = "
|
|
1
|
+
export declare const sdkVersion = "212.0.0-suggested-categories";
|
|
2
|
+
export declare const openapiSha256 = "7dfe6c962d2acc85b455fa7cbd1b4d8a6cec4b2dabf96550219fb483d3d71224";
|
|
3
3
|
export declare const realtimeSha256 = "f4f1078418b5302417babe1380b85b0c4f89cb0fdfaff3a46154dd2018625c07";
|
|
4
4
|
export declare const jsonSchemaSha256: {
|
|
5
|
-
readonly "account.schema.json": "
|
|
5
|
+
readonly "account.schema.json": "96c6f76d10567b00bff122e31eca177b3879eec78628113832d00bc9ea6db891";
|
|
6
6
|
readonly "comments.schema.json": "18f4addcfa4e31c2c833fce8b8beca61d2e2ee5b6318c2ed0b479698ff56b65e";
|
|
7
7
|
readonly "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb";
|
|
8
8
|
readonly "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401";
|
|
@@ -14,11 +14,11 @@ export declare const jsonSchemaSha256: {
|
|
|
14
14
|
readonly "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c";
|
|
15
15
|
readonly "market-data.schema.json": "85db33fac6a29b0fa87a500bfda947d0ab3913b13f1c26663d4a7c0484c35786";
|
|
16
16
|
readonly "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631";
|
|
17
|
-
readonly "quote.schema.json": "
|
|
17
|
+
readonly "quote.schema.json": "7b3dc6197c37d9e58440dccd109208205d380797506f4dc5ae07caf49a6276da";
|
|
18
18
|
readonly "realtime.schema.json": "f4f1078418b5302417babe1380b85b0c4f89cb0fdfaff3a46154dd2018625c07";
|
|
19
19
|
};
|
|
20
20
|
export declare const operations: {
|
|
21
|
-
readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketScoreTimeline", "getMarketStats", "getOperation", "getOwnMaker", "getPartnerReport", "getPerpMarks", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listQuotes", "listTraderPositions", "listTraderTrades", "placeGolden", "reactComment", "recordAcquisition", "refreshPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unreactComment"];
|
|
21
|
+
readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketScoreTimeline", "getMarketStats", "getOperation", "getOwnMaker", "getPartnerReport", "getPerpMarks", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listQuotes", "listTraderPositions", "listTraderTrades", "placeGolden", "reactComment", "recordAcquisition", "refreshPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unreactComment"];
|
|
22
22
|
readonly maker: readonly ["cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "releaseQuoteLease", "renewQuoteLease", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
|
|
23
23
|
readonly operator: readonly ["live", "ready"];
|
|
24
24
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Generated by scripts/generate.mjs; do not edit.
|
|
2
|
-
export const sdkVersion = "
|
|
3
|
-
export const openapiSha256 = "
|
|
2
|
+
export const sdkVersion = "212.0.0-suggested-categories";
|
|
3
|
+
export const openapiSha256 = "7dfe6c962d2acc85b455fa7cbd1b4d8a6cec4b2dabf96550219fb483d3d71224";
|
|
4
4
|
export const realtimeSha256 = "f4f1078418b5302417babe1380b85b0c4f89cb0fdfaff3a46154dd2018625c07";
|
|
5
5
|
export const jsonSchemaSha256 = {
|
|
6
|
-
"account.schema.json": "
|
|
6
|
+
"account.schema.json": "96c6f76d10567b00bff122e31eca177b3879eec78628113832d00bc9ea6db891",
|
|
7
7
|
"comments.schema.json": "18f4addcfa4e31c2c833fce8b8beca61d2e2ee5b6318c2ed0b479698ff56b65e",
|
|
8
8
|
"common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb",
|
|
9
9
|
"core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401",
|
|
@@ -15,7 +15,7 @@ export const jsonSchemaSha256 = {
|
|
|
15
15
|
"maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c",
|
|
16
16
|
"market-data.schema.json": "85db33fac6a29b0fa87a500bfda947d0ab3913b13f1c26663d4a7c0484c35786",
|
|
17
17
|
"product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
|
|
18
|
-
"quote.schema.json": "
|
|
18
|
+
"quote.schema.json": "7b3dc6197c37d9e58440dccd109208205d380797506f4dc5ae07caf49a6276da",
|
|
19
19
|
"realtime.schema.json": "f4f1078418b5302417babe1380b85b0c4f89cb0fdfaff3a46154dd2018625c07"
|
|
20
20
|
};
|
|
21
21
|
export const operations = {
|
|
@@ -25,6 +25,7 @@ export const operations = {
|
|
|
25
25
|
"activeCoreExits",
|
|
26
26
|
"admitOwnMaker",
|
|
27
27
|
"admitPartnerWallet",
|
|
28
|
+
"approveWallet",
|
|
28
29
|
"bindEmbeddedWallet",
|
|
29
30
|
"cancelRfq",
|
|
30
31
|
"confirmComboCopyAgent",
|
|
@@ -96,6 +97,7 @@ export const operations = {
|
|
|
96
97
|
"getUsernameAvailability",
|
|
97
98
|
"getVaultAgents",
|
|
98
99
|
"getVolumeLeaderboard",
|
|
100
|
+
"getWalletApproval",
|
|
99
101
|
"getWithdrawal",
|
|
100
102
|
"grantComboCopyAgent",
|
|
101
103
|
"grantVaultAgent",
|
package/dist/maker.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ApiError, randomBytes32, resendable, sendOnce, singleFetch, sleep, unwr
|
|
|
3
3
|
import { toTotalisSigner } from "./signer.js";
|
|
4
4
|
import { items } from "./pagination.js";
|
|
5
5
|
import { TotalisStream } from "./stream.js";
|
|
6
|
-
import { follow } from "./totalis.js";
|
|
6
|
+
import { follow, terminalOperationStatuses } from "./totalis.js";
|
|
7
7
|
import { address, cashoutTransferTypedData, hashTypedData, quoteTypedData, sellBackTypedData } from "./typed-data.js";
|
|
8
8
|
import { calldata, controllerTransactions } from "./controller.js";
|
|
9
9
|
export { controllerTransactions, encodeCall, openMakerVaultTransaction } from "./controller.js";
|
|
@@ -522,7 +522,7 @@ export function createMaker(options) {
|
|
|
522
522
|
*/
|
|
523
523
|
const withdrawal = async () => unwrap(await client.GET("/v1/makers/{maker_id}/withdrawal", { params: { path: { maker_id: makerId } } }));
|
|
524
524
|
const settled = new Set(["NO_IMPROVEMENT", "FAILED"]);
|
|
525
|
-
const operationDone =
|
|
525
|
+
const operationDone = terminalOperationStatuses;
|
|
526
526
|
/**
|
|
527
527
|
* Ask for a collateral reduction and follow the job on the maker stream until
|
|
528
528
|
* it needs nothing more from the maker: NO_IMPROVEMENT, FAILED, or DURABLE
|