@agglayer/sdk 1.0.0-beta.25 → 1.0.0-beta.27

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
@@ -186,14 +186,14 @@ interface StepEstimate {
186
186
  readonly fromAmountUSD?: string | null;
187
187
  readonly toAmountUSD?: string | null;
188
188
  }
189
- interface Step {
189
+ interface Step$1 {
190
190
  readonly id: string;
191
191
  readonly type: StepType;
192
192
  readonly tool: string;
193
193
  readonly toolDetails: ToolDetails;
194
194
  readonly action: StepAction;
195
195
  readonly estimate: StepEstimate;
196
- readonly includedSteps: Step[] | null;
196
+ readonly includedSteps: Step$1[] | null;
197
197
  readonly relatedSteps: string[] | null;
198
198
  }
199
199
  interface ProviderMetadata {
@@ -235,7 +235,7 @@ interface Route {
235
235
  readonly tags: string[];
236
236
  readonly feeCosts: FeeCost[];
237
237
  readonly gasCosts: GasCost[];
238
- readonly steps: Step[];
238
+ readonly steps: Step$1[];
239
239
  readonly transactionRequest?: UnsignedTransaction | undefined;
240
240
  readonly providerMetadata: ProviderMetadata;
241
241
  readonly riskFactors: RiskFactors | null;
@@ -272,53 +272,76 @@ type RoutesResponse = readonly Route[];
272
272
  * Defines the core request and response types for the transactions endpoint.
273
273
  */
274
274
 
275
+ declare enum TransactionStatus {
276
+ BRIDGED = "BRIDGED",
277
+ LEAF_INCLUDED = "LEAF_INCLUDED",
278
+ READY_TO_CLAIM = "READY_TO_CLAIM",
279
+ CLAIMED = "CLAIMED",
280
+ REFUND_IN_PROGRESS = "REFUND_IN_PROGRESS",
281
+ REFUNDED = "REFUNDED",
282
+ FAILED = "FAILED"
283
+ }
284
+ interface Token {
285
+ name: string;
286
+ symbol: string;
287
+ decimals: number;
288
+ logoURI: string;
289
+ }
290
+ interface SendingToken extends Token {
291
+ originTokenAddress: string;
292
+ originTokenNetwork: number | null;
293
+ }
294
+ interface ReceivingToken extends Token {
295
+ tokenAddress: string;
296
+ }
297
+ interface IntermediateToken extends Token {
298
+ tokenAddress: string;
299
+ }
300
+ interface Network {
301
+ chainId: number;
302
+ networkId: number | null;
303
+ }
304
+ interface Step {
305
+ txHash: string;
306
+ network: Network;
307
+ timestamp: number;
308
+ amount: string;
309
+ amountUSD: string;
310
+ includedSteps: unknown[];
311
+ }
312
+ interface SendingStep extends Step {
313
+ token: SendingToken;
314
+ }
315
+ interface ReceivingStep extends Step {
316
+ token: ReceivingToken;
317
+ }
318
+ interface IntermediateStep extends Step {
319
+ token: IntermediateToken;
320
+ }
275
321
  interface Transaction {
276
322
  id: string;
277
323
  transactionHash: string;
278
- bridgeHash: string | null;
279
324
  protocols: string[];
280
325
  status: string;
281
- timestamp: number;
282
326
  fromAddress: string;
283
327
  toAddress: string;
284
- sending: {
285
- txHash: string;
286
- network: {
287
- chainId: number;
288
- networkId: number | null;
289
- };
290
- timestamp: number;
291
- token: {
292
- originTokenAddress: string;
293
- originTokenNetwork: number | null;
294
- };
295
- amount: string;
296
- includedSteps: unknown[] | null;
297
- };
298
- receiving: {
299
- txHash: string | null;
300
- network: {
301
- chainId: number;
302
- networkId: number | null;
303
- };
304
- timestamp: number | null;
305
- amount: string;
306
- tokenAddress: string;
307
- } | null;
308
- leafType: string | null;
309
- depositCount: number | null;
310
- transactionIndex: number | null;
311
- blockNumber: number | null;
312
- leafIndex: number | null;
328
+ sending: SendingStep;
329
+ receiving: ReceivingStep | null;
330
+ intermediateSteps: IntermediateStep[];
331
+ transactionHashes: string[];
313
332
  metadata: {
314
333
  integrator: string | null;
315
334
  feeCosts: unknown[] | null;
335
+ leafType: string | null;
336
+ depositCount: number | null;
316
337
  };
338
+ lastUpdatedAt: number;
317
339
  }
318
340
  interface TransactionsRequestQueryParams {
319
341
  readonly address?: string;
320
- readonly sourceNetworkIds?: string;
321
- readonly destinationNetworkIds?: string;
342
+ readonly sourceChainIds?: number[];
343
+ readonly destinationChainIds?: number[];
344
+ readonly statuses?: TransactionStatus[];
322
345
  readonly limit?: number;
323
346
  readonly startAfter?: number;
324
347
  }
@@ -334,7 +357,7 @@ interface PaginatedTransactionsResponse {
334
357
  * Defines the core request and response types for the built transaction endpoint.
335
358
  */
336
359
 
337
- type BuildTransactionRequestBody = Step;
360
+ type BuildTransactionRequestBody = Step$1;
338
361
  type BuildTransactionResponse = UnsignedTransaction;
339
362
 
340
363
  /**
@@ -1030,4 +1053,4 @@ declare class AggLayerSDK {
1030
1053
  getNative(): NativeClient;
1031
1054
  }
1032
1055
 
1033
- 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 LiFiBridge, type LiFiFeeCost, type LiFiMetadata, type LiFiStatusRequestParams, type LiFiStatusResponse, type LiFiStep, type LiFiToken, type LiFiTransaction, type LiFiTransferStatus, type LiFiTransferSubstatus, 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 UnsignedTransaction, type WrappedTokenParams };
1056
+ 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 LiFiBridge, type LiFiFeeCost, type LiFiMetadata, type LiFiStatusRequestParams, type LiFiStatusResponse, type LiFiStep, type LiFiToken, type LiFiTransaction, type LiFiTransferStatus, type LiFiTransferSubstatus, 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$1 as 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, TransactionStatus, type TransactionsRequestQueryParams, type TransactionsResponse, type UnsignedTransaction, type WrappedTokenParams };
package/dist/index.d.ts CHANGED
@@ -186,14 +186,14 @@ interface StepEstimate {
186
186
  readonly fromAmountUSD?: string | null;
187
187
  readonly toAmountUSD?: string | null;
188
188
  }
189
- interface Step {
189
+ interface Step$1 {
190
190
  readonly id: string;
191
191
  readonly type: StepType;
192
192
  readonly tool: string;
193
193
  readonly toolDetails: ToolDetails;
194
194
  readonly action: StepAction;
195
195
  readonly estimate: StepEstimate;
196
- readonly includedSteps: Step[] | null;
196
+ readonly includedSteps: Step$1[] | null;
197
197
  readonly relatedSteps: string[] | null;
198
198
  }
199
199
  interface ProviderMetadata {
@@ -235,7 +235,7 @@ interface Route {
235
235
  readonly tags: string[];
236
236
  readonly feeCosts: FeeCost[];
237
237
  readonly gasCosts: GasCost[];
238
- readonly steps: Step[];
238
+ readonly steps: Step$1[];
239
239
  readonly transactionRequest?: UnsignedTransaction | undefined;
240
240
  readonly providerMetadata: ProviderMetadata;
241
241
  readonly riskFactors: RiskFactors | null;
@@ -272,53 +272,76 @@ type RoutesResponse = readonly Route[];
272
272
  * Defines the core request and response types for the transactions endpoint.
273
273
  */
274
274
 
275
+ declare enum TransactionStatus {
276
+ BRIDGED = "BRIDGED",
277
+ LEAF_INCLUDED = "LEAF_INCLUDED",
278
+ READY_TO_CLAIM = "READY_TO_CLAIM",
279
+ CLAIMED = "CLAIMED",
280
+ REFUND_IN_PROGRESS = "REFUND_IN_PROGRESS",
281
+ REFUNDED = "REFUNDED",
282
+ FAILED = "FAILED"
283
+ }
284
+ interface Token {
285
+ name: string;
286
+ symbol: string;
287
+ decimals: number;
288
+ logoURI: string;
289
+ }
290
+ interface SendingToken extends Token {
291
+ originTokenAddress: string;
292
+ originTokenNetwork: number | null;
293
+ }
294
+ interface ReceivingToken extends Token {
295
+ tokenAddress: string;
296
+ }
297
+ interface IntermediateToken extends Token {
298
+ tokenAddress: string;
299
+ }
300
+ interface Network {
301
+ chainId: number;
302
+ networkId: number | null;
303
+ }
304
+ interface Step {
305
+ txHash: string;
306
+ network: Network;
307
+ timestamp: number;
308
+ amount: string;
309
+ amountUSD: string;
310
+ includedSteps: unknown[];
311
+ }
312
+ interface SendingStep extends Step {
313
+ token: SendingToken;
314
+ }
315
+ interface ReceivingStep extends Step {
316
+ token: ReceivingToken;
317
+ }
318
+ interface IntermediateStep extends Step {
319
+ token: IntermediateToken;
320
+ }
275
321
  interface Transaction {
276
322
  id: string;
277
323
  transactionHash: string;
278
- bridgeHash: string | null;
279
324
  protocols: string[];
280
325
  status: string;
281
- timestamp: number;
282
326
  fromAddress: string;
283
327
  toAddress: string;
284
- sending: {
285
- txHash: string;
286
- network: {
287
- chainId: number;
288
- networkId: number | null;
289
- };
290
- timestamp: number;
291
- token: {
292
- originTokenAddress: string;
293
- originTokenNetwork: number | null;
294
- };
295
- amount: string;
296
- includedSteps: unknown[] | null;
297
- };
298
- receiving: {
299
- txHash: string | null;
300
- network: {
301
- chainId: number;
302
- networkId: number | null;
303
- };
304
- timestamp: number | null;
305
- amount: string;
306
- tokenAddress: string;
307
- } | null;
308
- leafType: string | null;
309
- depositCount: number | null;
310
- transactionIndex: number | null;
311
- blockNumber: number | null;
312
- leafIndex: number | null;
328
+ sending: SendingStep;
329
+ receiving: ReceivingStep | null;
330
+ intermediateSteps: IntermediateStep[];
331
+ transactionHashes: string[];
313
332
  metadata: {
314
333
  integrator: string | null;
315
334
  feeCosts: unknown[] | null;
335
+ leafType: string | null;
336
+ depositCount: number | null;
316
337
  };
338
+ lastUpdatedAt: number;
317
339
  }
318
340
  interface TransactionsRequestQueryParams {
319
341
  readonly address?: string;
320
- readonly sourceNetworkIds?: string;
321
- readonly destinationNetworkIds?: string;
342
+ readonly sourceChainIds?: number[];
343
+ readonly destinationChainIds?: number[];
344
+ readonly statuses?: TransactionStatus[];
322
345
  readonly limit?: number;
323
346
  readonly startAfter?: number;
324
347
  }
@@ -334,7 +357,7 @@ interface PaginatedTransactionsResponse {
334
357
  * Defines the core request and response types for the built transaction endpoint.
335
358
  */
336
359
 
337
- type BuildTransactionRequestBody = Step;
360
+ type BuildTransactionRequestBody = Step$1;
338
361
  type BuildTransactionResponse = UnsignedTransaction;
339
362
 
340
363
  /**
@@ -1030,4 +1053,4 @@ declare class AggLayerSDK {
1030
1053
  getNative(): NativeClient;
1031
1054
  }
1032
1055
 
1033
- 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 LiFiBridge, type LiFiFeeCost, type LiFiMetadata, type LiFiStatusRequestParams, type LiFiStatusResponse, type LiFiStep, type LiFiToken, type LiFiTransaction, type LiFiTransferStatus, type LiFiTransferSubstatus, 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 UnsignedTransaction, type WrappedTokenParams };
1056
+ 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 LiFiBridge, type LiFiFeeCost, type LiFiMetadata, type LiFiStatusRequestParams, type LiFiStatusResponse, type LiFiStep, type LiFiToken, type LiFiTransaction, type LiFiTransferStatus, type LiFiTransferSubstatus, 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$1 as 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, TransactionStatus, type TransactionsRequestQueryParams, type TransactionsResponse, type UnsignedTransaction, type WrappedTokenParams };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agglayer/sdk",
3
- "version": "1.0.0-beta.25",
3
+ "version": "1.0.0-beta.27",
4
4
  "description": "AggLayer SDK for ARC API and blockchain interactions",
5
5
  "publishConfig": {
6
6
  "access": "public"