@rash2x/bridge-widget 0.6.64 → 0.6.65

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.ts CHANGED
@@ -141,7 +141,7 @@ declare interface ChainStrategy {
141
141
  isAddressValid(address?: string): boolean;
142
142
  getAvailableConnections(): ChainConnectionState[];
143
143
  validateSteps(steps: TransactionStep[]): void;
144
- executeSteps(steps: TransactionStep[], context: TransactionStrategyContext, onFirstHash?: (hash: string) => void): Promise<TransactionResult>;
144
+ executeSteps(steps: TransactionStep[], context: TransactionStrategyContext, onStepComplete?: (hash: string, stepType: string, stepIndex: number, totalSteps: number) => void): Promise<TransactionResult>;
145
145
  getSourceCost?: (txHash: string) => Promise<SourceCost | null>;
146
146
  estimateNetworkFee: (steps: TransactionStep[]) => Promise<number>;
147
147
  convertMessageHashToTxHash?: (messageHash: string, timeoutMs?: number) => Promise<string | null>;
@@ -198,6 +198,11 @@ declare interface CurrentTransaction {
198
198
  errorParams?: Record<string, any>;
199
199
  monitorReceipt?: MonitorReceipt;
200
200
  metadata?: TransactionMetadata;
201
+ currentStep?: {
202
+ type: "approve" | "bridge";
203
+ index: number;
204
+ total: number;
205
+ };
201
206
  }
202
207
 
203
208
  /**
@@ -654,6 +659,7 @@ declare interface TransactionActions {
654
659
  setError: (errorCode: string, errorParams?: Record<string, any>) => void;
655
660
  updateActualFee: (feeValue: number, feeSymbol: string) => void;
656
661
  updateLayerZeroTotalFee: (feeValue: number, feeSymbol: string, feeUsd?: number) => void;
662
+ updateCurrentStep: (type: "approve" | "bridge", index: number, total: number) => void;
657
663
  reset: () => void;
658
664
  }
659
665
 
@@ -731,7 +737,7 @@ export declare const truncateToDecimals: (num: number, decimals: number) => stri
731
737
 
732
738
  export declare type TxStatus = "success" | "failed" | "timeout";
733
739
 
734
- declare type TxStatus_2 = "idle" | "pending" | "executing" | "processing" | "completed" | "failed" | "expired";
740
+ declare type TxStatus_2 = "idle" | "pending" | "executing" | "approving" | "processing" | "completed" | "failed" | "expired";
735
741
 
736
742
  export declare function useBridgeExternalData(options?: UseBridgeExternalDataOptions): BridgeExternalData;
737
743
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rash2x/bridge-widget",
3
- "version": "0.6.64",
3
+ "version": "0.6.65",
4
4
  "description": "Cross-chain bridge widget powered by Stargate Protocol with multi-chain wallet support",
5
5
  "type": "module",
6
6
  "main": "./dist/evaa-bridge.cjs",