@atomiqlabs/chain-solana 13.5.8 → 13.5.10

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.
@@ -21,6 +21,10 @@ exports.SolanaChains = {
21
21
  v1: {
22
22
  swapContract: "4hfUykhqmD7ZRvNh1HuzVKEY7ToENixtdUKZspNDCrEM",
23
23
  btcRelayContract: "3KHSHFpEK6bsjg3bqcxQ9qssJYtRCMi2S9TYVe4q6CQc"
24
+ },
25
+ v2: {
26
+ swapContract: "atq2FYuvww5EF6qeB28gj9tkao6Ld9mEGUzF4M93cCC",
27
+ btcRelayContract: "btc2WHkrjoZU9xzFJupDCmMaUTRHyYTzJE25LvEi9Ls"
24
28
  }
25
29
  },
26
30
  clusterName: "devnet"
@@ -35,7 +35,9 @@ class SolanaDataAccount extends SolanaSwapModule_1.SolanaSwapModule {
35
35
  * @private
36
36
  */
37
37
  async InitDataAccount(signer, accountKey, dataLength) {
38
- const accountSize = 32 + dataLength;
38
+ const accountSize = this.program.version === "v2"
39
+ ? 40 + dataLength
40
+ : 32 + dataLength;
39
41
  const lamportsDeposit = await this.connection.getMinimumBalanceForRentExemption(accountSize);
40
42
  return new SolanaAction_1.SolanaAction(signer, this.root, [
41
43
  web3_js_1.SystemProgram.createAccount({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-solana",
3
- "version": "13.5.8",
3
+ "version": "13.5.10",
4
4
  "description": "Solana specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -22,6 +22,10 @@ export const SolanaChains: {[key in BitcoinNetwork]?: {
22
22
  v1: {
23
23
  swapContract: "4hfUykhqmD7ZRvNh1HuzVKEY7ToENixtdUKZspNDCrEM",
24
24
  btcRelayContract: "3KHSHFpEK6bsjg3bqcxQ9qssJYtRCMi2S9TYVe4q6CQc"
25
+ },
26
+ v2: {
27
+ swapContract: "atq2FYuvww5EF6qeB28gj9tkao6Ld9mEGUzF4M93cCC",
28
+ btcRelayContract: "btc2WHkrjoZU9xzFJupDCmMaUTRHyYTzJE25LvEi9Ls"
25
29
  }
26
30
  },
27
31
  clusterName: "devnet"
@@ -64,7 +64,9 @@ export class SolanaDataAccount extends SolanaSwapModule {
64
64
  accountKey: Signer,
65
65
  dataLength: number
66
66
  ): Promise<SolanaAction> {
67
- const accountSize = 32+dataLength;
67
+ const accountSize = this.program.version==="v2"
68
+ ? 40+dataLength
69
+ : 32+dataLength;
68
70
  const lamportsDeposit = await this.connection.getMinimumBalanceForRentExemption(accountSize);
69
71
 
70
72
  return new SolanaAction(signer, this.root, [