@strkfarm/sdk 1.1.7 → 1.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/index.browser.global.js +2 -2
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/modules/avnu.ts +4 -3
|
@@ -53686,8 +53686,8 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
53686
53686
|
}
|
|
53687
53687
|
return filteredQuotes[0];
|
|
53688
53688
|
}
|
|
53689
|
-
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount) {
|
|
53690
|
-
const calldata = await fetchBuildExecuteTransaction(quote.quoteId);
|
|
53689
|
+
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount, options) {
|
|
53690
|
+
const calldata = await fetchBuildExecuteTransaction(quote.quoteId, taker, void 0, void 0, options);
|
|
53691
53691
|
const call = calldata.calls[1];
|
|
53692
53692
|
const callData = call.calldata;
|
|
53693
53693
|
const routesLen = Number(callData[11]);
|
package/dist/index.browser.mjs
CHANGED
|
@@ -2095,8 +2095,8 @@ var AvnuWrapper = class _AvnuWrapper {
|
|
|
2095
2095
|
}
|
|
2096
2096
|
return filteredQuotes[0];
|
|
2097
2097
|
}
|
|
2098
|
-
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount) {
|
|
2099
|
-
const calldata = await fetchBuildExecuteTransaction(quote.quoteId);
|
|
2098
|
+
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount, options) {
|
|
2099
|
+
const calldata = await fetchBuildExecuteTransaction(quote.quoteId, taker, void 0, void 0, options);
|
|
2100
2100
|
const call = calldata.calls[1];
|
|
2101
2101
|
const callData = call.calldata;
|
|
2102
2102
|
const routesLen = Number(callData[11]);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import BigNumber from 'bignumber.js';
|
|
|
2
2
|
import * as starknet from 'starknet';
|
|
3
3
|
import { RpcProvider, BlockIdentifier, Contract, Uint256, Call, Account, CairoCustomEnum, RawArgs } from 'starknet';
|
|
4
4
|
import React, { ReactNode } from 'react';
|
|
5
|
-
import { Quote } from '@avnu/avnu-sdk';
|
|
5
|
+
import { Quote, AvnuOptions } from '@avnu/avnu-sdk';
|
|
6
6
|
import { HexString, BytesLike } from '@ericnordelo/strk-merkle-tree/dist/bytes';
|
|
7
7
|
import { MultiProof } from '@ericnordelo/strk-merkle-tree/dist/core';
|
|
8
8
|
import { MerkleTreeImpl, MerkleTreeData } from '@ericnordelo/strk-merkle-tree/dist/merkletree';
|
|
@@ -334,7 +334,7 @@ interface SwapInfo {
|
|
|
334
334
|
}
|
|
335
335
|
declare class AvnuWrapper {
|
|
336
336
|
getQuotes(fromToken: string, toToken: string, amountWei: string, taker: string, retry?: number, excludeSources?: string[]): Promise<Quote>;
|
|
337
|
-
getSwapInfo(quote: Pick<Quote, 'quoteId' | 'buyTokenAddress' | 'buyAmount' | 'sellTokenAddress' | 'sellAmount'>, taker: string, integratorFeeBps: number, integratorFeeRecipient: string, minAmount?: string): Promise<SwapInfo>;
|
|
337
|
+
getSwapInfo(quote: Pick<Quote, 'quoteId' | 'buyTokenAddress' | 'buyAmount' | 'sellTokenAddress' | 'sellAmount'>, taker: string, integratorFeeBps: number, integratorFeeRecipient: string, minAmount?: string, options?: AvnuOptions): Promise<SwapInfo>;
|
|
338
338
|
static buildZeroSwap(tokenToSell: ContractAddr, address: string): SwapInfo;
|
|
339
339
|
}
|
|
340
340
|
|
package/dist/index.js
CHANGED
|
@@ -2231,8 +2231,8 @@ var AvnuWrapper = class _AvnuWrapper {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
return filteredQuotes[0];
|
|
2233
2233
|
}
|
|
2234
|
-
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount) {
|
|
2235
|
-
const calldata = await (0, import_avnu_sdk.fetchBuildExecuteTransaction)(quote.quoteId);
|
|
2234
|
+
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount, options) {
|
|
2235
|
+
const calldata = await (0, import_avnu_sdk.fetchBuildExecuteTransaction)(quote.quoteId, taker, void 0, void 0, options);
|
|
2236
2236
|
const call = calldata.calls[1];
|
|
2237
2237
|
const callData = call.calldata;
|
|
2238
2238
|
const routesLen = Number(callData[11]);
|
package/dist/index.mjs
CHANGED
|
@@ -2144,8 +2144,8 @@ var AvnuWrapper = class _AvnuWrapper {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
return filteredQuotes[0];
|
|
2146
2146
|
}
|
|
2147
|
-
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount) {
|
|
2148
|
-
const calldata = await fetchBuildExecuteTransaction(quote.quoteId);
|
|
2147
|
+
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount, options) {
|
|
2148
|
+
const calldata = await fetchBuildExecuteTransaction(quote.quoteId, taker, void 0, void 0, options);
|
|
2149
2149
|
const call = calldata.calls[1];
|
|
2150
2150
|
const callData = call.calldata;
|
|
2151
2151
|
const routesLen = Number(callData[11]);
|
package/package.json
CHANGED
package/src/modules/avnu.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { uint256 } from "starknet";
|
|
2
2
|
|
|
3
3
|
import { Call, Uint256 } from "starknet";
|
|
4
|
-
import { fetchBuildExecuteTransaction, fetchQuotes, Quote } from "@avnu/avnu-sdk";
|
|
4
|
+
import { AvnuOptions, fetchBuildExecuteTransaction, fetchQuotes, Quote } from "@avnu/avnu-sdk";
|
|
5
5
|
import { assert } from "../utils";
|
|
6
6
|
import { logger } from "@/utils/logger";
|
|
7
7
|
import { ContractAddr } from "@/dataTypes";
|
|
@@ -68,9 +68,10 @@ export class AvnuWrapper {
|
|
|
68
68
|
taker: string,
|
|
69
69
|
integratorFeeBps: number,
|
|
70
70
|
integratorFeeRecipient: string,
|
|
71
|
-
minAmount?: string
|
|
71
|
+
minAmount?: string,
|
|
72
|
+
options?: AvnuOptions
|
|
72
73
|
) {
|
|
73
|
-
const calldata = await fetchBuildExecuteTransaction(quote.quoteId);
|
|
74
|
+
const calldata = await fetchBuildExecuteTransaction(quote.quoteId, taker, undefined, undefined, options);
|
|
74
75
|
// its the multi swap function call
|
|
75
76
|
const call: Call = calldata.calls[1];
|
|
76
77
|
const callData: string[] = call.calldata as string[];
|