@totalis/hip4-client 0.84.1 → 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 +39 -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/client.d.ts +2 -1
- package/dist/generated/errors.d.ts +3 -1
- package/dist/generated/errors.js +26 -1
- package/dist/generated/openapi.d.ts +173 -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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,45 @@
|
|
|
3
3
|
`@totalis/hip4-client` follows [semantic versioning](https://semver.org).
|
|
4
4
|
The contract version the generated types come from is `sdkVersion` in `./version`.
|
|
5
5
|
|
|
6
|
+
## 0.85.0
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Combos funded from the wallet's USDC approval to WalletAccept (TT-2645).
|
|
11
|
+
`openPosition`, `prepareEntryFunding` and `signEntry` take
|
|
12
|
+
`funding: "approval"`: the shortfall the vault lacks is drawn from the
|
|
13
|
+
approval, so a wallet-funded Combo needs no USDC authorization, and one
|
|
14
|
+
from HyperCore only its bridge. When the approval left is short,
|
|
15
|
+
`prepareEntryFunding` (and `openPosition`) asks one permit for the larger
|
|
16
|
+
of `defaultWalletApproval` (10,000 USDC) and the shortfall, hands it to
|
|
17
|
+
`onApproval` to persist and waits until it lands; a refresh reuses the
|
|
18
|
+
landed approval and an unsent bridge's exact bytes; `approvalValue: null`
|
|
19
|
+
never asks one and throws `INSUFFICIENT_APPROVAL` instead. The approval is
|
|
20
|
+
read beside the bridge signature; pass `approval`, a `WalletApproval` just
|
|
21
|
+
read or a `LandedWalletApproval` (the signed permit with its committed
|
|
22
|
+
request), to skip that read. It must be this wallet's, on this deployment,
|
|
23
|
+
for its vault and USDC (`WalletApproval.vault`, `SignedWalletApproval.vault`). With a HyperCore bridge, which can't be undone, the approval is
|
|
24
|
+
read again beside the bridge signature whatever was passed, and that read
|
|
25
|
+
decides.
|
|
26
|
+
The default stays `"wallet"`.
|
|
27
|
+
- `readWalletApproval` (`GET /v1/me/wallet-approval`), and
|
|
28
|
+
`signWalletApproval`, `sendWalletApproval`, `recoverWalletApproval`,
|
|
29
|
+
`approveWallet({ value })` and `revokeWalletApproval()` over
|
|
30
|
+
`POST /v1/me/wallet-approval`; `walletPermitTypedData` in `./typed-data`.
|
|
31
|
+
The signed record (`SignedWalletApproval`) carries its request ID and the
|
|
32
|
+
permit nonce; `approveWallet` and `revokeWalletApproval` resolve only once
|
|
33
|
+
the permit landed and throw `WalletApprovalError` (`PERMIT_EXPIRED`,
|
|
34
|
+
`PERMIT_NONCE_USED`, `PERMIT_REVERTED`) when it changed nothing. A revoke is
|
|
35
|
+
done only when `revokeWalletApproval` resolves. The chain judges a permit's
|
|
36
|
+
deadline: one sent after it passed is admitted and ends `PERMIT_EXPIRED`.
|
|
37
|
+
- `entryFailure(record, operation, acceptance)` answers
|
|
38
|
+
`INSUFFICIENT_APPROVAL` for an approval-funded entry whose approval was
|
|
39
|
+
below its shortfall (the acceptance's `funding_failure_reason`).
|
|
40
|
+
- `getSuggestedCombo`: each `SuggestedCombo` may carry `category`, the
|
|
41
|
+
discovery category its legs were drawn from (Crypto counts as Finance);
|
|
42
|
+
absent on the mix, whose legs come from different categories (TT-2669).
|
|
43
|
+
Contract `212.0.0-suggested-categories`.
|
|
44
|
+
|
|
6
45
|
## 0.84.1
|
|
7
46
|
|
|
8
47
|
### Changed
|
package/README.md
CHANGED
|
@@ -70,6 +70,31 @@ totalis.close();
|
|
|
70
70
|
and signs the acceptance. If the maker replaced the quote first, declined it or didn't answer, it signs the best
|
|
71
71
|
other quote paying at least the first one's payout (`minPayout`) and tries again. Only `COMMITTED` means the trade happened. A decided position settles and pays out on its own.
|
|
72
72
|
|
|
73
|
+
### Fund Combos from a wallet approval
|
|
74
|
+
|
|
75
|
+
With `funding: "approval"`, a shortfall the vault lacks comes from the wallet's USDC approval to WalletAccept
|
|
76
|
+
instead of a signed authorization per Combo. When the approval left is short, the SDK asks the wallet for one
|
|
77
|
+
permit of the larger of 10,000 USDC (`defaultWalletApproval`) and the shortfall, and waits until it lands:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
const opened = await totalis.openPosition({
|
|
81
|
+
legs: [{ outcome_id: "13160", side: "YES" }],
|
|
82
|
+
stake: 5_000_000n,
|
|
83
|
+
funding: "approval",
|
|
84
|
+
onApproval: (record) => save("approval", record), // recoverWalletApproval(record) after a restart
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
await totalis.revokeWalletApproval(); // resolves once permit(0) landed
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`readWalletApproval()` reads the approval and permit nonce; `approveWallet({ value })`,
|
|
91
|
+
`signWalletApproval` / `sendWalletApproval` / `recoverWalletApproval` and `walletPermitTypedData` (in
|
|
92
|
+
`./typed-data`) are the parts. Once approved, anyone can relay any live acceptance named to the account through
|
|
93
|
+
WalletAccept; revoke it with `revokeWalletApproval`, since a wallet's own `approve(0)` can be undone by a signed
|
|
94
|
+
permit that has not landed yet. Approvals are per vault: these calls serve the active vault's WalletAccept. Once
|
|
95
|
+
a vault is retired its WalletAccept can't pull, and the wallet clears an approval left to it with its own
|
|
96
|
+
`approve(0)` or `permit(0)`.
|
|
97
|
+
|
|
73
98
|
## Make markets
|
|
74
99
|
|
|
75
100
|
```ts
|
package/dist/client.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type { components, operations, paths } from "./generated/client.js";
|
|
|
5
5
|
export type { AccessToken, ApiClientOptions, PublicEnvironment } from "./base.js";
|
|
6
6
|
/** The typed HTTP client for the `client` audience. `createTotalis` adds the flows. */
|
|
7
7
|
export declare function createClient(environment: PublicEnvironment, options?: ApiClientOptions): import("openapi-fetch").Client<paths, `${string}/${string}`>;
|
|
8
|
-
export { bestBid, bestQuote, createTotalis, EntryError, entryFailure, follow, type Acceptance, type AcceptanceResult, type Amount, type BridgeState, type ComboCash, type CashoutBid, type Chooser, type Deployment, type DepositAccepted, type EntryCash, type EntryFailure, type EntryQuote, type CoreExit, type LegacySignedEntry, type Leg, type PreparedEntryFunding, type NotAdmitted, type RecordListener, type Operation, type Quote, type ResponseOf, type SellBackQuote, type SignedAcceptance, type SignedCashout, type SignedCoreExit, type SignedDeposit, type SignedEntry, type SignedReturnToCore, type Totalis, type TotalisOptions, type TransferQuote, type WalletCall, type Withdrawal, } from "./totalis.js";
|
|
8
|
+
export { bestBid, bestQuote, createTotalis, defaultWalletApproval, EntryError, entryFailure, follow, WalletApprovalError, type Acceptance, type AcceptanceResult, type Amount, type ApprovalListener, type BridgeState, type ComboCash, type CashoutBid, type Chooser, type Deployment, type DepositAccepted, type EntryCash, type EntryFailure, type EntryFunding, type EntryQuote, type KnownWalletApproval, type LandedWalletApproval, type SignedWalletApproval, type WalletApproval, type WalletApprovalRequest, type CoreExit, type LegacySignedEntry, type Leg, type PreparedEntryFunding, type NotAdmitted, type RecordListener, type Operation, type Quote, type ResponseOf, type SellBackQuote, type SignedAcceptance, type SignedCashout, type SignedCoreExit, type SignedDeposit, type SignedEntry, type SignedReturnToCore, type Totalis, type TotalisOptions, type TransferQuote, type WalletCall, type Withdrawal, } from "./totalis.js";
|
|
9
9
|
export { bridgeAction, bridgeGasBuffer, classifyHypercoreAnswer, coreSetupFee, hyperevmUsdcBridge, hyperliquidExchange, hyperliquidInfo, hyperliquidNetwork, hypercoreNonce, hypercoreSignature, readCoreCash, sendAssetTypedData, settleHypercore, signSendAsset, submitHypercore, usdcText, type BridgedCash, type CoreAccountMode, type CoreCash, type HypercoreAnswer, type HyperliquidInfo, type HypercoreSignature, type HypercoreTransport, type HyperliquidNetwork, type SendAssetAction, type SignedSendAsset, } from "./hypercore.js";
|
|
10
10
|
export { ApiError, envelope, NetworkError, randomBytes32, retryingFetch, sendOnce, unwrap, uuidv7, type Fetch, type Repaired, type RetryPolicy } from "./request.js";
|
|
11
11
|
export { items, pages, type Page, type PageQuery } from "./pagination.js";
|
package/dist/client.js
CHANGED
|
@@ -4,7 +4,7 @@ export { publicServers, publicStreamServers } from "./base.js";
|
|
|
4
4
|
export function createClient(environment, options) {
|
|
5
5
|
return audienceClient(environment, options);
|
|
6
6
|
}
|
|
7
|
-
export { bestBid, bestQuote, createTotalis, EntryError, entryFailure, follow, } from "./totalis.js";
|
|
7
|
+
export { bestBid, bestQuote, createTotalis, defaultWalletApproval, EntryError, entryFailure, follow, WalletApprovalError, } from "./totalis.js";
|
|
8
8
|
export { bridgeAction, bridgeGasBuffer, classifyHypercoreAnswer, coreSetupFee, hyperevmUsdcBridge, hyperliquidExchange, hyperliquidInfo, hyperliquidNetwork, hypercoreNonce, hypercoreSignature, readCoreCash, sendAssetTypedData, settleHypercore, signSendAsset, submitHypercore, usdcText, } from "./hypercore.js";
|
|
9
9
|
export { ApiError, envelope, NetworkError, randomBytes32, retryingFetch, sendOnce, unwrap, uuidv7 } from "./request.js";
|
|
10
10
|
export { items, pages } from "./pagination.js";
|
package/dist/flow-errors.d.ts
CHANGED
|
@@ -34,9 +34,26 @@ export declare class ExitUnavailableError extends Error {
|
|
|
34
34
|
cause: unknown;
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The wallet approval to WalletAccept did not become what was asked.
|
|
39
|
+
* `PERMIT_EXPIRED`, `PERMIT_NONCE_USED` and `PERMIT_REVERTED` are the permit
|
|
40
|
+
* request's `failure_reason`: it changed nothing. On `PERMIT_NONCE_USED` read
|
|
41
|
+
* the approval first, as another permit may already have set it; never sign
|
|
42
|
+
* the old intent again automatically. `APPROVAL_UNKNOWN`: the approval or its
|
|
43
|
+
* nonce could not be read, so no permit was signed; read again.
|
|
44
|
+
* `INSUFFICIENT_APPROVAL`: an entry signed without preparing its funding
|
|
45
|
+
* needs more approval than the wallet has left; `approveWallet` first.
|
|
46
|
+
*/
|
|
47
|
+
export declare class WalletApprovalError extends Error {
|
|
48
|
+
readonly code: "PERMIT_EXPIRED" | "PERMIT_NONCE_USED" | "PERMIT_REVERTED" | "APPROVAL_UNKNOWN" | "INSUFFICIENT_APPROVAL";
|
|
49
|
+
readonly name = "WalletApprovalError";
|
|
50
|
+
constructor(code: "PERMIT_EXPIRED" | "PERMIT_NONCE_USED" | "PERMIT_REVERTED" | "APPROVAL_UNKNOWN" | "INSUFFICIENT_APPROVAL", message: string, options?: {
|
|
51
|
+
cause: unknown;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
37
54
|
/** Any SDK failure in one shape, for a UI or a log line. */
|
|
38
55
|
export type NormalizedError = {
|
|
39
|
-
/** The venue's registered code, `EntryError`'s code, `BALANCE_UNKNOWN`, `EXIT_UNAVAILABLE`, `NETWORK`, `STREAM_CLOSED` (with the close reason in `message`), `TIMEOUT`, `ABORTED` or `UNKNOWN`. */
|
|
56
|
+
/** The venue's registered code, `EntryError`'s or `WalletApprovalError`'s code, `BALANCE_UNKNOWN`, `EXIT_UNAVAILABLE`, `NETWORK`, `STREAM_CLOSED` (with the close reason in `message`), `TIMEOUT`, `ABORTED` or `UNKNOWN`. */
|
|
40
57
|
readonly code: string;
|
|
41
58
|
readonly message: string;
|
|
42
59
|
/** Trying again can succeed: the same request later (BACKOFF, a lost response) or a fresh read and a new request (REFRESH, an unknown balance). */
|
package/dist/flow-errors.js
CHANGED
|
@@ -41,6 +41,24 @@ export class ExitUnavailableError extends Error {
|
|
|
41
41
|
super("exits to HyperCore are not configured on this deployment", options);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* The wallet approval to WalletAccept did not become what was asked.
|
|
46
|
+
* `PERMIT_EXPIRED`, `PERMIT_NONCE_USED` and `PERMIT_REVERTED` are the permit
|
|
47
|
+
* request's `failure_reason`: it changed nothing. On `PERMIT_NONCE_USED` read
|
|
48
|
+
* the approval first, as another permit may already have set it; never sign
|
|
49
|
+
* the old intent again automatically. `APPROVAL_UNKNOWN`: the approval or its
|
|
50
|
+
* nonce could not be read, so no permit was signed; read again.
|
|
51
|
+
* `INSUFFICIENT_APPROVAL`: an entry signed without preparing its funding
|
|
52
|
+
* needs more approval than the wallet has left; `approveWallet` first.
|
|
53
|
+
*/
|
|
54
|
+
export class WalletApprovalError extends Error {
|
|
55
|
+
code;
|
|
56
|
+
name = "WalletApprovalError";
|
|
57
|
+
constructor(code, message, options) {
|
|
58
|
+
super(message, options);
|
|
59
|
+
this.code = code;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
44
62
|
export function normalizeError(error) {
|
|
45
63
|
const base = { retry: undefined, requestId: undefined, status: undefined, mayStillRun: false, resend: undefined, cause: error };
|
|
46
64
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -57,6 +75,8 @@ export function normalizeError(error) {
|
|
|
57
75
|
return { ...base, code: error.code, message, retryable: error.code === "BALANCE_UNKNOWN" };
|
|
58
76
|
if (error instanceof BalanceUnknownError)
|
|
59
77
|
return { ...base, code: error.code, message, retryable: true };
|
|
78
|
+
if (error instanceof WalletApprovalError)
|
|
79
|
+
return { ...base, code: error.code, message, retryable: error.code !== "PERMIT_REVERTED" };
|
|
60
80
|
if (error instanceof ExitUnavailableError)
|
|
61
81
|
return { ...base, code: error.code, message, retryable: false };
|
|
62
82
|
if (error instanceof StreamClosedError)
|
|
@@ -58,6 +58,7 @@ export type paths = {
|
|
|
58
58
|
readonly "/v1/me/copy-agents/core": Pick<SharedPaths["/v1/me/copy-agents/core"], "parameters" | "post" | "delete">;
|
|
59
59
|
readonly "/v1/me/copy-agents/combo": Pick<SharedPaths["/v1/me/copy-agents/combo"], "parameters" | "post" | "delete">;
|
|
60
60
|
readonly "/v1/me/vault-agents": Pick<SharedPaths["/v1/me/vault-agents"], "parameters" | "get" | "post">;
|
|
61
|
+
readonly "/v1/me/wallet-approval": Pick<SharedPaths["/v1/me/wallet-approval"], "parameters" | "get" | "post">;
|
|
61
62
|
readonly "/v1/me/copy-budget": Pick<SharedPaths["/v1/me/copy-budget"], "parameters" | "get" | "put">;
|
|
62
63
|
readonly "/v1/me/copy-agents/combo/confirm": Pick<SharedPaths["/v1/me/copy-agents/combo/confirm"], "parameters" | "post">;
|
|
63
64
|
readonly "/v1/me/copy-agents/combo/grant": Pick<SharedPaths["/v1/me/copy-agents/combo/grant"], "parameters" | "post">;
|
|
@@ -111,4 +112,4 @@ export type paths = {
|
|
|
111
112
|
readonly "/v1/makers/{maker_id}/exposure": Pick<SharedPaths["/v1/makers/{maker_id}/exposure"], "parameters" | "get">;
|
|
112
113
|
readonly "/v1/makers/{maker_id}/performance": Pick<SharedPaths["/v1/makers/{maker_id}/performance"], "parameters" | "get">;
|
|
113
114
|
};
|
|
114
|
-
export type operations = Pick<SharedOperations, "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">;
|
|
115
|
+
export type operations = Pick<SharedOperations, "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">;
|
|
@@ -369,10 +369,11 @@ export type CloseReason = "SUBPROTOCOL_REQUIRED" | "CURSOR_RESET" | "DEPENDENCY_
|
|
|
369
369
|
/** The codes each live operation can return. */
|
|
370
370
|
export declare const operationErrors: {
|
|
371
371
|
readonly abandonCoreExit: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "NOT_FOUND", "STATE_CONFLICT", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND"];
|
|
372
|
-
readonly acceptQuote: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "RFQ_NOT_OPEN", "QUOTE_EXPIRED", "QUOTE_CANCELLED", "QUOTE_REPLACED", "QUOTE_SIGNER_CHANGED", "QUOTE_CAPACITY_EXCEEDED", "QUOTE_NOT_FOUND", "STATE_CONFLICT", "FINANCIAL_ACTIONS_DISABLED", "INVALID_SIGNATURE", "CONTRACT_SIGNATURE_OVERLOADED", "EXECUTION_BACKLOG_FULL", "CORE_MOVE_IN_FLIGHT", "ACCEPTANCE_IN_FLIGHT", "GOLDEN_CASHOUT_REFUSED", "GAS_PRICE_ABOVE_CEILING", "NOT_FOUND", "ORIGIN_REQUIRED", "WRONG_AUTHORITY", "IDENTITY_NOT_FOUND"];
|
|
372
|
+
readonly acceptQuote: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "RFQ_NOT_OPEN", "QUOTE_EXPIRED", "QUOTE_CANCELLED", "QUOTE_REPLACED", "QUOTE_SIGNER_CHANGED", "QUOTE_CAPACITY_EXCEEDED", "QUOTE_NOT_FOUND", "STATE_CONFLICT", "FINANCIAL_ACTIONS_DISABLED", "INVALID_SIGNATURE", "CONTRACT_SIGNATURE_OVERLOADED", "EXECUTION_BACKLOG_FULL", "CORE_MOVE_IN_FLIGHT", "ACCEPTANCE_IN_FLIGHT", "GOLDEN_CASHOUT_REFUSED", "GAS_PRICE_ABOVE_CEILING", "NOT_FOUND", "ORIGIN_REQUIRED", "WRONG_AUTHORITY", "IDENTITY_NOT_FOUND", "CONTRACT_UNAVAILABLE"];
|
|
373
373
|
readonly activeCoreExits: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "IDENTITY_NOT_FOUND"];
|
|
374
374
|
readonly admitOwnMaker: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "INVALID_REQUEST", "NOT_FOUND", "STATE_CONFLICT", "IDENTITY_NOT_FOUND"];
|
|
375
375
|
readonly admitPartnerWallet: readonly ["INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "UNAUTHENTICATED", "FORBIDDEN", "STATE_CONFLICT", "INVALID_SIGNATURE", "RATE_LIMITED", "AUTHORIZATION_UNAVAILABLE"];
|
|
376
|
+
readonly approveWallet: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_REQUEST", "INVALID_SIGNATURE", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "FINANCIAL_ACTIONS_DISABLED", "CONTRACT_UNAVAILABLE"];
|
|
376
377
|
readonly bindEmbeddedWallet: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "EMBEDDED_WALLET_CONFLICT", "ACCESS_REQUIRED", "SIGN_IN_REQUIRED", "WALLET_CONTRACT_UNSUPPORTED", "ORIGIN_REQUIRED"];
|
|
377
378
|
readonly cancelQuote: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND", "STATE_CONFLICT"];
|
|
378
379
|
readonly cancelRfq: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED", "NOT_FOUND", "RFQ_NOT_CANCELLABLE", "STATE_CONFLICT", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND"];
|
|
@@ -457,6 +458,7 @@ export declare const operationErrors: {
|
|
|
457
458
|
readonly getUsernameAvailability: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_QUERY", "IDENTITY_NOT_FOUND", "ORIGIN_REQUIRED"];
|
|
458
459
|
readonly getVaultAgents: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "DEPENDENCY_STALE"];
|
|
459
460
|
readonly getVolumeLeaderboard: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_QUERY", "CONTRACT_UNAVAILABLE", "IDENTITY_NOT_FOUND"];
|
|
461
|
+
readonly getWalletApproval: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "IDENTITY_NOT_FOUND", "CONTRACT_UNAVAILABLE"];
|
|
460
462
|
readonly getWithdrawal: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "NOT_FOUND", "IDENTITY_NOT_FOUND"];
|
|
461
463
|
readonly grantComboCopyAgent: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "CONTRACT_UNAVAILABLE", "NOT_FOUND", "INVALID_REQUEST", "FINANCIAL_ACTIONS_DISABLED", "DEPENDENCY_STALE", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED"];
|
|
462
464
|
readonly grantVaultAgent: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "CONTRACT_UNAVAILABLE", "INVALID_REQUEST", "FINANCIAL_ACTIONS_DISABLED", "DEPENDENCY_STALE", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSED"];
|
package/dist/generated/errors.js
CHANGED
|
@@ -407,7 +407,8 @@ export const operationErrors = {
|
|
|
407
407
|
"NOT_FOUND",
|
|
408
408
|
"ORIGIN_REQUIRED",
|
|
409
409
|
"WRONG_AUTHORITY",
|
|
410
|
-
"IDENTITY_NOT_FOUND"
|
|
410
|
+
"IDENTITY_NOT_FOUND",
|
|
411
|
+
"CONTRACT_UNAVAILABLE"
|
|
411
412
|
],
|
|
412
413
|
"activeCoreExits": [
|
|
413
414
|
"UNAUTHENTICATED",
|
|
@@ -439,6 +440,21 @@ export const operationErrors = {
|
|
|
439
440
|
"RATE_LIMITED",
|
|
440
441
|
"AUTHORIZATION_UNAVAILABLE"
|
|
441
442
|
],
|
|
443
|
+
"approveWallet": [
|
|
444
|
+
"UNAUTHENTICATED",
|
|
445
|
+
"FORBIDDEN",
|
|
446
|
+
"AUTHORIZATION_UNAVAILABLE",
|
|
447
|
+
"DEPENDENCY_STALE",
|
|
448
|
+
"RATE_LIMITED",
|
|
449
|
+
"ORIGIN_REQUIRED",
|
|
450
|
+
"IDENTITY_NOT_FOUND",
|
|
451
|
+
"INVALID_REQUEST",
|
|
452
|
+
"INVALID_SIGNATURE",
|
|
453
|
+
"INVALID_IDEMPOTENCY_KEY",
|
|
454
|
+
"IDEMPOTENCY_KEY_REUSED",
|
|
455
|
+
"FINANCIAL_ACTIONS_DISABLED",
|
|
456
|
+
"CONTRACT_UNAVAILABLE"
|
|
457
|
+
],
|
|
442
458
|
"bindEmbeddedWallet": [
|
|
443
459
|
"UNAUTHENTICATED",
|
|
444
460
|
"FORBIDDEN",
|
|
@@ -1362,6 +1378,15 @@ export const operationErrors = {
|
|
|
1362
1378
|
"CONTRACT_UNAVAILABLE",
|
|
1363
1379
|
"IDENTITY_NOT_FOUND"
|
|
1364
1380
|
],
|
|
1381
|
+
"getWalletApproval": [
|
|
1382
|
+
"UNAUTHENTICATED",
|
|
1383
|
+
"FORBIDDEN",
|
|
1384
|
+
"AUTHORIZATION_UNAVAILABLE",
|
|
1385
|
+
"DEPENDENCY_STALE",
|
|
1386
|
+
"RATE_LIMITED",
|
|
1387
|
+
"IDENTITY_NOT_FOUND",
|
|
1388
|
+
"CONTRACT_UNAVAILABLE"
|
|
1389
|
+
],
|
|
1365
1390
|
"getWithdrawal": [
|
|
1366
1391
|
"UNAUTHENTICATED",
|
|
1367
1392
|
"FORBIDDEN",
|
|
@@ -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}
|
|
@@ -7822,7 +7913,7 @@ export interface operations {
|
|
|
7822
7913
|
};
|
|
7823
7914
|
content: {
|
|
7824
7915
|
readonly "application/json": {
|
|
7825
|
-
/** @description
|
|
7916
|
+
/** @description One per category in display order, then the mix; empty when none is quoted. */
|
|
7826
7917
|
readonly combos: readonly components["schemas"]["SuggestedCombo"][];
|
|
7827
7918
|
/**
|
|
7828
7919
|
* @deprecated
|
|
@@ -9250,6 +9341,76 @@ export interface operations {
|
|
|
9250
9341
|
readonly 503: components["responses"]["Unavailable"];
|
|
9251
9342
|
};
|
|
9252
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
|
+
};
|
|
9253
9414
|
readonly getCopyBudget: {
|
|
9254
9415
|
readonly parameters: {
|
|
9255
9416
|
readonly query?: never;
|
|
@@ -10033,7 +10194,7 @@ export interface operations {
|
|
|
10033
10194
|
readonly 409: components["responses"]["Error"];
|
|
10034
10195
|
readonly 422: components["responses"]["Error"];
|
|
10035
10196
|
readonly 429: components["responses"]["RateLimited"];
|
|
10036
|
-
/** @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. */
|
|
10037
10198
|
readonly 503: components["responses"]["Unavailable"];
|
|
10038
10199
|
};
|
|
10039
10200
|
};
|
|
@@ -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
|
};
|