@cryptorubic/web3 0.9.0-alpha-exolix.0 → 0.9.0-alpha.0

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/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@cryptorubic/web3",
3
- "version": "0.9.0-alpha-exolix.0",
3
+ "version": "0.9.0-alpha.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0",
6
6
  "bignumber.js": "9.1.2",
7
- "@cryptorubic/core": "0.9.0-alpha-exolix.0",
7
+ "@cryptorubic/core": "0.9.0-alpha.0",
8
8
  "viem": "^2.19.1",
9
- "web3-utils": "^4.3.1",
10
9
  "@ton/ton": "^15.1.0",
11
10
  "@solana/web3.js": "1.95.3",
12
11
  "@solflare-wallet/utl-sdk": "^1.4.0",
13
12
  "@ethersproject/bignumber": "^5.7.0",
14
- "@cryptorubic/tron-types": "0.9.0-alpha-exolix.0",
13
+ "@cryptorubic/tron-types": "0.9.0-alpha.0",
15
14
  "bitcoin-address-validation": "^2.2.3",
16
15
  "axios": "0.27.2",
17
16
  "crc-32": "^1.2.2",
18
17
  "tronweb": "^6.0.0-beta.4",
19
18
  "@solana/spl-token": "0.2.0",
20
19
  "@mysten/sui": "^1.24.0",
21
- "@suiet/wallet-sdk": "^0.3.3"
20
+ "@suiet/wallet-sdk": "^0.3.3",
21
+ "web3-utils": "4.3.3"
22
22
  },
23
23
  "type": "commonjs",
24
24
  "main": "./src/index.js",
@@ -1,2 +1,2 @@
1
- import { AbiItem } from 'web3-utils';
1
+ import { AbiItem } from '../../../utils/models/abi-types';
2
2
  export declare const TRON_MULTICALL_ABI: AbiItem[];
@@ -1,6 +1,6 @@
1
1
  import { Abi, MulticallResponse, MulticallParameters } from 'viem';
2
2
  import { AbstractAdapter } from './abstract-adapter';
3
- import { AddressLookupTableAccount, Connection, TransactionInstruction, VersionedTransaction } from '@solana/web3.js';
3
+ import { AddressLookupTableAccount, Connection, PublicKey, TransactionInstruction, VersionedTransaction } from '@solana/web3.js';
4
4
  import { HttpClient, ICustomLogger, PriceTokenAmount, SolanaBlockchainName, Token, TokenAmount } from '@cryptorubic/core';
5
5
  import { EvmTransactionConfig } from '../../utils/models/evm-transaction-config';
6
6
  import BigNumber from 'bignumber.js';
@@ -27,4 +27,5 @@ export declare class SolanaAdapter extends AbstractAdapter<Connection, Connectio
27
27
  parseRawInstruction(rawInstruction: SolanaRawInstruction[], dataFormat: BufferEncoding): TransactionInstruction[];
28
28
  parseLUTAddresses(lookupTableAddresses: string[]): Promise<AddressLookupTableAccount[]>;
29
29
  createVersionedTransaction(instructions: TransactionInstruction[], walletAddress: string, addressLookupTableAccounts?: AddressLookupTableAccount[]): Promise<VersionedTransaction>;
30
+ getAtaAddress(walletAddress: string, tokenAddress: string): Promise<PublicKey>;
30
31
  }
@@ -121,5 +121,8 @@ class SolanaAdapter extends abstract_adapter_1.AbstractAdapter {
121
121
  }).compileToV0Message(addressLookupTableAccounts);
122
122
  return new web3_js_1.VersionedTransaction(message);
123
123
  }
124
+ getAtaAddress(walletAddress, tokenAddress) {
125
+ return (0, spl_token_1.getAssociatedTokenAddress)(new web3_js_1.PublicKey(tokenAddress), new web3_js_1.PublicKey(walletAddress));
126
+ }
124
127
  }
125
128
  exports.SolanaAdapter = SolanaAdapter;