@ravnexchange/sdk 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +3 -2
- package/dist/client.js +7 -4
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ export declare class RavnClient {
|
|
|
21
21
|
submitSignature(params: SubmitSignatureParams): Promise<{
|
|
22
22
|
statusRef: string;
|
|
23
23
|
}>;
|
|
24
|
-
/**
|
|
25
|
-
* the execution's statusRef, submitSignature's statusRef, or the origin tx hash.
|
|
24
|
+
/** POST /v1/status: pass the quoteToken execute() returned (not the quote's own), and as `ref`
|
|
25
|
+
* the execution's statusRef, submitSignature's statusRef, or the origin tx hash. POST, not GET:
|
|
26
|
+
* a 2-hop quoteToken in a query string can exceed header limits and fail with 431. */
|
|
26
27
|
getStatus(quoteToken: string, ref: string): Promise<StatusDTO>;
|
|
27
28
|
/** GET /v1/tokens: RAVN's listed token registry for one chain. Not a per-pair routability guarantee. */
|
|
28
29
|
getTokens(chainId: number): Promise<TokenDTO[]>;
|
package/dist/client.js
CHANGED
|
@@ -51,11 +51,14 @@ class RavnClient {
|
|
|
51
51
|
body: JSON.stringify(params),
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
55
|
-
* the execution's statusRef, submitSignature's statusRef, or the origin tx hash.
|
|
54
|
+
/** POST /v1/status: pass the quoteToken execute() returned (not the quote's own), and as `ref`
|
|
55
|
+
* the execution's statusRef, submitSignature's statusRef, or the origin tx hash. POST, not GET:
|
|
56
|
+
* a 2-hop quoteToken in a query string can exceed header limits and fail with 431. */
|
|
56
57
|
getStatus(quoteToken, ref) {
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
return this.request("/status", {
|
|
59
|
+
method: "POST",
|
|
60
|
+
body: JSON.stringify({ quoteToken, ref }),
|
|
61
|
+
});
|
|
59
62
|
}
|
|
60
63
|
/** GET /v1/tokens: RAVN's listed token registry for one chain. Not a per-pair routability guarantee. */
|
|
61
64
|
getTokens(chainId) {
|
package/dist/types.d.ts
CHANGED
|
@@ -192,14 +192,28 @@ export interface GetQuoteParams {
|
|
|
192
192
|
rankingMode?: "best_output" | "fastest";
|
|
193
193
|
/** Drop specific venues from this race, e.g. a risk objection to one of them. */
|
|
194
194
|
excludeVenues?: string[];
|
|
195
|
+
/** Settle privately: the race narrows to NEAR Intents (Confidential Intents) and Houdini Swap,
|
|
196
|
+
* and NO_LIQUIDITY replaces a public fill if neither can quote. Houdini is sent the request's IP,
|
|
197
|
+
* user-agent and clientTimezone for compliance screening; its terms bar US persons and
|
|
198
|
+
* sanctioned jurisdictions, and you own your users' eligibility (excludeVenues: ["houdini"]). */
|
|
199
|
+
confidential?: boolean;
|
|
200
|
+
/** Your end user's IANA timezone (e.g. "Europe/Berlin"), forwarded only to Houdini. Default UTC. */
|
|
201
|
+
clientTimezone?: string;
|
|
202
|
+
/** Optional analytics handle: send the same value while re-pricing one swap so it counts as one
|
|
203
|
+
* intent. Never affects pricing, routing or fees. Max 64 chars. */
|
|
204
|
+
quoteSessionId?: string;
|
|
195
205
|
/** Test quote -> execute -> status with no real funds and no live venue settlement. See
|
|
196
206
|
* the API's own sandbox field description for per-venue/per-route exceptions. */
|
|
197
207
|
sandbox?: boolean;
|
|
198
208
|
}
|
|
199
209
|
export interface ExecuteParams {
|
|
200
210
|
quoteToken: string;
|
|
211
|
+
/** Only venues that bind the recipient at execute (Chainflip, Houdini Swap, Layerswap, Mayan,
|
|
212
|
+
* NEAR Intents, Rift) accept a new one; elsewhere a different address is INVALID_REQUEST. */
|
|
201
213
|
destinationAddress?: string;
|
|
202
214
|
refundAddress?: string;
|
|
215
|
+
/** Your end user's IANA timezone, forwarded only to Houdini. Default UTC. */
|
|
216
|
+
clientTimezone?: string;
|
|
203
217
|
}
|
|
204
218
|
export interface SubmitSignatureParams {
|
|
205
219
|
quoteToken: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ravnexchange/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Typed client for the RAVN integrator API (/api/v1): quote, execute, submit-signature, status.",
|
|
5
5
|
"keywords": ["ravn", "cross-chain", "swap", "swap-api", "dex-aggregator", "bitcoin", "native-btc", "solana", "evm", "crypto", "defi", "typescript", "sdk", "api-client"],
|
|
6
6
|
"main": "./dist/index.js",
|