@sodax/sdk 1.5.0-beta → 1.5.2-beta

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/dist/index.d.cts CHANGED
@@ -9384,7 +9384,7 @@ declare class InjectiveBaseSpokeProvider {
9384
9384
  readonly endpoints: NetworkEndpoints;
9385
9385
  constructor(chainConfig: InjectiveSpokeChainConfig);
9386
9386
  getState(): Promise<State>;
9387
- getBalance(token: String): Promise<number>;
9387
+ getBalance(token: string): Promise<number>;
9388
9388
  getRawTransaction(chainId: string, _: string, senderAddress: string, contractAddress: string, msg: JsonObject, memo?: string): Promise<InjectiveRawTransaction>;
9389
9389
  send_message<S extends InjectiveSpokeProviderType, R extends boolean = false>(sender: string, dst_chain_id: string, dst_address: Hex, payload: Hex, spokeProvider: S, raw?: R): Promise<TxReturnType<InjectiveSpokeProviderType, R>>;
9390
9390
  }
@@ -10217,7 +10217,7 @@ declare class InjectiveSpokeService {
10217
10217
  * @param {InjectiveSpokeProviderType} spokeProvider - The spoke provider.
10218
10218
  * @returns {Promise<bigint>} The balance of the token.
10219
10219
  */
10220
- static getDeposit(token: String, spokeProvider: InjectiveSpokeProviderType): Promise<bigint>;
10220
+ static getDeposit(token: string, spokeProvider: InjectiveSpokeProviderType): Promise<bigint>;
10221
10221
  /**
10222
10222
  * Calls a contract on the spoke chain using the user's wallet.
10223
10223
  * @param {HubAddress} from - The address of the user on the hub chain.
package/dist/index.d.ts CHANGED
@@ -9384,7 +9384,7 @@ declare class InjectiveBaseSpokeProvider {
9384
9384
  readonly endpoints: NetworkEndpoints;
9385
9385
  constructor(chainConfig: InjectiveSpokeChainConfig);
9386
9386
  getState(): Promise<State>;
9387
- getBalance(token: String): Promise<number>;
9387
+ getBalance(token: string): Promise<number>;
9388
9388
  getRawTransaction(chainId: string, _: string, senderAddress: string, contractAddress: string, msg: JsonObject, memo?: string): Promise<InjectiveRawTransaction>;
9389
9389
  send_message<S extends InjectiveSpokeProviderType, R extends boolean = false>(sender: string, dst_chain_id: string, dst_address: Hex, payload: Hex, spokeProvider: S, raw?: R): Promise<TxReturnType<InjectiveSpokeProviderType, R>>;
9390
9390
  }
@@ -10217,7 +10217,7 @@ declare class InjectiveSpokeService {
10217
10217
  * @param {InjectiveSpokeProviderType} spokeProvider - The spoke provider.
10218
10218
  * @returns {Promise<bigint>} The balance of the token.
10219
10219
  */
10220
- static getDeposit(token: String, spokeProvider: InjectiveSpokeProviderType): Promise<bigint>;
10220
+ static getDeposit(token: string, spokeProvider: InjectiveSpokeProviderType): Promise<bigint>;
10221
10221
  /**
10222
10222
  * Calls a contract on the spoke chain using the user's wallet.
10223
10223
  * @param {HubAddress} from - The address of the user on the hub chain.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getAbiItem, defineChain, encodeAbiParameters, parseAbiParameters, createPublicClient, http, fromHex, encodeFunctionData, erc20Abi as erc20Abi$1, toHex, encodePacked, parseEventLogs, keccak256, decodeAbiParameters, isAddress, maxUint160, maxUint48 } from 'viem';
2
2
  import { kaia, redbellyMainnet, mainnet, lightlinkPhoenix, polygon, bsc, optimism, base, arbitrum, avalanche, sonic } from 'viem/chains';
3
3
  import invariant6 from 'tiny-invariant';
4
- import { ChainGrpcWasmApi, TxGrpcApi, toBase64, fromBase64, MsgExecuteContract, createTransactionForAddressAndMsg } from '@injectivelabs/sdk-ts';
4
+ import { ChainGrpcWasmApi, TxGrpcApi, toBase64, fromBase64, MsgExecuteContract, createTransactionForAddressAndMsg, CosmosTxV1Beta1TxPb } from '@injectivelabs/sdk-ts';
5
5
  import { getNetworkEndpoints, Network } from '@injectivelabs/networks';
6
6
  import * as IconSdkRaw from 'icon-sdk-js';
7
7
  import { PublicKey, TransactionInstruction, Connection, TransactionMessage, VersionedTransaction, SystemProgram, ComputeBudgetProgram } from '@solana/web3.js';
@@ -12,7 +12,6 @@ import { Transaction } from '@mysten/sui/transactions';
12
12
  import { SorobanRpc, Account, Horizon, Contract, TransactionBuilder, BASE_FEE, nativeToScVal, TimeoutInfinite, rpc, scValToBigInt, Address, Operation, Asset, FeeBumpTransaction } from '@stellar/stellar-sdk';
13
13
  import BigNumber4, { BigNumber } from 'bignumber.js';
14
14
  import { CLPositionManagerAbi, encodeCLPositionManagerMintCalldata, encodeCLPositionManagerIncreaseLiquidityCalldata, encodeCLPositionManagerDecreaseLiquidityCalldata, getPoolId, CLPoolManagerAbi, decodePoolKey } from '@pancakeswap/infinity-sdk';
15
- import { CosmosTxV1Beta1Tx } from '@injectivelabs/core-proto-ts';
16
15
  import * as rlp from 'rlp';
17
16
  import * as anchor from '@coral-xyz/anchor';
18
17
  import BN from 'bn.js';
@@ -8714,7 +8713,7 @@ var universalRouterAbi = [
8714
8713
  ];
8715
8714
 
8716
8715
  // ../types/dist/constants/index.js
8717
- var CONFIG_VERSION = 35;
8716
+ var CONFIG_VERSION = 37;
8718
8717
  var AVALANCHE_MAINNET_CHAIN_ID = "0xa86a.avax";
8719
8718
  var ARBITRUM_MAINNET_CHAIN_ID = "0xa4b1.arbitrum";
8720
8719
  var BASE_MAINNET_CHAIN_ID = "0x2105.base";
@@ -22633,7 +22632,7 @@ var InjectiveSpokeService = class _InjectiveSpokeService {
22633
22632
  * @returns {Promise<InjectiveGasEstimate>} The estimated gas for the transaction.
22634
22633
  */
22635
22634
  static async estimateGas(rawTx, spokeProvider) {
22636
- const txRaw = CosmosTxV1Beta1Tx.TxRaw.fromPartial({
22635
+ const txRaw = CosmosTxV1Beta1TxPb.TxRaw.fromPartial({
22637
22636
  bodyBytes: rawTx.signedDoc.bodyBytes,
22638
22637
  authInfoBytes: rawTx.signedDoc.authInfoBytes,
22639
22638
  signatures: []
@@ -34931,7 +34930,6 @@ var AssetService = class {
34931
34930
  calls.push(EvmVaultTokenService.encodeWithdraw(assetConfig.vault, assetConfig.asset, vaultAmount));
34932
34931
  const translatedAmount = EvmVaultTokenService.translateIncomingDecimals(assetConfig.decimal, vaultAmount);
34933
34932
  if (dstChainId === this.hubProvider.chainConfig.chain.id) {
34934
- calls.push(Erc20Service.encodeTransfer(assetConfig.asset, recipient, translatedAmount));
34935
34933
  if (assetConfig.asset.toLowerCase() === this.configService.spokeChainConfig[dstChainId].addresses.wrappedSonic.toLowerCase()) {
34936
34934
  const withdrawToCall = {
34937
34935
  address: assetConfig.asset,