@ravnexchange/sdk 0.1.13 → 0.1.14
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 +20 -5
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -154,6 +154,19 @@ export type ExecutionDTO = {
|
|
|
154
154
|
submit?: {
|
|
155
155
|
url: string;
|
|
156
156
|
};
|
|
157
|
+
/**
|
|
158
|
+
* Only when your key sets a fee and the route has no fee of its own (Eco, Layerswap, Mayan's
|
|
159
|
+
* routes paying no referrer): RAVN's fee, a transfer of the input token to RAVN;
|
|
160
|
+
* `transaction` already leaves it out. Skip it and the swap still fills; no fee is owed to
|
|
161
|
+
* you. With no `statusRef` here (you poll with the swap's own tx hash), a wallet that batches
|
|
162
|
+
* atomically (EIP-5792 `wallet_sendCalls`, one transaction) may send `fee.transaction` in the
|
|
163
|
+
* same batch as `transaction`, and the swap's tx proves it (an ERC-20 sell only: a native coin
|
|
164
|
+
* batched leaves nothing to read). Otherwise — including a batch the wallet splits into
|
|
165
|
+
* several transactions — send it as a transaction of its own from the user's regular wallet
|
|
166
|
+
* once the swap has confirmed, and pass its hash as `txHash` to getStatus. A fee paid on a
|
|
167
|
+
* swap the venue refunds stays with RAVN.
|
|
168
|
+
*/
|
|
169
|
+
fee?: DepositFeeDTO;
|
|
157
170
|
} | {
|
|
158
171
|
executionType: "SIGNATURE";
|
|
159
172
|
/** Pass this, not the quote's own token, to submitSignature and getStatus. */
|
|
@@ -180,12 +193,14 @@ export type ExecutionDTO = {
|
|
|
180
193
|
};
|
|
181
194
|
/** Poll getStatus with this, not `deposit.address`. */
|
|
182
195
|
statusRef: string;
|
|
183
|
-
/** Only when your key sets a fee and the venue has no fee of its own (
|
|
184
|
-
* and the swap still fills on `deposit.amount`; no fee is
|
|
196
|
+
/** Only when your key sets a fee and the venue has no fee of its own (Rift; private swaps from
|
|
197
|
+
* an EVM chain or Bitcoin). Skip it and the swap still fills on `deposit.amount`; no fee is
|
|
198
|
+
* owed to you. A fee paid on a swap the venue then refunds stays with RAVN and nothing is owed
|
|
199
|
+
* on it, so send an EVM fee payment once the deposit has confirmed. */
|
|
185
200
|
fee?: DepositFeeDTO;
|
|
186
201
|
};
|
|
187
|
-
/** RAVN's integrator fee beside a deposit, in the input token, paid by your user
|
|
188
|
-
* share is paid out as usual. `deposit.amount` already leaves it out. */
|
|
202
|
+
/** RAVN's integrator fee beside a deposit (or a transaction), in the input token, paid by your user
|
|
203
|
+
* to RAVN; your share is paid out as usual. `deposit.amount` (the transaction) already leaves it out. */
|
|
189
204
|
export interface DepositFeeDTO {
|
|
190
205
|
/** Base units of the input token. */
|
|
191
206
|
amount: string;
|
|
@@ -197,7 +212,7 @@ export interface DepositFeeDTO {
|
|
|
197
212
|
* smart-wallet batch it can't be proven, and nothing is owed on it), then pass its hash as
|
|
198
213
|
* `txHash` to getStatus once it has confirmed (simplest: on every poll). Absent on Bitcoin: pay `amount` to `address`
|
|
199
214
|
* as an extra output of the SAME transaction that pays the deposit; RAVN finds it there once
|
|
200
|
-
* that transaction confirms. */
|
|
215
|
+
* that transaction confirms. One deposit per Bitcoin transaction: a fee output proves one swap. */
|
|
201
216
|
transaction?: {
|
|
202
217
|
to: string;
|
|
203
218
|
data: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ravnexchange/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
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",
|