@atomiqlabs/chain-starknet 5.1.4 → 5.1.6

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.
@@ -3,7 +3,7 @@ import { StarknetFees } from "./chain/modules/StarknetFees";
3
3
  import { StarknetRetryPolicy } from "./chain/StarknetChainInterface";
4
4
  import { BaseTokenType, BitcoinNetwork, BitcoinRpc, ChainData, ChainInitializer, ChainSwapType } from "@atomiqlabs/base";
5
5
  import { StarknetChainType } from "./StarknetChainType";
6
- export type StarknetAssetsType = BaseTokenType<"ETH" | "STRK" | "WBTC">;
6
+ export type StarknetAssetsType = BaseTokenType<"ETH" | "STRK" | "WBTC" | "TBTC" | "_TESTNET_WBTC_VESU">;
7
7
  export declare const StarknetAssets: StarknetAssetsType;
8
8
  export type StarknetOptions = {
9
9
  rpcUrl: string | Provider;
@@ -28,11 +28,15 @@ exports.StarknetAssets = {
28
28
  address: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
29
29
  decimals: 8
30
30
  },
31
- // TBTC: {
32
- // address: "0x04daa17763b286d1e59b97c283C0b8C949994C361e426A28F743c67bDfE9a32f",
33
- // decimals: 18,
34
- // displayDecimals: 8
35
- // }
31
+ TBTC: {
32
+ address: "0x04daa17763b286d1e59b97c283C0b8C949994C361e426A28F743c67bDfE9a32f",
33
+ decimals: 18,
34
+ displayDecimals: 8
35
+ },
36
+ _TESTNET_WBTC_VESU: {
37
+ address: "0x04861ba938aed21f2cd7740acd3765ac4d2974783a3218367233de0153490cb6",
38
+ decimals: 8
39
+ }
36
40
  };
37
41
  function initializeStarknet(options, bitcoinRpc, network) {
38
42
  const provider = typeof (options.rpcUrl) === "string" ?
@@ -13,7 +13,7 @@ function starknetGasAdd(a, b) {
13
13
  }
14
14
  exports.starknetGasAdd = starknetGasAdd;
15
15
  class StarknetFees {
16
- constructor(provider, maxFeeRate = { l1GasCost: 1000000000000000n, l2GasCost: 1000000000000000n, l1DataGasCost: 1000000000000000n } /*100 * 10000 GWei*/, feeMultiplier = 1.25, da) {
16
+ constructor(provider, maxFeeRate = { l1GasCost: 20000000000000000n, l2GasCost: 4000000000000000n, l1DataGasCost: 10000000000000000n }, feeMultiplier = 1.25, da) {
17
17
  this.logger = (0, Utils_1.getLogger)("StarknetFees: ");
18
18
  this.blockFeeCache = null;
19
19
  this.provider = provider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-starknet",
3
- "version": "5.1.4",
3
+ "version": "5.1.6",
4
4
  "description": "Starknet specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -12,7 +12,7 @@ import {StarknetSpvVaultData} from "./spv_swap/StarknetSpvVaultData";
12
12
  import {StarknetSpvWithdrawalData} from "./spv_swap/StarknetSpvWithdrawalData";
13
13
  import {RpcProviderWithRetries} from "./provider/RpcProviderWithRetries";
14
14
 
15
- export type StarknetAssetsType = BaseTokenType<"ETH" | "STRK" | "WBTC">;
15
+ export type StarknetAssetsType = BaseTokenType<"ETH" | "STRK" | "WBTC" | "TBTC" | "_TESTNET_WBTC_VESU">;
16
16
  export const StarknetAssets: StarknetAssetsType = {
17
17
  ETH: {
18
18
  address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
@@ -28,11 +28,15 @@ export const StarknetAssets: StarknetAssetsType = {
28
28
  address: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
29
29
  decimals: 8
30
30
  },
31
- // TBTC: {
32
- // address: "0x04daa17763b286d1e59b97c283C0b8C949994C361e426A28F743c67bDfE9a32f",
33
- // decimals: 18,
34
- // displayDecimals: 8
35
- // }
31
+ TBTC: {
32
+ address: "0x04daa17763b286d1e59b97c283C0b8C949994C361e426A28F743c67bDfE9a32f",
33
+ decimals: 18,
34
+ displayDecimals: 8
35
+ },
36
+ _TESTNET_WBTC_VESU: {
37
+ address: "0x04861ba938aed21f2cd7740acd3765ac4d2974783a3218367233de0153490cb6",
38
+ decimals: 8
39
+ }
36
40
  } as const;
37
41
 
38
42
  export type StarknetOptions = {
@@ -41,7 +41,7 @@ export class StarknetFees {
41
41
 
42
42
  constructor(
43
43
  provider: Provider,
44
- maxFeeRate: StarknetFeeRate = {l1GasCost: 1_000_000_000_000_000n, l2GasCost: 1_000_000_000_000_000n, l1DataGasCost: 1_000_000_000_000_000n} /*100 * 10000 GWei*/,
44
+ maxFeeRate: StarknetFeeRate = {l1GasCost: 20_000_000_000_000_000n, l2GasCost: 4_000_000_000_000_000n, l1DataGasCost: 10_000_000_000_000_000n},
45
45
  feeMultiplier: number = 1.25,
46
46
  da?: {fee?: "L1" | "L2", nonce?: "L1" | "L2"}
47
47
  ) {