@ravnexchange/sdk 0.2.1 → 0.2.2
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/types.d.ts +30 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -188,6 +188,14 @@ export type ExecutionDTO = {
|
|
|
188
188
|
* stays with RAVN.
|
|
189
189
|
*/
|
|
190
190
|
fee?: DepositFeeDTO;
|
|
191
|
+
/** EVM: everything to send, in order (approval.reset, approval, the swap or the deposit
|
|
192
|
+
* transfer, RAVN's fee). Each once the one before has succeeded (stop if one reverts), or, when
|
|
193
|
+
* `batch` is true, all in one atomic wallet batch (EIP-5792 `wallet_sendCalls`,
|
|
194
|
+
* `atomicRequired: true`): simulate it first, and send them one by one if that fails or the
|
|
195
|
+
* last call needs more than ~400k gas. */
|
|
196
|
+
calls?: CallDTO[];
|
|
197
|
+
/** Whether `calls` (more than one) may go in one atomic wallet batch. */
|
|
198
|
+
batch?: boolean;
|
|
191
199
|
} | {
|
|
192
200
|
executionType: "SIGNATURE";
|
|
193
201
|
/** True for a sandbox quote: nothing here is real (see GetQuoteParams.sandbox); never send
|
|
@@ -221,6 +229,13 @@ export type ExecutionDTO = {
|
|
|
221
229
|
amount: string;
|
|
222
230
|
chainId?: number;
|
|
223
231
|
expiresAt?: string;
|
|
232
|
+
/** Bitcoin, from a native SegWit (bc1q…) userAddress: the deposit (and RAVN's fee as a second
|
|
233
|
+
* output) as a ready-to-sign PSBT, base64, change back to it. Absent when it can't be built. */
|
|
234
|
+
psbt?: string;
|
|
235
|
+
/** Solana, when the deposit carries RAVN's fee: deposit and fee as one unsigned transaction,
|
|
236
|
+
* base64. Sign and send it within a minute (its blockhash expires; a retry with the same
|
|
237
|
+
* Idempotency-Key returns this same one). */
|
|
238
|
+
transaction?: string;
|
|
224
239
|
};
|
|
225
240
|
/** Poll getStatus with this, not `deposit.address`. */
|
|
226
241
|
statusRef: string;
|
|
@@ -229,7 +244,22 @@ export type ExecutionDTO = {
|
|
|
229
244
|
* fee is owed to you. A fee paid on a swap the venue then refunds stays with RAVN and nothing
|
|
230
245
|
* is owed on it, so send an EVM fee payment once the deposit has confirmed. */
|
|
231
246
|
fee?: DepositFeeDTO;
|
|
247
|
+
/** EVM: everything to send, in order (approval.reset, approval, the swap or the deposit
|
|
248
|
+
* transfer, RAVN's fee). Each once the one before has succeeded (stop if one reverts), or, when
|
|
249
|
+
* `batch` is true, all in one atomic wallet batch (EIP-5792 `wallet_sendCalls`,
|
|
250
|
+
* `atomicRequired: true`): simulate it first, and send them one by one if that fails or the
|
|
251
|
+
* last call needs more than ~400k gas. */
|
|
252
|
+
calls?: CallDTO[];
|
|
253
|
+
/** Whether `calls` (more than one) may go in one atomic wallet batch. */
|
|
254
|
+
batch?: boolean;
|
|
232
255
|
};
|
|
256
|
+
/** One EVM transaction to send, as given. */
|
|
257
|
+
export interface CallDTO {
|
|
258
|
+
to: string;
|
|
259
|
+
data: string;
|
|
260
|
+
value: string;
|
|
261
|
+
chainId: number;
|
|
262
|
+
}
|
|
233
263
|
/** RAVN's integrator fee beside a deposit (or a transaction), in the input token, paid by your user
|
|
234
264
|
* to RAVN; your share is paid out as usual. `deposit.amount` (the transaction) already leaves it out. */
|
|
235
265
|
export interface DepositFeeDTO {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ravnexchange/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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",
|