@pyxisjs/core 0.2.7 → 0.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/index.d.mts +68 -1
- package/dist/index.d.ts +68 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -484,6 +484,67 @@ interface ApyDataPoint {
|
|
|
484
484
|
/** The timestamp in seconds */
|
|
485
485
|
timestamp: string;
|
|
486
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* Token transfer information for manage operations
|
|
489
|
+
*/
|
|
490
|
+
interface TokenTransfer {
|
|
491
|
+
/** Token address */
|
|
492
|
+
token_address: string;
|
|
493
|
+
/** Amount transferred (in token's smallest unit) */
|
|
494
|
+
amount: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Arguments for querying vault manage operations
|
|
498
|
+
*/
|
|
499
|
+
interface GetManageOperationsArgs {
|
|
500
|
+
/** The vault ID to filter operations by */
|
|
501
|
+
vaultId: string;
|
|
502
|
+
/** Start time for the query range (Unix timestamp in seconds) */
|
|
503
|
+
startTime: number;
|
|
504
|
+
/** End time for the query range (Unix timestamp in seconds) */
|
|
505
|
+
endTime: number;
|
|
506
|
+
/** Maximum number of operations to return */
|
|
507
|
+
limit?: number;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* A vault manage operation representing a protocol interaction
|
|
511
|
+
*/
|
|
512
|
+
interface ManageOperation {
|
|
513
|
+
/** Unique identifier: "{tx_hash}:{log_index}" */
|
|
514
|
+
id: string;
|
|
515
|
+
/** Vault identifier */
|
|
516
|
+
vault_id: string;
|
|
517
|
+
/** Chain code (e.g., "arbitrum", "ethereum", "aptos") */
|
|
518
|
+
chain_code: string;
|
|
519
|
+
/** Protocol name (e.g., "aave", "uniswap", "erc20") */
|
|
520
|
+
protocol: string;
|
|
521
|
+
/** Operation type (e.g., "aave_supply", "erc20_approve", "uniswap_swap") */
|
|
522
|
+
operation: string;
|
|
523
|
+
/** Transaction hash */
|
|
524
|
+
tx_hash: string;
|
|
525
|
+
/** Event timestamp (Unix timestamp in seconds) */
|
|
526
|
+
event_timestamp: number;
|
|
527
|
+
/** Tokens transferred into the protocol */
|
|
528
|
+
tokens_in: TokenTransfer[];
|
|
529
|
+
/** Tokens transferred out of the protocol */
|
|
530
|
+
tokens_out: TokenTransfer[];
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Response from manage operations API
|
|
534
|
+
*/
|
|
535
|
+
interface ManageOperationsResponse {
|
|
536
|
+
/** Response code (0 = success) */
|
|
537
|
+
code: number;
|
|
538
|
+
/** Response message */
|
|
539
|
+
message: string;
|
|
540
|
+
/** Response data */
|
|
541
|
+
data: {
|
|
542
|
+
/** List of manage operations */
|
|
543
|
+
items: ManageOperation[];
|
|
544
|
+
};
|
|
545
|
+
/** Request tracking ID */
|
|
546
|
+
request_id: string;
|
|
547
|
+
}
|
|
487
548
|
interface MultiChainVaultAPI {
|
|
488
549
|
quoteDeposit(args: QuoteDepositArgs): Promise<string>;
|
|
489
550
|
quoteWithdraw(args: QuoteWithdrawArgs): Promise<string>;
|
|
@@ -747,6 +808,12 @@ interface BaseAnalyticsClient {
|
|
|
747
808
|
* @returns Promise with array of APY data points
|
|
748
809
|
*/
|
|
749
810
|
getHistoricalApy(args: HistoricalApyArgs): Promise<ApyDataPoint[]>;
|
|
811
|
+
/**
|
|
812
|
+
* Get vault manage operations (protocol interactions)
|
|
813
|
+
* @param args - Vault ID, time range, and limit
|
|
814
|
+
* @returns Promise with array of manage operations
|
|
815
|
+
*/
|
|
816
|
+
getManageOperations(args: GetManageOperationsArgs): Promise<ManageOperation[]>;
|
|
750
817
|
}
|
|
751
818
|
|
|
752
819
|
/**
|
|
@@ -915,4 +982,4 @@ declare namespace index {
|
|
|
915
982
|
export { index_FLAG_BITS as FLAG_BITS, type index_FlagBitKey as FlagBitKey, index_SamplingStrategy as SamplingStrategy, index_amountWithSlippage as amountWithSlippage, index_buildRequestFlags as buildRequestFlags, index_calculateApy as calculateApy, index_calculateMinimumReceiveAmount as calculateMinimumReceiveAmount, index_calculateWithdrawalAmount as calculateWithdrawalAmount, index_getActiveFlags as getActiveFlags, index_hasFlag as hasFlag, index_mapIndexerToExchangeRateEvent as mapIndexerToExchangeRateEvent, index_mapIndexerToVaultActivity as mapIndexerToVaultActivity, index_mapOnchainToWithdrawalRequest as mapOnchainToWithdrawalRequest, index_normalizeAddress as normalizeAddress, index_parseRequestFlags as parseRequestFlags, index_sampleEventsByDay as sampleEventsByDay };
|
|
916
983
|
}
|
|
917
984
|
|
|
918
|
-
export { type AnyTransaction, type AptosTransaction, type AptosTransactionPayload, type ApyDataPoint, type ApyWindow, type BaseAPI, type BaseAnalyticsClient, BaseChainAdapter, type BaseTransaction, BridgeMethod, type BridgeQuoteResponse, type BuildBridgeTxArgs, type BuildCancelWithdrawalRequestTxArgs, type BuildDepositTxArgs, type BuildReclaimWithdrawalRequestTxArgs, type BuildWithdrawTxArgs, CHAIN_CONFIGS, type Chain, type ChainConfig, ChainId, ChainType, ConfigError, ContractError, type Currency, ESTIMATED_BRIDGE_TIME, ErrorCodes, type EthereumContractCall, type EthereumTokenApprove, type EthereumTransaction, type EthereumTransactionMetadata, type EventParams, type ExchangeRateEvent, type GetActivitiesArgs, type GetDepositRateInQuoteSafeArgs, type GetMinimumRequestAgeArgs, type GetWithdrawRateInQuoteSafeArgs, type GetWithdrawalRequestsOfUserArgs, type HistoricalApyArgs, type IndexerExchangeRateEvent, type IndexerVaultActivity, InsufficientFundsError, LAYERZERO_ENDPOINT_IDS, type MultiChainVaultAPI, NetworkError, NetworkType, PyxisError, type PyxisOnchainWithdrawalRequest, type PyxisRequestFlagState, type PyxisToken, index as PyxisUtils, type PyxisWithdrawalRequest, type QueryIndexerParams, type QuoteBridgeArgs, type QuoteDepositArgs, type QuoteWithdrawArgs, RateLimitError, type SDKConfig, type SignedTransaction, StrategyError, TransactionError, type TransactionPayload, type TransactionResult, type TxParams, ValidationError, type VaultActivity, type VaultContractAddressConfig, VaultError, type VaultTvlArgs, type ViewParams, type WalletAccount, type WalletAdapter, WalletError, createError, getChainConfig, getEstimatedBridgeTime, getLayerZeroEndpointId, getLayerZeroGasLimit };
|
|
985
|
+
export { type AnyTransaction, type AptosTransaction, type AptosTransactionPayload, type ApyDataPoint, type ApyWindow, type BaseAPI, type BaseAnalyticsClient, BaseChainAdapter, type BaseTransaction, BridgeMethod, type BridgeQuoteResponse, type BuildBridgeTxArgs, type BuildCancelWithdrawalRequestTxArgs, type BuildDepositTxArgs, type BuildReclaimWithdrawalRequestTxArgs, type BuildWithdrawTxArgs, CHAIN_CONFIGS, type Chain, type ChainConfig, ChainId, ChainType, ConfigError, ContractError, type Currency, ESTIMATED_BRIDGE_TIME, ErrorCodes, type EthereumContractCall, type EthereumTokenApprove, type EthereumTransaction, type EthereumTransactionMetadata, type EventParams, type ExchangeRateEvent, type GetActivitiesArgs, type GetDepositRateInQuoteSafeArgs, type GetManageOperationsArgs, type GetMinimumRequestAgeArgs, type GetWithdrawRateInQuoteSafeArgs, type GetWithdrawalRequestsOfUserArgs, type HistoricalApyArgs, type IndexerExchangeRateEvent, type IndexerVaultActivity, InsufficientFundsError, LAYERZERO_ENDPOINT_IDS, type ManageOperation, type ManageOperationsResponse, type MultiChainVaultAPI, NetworkError, NetworkType, PyxisError, type PyxisOnchainWithdrawalRequest, type PyxisRequestFlagState, type PyxisToken, index as PyxisUtils, type PyxisWithdrawalRequest, type QueryIndexerParams, type QuoteBridgeArgs, type QuoteDepositArgs, type QuoteWithdrawArgs, RateLimitError, type SDKConfig, type SignedTransaction, StrategyError, type TokenTransfer, TransactionError, type TransactionPayload, type TransactionResult, type TxParams, ValidationError, type VaultActivity, type VaultContractAddressConfig, VaultError, type VaultTvlArgs, type ViewParams, type WalletAccount, type WalletAdapter, WalletError, createError, getChainConfig, getEstimatedBridgeTime, getLayerZeroEndpointId, getLayerZeroGasLimit };
|
package/dist/index.d.ts
CHANGED
|
@@ -484,6 +484,67 @@ interface ApyDataPoint {
|
|
|
484
484
|
/** The timestamp in seconds */
|
|
485
485
|
timestamp: string;
|
|
486
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* Token transfer information for manage operations
|
|
489
|
+
*/
|
|
490
|
+
interface TokenTransfer {
|
|
491
|
+
/** Token address */
|
|
492
|
+
token_address: string;
|
|
493
|
+
/** Amount transferred (in token's smallest unit) */
|
|
494
|
+
amount: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Arguments for querying vault manage operations
|
|
498
|
+
*/
|
|
499
|
+
interface GetManageOperationsArgs {
|
|
500
|
+
/** The vault ID to filter operations by */
|
|
501
|
+
vaultId: string;
|
|
502
|
+
/** Start time for the query range (Unix timestamp in seconds) */
|
|
503
|
+
startTime: number;
|
|
504
|
+
/** End time for the query range (Unix timestamp in seconds) */
|
|
505
|
+
endTime: number;
|
|
506
|
+
/** Maximum number of operations to return */
|
|
507
|
+
limit?: number;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* A vault manage operation representing a protocol interaction
|
|
511
|
+
*/
|
|
512
|
+
interface ManageOperation {
|
|
513
|
+
/** Unique identifier: "{tx_hash}:{log_index}" */
|
|
514
|
+
id: string;
|
|
515
|
+
/** Vault identifier */
|
|
516
|
+
vault_id: string;
|
|
517
|
+
/** Chain code (e.g., "arbitrum", "ethereum", "aptos") */
|
|
518
|
+
chain_code: string;
|
|
519
|
+
/** Protocol name (e.g., "aave", "uniswap", "erc20") */
|
|
520
|
+
protocol: string;
|
|
521
|
+
/** Operation type (e.g., "aave_supply", "erc20_approve", "uniswap_swap") */
|
|
522
|
+
operation: string;
|
|
523
|
+
/** Transaction hash */
|
|
524
|
+
tx_hash: string;
|
|
525
|
+
/** Event timestamp (Unix timestamp in seconds) */
|
|
526
|
+
event_timestamp: number;
|
|
527
|
+
/** Tokens transferred into the protocol */
|
|
528
|
+
tokens_in: TokenTransfer[];
|
|
529
|
+
/** Tokens transferred out of the protocol */
|
|
530
|
+
tokens_out: TokenTransfer[];
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Response from manage operations API
|
|
534
|
+
*/
|
|
535
|
+
interface ManageOperationsResponse {
|
|
536
|
+
/** Response code (0 = success) */
|
|
537
|
+
code: number;
|
|
538
|
+
/** Response message */
|
|
539
|
+
message: string;
|
|
540
|
+
/** Response data */
|
|
541
|
+
data: {
|
|
542
|
+
/** List of manage operations */
|
|
543
|
+
items: ManageOperation[];
|
|
544
|
+
};
|
|
545
|
+
/** Request tracking ID */
|
|
546
|
+
request_id: string;
|
|
547
|
+
}
|
|
487
548
|
interface MultiChainVaultAPI {
|
|
488
549
|
quoteDeposit(args: QuoteDepositArgs): Promise<string>;
|
|
489
550
|
quoteWithdraw(args: QuoteWithdrawArgs): Promise<string>;
|
|
@@ -747,6 +808,12 @@ interface BaseAnalyticsClient {
|
|
|
747
808
|
* @returns Promise with array of APY data points
|
|
748
809
|
*/
|
|
749
810
|
getHistoricalApy(args: HistoricalApyArgs): Promise<ApyDataPoint[]>;
|
|
811
|
+
/**
|
|
812
|
+
* Get vault manage operations (protocol interactions)
|
|
813
|
+
* @param args - Vault ID, time range, and limit
|
|
814
|
+
* @returns Promise with array of manage operations
|
|
815
|
+
*/
|
|
816
|
+
getManageOperations(args: GetManageOperationsArgs): Promise<ManageOperation[]>;
|
|
750
817
|
}
|
|
751
818
|
|
|
752
819
|
/**
|
|
@@ -915,4 +982,4 @@ declare namespace index {
|
|
|
915
982
|
export { index_FLAG_BITS as FLAG_BITS, type index_FlagBitKey as FlagBitKey, index_SamplingStrategy as SamplingStrategy, index_amountWithSlippage as amountWithSlippage, index_buildRequestFlags as buildRequestFlags, index_calculateApy as calculateApy, index_calculateMinimumReceiveAmount as calculateMinimumReceiveAmount, index_calculateWithdrawalAmount as calculateWithdrawalAmount, index_getActiveFlags as getActiveFlags, index_hasFlag as hasFlag, index_mapIndexerToExchangeRateEvent as mapIndexerToExchangeRateEvent, index_mapIndexerToVaultActivity as mapIndexerToVaultActivity, index_mapOnchainToWithdrawalRequest as mapOnchainToWithdrawalRequest, index_normalizeAddress as normalizeAddress, index_parseRequestFlags as parseRequestFlags, index_sampleEventsByDay as sampleEventsByDay };
|
|
916
983
|
}
|
|
917
984
|
|
|
918
|
-
export { type AnyTransaction, type AptosTransaction, type AptosTransactionPayload, type ApyDataPoint, type ApyWindow, type BaseAPI, type BaseAnalyticsClient, BaseChainAdapter, type BaseTransaction, BridgeMethod, type BridgeQuoteResponse, type BuildBridgeTxArgs, type BuildCancelWithdrawalRequestTxArgs, type BuildDepositTxArgs, type BuildReclaimWithdrawalRequestTxArgs, type BuildWithdrawTxArgs, CHAIN_CONFIGS, type Chain, type ChainConfig, ChainId, ChainType, ConfigError, ContractError, type Currency, ESTIMATED_BRIDGE_TIME, ErrorCodes, type EthereumContractCall, type EthereumTokenApprove, type EthereumTransaction, type EthereumTransactionMetadata, type EventParams, type ExchangeRateEvent, type GetActivitiesArgs, type GetDepositRateInQuoteSafeArgs, type GetMinimumRequestAgeArgs, type GetWithdrawRateInQuoteSafeArgs, type GetWithdrawalRequestsOfUserArgs, type HistoricalApyArgs, type IndexerExchangeRateEvent, type IndexerVaultActivity, InsufficientFundsError, LAYERZERO_ENDPOINT_IDS, type MultiChainVaultAPI, NetworkError, NetworkType, PyxisError, type PyxisOnchainWithdrawalRequest, type PyxisRequestFlagState, type PyxisToken, index as PyxisUtils, type PyxisWithdrawalRequest, type QueryIndexerParams, type QuoteBridgeArgs, type QuoteDepositArgs, type QuoteWithdrawArgs, RateLimitError, type SDKConfig, type SignedTransaction, StrategyError, TransactionError, type TransactionPayload, type TransactionResult, type TxParams, ValidationError, type VaultActivity, type VaultContractAddressConfig, VaultError, type VaultTvlArgs, type ViewParams, type WalletAccount, type WalletAdapter, WalletError, createError, getChainConfig, getEstimatedBridgeTime, getLayerZeroEndpointId, getLayerZeroGasLimit };
|
|
985
|
+
export { type AnyTransaction, type AptosTransaction, type AptosTransactionPayload, type ApyDataPoint, type ApyWindow, type BaseAPI, type BaseAnalyticsClient, BaseChainAdapter, type BaseTransaction, BridgeMethod, type BridgeQuoteResponse, type BuildBridgeTxArgs, type BuildCancelWithdrawalRequestTxArgs, type BuildDepositTxArgs, type BuildReclaimWithdrawalRequestTxArgs, type BuildWithdrawTxArgs, CHAIN_CONFIGS, type Chain, type ChainConfig, ChainId, ChainType, ConfigError, ContractError, type Currency, ESTIMATED_BRIDGE_TIME, ErrorCodes, type EthereumContractCall, type EthereumTokenApprove, type EthereumTransaction, type EthereumTransactionMetadata, type EventParams, type ExchangeRateEvent, type GetActivitiesArgs, type GetDepositRateInQuoteSafeArgs, type GetManageOperationsArgs, type GetMinimumRequestAgeArgs, type GetWithdrawRateInQuoteSafeArgs, type GetWithdrawalRequestsOfUserArgs, type HistoricalApyArgs, type IndexerExchangeRateEvent, type IndexerVaultActivity, InsufficientFundsError, LAYERZERO_ENDPOINT_IDS, type ManageOperation, type ManageOperationsResponse, type MultiChainVaultAPI, NetworkError, NetworkType, PyxisError, type PyxisOnchainWithdrawalRequest, type PyxisRequestFlagState, type PyxisToken, index as PyxisUtils, type PyxisWithdrawalRequest, type QueryIndexerParams, type QuoteBridgeArgs, type QuoteDepositArgs, type QuoteWithdrawArgs, RateLimitError, type SDKConfig, type SignedTransaction, StrategyError, type TokenTransfer, TransactionError, type TransactionPayload, type TransactionResult, type TxParams, ValidationError, type VaultActivity, type VaultContractAddressConfig, VaultError, type VaultTvlArgs, type ViewParams, type WalletAccount, type WalletAdapter, WalletError, createError, getChainConfig, getEstimatedBridgeTime, getLayerZeroEndpointId, getLayerZeroGasLimit };
|