@skip-go/client 0.14.2 → 0.14.4

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
@@ -376,6 +376,7 @@ type TransferEvent = {
376
376
  } | {
377
377
  goFastTransfer: GoFastTransferInfo;
378
378
  };
379
+ type CallbackStatus = 'success' | 'error' | 'pending' | 'completed';
379
380
  interface TransactionCallbacks {
380
381
  onTransactionSigned?: (txInfo: {
381
382
  txHash: string;
@@ -394,7 +395,11 @@ interface TransactionCallbacks {
394
395
  onValidateGasBalance?: (value: {
395
396
  chainID?: string;
396
397
  txIndex?: number;
397
- status: 'success' | 'error' | 'pending' | 'completed';
398
+ status: CallbackStatus;
399
+ }) => Promise<void>;
400
+ onApproveAllowance?: (value: {
401
+ allowance?: ERC20Approval;
402
+ status: CallbackStatus;
398
403
  }) => Promise<void>;
399
404
  }
400
405
 
@@ -1842,10 +1847,11 @@ declare class SkipClient {
1842
1847
  stargateClient: SigningStargateClient;
1843
1848
  signer: OfflineSigner;
1844
1849
  }): Promise<_cosmjs_cosmwasm_stargate.DeliverTxResponse>;
1845
- executeEVMTransaction({ message, signer, onTransactionSigned, }: {
1850
+ executeEVMTransaction({ message, signer, onTransactionSigned, onApproveAllowance, }: {
1846
1851
  message: EvmTx;
1847
1852
  signer: WalletClient;
1848
- onTransactionSigned?: ExecuteRouteOptions['onTransactionSigned'];
1853
+ onTransactionSigned?: TransactionCallbacks['onTransactionSigned'];
1854
+ onApproveAllowance?: TransactionCallbacks['onApproveAllowance'];
1849
1855
  }): Promise<viem.TransactionReceipt>;
1850
1856
  executeSVMTransaction({ signer, message, onTransactionSigned, }: {
1851
1857
  signer: Adapter;
@@ -1955,7 +1961,6 @@ declare class SkipClient {
1955
1961
  }) => Promise<void>;
1956
1962
  }): Promise<TxStatusResponse>;
1957
1963
  venues(onlyTestnets?: boolean): Promise<SwapVenue[]>;
1958
- getCosmsosGasAmountForMessage(client: SigningStargateClient, signerAddress: string, chainID: string, cosmosMessages: CosmosMsg[]): Promise<string>;
1959
1964
  getAccountNumberAndSequence(address: string, chainID: string): Promise<{
1960
1965
  accountNumber: number;
1961
1966
  sequence: number;
@@ -1965,7 +1970,6 @@ declare class SkipClient {
1965
1970
  private getAccountNumberAndSequenceInjective;
1966
1971
  getRpcEndpointForChain(chainID: string): Promise<string>;
1967
1972
  getRestEndpointForChain(chainID: string): Promise<string>;
1968
- getCosmosFeeForMessage(chainID: string, msgs: CosmosMsg[], gasAmountMultiplier: number | undefined, client: SigningStargateClient, signer?: OfflineSigner, gasPrice?: GasPrice): Promise<StdFee>;
1969
1973
  getRecommendedGasPrice(chainID: string): Promise<GasPrice | undefined>;
1970
1974
  getFeeInfoForChain(chainID: string): Promise<FeeAsset | undefined>;
1971
1975
  private getDefaultGasTokenForChain;
@@ -1981,13 +1985,18 @@ declare class SkipClient {
1981
1985
  * Validate gas balance for cosmos messages returns a fee asset and StdFee to be used
1982
1986
  *
1983
1987
  */
1984
- validateCosmosGasBalance({ chainID, signerAddress, client, messages, getFallbackGasAmount, }: {
1988
+ validateCosmosGasBalance({ chainID, signerAddress, client, messages, getFallbackGasAmount, txIndex, }: {
1985
1989
  chainID: string;
1986
1990
  signerAddress: string;
1987
1991
  client: SigningStargateClient;
1988
1992
  messages?: CosmosMsg[];
1989
1993
  getFallbackGasAmount?: GetFallbackGasAmount;
1994
+ txIndex?: number;
1990
1995
  }): Promise<{
1996
+ error: string;
1997
+ asset?: undefined;
1998
+ fee?: undefined;
1999
+ } | {
1991
2000
  error: string;
1992
2001
  asset: FeeAsset;
1993
2002
  fee?: undefined;