@atomiqlabs/chain-starknet 4.0.0-dev.38 → 4.0.0-dev.39

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.
@@ -4,6 +4,7 @@ exports.StarknetTransactions = exports.isStarknetTxDeployAccount = exports.isSta
4
4
  const StarknetModule_1 = require("../StarknetModule");
5
5
  const starknet_1 = require("starknet");
6
6
  const Utils_1 = require("../../../utils/Utils");
7
+ const base_1 = require("@atomiqlabs/base");
7
8
  function isStarknetTxInvoke(obj) {
8
9
  return typeof (obj) === "object" &&
9
10
  typeof (obj.details) === "object" &&
@@ -124,7 +125,7 @@ class StarknetTransactions extends StarknetModule_1.StarknetModule {
124
125
  this.latestConfirmedNonces[(0, Utils_1.toHex)(tx.details.walletAddress)] = nextAccountNonce;
125
126
  }
126
127
  if (state === "reverted")
127
- throw new Error("Transaction reverted!");
128
+ throw new base_1.TransactionRevertedError("Transaction reverted!");
128
129
  return confirmedTxId;
129
130
  }
130
131
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-starknet",
3
- "version": "4.0.0-dev.38",
3
+ "version": "4.0.0-dev.39",
4
4
  "description": "Starknet specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "url": "git+https://github.com/atomiqlabs/atomiq-chain-starknet.git"
29
29
  },
30
30
  "dependencies": {
31
- "@atomiqlabs/base": "^10.0.0-dev.20",
31
+ "@atomiqlabs/base": "^10.0.0-dev.21",
32
32
  "@noble/hashes": "^1.7.1",
33
33
  "@scure/btc-signer": "^1.6.0",
34
34
  "abi-wan-kanabi": "2.2.4",
@@ -9,6 +9,7 @@ import {
9
9
  } from "starknet";
10
10
  import {StarknetSigner} from "../../wallet/StarknetSigner";
11
11
  import {timeoutPromise, toHex} from "../../../utils/Utils";
12
+ import {TransactionRevertedError} from "@atomiqlabs/base";
12
13
 
13
14
  export type StarknetTxBase = {
14
15
  details: InvocationsSignerDetails & {maxFee?: BigNumberish},
@@ -155,7 +156,7 @@ export class StarknetTransactions extends StarknetModule {
155
156
  if(currentConfirmedNonce==null || nextAccountNonce > currentConfirmedNonce) {
156
157
  this.latestConfirmedNonces[toHex(tx.details.walletAddress)] = nextAccountNonce;
157
158
  }
158
- if(state==="reverted") throw new Error("Transaction reverted!");
159
+ if(state==="reverted") throw new TransactionRevertedError("Transaction reverted!");
159
160
 
160
161
  return confirmedTxId;
161
162
  }