@agglayer/sdk 1.0.0-beta.23 → 1.0.0-beta.24

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 CHANGED
@@ -271,6 +271,7 @@ type RoutesResponse = readonly Route[];
271
271
  *
272
272
  * Defines the core request and response types for the transactions endpoint.
273
273
  */
274
+
274
275
  interface Transaction {
275
276
  id: string;
276
277
  transactionHash: string;
@@ -321,9 +322,11 @@ interface TransactionsRequestQueryParams {
321
322
  readonly limit?: number;
322
323
  readonly startAfter?: number;
323
324
  }
324
- type TransactionsResponse = {
325
- transactions: Transaction[];
326
- };
325
+ type TransactionsResponse = Transaction[];
326
+ interface PaginatedTransactionsResponse {
327
+ readonly transactions: TransactionsResponse;
328
+ readonly pagination?: CursorPagination;
329
+ }
327
330
 
328
331
  /**
329
332
  * Arc API Built Transaction Types
@@ -870,9 +873,10 @@ declare class CoreClient {
870
873
  */
871
874
  getClaimUnsignedTransaction(buildClaimTxParams: BuildClaimTransactionRequestParam): Promise<UnsignedTransaction>;
872
875
  /**
873
- * Get all transactions via web sockets
876
+ * Get all transactions with pagination information
877
+ * @param transactionsRequestQueryParams - Parameters for the transactions API call
874
878
  */
875
- getTransactions(transactionsRequestQueryParams: TransactionsRequestQueryParams): Promise<TransactionsResponse>;
879
+ getTransactions(transactionsRequestQueryParams: TransactionsRequestQueryParams): Promise<PaginatedTransactionsResponse>;
876
880
  /**
877
881
  * Get token mappings by token address
878
882
  * @developer Note: Do not misinterpret network ID as chain ID.
@@ -933,4 +937,4 @@ declare class AggLayerSDK {
933
937
  getNative(): NativeClient;
934
938
  }
935
939
 
936
- export { AggLayerSDK, ApiError, type ApiResponse, type BaseContractConfig, type BridgeAssetParams, type BridgeConfig, type BridgeMessageParams, type BridgeOptions, type BuildClaimTransactionRequestParam, type BuildClaimTransactionResponse, type BuildTransactionRequestBody, type BuildTransactionResponse, type ChainConfig, type ChainsQueryParams, type ChainsResponse, type ClaimAssetParams, type ClaimMessageParams, type CoreConfig, type CursorPagination, type CustomChainConfig, type ERC20Config, type ErrorResponse, type FeeCost, type GasCost, type IChain, type IsClaimedParams, type NativeConfig, type OffsetPagination, type OriginTokenInfoParams, type Pagination, type PrecalculatedWrapperParams, type ProviderMetadata, type RiskFactors, type RiskLevel, type Route, type RoutePreferences, type RouteStep, type RoutesRequestParams, type RoutesResponse, type SDKConfig, type SDKMode, SDK_MODES, type Step, type StepAction, type StepEstimate, type StepType, type SuccessResponse, type TokenInfo, type TokenMappingQueryParams, type TokenMappingResponse, type TokenMetadataRequestParam, type TokenMetadataResponse, type TokenReference, type ToolDetails, type Transaction, type TransactionParams, type TransactionsRequestQueryParams, type TransactionsResponse, type WrappedTokenParams };
940
+ export { AggLayerSDK, ApiError, type ApiResponse, type BaseContractConfig, type BridgeAssetParams, type BridgeConfig, type BridgeMessageParams, type BridgeOptions, type BuildClaimTransactionRequestParam, type BuildClaimTransactionResponse, type BuildTransactionRequestBody, type BuildTransactionResponse, type ChainConfig, type ChainsQueryParams, type ChainsResponse, type ClaimAssetParams, type ClaimMessageParams, type CoreConfig, type CursorPagination, type CustomChainConfig, type ERC20Config, type ErrorResponse, type FeeCost, type GasCost, type IChain, type IsClaimedParams, type NativeConfig, type OffsetPagination, type OriginTokenInfoParams, type PaginatedTransactionsResponse, type Pagination, type PrecalculatedWrapperParams, type ProviderMetadata, type RiskFactors, type RiskLevel, type Route, type RoutePreferences, type RouteStep, type RoutesRequestParams, type RoutesResponse, type SDKConfig, type SDKMode, SDK_MODES, type Step, type StepAction, type StepEstimate, type StepType, type SuccessResponse, type TokenInfo, type TokenMappingQueryParams, type TokenMappingResponse, type TokenMetadataRequestParam, type TokenMetadataResponse, type TokenReference, type ToolDetails, type Transaction, type TransactionParams, type TransactionsRequestQueryParams, type TransactionsResponse, type WrappedTokenParams };
package/dist/index.d.ts CHANGED
@@ -271,6 +271,7 @@ type RoutesResponse = readonly Route[];
271
271
  *
272
272
  * Defines the core request and response types for the transactions endpoint.
273
273
  */
274
+
274
275
  interface Transaction {
275
276
  id: string;
276
277
  transactionHash: string;
@@ -321,9 +322,11 @@ interface TransactionsRequestQueryParams {
321
322
  readonly limit?: number;
322
323
  readonly startAfter?: number;
323
324
  }
324
- type TransactionsResponse = {
325
- transactions: Transaction[];
326
- };
325
+ type TransactionsResponse = Transaction[];
326
+ interface PaginatedTransactionsResponse {
327
+ readonly transactions: TransactionsResponse;
328
+ readonly pagination?: CursorPagination;
329
+ }
327
330
 
328
331
  /**
329
332
  * Arc API Built Transaction Types
@@ -870,9 +873,10 @@ declare class CoreClient {
870
873
  */
871
874
  getClaimUnsignedTransaction(buildClaimTxParams: BuildClaimTransactionRequestParam): Promise<UnsignedTransaction>;
872
875
  /**
873
- * Get all transactions via web sockets
876
+ * Get all transactions with pagination information
877
+ * @param transactionsRequestQueryParams - Parameters for the transactions API call
874
878
  */
875
- getTransactions(transactionsRequestQueryParams: TransactionsRequestQueryParams): Promise<TransactionsResponse>;
879
+ getTransactions(transactionsRequestQueryParams: TransactionsRequestQueryParams): Promise<PaginatedTransactionsResponse>;
876
880
  /**
877
881
  * Get token mappings by token address
878
882
  * @developer Note: Do not misinterpret network ID as chain ID.
@@ -933,4 +937,4 @@ declare class AggLayerSDK {
933
937
  getNative(): NativeClient;
934
938
  }
935
939
 
936
- export { AggLayerSDK, ApiError, type ApiResponse, type BaseContractConfig, type BridgeAssetParams, type BridgeConfig, type BridgeMessageParams, type BridgeOptions, type BuildClaimTransactionRequestParam, type BuildClaimTransactionResponse, type BuildTransactionRequestBody, type BuildTransactionResponse, type ChainConfig, type ChainsQueryParams, type ChainsResponse, type ClaimAssetParams, type ClaimMessageParams, type CoreConfig, type CursorPagination, type CustomChainConfig, type ERC20Config, type ErrorResponse, type FeeCost, type GasCost, type IChain, type IsClaimedParams, type NativeConfig, type OffsetPagination, type OriginTokenInfoParams, type Pagination, type PrecalculatedWrapperParams, type ProviderMetadata, type RiskFactors, type RiskLevel, type Route, type RoutePreferences, type RouteStep, type RoutesRequestParams, type RoutesResponse, type SDKConfig, type SDKMode, SDK_MODES, type Step, type StepAction, type StepEstimate, type StepType, type SuccessResponse, type TokenInfo, type TokenMappingQueryParams, type TokenMappingResponse, type TokenMetadataRequestParam, type TokenMetadataResponse, type TokenReference, type ToolDetails, type Transaction, type TransactionParams, type TransactionsRequestQueryParams, type TransactionsResponse, type WrappedTokenParams };
940
+ export { AggLayerSDK, ApiError, type ApiResponse, type BaseContractConfig, type BridgeAssetParams, type BridgeConfig, type BridgeMessageParams, type BridgeOptions, type BuildClaimTransactionRequestParam, type BuildClaimTransactionResponse, type BuildTransactionRequestBody, type BuildTransactionResponse, type ChainConfig, type ChainsQueryParams, type ChainsResponse, type ClaimAssetParams, type ClaimMessageParams, type CoreConfig, type CursorPagination, type CustomChainConfig, type ERC20Config, type ErrorResponse, type FeeCost, type GasCost, type IChain, type IsClaimedParams, type NativeConfig, type OffsetPagination, type OriginTokenInfoParams, type PaginatedTransactionsResponse, type Pagination, type PrecalculatedWrapperParams, type ProviderMetadata, type RiskFactors, type RiskLevel, type Route, type RoutePreferences, type RouteStep, type RoutesRequestParams, type RoutesResponse, type SDKConfig, type SDKMode, SDK_MODES, type Step, type StepAction, type StepEstimate, type StepType, type SuccessResponse, type TokenInfo, type TokenMappingQueryParams, type TokenMappingResponse, type TokenMetadataRequestParam, type TokenMetadataResponse, type TokenReference, type ToolDetails, type Transaction, type TransactionParams, type TransactionsRequestQueryParams, type TransactionsResponse, type WrappedTokenParams };
package/dist/index.js CHANGED
@@ -2008,7 +2008,8 @@ var CoreClient = class {
2008
2008
  }
2009
2009
  }
2010
2010
  /**
2011
- * Get all transactions via web sockets
2011
+ * Get all transactions with pagination information
2012
+ * @param transactionsRequestQueryParams - Parameters for the transactions API call
2012
2013
  */
2013
2014
  async getTransactions(transactionsRequestQueryParams) {
2014
2015
  if (transactionsRequestQueryParams.limit && transactionsRequestQueryParams.limit > MAX_TRANSACTIONS_PER_PAGE) {
@@ -2022,7 +2023,12 @@ var CoreClient = class {
2022
2023
  transactionsRequestQueryParams
2023
2024
  );
2024
2025
  if (response.data.status === "success") {
2025
- return response.data.data;
2026
+ return {
2027
+ transactions: response.data.data,
2028
+ ...response.data.pagination && {
2029
+ pagination: response.data.pagination
2030
+ }
2031
+ };
2026
2032
  }
2027
2033
  throw ApiError.fromErrorResponse(response.data);
2028
2034
  } catch (error) {