@atomiqlabs/chain-evm 1.0.0-dev.88 → 1.0.0-dev.89

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.
@@ -72,7 +72,7 @@ export declare class EVMBtcRelay<B extends BtcBlock> extends EVMContractBase<Btc
72
72
  }, requiredBlockheight?: number): Promise<{
73
73
  header: EVMBtcStoredHeader;
74
74
  height: number;
75
- } | null>;
75
+ }>;
76
76
  /**
77
77
  * Retrieves blockheader data by blockheader's commit hash,
78
78
  *
@@ -150,7 +150,7 @@ export declare class EVMSwapContract<ChainId extends string = string> extends EV
150
150
  txid: string;
151
151
  hex: string;
152
152
  height: number;
153
- }, requiredConfirmations: number, vout: number, commitedHeader?: EVMBtcStoredHeader, synchronizer?: RelaySynchronizer<EVMBtcStoredHeader, EVMTx, any>, initAta?: boolean, feeRate?: string): Promise<EVMTx[] | null>;
153
+ }, requiredConfirmations: number, vout: number, commitedHeader?: EVMBtcStoredHeader, synchronizer?: RelaySynchronizer<EVMBtcStoredHeader, EVMTx, any>, initAta?: boolean, feeRate?: string): Promise<EVMTx[]>;
154
154
  txsRefund(signer: string, swapData: EVMSwapData, check?: boolean, initAta?: boolean, feeRate?: string): Promise<EVMTx[]>;
155
155
  txsRefundWithAuthorization(signer: string, swapData: EVMSwapData, { timeout, prefix, signature }: {
156
156
  timeout: any;
@@ -45,7 +45,7 @@ export declare class EVMSwapClaim extends EVMSwapModule {
45
45
  txid: string;
46
46
  hex: string;
47
47
  height: number;
48
- }, requiredConfirmations: number, vout: number, commitedHeader?: EVMBtcStoredHeader, synchronizer?: RelaySynchronizer<EVMBtcStoredHeader, EVMTx, any>, feeRate?: string): Promise<EVMTx[] | null>;
48
+ }, requiredConfirmations: number, vout: number, commitedHeader?: EVMBtcStoredHeader, synchronizer?: RelaySynchronizer<EVMBtcStoredHeader, EVMTx, any>, feeRate?: string): Promise<EVMTx[]>;
49
49
  getClaimGas(swapData: EVMSwapData): number;
50
50
  /**
51
51
  * Get the estimated starknet transaction fee of the claim transaction
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-evm",
3
- "version": "1.0.0-dev.88",
3
+ "version": "1.0.0-dev.89",
4
4
  "description": "EVM specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@atomiqlabs/base": "^10.0.0-dev.10",
27
27
  "@noble/hashes": "^1.8.0",
28
- "@scure/btc-signer": "1.6.0",
28
+ "@scure/btc-signer": "^1.6.0",
29
29
  "buffer": "6.0.3",
30
30
  "promise-cache-ts": "0.0.7",
31
31
  "promise-queue-ts": "1.0.0"
@@ -255,7 +255,7 @@ export class EVMBtcRelay<B extends BtcBlock>
255
255
  public async retrieveLogAndBlockheight(blockData: {blockhash: string}, requiredBlockheight?: number): Promise<{
256
256
  header: EVMBtcStoredHeader,
257
257
  height: number
258
- } | null> {
258
+ }> {
259
259
  //TODO: we can fetch the blockheight and events in parallel
260
260
  const blockHeight = await this.getBlockHeight();
261
261
  if(requiredBlockheight!=null && blockHeight < requiredBlockheight) {
@@ -420,7 +420,7 @@ export class EVMSwapContract<ChainId extends string = string>
420
420
  synchronizer?: RelaySynchronizer<EVMBtcStoredHeader, EVMTx, any>,
421
421
  initAta?: boolean,
422
422
  feeRate?: string
423
- ): Promise<EVMTx[] | null> {
423
+ ): Promise<EVMTx[]> {
424
424
  return this.Claim.txsClaimWithTxData(
425
425
  typeof(signer)==="string" ? signer : signer.getAddress(),
426
426
  swapData,
@@ -102,7 +102,7 @@ export class EVMSwapClaim extends EVMSwapModule {
102
102
  commitedHeader?: EVMBtcStoredHeader,
103
103
  synchronizer?: RelaySynchronizer<EVMBtcStoredHeader, EVMTx, any>,
104
104
  feeRate?: string
105
- ): Promise<EVMTx[] | null> {
105
+ ): Promise<EVMTx[]> {
106
106
  const claimHandler: IClaimHandler<any, BitcoinOutputWitnessData | BitcoinWitnessData> = this.contract.claimHandlersByAddress[swapData.claimHandler.toLowerCase()];
107
107
  if(claimHandler==null) throw new SwapDataVerificationError("Unknown claim handler!");
108
108
  if(