@streamflow/distributor 13.2.1-alpha.p371.2d28b7a → 13.3.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/dist/cjs/index.cjs +3 -5
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/index.cjs +3 -5
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +0 -3
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.d.ts +0 -3
- package/dist/esm/solana/index.js +3 -5
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -601,9 +601,6 @@ declare function resolveAirdropFeeLamportsUsingApi(params: {
|
|
|
601
601
|
cluster: ICluster;
|
|
602
602
|
apiUrl: string;
|
|
603
603
|
apiKey?: string;
|
|
604
|
-
/** On-chain claim_max_fee from the distributor account (in lamports). When provided, used as
|
|
605
|
-
* the authoritative upper bound and as a safe fallback when price data is unavailable. */
|
|
606
|
-
claimMaxFeeLamports?: number;
|
|
607
604
|
}): Promise<bigint>;
|
|
608
605
|
|
|
609
606
|
type index_AirdropFeeClient = AirdropFeeClient;
|
package/dist/esm/index.js
CHANGED
|
@@ -5589,8 +5589,7 @@ function calculateDynamicFeeFromSolParams(params) {
|
|
|
5589
5589
|
return raw;
|
|
5590
5590
|
}
|
|
5591
5591
|
async function resolveAirdropFeeLamportsUsingApi(params) {
|
|
5592
|
-
const { distributorAddress, mintAccount, claimableAmount, cluster, apiUrl, apiKey
|
|
5593
|
-
const maxFeeBigint = claimMaxFeeLamports !== void 0 ? BigInt(claimMaxFeeLamports) : void 0;
|
|
5592
|
+
const { distributorAddress, mintAccount, claimableAmount, cluster, apiUrl, apiKey } = params;
|
|
5594
5593
|
let apiFeesResponse = void 0;
|
|
5595
5594
|
try {
|
|
5596
5595
|
apiFeesResponse = await fetchAirdropFee(distributorAddress, apiUrl, apiKey);
|
|
@@ -5611,7 +5610,7 @@ async function resolveAirdropFeeLamportsUsingApi(params) {
|
|
|
5611
5610
|
}
|
|
5612
5611
|
const claimFeeDynamic = response?.claimFeeDynamic ?? defaultAPIFeesResponse.claimFeeDynamic;
|
|
5613
5612
|
if (!tokenPrice?.value || !solPrice?.value) {
|
|
5614
|
-
return
|
|
5613
|
+
return MINIMUM_FEE_FALLBACK;
|
|
5615
5614
|
}
|
|
5616
5615
|
const baseLamports = calculateClaimableLamportsFromPrices({
|
|
5617
5616
|
claimableAmount,
|
|
@@ -5619,10 +5618,9 @@ async function resolveAirdropFeeLamportsUsingApi(params) {
|
|
|
5619
5618
|
solPriceUsd: solPrice.value,
|
|
5620
5619
|
tokenDecimals: mintAccount.decimals
|
|
5621
5620
|
});
|
|
5622
|
-
const maxPriceOverride = maxFeeBigint !== void 0 ? lamportsToSolString(maxFeeBigint) : claimFeeDynamic.maxPrice;
|
|
5623
5621
|
return calculateDynamicFeeFromSolParams({
|
|
5624
5622
|
minPrice: claimFeeDynamic.minPrice,
|
|
5625
|
-
maxPrice:
|
|
5623
|
+
maxPrice: claimFeeDynamic.maxPrice,
|
|
5626
5624
|
allocationFactor: claimFeeDynamic.allocationFactor,
|
|
5627
5625
|
claimableLamports: baseLamports
|
|
5628
5626
|
});
|