@paxoslabs/amplify-sdk 0.5.1 → 0.5.3
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/CHANGELOG.md +7 -45
- package/README.md +22 -22
- package/dist/{chain-utils-D_b2LEEi.d.mts → chain-utils-5r2UnCDS.d.mts} +57 -1
- package/dist/{chain-utils-D_b2LEEi.d.ts → chain-utils-5r2UnCDS.d.ts} +57 -1
- package/dist/{chunk-L5XT67QZ.js → chunk-4NQPS3JC.js} +813 -147
- package/dist/chunk-4NQPS3JC.js.map +1 -0
- package/dist/{chunk-7RWWVUHP.mjs → chunk-6CU533DM.mjs} +2 -2
- package/dist/chunk-6CU533DM.mjs.map +1 -0
- package/dist/chunk-6JLKHV6O.js +128 -0
- package/dist/chunk-6JLKHV6O.js.map +1 -0
- package/dist/{chunk-YAYUSBC6.js → chunk-FHE43NKY.js} +12 -12
- package/dist/chunk-FHE43NKY.js.map +1 -0
- package/dist/chunk-GOJQYEJQ.js +3212 -0
- package/dist/chunk-GOJQYEJQ.js.map +1 -0
- package/dist/{chunk-3D6EDR3Z.mjs → chunk-LMNADWTH.mjs} +703 -41
- package/dist/chunk-LMNADWTH.mjs.map +1 -0
- package/dist/chunk-ODXJYXUH.mjs +3168 -0
- package/dist/chunk-ODXJYXUH.mjs.map +1 -0
- package/dist/{chunk-WJGSTAPB.mjs → chunk-QMFYPHX5.mjs} +300 -87
- package/dist/chunk-QMFYPHX5.mjs.map +1 -0
- package/dist/{chunk-3I3PYX2F.js → chunk-TNL23CO2.js} +2 -2
- package/dist/chunk-TNL23CO2.js.map +1 -0
- package/dist/{chunk-E6SBQNDA.mjs → chunk-UY2WD7MF.mjs} +3 -3
- package/dist/chunk-UY2WD7MF.mjs.map +1 -0
- package/dist/chunk-WD6QFSXZ.js +701 -0
- package/dist/chunk-WD6QFSXZ.js.map +1 -0
- package/dist/chunk-Y5LBT2WT.mjs +118 -0
- package/dist/chunk-Y5LBT2WT.mjs.map +1 -0
- package/dist/core.d.mts +50 -7
- package/dist/core.d.ts +50 -7
- package/dist/core.js +32 -16
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +4 -4
- package/dist/core.mjs.map +1 -1
- package/dist/display.d.mts +212 -3
- package/dist/display.d.ts +212 -3
- package/dist/display.js +27 -11
- package/dist/display.mjs +5 -5
- package/dist/index-D8RtV9cB.d.mts +5114 -0
- package/dist/index-ev_V5sjt.d.ts +5114 -0
- package/dist/index.d.mts +41 -6
- package/dist/index.d.ts +41 -6
- package/dist/index.js +90 -58
- package/dist/index.mjs +6 -6
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +13 -13
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +3 -3
- package/dist/utils.mjs.map +1 -1
- package/dist/vaults.d.mts +3 -3817
- package/dist/vaults.d.ts +3 -3817
- package/dist/vaults.js +26 -26
- package/dist/vaults.mjs +5 -5
- package/package.json +30 -65
- package/dist/chunk-3D6EDR3Z.mjs.map +0 -1
- package/dist/chunk-3I3PYX2F.js.map +0 -1
- package/dist/chunk-7RWWVUHP.mjs.map +0 -1
- package/dist/chunk-AUDMOT6F.js +0 -1230
- package/dist/chunk-AUDMOT6F.js.map +0 -1
- package/dist/chunk-E5DH5YEE.js +0 -1485
- package/dist/chunk-E5DH5YEE.js.map +0 -1
- package/dist/chunk-E6SBQNDA.mjs.map +0 -1
- package/dist/chunk-JLZL25CY.mjs +0 -1450
- package/dist/chunk-JLZL25CY.mjs.map +0 -1
- package/dist/chunk-L5XT67QZ.js.map +0 -1
- package/dist/chunk-WJGSTAPB.mjs.map +0 -1
- package/dist/chunk-XVDK6J72.js +0 -484
- package/dist/chunk-XVDK6J72.js.map +0 -1
- package/dist/chunk-Y6RXVDQN.mjs +0 -1222
- package/dist/chunk-Y6RXVDQN.mjs.map +0 -1
- package/dist/chunk-YAYUSBC6.js.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { GetMinimumMintParams, GetMinimumWithdrawalOrderSizeParams, GetVaultAPYParams, GetVaultTVLParams, GetWithdrawalFeeParams, GetWithdrawalRequestsParams, MinimumMintResult, MinimumWithdrawalOrderSizeResult, VaultAPYResult, VaultTVLResult, WithdrawalFeeResult, WithdrawalRequest, WithdrawalRequestStatus, WithdrawalRequestsResult, getMinimumMint, getMinimumWithdrawalOrderSize, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './display.mjs';
|
|
1
|
+
export { CalculateDepositFeeParams, CurrentSupplyResult, GetCurrentSupplyParams, GetDepositCapParams, GetMinimumMintParams, GetMinimumWithdrawalOrderSizeParams, GetShareValueParams, GetVaultAPYParams, GetVaultTVLParams, GetWithdrawalFeeParams, GetWithdrawalRequestsParams, MinimumMintResult, MinimumWithdrawalOrderSizeResult, ShareValueResult, VaultAPYResult, VaultTVLResult, WithdrawalFeeResult, WithdrawalRequest, WithdrawalRequestStatus, WithdrawalRequestsResult, calculateDepositFee, getCurrentSupply, getDepositCap, getMinimumMint, getMinimumWithdrawalOrderSize, getShareValue, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './display.mjs';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
|
-
import { A as AmplifyVault, S as SupportedAsset, Y as YieldType, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset, C as ChainId } from './chain-utils-
|
|
4
|
-
export { b as APIError, d as
|
|
5
|
-
|
|
3
|
+
import { A as AmplifyVault, S as SupportedAsset, Y as YieldType, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset, C as ChainId } from './chain-utils-5r2UnCDS.mjs';
|
|
4
|
+
export { b as APIError, E as EnterpriseConfig, d as VaultDepositFees, e as VaultSLA, f as VaultSupportedAsset, h as VaultWithdrawFees } from './chain-utils-5r2UnCDS.mjs';
|
|
5
|
+
import { A as Attestation } from './index-D8RtV9cB.mjs';
|
|
6
|
+
export { a as AlreadyApprovedAuthorizationResult, b as ApprovalAuthorizationResult, c as ApproveDepositTokenTxData, d as ApproveWithdrawOrderTxData, C as CancelWithdrawOrderTxData, D as DepositAuthMethod, e as DepositAuthorizationResult, f as DepositTxData, g as DepositType, h as DepositWithPermitData, E as EIP712Domain, K as KytDepositTxData, i as KytDepositWithPermitData, P as PERMIT_TYPES, j as ParsedPermitSignature, k as PermitAuthorizationResult, l as PermitDepositResult, m as PermitSignatureData, n as PrepareCancelWithdrawOrderTxDataParams, o as PrepareDepositAuthorizationParams, p as PrepareDepositParams, q as PrepareDepositPermitSignatureParams, r as PrepareDepositResult, s as PrepareDepositWithPermitTxDataParams, t as PrepareWithdrawOrderTxDataParams, u as PrepareWithdrawalAuthorizationParams, v as PrepareWithdrawalParams, w as PrepareWithdrawalResult, S as StandardDepositResult, x as StandardDepositTxData, y as StandardDepositWithPermitData, U as UnencodedDepositWithPermitData, W as WithdrawAlreadyApprovedAuthorizationResult, z as WithdrawApprovalAuthorizationResult, B as WithdrawAuthMethod, F as WithdrawAuthorizationResult, G as WithdrawOrderTxData, H as isAlreadyApprovedAuth, I as isApprovalAuth, J as isKytDeposit, L as isPermitAuth, M as isStandardDeposit, N as isWithdrawAlreadyApprovedAuth, O as isWithdrawApprovalAuth, Q as parsePermitSignature, R as prepareApproveDepositTokenTxData, T as prepareApproveWithdrawOrderTxData, V as prepareCancelWithdrawOrderTxData, X as prepareDeposit, Y as prepareDepositAuthorization, Z as prepareDepositPermitSignature, _ as prepareDepositTxData, $ as prepareDepositWithPermitTxData, a0 as prepareWithdrawOrderTxData, a1 as prepareWithdrawal, a2 as prepareWithdrawalAuthorization, a3 as toEthSignTypedDataV4 } from './index-D8RtV9cB.mjs';
|
|
6
7
|
import 'viem/chains';
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -75,6 +76,11 @@ declare class VaultCache {
|
|
|
75
76
|
* When non-null, a refresh is in progress and callers should await this promise
|
|
76
77
|
*/
|
|
77
78
|
private refreshPromise;
|
|
79
|
+
/**
|
|
80
|
+
* Unix timestamp (milliseconds) when current refresh started.
|
|
81
|
+
* Used to detect stale refresh promises.
|
|
82
|
+
*/
|
|
83
|
+
private refreshStartedAt;
|
|
78
84
|
/**
|
|
79
85
|
* Creates a new VaultCache instance
|
|
80
86
|
*
|
|
@@ -409,6 +415,35 @@ declare function getVaultsByConfig(params?: GetVaultsByConfigParams): Promise<Am
|
|
|
409
415
|
*/
|
|
410
416
|
declare function getWithdrawSupportedAssets(): Promise<WithdrawSupportedAsset[]>;
|
|
411
417
|
|
|
418
|
+
/**
|
|
419
|
+
* KYT (Know Your Transaction) API Client
|
|
420
|
+
*
|
|
421
|
+
* Calls the backend-v2 KYT attestation endpoint to obtain Predicate
|
|
422
|
+
* compliance attestations for deposit transactions.
|
|
423
|
+
*
|
|
424
|
+
* @module client/kyt-client
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
interface FetchKytAttestationParams {
|
|
428
|
+
/** Destination contract address (e.g. the DCD contract receiving the deposit) */
|
|
429
|
+
to: Address;
|
|
430
|
+
/** User wallet address initiating the deposit */
|
|
431
|
+
from: Address;
|
|
432
|
+
/** Numeric chain ID where the deposit occurs */
|
|
433
|
+
chainId: number;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Fetches a KYT compliance attestation from backend-v2.
|
|
437
|
+
*
|
|
438
|
+
* Calls `POST /v2/kytAttestation` with the deposit's `to`, `from`, and `chain`
|
|
439
|
+
* parameters. The backend forwards the request to the Predicate API
|
|
440
|
+
* and returns the attestation if the transaction is compliant.
|
|
441
|
+
*
|
|
442
|
+
* @throws {APIError} If the request fails, the user is non-compliant (403),
|
|
443
|
+
* or the response is malformed.
|
|
444
|
+
*/
|
|
445
|
+
declare function fetchKytAttestation(params: FetchKytAttestationParams): Promise<Attestation>;
|
|
446
|
+
|
|
412
447
|
/**
|
|
413
448
|
* Telemetry Type Definitions
|
|
414
449
|
*
|
|
@@ -675,7 +710,7 @@ type RequestHeaders = Record<string, string>;
|
|
|
675
710
|
* Specific error codes for different initialization failure scenarios.
|
|
676
711
|
* Use these codes for programmatic error handling.
|
|
677
712
|
*/
|
|
678
|
-
type InitErrorCode =
|
|
713
|
+
type InitErrorCode = 'INVALID_API_KEY' | 'EMPTY_API_KEY' | 'AUTH_FAILED' | 'NETWORK_TIMEOUT' | 'CACHE_INIT_FAILED' | 'CONCURRENT_INIT' | 'UNKNOWN_ERROR';
|
|
679
714
|
|
|
680
715
|
/**
|
|
681
716
|
* SDK Configuration Module
|
|
@@ -861,4 +896,4 @@ declare const isWithdrawalSpendApproved: ({ vaultName, chainId, wantAssetAddress
|
|
|
861
896
|
error: null;
|
|
862
897
|
}>;
|
|
863
898
|
|
|
864
|
-
export { AmplifyVault, AssetFilterOptions, type GetVaultsByConfigParams, type InitErrorCode, LogLevel, type Logger, type RequestHeaders, type SDKConfig, type SDKInitOptions, SupportedAsset, UnauthorizedVaultAccessError, VaultFilterOptions, VaultNotFoundByAddressError, VaultNotFoundByNameError, WithdrawSupportedAsset, YieldType, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getSupportedAssets, getVaults, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, isDepositSpendApproved, isVaultNotFoundByAddressError, isVaultNotFoundByNameError, isWithdrawalSpendApproved, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady };
|
|
899
|
+
export { AmplifyVault, AssetFilterOptions, Attestation, type FetchKytAttestationParams, type GetVaultsByConfigParams, type InitErrorCode, LogLevel, type Logger, type RequestHeaders, type SDKConfig, type SDKInitOptions, SupportedAsset, UnauthorizedVaultAccessError, VaultFilterOptions, VaultNotFoundByAddressError, VaultNotFoundByNameError, WithdrawSupportedAsset, YieldType, fetchKytAttestation, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getSupportedAssets, getVaults, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, isDepositSpendApproved, isVaultNotFoundByAddressError, isVaultNotFoundByNameError, isWithdrawalSpendApproved, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { GetMinimumMintParams, GetMinimumWithdrawalOrderSizeParams, GetVaultAPYParams, GetVaultTVLParams, GetWithdrawalFeeParams, GetWithdrawalRequestsParams, MinimumMintResult, MinimumWithdrawalOrderSizeResult, VaultAPYResult, VaultTVLResult, WithdrawalFeeResult, WithdrawalRequest, WithdrawalRequestStatus, WithdrawalRequestsResult, getMinimumMint, getMinimumWithdrawalOrderSize, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './display.js';
|
|
1
|
+
export { CalculateDepositFeeParams, CurrentSupplyResult, GetCurrentSupplyParams, GetDepositCapParams, GetMinimumMintParams, GetMinimumWithdrawalOrderSizeParams, GetShareValueParams, GetVaultAPYParams, GetVaultTVLParams, GetWithdrawalFeeParams, GetWithdrawalRequestsParams, MinimumMintResult, MinimumWithdrawalOrderSizeResult, ShareValueResult, VaultAPYResult, VaultTVLResult, WithdrawalFeeResult, WithdrawalRequest, WithdrawalRequestStatus, WithdrawalRequestsResult, calculateDepositFee, getCurrentSupply, getDepositCap, getMinimumMint, getMinimumWithdrawalOrderSize, getShareValue, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './display.js';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
|
-
import { A as AmplifyVault, S as SupportedAsset, Y as YieldType, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset, C as ChainId } from './chain-utils-
|
|
4
|
-
export { b as APIError, d as
|
|
5
|
-
|
|
3
|
+
import { A as AmplifyVault, S as SupportedAsset, Y as YieldType, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset, C as ChainId } from './chain-utils-5r2UnCDS.js';
|
|
4
|
+
export { b as APIError, E as EnterpriseConfig, d as VaultDepositFees, e as VaultSLA, f as VaultSupportedAsset, h as VaultWithdrawFees } from './chain-utils-5r2UnCDS.js';
|
|
5
|
+
import { A as Attestation } from './index-ev_V5sjt.js';
|
|
6
|
+
export { a as AlreadyApprovedAuthorizationResult, b as ApprovalAuthorizationResult, c as ApproveDepositTokenTxData, d as ApproveWithdrawOrderTxData, C as CancelWithdrawOrderTxData, D as DepositAuthMethod, e as DepositAuthorizationResult, f as DepositTxData, g as DepositType, h as DepositWithPermitData, E as EIP712Domain, K as KytDepositTxData, i as KytDepositWithPermitData, P as PERMIT_TYPES, j as ParsedPermitSignature, k as PermitAuthorizationResult, l as PermitDepositResult, m as PermitSignatureData, n as PrepareCancelWithdrawOrderTxDataParams, o as PrepareDepositAuthorizationParams, p as PrepareDepositParams, q as PrepareDepositPermitSignatureParams, r as PrepareDepositResult, s as PrepareDepositWithPermitTxDataParams, t as PrepareWithdrawOrderTxDataParams, u as PrepareWithdrawalAuthorizationParams, v as PrepareWithdrawalParams, w as PrepareWithdrawalResult, S as StandardDepositResult, x as StandardDepositTxData, y as StandardDepositWithPermitData, U as UnencodedDepositWithPermitData, W as WithdrawAlreadyApprovedAuthorizationResult, z as WithdrawApprovalAuthorizationResult, B as WithdrawAuthMethod, F as WithdrawAuthorizationResult, G as WithdrawOrderTxData, H as isAlreadyApprovedAuth, I as isApprovalAuth, J as isKytDeposit, L as isPermitAuth, M as isStandardDeposit, N as isWithdrawAlreadyApprovedAuth, O as isWithdrawApprovalAuth, Q as parsePermitSignature, R as prepareApproveDepositTokenTxData, T as prepareApproveWithdrawOrderTxData, V as prepareCancelWithdrawOrderTxData, X as prepareDeposit, Y as prepareDepositAuthorization, Z as prepareDepositPermitSignature, _ as prepareDepositTxData, $ as prepareDepositWithPermitTxData, a0 as prepareWithdrawOrderTxData, a1 as prepareWithdrawal, a2 as prepareWithdrawalAuthorization, a3 as toEthSignTypedDataV4 } from './index-ev_V5sjt.js';
|
|
6
7
|
import 'viem/chains';
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -75,6 +76,11 @@ declare class VaultCache {
|
|
|
75
76
|
* When non-null, a refresh is in progress and callers should await this promise
|
|
76
77
|
*/
|
|
77
78
|
private refreshPromise;
|
|
79
|
+
/**
|
|
80
|
+
* Unix timestamp (milliseconds) when current refresh started.
|
|
81
|
+
* Used to detect stale refresh promises.
|
|
82
|
+
*/
|
|
83
|
+
private refreshStartedAt;
|
|
78
84
|
/**
|
|
79
85
|
* Creates a new VaultCache instance
|
|
80
86
|
*
|
|
@@ -409,6 +415,35 @@ declare function getVaultsByConfig(params?: GetVaultsByConfigParams): Promise<Am
|
|
|
409
415
|
*/
|
|
410
416
|
declare function getWithdrawSupportedAssets(): Promise<WithdrawSupportedAsset[]>;
|
|
411
417
|
|
|
418
|
+
/**
|
|
419
|
+
* KYT (Know Your Transaction) API Client
|
|
420
|
+
*
|
|
421
|
+
* Calls the backend-v2 KYT attestation endpoint to obtain Predicate
|
|
422
|
+
* compliance attestations for deposit transactions.
|
|
423
|
+
*
|
|
424
|
+
* @module client/kyt-client
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
interface FetchKytAttestationParams {
|
|
428
|
+
/** Destination contract address (e.g. the DCD contract receiving the deposit) */
|
|
429
|
+
to: Address;
|
|
430
|
+
/** User wallet address initiating the deposit */
|
|
431
|
+
from: Address;
|
|
432
|
+
/** Numeric chain ID where the deposit occurs */
|
|
433
|
+
chainId: number;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Fetches a KYT compliance attestation from backend-v2.
|
|
437
|
+
*
|
|
438
|
+
* Calls `POST /v2/kytAttestation` with the deposit's `to`, `from`, and `chain`
|
|
439
|
+
* parameters. The backend forwards the request to the Predicate API
|
|
440
|
+
* and returns the attestation if the transaction is compliant.
|
|
441
|
+
*
|
|
442
|
+
* @throws {APIError} If the request fails, the user is non-compliant (403),
|
|
443
|
+
* or the response is malformed.
|
|
444
|
+
*/
|
|
445
|
+
declare function fetchKytAttestation(params: FetchKytAttestationParams): Promise<Attestation>;
|
|
446
|
+
|
|
412
447
|
/**
|
|
413
448
|
* Telemetry Type Definitions
|
|
414
449
|
*
|
|
@@ -675,7 +710,7 @@ type RequestHeaders = Record<string, string>;
|
|
|
675
710
|
* Specific error codes for different initialization failure scenarios.
|
|
676
711
|
* Use these codes for programmatic error handling.
|
|
677
712
|
*/
|
|
678
|
-
type InitErrorCode =
|
|
713
|
+
type InitErrorCode = 'INVALID_API_KEY' | 'EMPTY_API_KEY' | 'AUTH_FAILED' | 'NETWORK_TIMEOUT' | 'CACHE_INIT_FAILED' | 'CONCURRENT_INIT' | 'UNKNOWN_ERROR';
|
|
679
714
|
|
|
680
715
|
/**
|
|
681
716
|
* SDK Configuration Module
|
|
@@ -861,4 +896,4 @@ declare const isWithdrawalSpendApproved: ({ vaultName, chainId, wantAssetAddress
|
|
|
861
896
|
error: null;
|
|
862
897
|
}>;
|
|
863
898
|
|
|
864
|
-
export { AmplifyVault, AssetFilterOptions, type GetVaultsByConfigParams, type InitErrorCode, LogLevel, type Logger, type RequestHeaders, type SDKConfig, type SDKInitOptions, SupportedAsset, UnauthorizedVaultAccessError, VaultFilterOptions, VaultNotFoundByAddressError, VaultNotFoundByNameError, WithdrawSupportedAsset, YieldType, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getSupportedAssets, getVaults, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, isDepositSpendApproved, isVaultNotFoundByAddressError, isVaultNotFoundByNameError, isWithdrawalSpendApproved, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady };
|
|
899
|
+
export { AmplifyVault, AssetFilterOptions, Attestation, type FetchKytAttestationParams, type GetVaultsByConfigParams, type InitErrorCode, LogLevel, type Logger, type RequestHeaders, type SDKConfig, type SDKInitOptions, SupportedAsset, UnauthorizedVaultAccessError, VaultFilterOptions, VaultNotFoundByAddressError, VaultNotFoundByNameError, WithdrawSupportedAsset, YieldType, fetchKytAttestation, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getSupportedAssets, getVaults, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, isDepositSpendApproved, isVaultNotFoundByAddressError, isVaultNotFoundByNameError, isWithdrawalSpendApproved, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady };
|
package/dist/index.js
CHANGED
|
@@ -1,221 +1,253 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
var
|
|
3
|
+
var chunk4NQPS3JC_js = require('./chunk-4NQPS3JC.js');
|
|
4
|
+
var chunkWD6QFSXZ_js = require('./chunk-WD6QFSXZ.js');
|
|
5
|
+
var chunk6JLKHV6O_js = require('./chunk-6JLKHV6O.js');
|
|
6
|
+
require('./chunk-FHE43NKY.js');
|
|
7
|
+
require('./chunk-TNL23CO2.js');
|
|
8
|
+
var chunkGOJQYEJQ_js = require('./chunk-GOJQYEJQ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "DepositAuthMethod", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk4NQPS3JC_js.DepositAuthMethod; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "DepositType", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunk4NQPS3JC_js.DepositType; }
|
|
15
19
|
});
|
|
16
20
|
Object.defineProperty(exports, "PERMIT_TYPES", {
|
|
17
21
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk4NQPS3JC_js.PERMIT_TYPES; }
|
|
19
23
|
});
|
|
20
24
|
Object.defineProperty(exports, "WithdrawAuthMethod", {
|
|
21
25
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk4NQPS3JC_js.WithdrawAuthMethod; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "fetchKytAttestation", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunk4NQPS3JC_js.fetchKytAttestation; }
|
|
23
31
|
});
|
|
24
32
|
Object.defineProperty(exports, "isAlreadyApprovedAuth", {
|
|
25
33
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk4NQPS3JC_js.isAlreadyApprovedAuth; }
|
|
27
35
|
});
|
|
28
36
|
Object.defineProperty(exports, "isApprovalAuth", {
|
|
29
37
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk4NQPS3JC_js.isApprovalAuth; }
|
|
31
39
|
});
|
|
32
40
|
Object.defineProperty(exports, "isDepositSpendApproved", {
|
|
33
41
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk4NQPS3JC_js.isDepositSpendApproved; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "isKytDeposit", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunk4NQPS3JC_js.isKytDeposit; }
|
|
35
47
|
});
|
|
36
48
|
Object.defineProperty(exports, "isPermitAuth", {
|
|
37
49
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk4NQPS3JC_js.isPermitAuth; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "isStandardDeposit", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunk4NQPS3JC_js.isStandardDeposit; }
|
|
39
55
|
});
|
|
40
56
|
Object.defineProperty(exports, "isWithdrawAlreadyApprovedAuth", {
|
|
41
57
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk4NQPS3JC_js.isWithdrawAlreadyApprovedAuth; }
|
|
43
59
|
});
|
|
44
60
|
Object.defineProperty(exports, "isWithdrawApprovalAuth", {
|
|
45
61
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk4NQPS3JC_js.isWithdrawApprovalAuth; }
|
|
47
63
|
});
|
|
48
64
|
Object.defineProperty(exports, "isWithdrawalSpendApproved", {
|
|
49
65
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk4NQPS3JC_js.isWithdrawalSpendApproved; }
|
|
51
67
|
});
|
|
52
68
|
Object.defineProperty(exports, "parsePermitSignature", {
|
|
53
69
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk4NQPS3JC_js.parsePermitSignature; }
|
|
55
71
|
});
|
|
56
72
|
Object.defineProperty(exports, "prepareApproveDepositTokenTxData", {
|
|
57
73
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk4NQPS3JC_js.prepareApproveDepositTokenTxData; }
|
|
59
75
|
});
|
|
60
76
|
Object.defineProperty(exports, "prepareApproveWithdrawOrderTxData", {
|
|
61
77
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk4NQPS3JC_js.prepareApproveWithdrawOrderTxData; }
|
|
63
79
|
});
|
|
64
80
|
Object.defineProperty(exports, "prepareCancelWithdrawOrderTxData", {
|
|
65
81
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk4NQPS3JC_js.prepareCancelWithdrawOrderTxData; }
|
|
67
83
|
});
|
|
68
84
|
Object.defineProperty(exports, "prepareDeposit", {
|
|
69
85
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk4NQPS3JC_js.prepareDeposit; }
|
|
71
87
|
});
|
|
72
88
|
Object.defineProperty(exports, "prepareDepositAuthorization", {
|
|
73
89
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunk4NQPS3JC_js.prepareDepositAuthorization; }
|
|
75
91
|
});
|
|
76
92
|
Object.defineProperty(exports, "prepareDepositPermitSignature", {
|
|
77
93
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunk4NQPS3JC_js.prepareDepositPermitSignature; }
|
|
79
95
|
});
|
|
80
96
|
Object.defineProperty(exports, "prepareDepositTxData", {
|
|
81
97
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunk4NQPS3JC_js.prepareDepositTxData; }
|
|
83
99
|
});
|
|
84
100
|
Object.defineProperty(exports, "prepareDepositWithPermitTxData", {
|
|
85
101
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunk4NQPS3JC_js.prepareDepositWithPermitTxData; }
|
|
87
103
|
});
|
|
88
104
|
Object.defineProperty(exports, "prepareWithdrawOrderTxData", {
|
|
89
105
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunk4NQPS3JC_js.prepareWithdrawOrderTxData; }
|
|
91
107
|
});
|
|
92
108
|
Object.defineProperty(exports, "prepareWithdrawal", {
|
|
93
109
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunk4NQPS3JC_js.prepareWithdrawal; }
|
|
95
111
|
});
|
|
96
112
|
Object.defineProperty(exports, "prepareWithdrawalAuthorization", {
|
|
97
113
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunk4NQPS3JC_js.prepareWithdrawalAuthorization; }
|
|
99
115
|
});
|
|
100
116
|
Object.defineProperty(exports, "toEthSignTypedDataV4", {
|
|
101
117
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunk4NQPS3JC_js.toEthSignTypedDataV4; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "calculateDepositFee", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunkWD6QFSXZ_js.calculateDepositFee; }
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "getCurrentSupply", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () { return chunkWD6QFSXZ_js.getCurrentSupply; }
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "getDepositCap", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () { return chunkWD6QFSXZ_js.getDepositCap; }
|
|
103
131
|
});
|
|
104
132
|
Object.defineProperty(exports, "getMinimumMint", {
|
|
105
133
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkWD6QFSXZ_js.getMinimumMint; }
|
|
107
135
|
});
|
|
108
136
|
Object.defineProperty(exports, "getMinimumWithdrawalOrderSize", {
|
|
109
137
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkWD6QFSXZ_js.getMinimumWithdrawalOrderSize; }
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "getShareValue", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () { return chunkWD6QFSXZ_js.getShareValue; }
|
|
111
143
|
});
|
|
112
144
|
Object.defineProperty(exports, "getVaultAPY", {
|
|
113
145
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkWD6QFSXZ_js.getVaultAPY; }
|
|
115
147
|
});
|
|
116
148
|
Object.defineProperty(exports, "getVaultTVL", {
|
|
117
149
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkWD6QFSXZ_js.getVaultTVL; }
|
|
119
151
|
});
|
|
120
152
|
Object.defineProperty(exports, "getWithdrawalFee", {
|
|
121
153
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkWD6QFSXZ_js.getWithdrawalFee; }
|
|
123
155
|
});
|
|
124
156
|
Object.defineProperty(exports, "getWithdrawalRequests", {
|
|
125
157
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkWD6QFSXZ_js.getWithdrawalRequests; }
|
|
127
159
|
});
|
|
128
160
|
Object.defineProperty(exports, "UnauthorizedVaultAccessError", {
|
|
129
161
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunk6JLKHV6O_js.UnauthorizedVaultAccessError; }
|
|
131
163
|
});
|
|
132
164
|
Object.defineProperty(exports, "VaultNotFoundByAddressError", {
|
|
133
165
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunk6JLKHV6O_js.VaultNotFoundByAddressError; }
|
|
135
167
|
});
|
|
136
168
|
Object.defineProperty(exports, "VaultNotFoundByNameError", {
|
|
137
169
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunk6JLKHV6O_js.VaultNotFoundByNameError; }
|
|
139
171
|
});
|
|
140
172
|
Object.defineProperty(exports, "isVaultNotFoundByAddressError", {
|
|
141
173
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunk6JLKHV6O_js.isVaultNotFoundByAddressError; }
|
|
143
175
|
});
|
|
144
176
|
Object.defineProperty(exports, "isVaultNotFoundByNameError", {
|
|
145
177
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunk6JLKHV6O_js.isVaultNotFoundByNameError; }
|
|
147
179
|
});
|
|
148
180
|
Object.defineProperty(exports, "APIError", {
|
|
149
181
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkGOJQYEJQ_js.APIError; }
|
|
151
183
|
});
|
|
152
184
|
Object.defineProperty(exports, "LogLevel", {
|
|
153
185
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkGOJQYEJQ_js.LogLevel; }
|
|
155
187
|
});
|
|
156
188
|
Object.defineProperty(exports, "YieldType", {
|
|
157
189
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkGOJQYEJQ_js.YieldType; }
|
|
159
191
|
});
|
|
160
192
|
Object.defineProperty(exports, "findVaultByConfig", {
|
|
161
193
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkGOJQYEJQ_js.findVaultByConfig; }
|
|
163
195
|
});
|
|
164
196
|
Object.defineProperty(exports, "getAssetsFromCache", {
|
|
165
197
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkGOJQYEJQ_js.getAssetsFromCache; }
|
|
167
199
|
});
|
|
168
200
|
Object.defineProperty(exports, "getCache", {
|
|
169
201
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkGOJQYEJQ_js.getCache; }
|
|
171
203
|
});
|
|
172
204
|
Object.defineProperty(exports, "getLogger", {
|
|
173
205
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkGOJQYEJQ_js.getLogger; }
|
|
175
207
|
});
|
|
176
208
|
Object.defineProperty(exports, "getSupportedAssets", {
|
|
177
209
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkGOJQYEJQ_js.getSupportedAssets; }
|
|
179
211
|
});
|
|
180
212
|
Object.defineProperty(exports, "getVaults", {
|
|
181
213
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunkGOJQYEJQ_js.getVaults; }
|
|
183
215
|
});
|
|
184
216
|
Object.defineProperty(exports, "getVaultsByConfig", {
|
|
185
217
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkGOJQYEJQ_js.getVaultsByConfig; }
|
|
187
219
|
});
|
|
188
220
|
Object.defineProperty(exports, "getWithdrawSupportedAssets", {
|
|
189
221
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunkGOJQYEJQ_js.getWithdrawSupportedAssets; }
|
|
191
223
|
});
|
|
192
224
|
Object.defineProperty(exports, "initAmplifySDK", {
|
|
193
225
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunkGOJQYEJQ_js.initAmplifySDK; }
|
|
195
227
|
});
|
|
196
228
|
Object.defineProperty(exports, "initializeCache", {
|
|
197
229
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunkGOJQYEJQ_js.initializeCache; }
|
|
199
231
|
});
|
|
200
232
|
Object.defineProperty(exports, "isCacheReady", {
|
|
201
233
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
234
|
+
get: function () { return chunkGOJQYEJQ_js.isCacheReady; }
|
|
203
235
|
});
|
|
204
236
|
Object.defineProperty(exports, "refreshVaultCache", {
|
|
205
237
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
238
|
+
get: function () { return chunkGOJQYEJQ_js.refreshVaultCache; }
|
|
207
239
|
});
|
|
208
240
|
Object.defineProperty(exports, "setLogLevel", {
|
|
209
241
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
242
|
+
get: function () { return chunkGOJQYEJQ_js.setLogLevel; }
|
|
211
243
|
});
|
|
212
244
|
Object.defineProperty(exports, "setLogger", {
|
|
213
245
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
246
|
+
get: function () { return chunkGOJQYEJQ_js.setLogger; }
|
|
215
247
|
});
|
|
216
248
|
Object.defineProperty(exports, "waitForCacheReady", {
|
|
217
249
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
250
|
+
get: function () { return chunkGOJQYEJQ_js.waitForCacheReady; }
|
|
219
251
|
});
|
|
220
252
|
//# sourceMappingURL=index.js.map
|
|
221
253
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DepositAuthMethod, PERMIT_TYPES, WithdrawAuthMethod, isAlreadyApprovedAuth, isApprovalAuth, isDepositSpendApproved, isPermitAuth, isWithdrawAlreadyApprovedAuth, isWithdrawApprovalAuth, isWithdrawalSpendApproved, parsePermitSignature, prepareApproveDepositTokenTxData, prepareApproveWithdrawOrderTxData, prepareCancelWithdrawOrderTxData, prepareDeposit, prepareDepositAuthorization, prepareDepositPermitSignature, prepareDepositTxData, prepareDepositWithPermitTxData, prepareWithdrawOrderTxData, prepareWithdrawal, prepareWithdrawalAuthorization, toEthSignTypedDataV4 } from './chunk-
|
|
2
|
-
export { getMinimumMint, getMinimumWithdrawalOrderSize, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './chunk-
|
|
3
|
-
export { UnauthorizedVaultAccessError, VaultNotFoundByAddressError, VaultNotFoundByNameError, isVaultNotFoundByAddressError, isVaultNotFoundByNameError } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
export { APIError, LogLevel, YieldType, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getSupportedAssets, getVaults, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady } from './chunk-
|
|
1
|
+
export { DepositAuthMethod, DepositType, PERMIT_TYPES, WithdrawAuthMethod, fetchKytAttestation, isAlreadyApprovedAuth, isApprovalAuth, isDepositSpendApproved, isKytDeposit, isPermitAuth, isStandardDeposit, isWithdrawAlreadyApprovedAuth, isWithdrawApprovalAuth, isWithdrawalSpendApproved, parsePermitSignature, prepareApproveDepositTokenTxData, prepareApproveWithdrawOrderTxData, prepareCancelWithdrawOrderTxData, prepareDeposit, prepareDepositAuthorization, prepareDepositPermitSignature, prepareDepositTxData, prepareDepositWithPermitTxData, prepareWithdrawOrderTxData, prepareWithdrawal, prepareWithdrawalAuthorization, toEthSignTypedDataV4 } from './chunk-LMNADWTH.mjs';
|
|
2
|
+
export { calculateDepositFee, getCurrentSupply, getDepositCap, getMinimumMint, getMinimumWithdrawalOrderSize, getShareValue, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './chunk-QMFYPHX5.mjs';
|
|
3
|
+
export { UnauthorizedVaultAccessError, VaultNotFoundByAddressError, VaultNotFoundByNameError, isVaultNotFoundByAddressError, isVaultNotFoundByNameError } from './chunk-Y5LBT2WT.mjs';
|
|
4
|
+
import './chunk-UY2WD7MF.mjs';
|
|
5
|
+
import './chunk-6CU533DM.mjs';
|
|
6
|
+
export { APIError, LogLevel, YieldType, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getSupportedAssets, getVaults, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady } from './chunk-ODXJYXUH.mjs';
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|
|
8
8
|
//# sourceMappingURL=index.mjs.map
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-
|
|
1
|
+
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-5r2UnCDS.mjs';
|
|
2
2
|
import 'viem/chains';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-
|
|
1
|
+
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-5r2UnCDS.js';
|
|
2
2
|
import 'viem/chains';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/utils.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkTNL23CO2_js = require('./chunk-TNL23CO2.js');
|
|
4
|
+
var chunkGOJQYEJQ_js = require('./chunk-GOJQYEJQ.js');
|
|
5
5
|
|
|
6
6
|
// src/utils/time.ts
|
|
7
|
-
var calculateDeadline = (daysFromNow =
|
|
7
|
+
var calculateDeadline = (daysFromNow = chunkGOJQYEJQ_js.DEFAULT_DEADLINE) => {
|
|
8
8
|
const daysInSeconds = daysFromNow * 24 * 60 * 60;
|
|
9
9
|
const currentTimeStamp = Math.floor(Date.now() / 1e3);
|
|
10
10
|
const deadline = currentTimeStamp + daysInSeconds;
|
|
@@ -23,43 +23,43 @@ async function tryCatch(promise) {
|
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "RAY", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkTNL23CO2_js.RAY; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "WAD", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkTNL23CO2_js.WAD; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "bigIntToNumberAsString", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkTNL23CO2_js.bigIntToNumberAsString; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "calculateAtomicPrice", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkTNL23CO2_js.calculateAtomicPrice; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "calculateExpectedSharesMinted", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkTNL23CO2_js.calculateExpectedSharesMinted; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "DEFAULT_TIMEOUT", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkGOJQYEJQ_js.DEFAULT_TIMEOUT; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "clearChainsCache", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkGOJQYEJQ_js.clearChainsCache; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "createTimeoutSignal", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkGOJQYEJQ_js.createTimeoutSignal; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "getChainFromConfig", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkGOJQYEJQ_js.getChainFromConfig; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "toChainId", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkGOJQYEJQ_js.toChainId; }
|
|
63
63
|
});
|
|
64
64
|
exports.calculateDeadline = calculateDeadline;
|
|
65
65
|
exports.tryCatch = tryCatch;
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/time.ts","../src/utils/try-catch.ts"],"names":["DEFAULT_DEADLINE"],"mappings":";;;;;;AAoBO,IAAM,iBAAA,GAAoB,CAAC,WAAA,GAAcA,iCAAA,KAAqB;AAEnE,EAAA,MAAM,aAAA,GAAgB,WAAA,GAAc,EAAA,GAAK,EAAA,GAAK,EAAA;AAG9C,EAAA,MAAM,mBAAmB,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,KAAQ,GAAI,CAAA;AAGrD,EAAA,MAAM,WAAW,gBAAA,GAAmB,aAAA;AAEpC,EAAA,OAAO,OAAO,QAAQ,CAAA;AACxB;;;ACjBA,eAAsB,SACpB,OAAA,EAC2B;AAC3B,EAAA,IAAI;AACF,IAAA,MAAM,OAAO,MAAM,OAAA;AACnB,IAAA,OAAO,EAAE,IAAA,EAAM,KAAA,EAAO,KAAA,CAAA,EAAW,SAAS,IAAA,EAAK;AAAA,EACjD,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAW,KAAA,EAAmB,SAAS,KAAA,EAAM;AAAA,EAC9D;AACF","file":"utils.js","sourcesContent":["/**\n * @fileoverview Utility functions for time-related operations\n */\n\nimport { DEFAULT_DEADLINE } from
|
|
1
|
+
{"version":3,"sources":["../src/utils/time.ts","../src/utils/try-catch.ts"],"names":["DEFAULT_DEADLINE"],"mappings":";;;;;;AAoBO,IAAM,iBAAA,GAAoB,CAAC,WAAA,GAAcA,iCAAA,KAAqB;AAEnE,EAAA,MAAM,aAAA,GAAgB,WAAA,GAAc,EAAA,GAAK,EAAA,GAAK,EAAA;AAG9C,EAAA,MAAM,mBAAmB,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,KAAQ,GAAI,CAAA;AAGrD,EAAA,MAAM,WAAW,gBAAA,GAAmB,aAAA;AAEpC,EAAA,OAAO,OAAO,QAAQ,CAAA;AACxB;;;ACjBA,eAAsB,SACpB,OAAA,EAC2B;AAC3B,EAAA,IAAI;AACF,IAAA,MAAM,OAAO,MAAM,OAAA;AACnB,IAAA,OAAO,EAAE,IAAA,EAAM,KAAA,EAAO,KAAA,CAAA,EAAW,SAAS,IAAA,EAAK;AAAA,EACjD,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAW,KAAA,EAAmB,SAAS,KAAA,EAAM;AAAA,EAC9D;AACF","file":"utils.js","sourcesContent":["/**\n * @fileoverview Utility functions for time-related operations\n */\n\nimport { DEFAULT_DEADLINE } from '../constants'\n\n/**\n * Calculates a deadline timestamp in seconds from the current time\n *\n * @param {number} [daysFromNow=DEFAULT_DEADLINE] - Number of days from now to set the deadline\n * @returns {number} Unix timestamp in seconds representing the deadline\n *\n * @example\n * // Returns a timestamp 3 days from now (in seconds)\n * const threeDay = calculateDeadline();\n *\n * @example\n * // Returns a timestamp 7 days from now (in seconds)\n * const weekDeadline = calculateDeadline(7);\n */\nexport const calculateDeadline = (daysFromNow = DEFAULT_DEADLINE) => {\n // Get days in seconds\n const daysInSeconds = daysFromNow * 24 * 60 * 60\n\n // Get current timestamp in seconds\n const currentTimeStamp = Math.floor(Date.now() / 1000)\n\n // Calculate deadline (current time + 3 days in seconds)\n const deadline = currentTimeStamp + daysInSeconds\n\n return BigInt(deadline)\n}\n","type Success<T> = {\n success: true\n data: T\n error?: never\n}\n\ntype Failure<E> = {\n success: false\n data?: never\n error: E\n}\n\ntype SafeResult<T, E = Error> = Success<T> | Failure<E>\n\nexport async function tryCatch<T, E = Error>(\n promise: Promise<T>\n): Promise<SafeResult<T, E>> {\n try {\n const data = await promise\n return { data, error: undefined, success: true }\n } catch (error) {\n return { data: undefined, error: error as E, success: false }\n }\n}\n"]}
|
package/dist/utils.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { RAY, WAD, bigIntToNumberAsString, calculateAtomicPrice, calculateExpectedSharesMinted } from './chunk-
|
|
2
|
-
import { DEFAULT_DEADLINE } from './chunk-
|
|
3
|
-
export { DEFAULT_TIMEOUT, clearChainsCache, createTimeoutSignal, getChainFromConfig, toChainId } from './chunk-
|
|
1
|
+
export { RAY, WAD, bigIntToNumberAsString, calculateAtomicPrice, calculateExpectedSharesMinted } from './chunk-6CU533DM.mjs';
|
|
2
|
+
import { DEFAULT_DEADLINE } from './chunk-ODXJYXUH.mjs';
|
|
3
|
+
export { DEFAULT_TIMEOUT, clearChainsCache, createTimeoutSignal, getChainFromConfig, toChainId } from './chunk-ODXJYXUH.mjs';
|
|
4
4
|
|
|
5
5
|
// src/utils/time.ts
|
|
6
6
|
var calculateDeadline = (daysFromNow = DEFAULT_DEADLINE) => {
|
package/dist/utils.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/time.ts","../src/utils/try-catch.ts"],"names":[],"mappings":";;;;;AAoBO,IAAM,iBAAA,GAAoB,CAAC,WAAA,GAAc,gBAAA,KAAqB;AAEnE,EAAA,MAAM,aAAA,GAAgB,WAAA,GAAc,EAAA,GAAK,EAAA,GAAK,EAAA;AAG9C,EAAA,MAAM,mBAAmB,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,KAAQ,GAAI,CAAA;AAGrD,EAAA,MAAM,WAAW,gBAAA,GAAmB,aAAA;AAEpC,EAAA,OAAO,OAAO,QAAQ,CAAA;AACxB;;;ACjBA,eAAsB,SACpB,OAAA,EAC2B;AAC3B,EAAA,IAAI;AACF,IAAA,MAAM,OAAO,MAAM,OAAA;AACnB,IAAA,OAAO,EAAE,IAAA,EAAM,KAAA,EAAO,KAAA,CAAA,EAAW,SAAS,IAAA,EAAK;AAAA,EACjD,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAW,KAAA,EAAmB,SAAS,KAAA,EAAM;AAAA,EAC9D;AACF","file":"utils.mjs","sourcesContent":["/**\n * @fileoverview Utility functions for time-related operations\n */\n\nimport { DEFAULT_DEADLINE } from
|
|
1
|
+
{"version":3,"sources":["../src/utils/time.ts","../src/utils/try-catch.ts"],"names":[],"mappings":";;;;;AAoBO,IAAM,iBAAA,GAAoB,CAAC,WAAA,GAAc,gBAAA,KAAqB;AAEnE,EAAA,MAAM,aAAA,GAAgB,WAAA,GAAc,EAAA,GAAK,EAAA,GAAK,EAAA;AAG9C,EAAA,MAAM,mBAAmB,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,KAAQ,GAAI,CAAA;AAGrD,EAAA,MAAM,WAAW,gBAAA,GAAmB,aAAA;AAEpC,EAAA,OAAO,OAAO,QAAQ,CAAA;AACxB;;;ACjBA,eAAsB,SACpB,OAAA,EAC2B;AAC3B,EAAA,IAAI;AACF,IAAA,MAAM,OAAO,MAAM,OAAA;AACnB,IAAA,OAAO,EAAE,IAAA,EAAM,KAAA,EAAO,KAAA,CAAA,EAAW,SAAS,IAAA,EAAK;AAAA,EACjD,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAW,KAAA,EAAmB,SAAS,KAAA,EAAM;AAAA,EAC9D;AACF","file":"utils.mjs","sourcesContent":["/**\n * @fileoverview Utility functions for time-related operations\n */\n\nimport { DEFAULT_DEADLINE } from '../constants'\n\n/**\n * Calculates a deadline timestamp in seconds from the current time\n *\n * @param {number} [daysFromNow=DEFAULT_DEADLINE] - Number of days from now to set the deadline\n * @returns {number} Unix timestamp in seconds representing the deadline\n *\n * @example\n * // Returns a timestamp 3 days from now (in seconds)\n * const threeDay = calculateDeadline();\n *\n * @example\n * // Returns a timestamp 7 days from now (in seconds)\n * const weekDeadline = calculateDeadline(7);\n */\nexport const calculateDeadline = (daysFromNow = DEFAULT_DEADLINE) => {\n // Get days in seconds\n const daysInSeconds = daysFromNow * 24 * 60 * 60\n\n // Get current timestamp in seconds\n const currentTimeStamp = Math.floor(Date.now() / 1000)\n\n // Calculate deadline (current time + 3 days in seconds)\n const deadline = currentTimeStamp + daysInSeconds\n\n return BigInt(deadline)\n}\n","type Success<T> = {\n success: true\n data: T\n error?: never\n}\n\ntype Failure<E> = {\n success: false\n data?: never\n error: E\n}\n\ntype SafeResult<T, E = Error> = Success<T> | Failure<E>\n\nexport async function tryCatch<T, E = Error>(\n promise: Promise<T>\n): Promise<SafeResult<T, E>> {\n try {\n const data = await promise\n return { data, error: undefined, success: true }\n } catch (error) {\n return { data: undefined, error: error as E, success: false }\n }\n}\n"]}
|