@swapkit/core 4.4.38 → 4.4.40

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @swapkit/core
2
2
 
3
+ ## 4.4.40
4
+
5
+ ### Patch Changes
6
+
7
+ - [#290](https://github.com/swapkit/sdk/pull/290) [`4e7d2d7`](https://github.com/swapkit/sdk/commit/4e7d2d72b4c1254d16a8a6084843bd49d0795b3b) Thanks [@olegpetroveth](https://github.com/olegpetroveth)! - Add TON native balance sweep. `createTransaction`/`transfer` accept a `sweep` flag that sets the `CARRY_ALL_REMAINING_BALANCE | IGNORE_ERRORS` send mode so the wallet sends its full balance minus fees. `TONTransactionMessage` gains an optional `sendMode` override (read per-transfer from the first message by `sign`/`estimateTransactionFee`). Sweep is native-only; jetton sweeps throw. (via @swapkit/toolboxes@4.19.0)
8
+
9
+ ## 4.4.39
10
+
11
+ ### Patch Changes
12
+
13
+ - [#288](https://github.com/swapkit/sdk/pull/288) [`3172029`](https://github.com/swapkit/sdk/commit/3172029e6349e82b128719a640604ef89e4645ab) Thanks [@ice-chillios](https://github.com/ice-chillios)! - Add Linea (`59144`) and Plasma (`9745`) EVM chains: chain/chainId enums, chain configs, and EVM toolbox wiring. (via @swapkit/toolboxes@4.18.0)
14
+ - [#247](https://github.com/swapkit/sdk/pull/247) [`f3888bf`](https://github.com/swapkit/sdk/commit/f3888bf4695cdef3353557f2494034acc178c67d) Thanks [@ice-chillios](https://github.com/ice-chillios)! - Bump `@aptos-labs/ts-sdk` from 1.34.0 to 7.0.1. v7 is ESM-only and requires Node 22+. Adds two `AptosConfig` parameters required by v7: `network: Network.MAINNET` (custom endpoints now require an explicit network) and `clientConfig: { http2: false }` (Bun's HTTP/2 client isn't mature; v7 warns at construction otherwise). No public API change in our usage. (via @swapkit/toolboxes@4.18.0)
15
+ - [#247](https://github.com/swapkit/sdk/pull/247) [`f3888bf`](https://github.com/swapkit/sdk/commit/f3888bf4695cdef3353557f2494034acc178c67d) Thanks [@ice-chillios](https://github.com/ice-chillios)! - Bump `@polkadot/api`, `@polkadot/rpc-provider`, `@polkadot/types` from 15.10.2 to 16.5.6. Also moves `@polkadot/types` from a hard-pin in `toolboxes/package.json` to the root catalog. Public API unchanged in our usage. v16's Metadata v16 surface-renames (`signedExtensions` → `transactionExtensions`) live inside `api.runtimeMetadata.asV*` which we do not touch. (via @swapkit/toolboxes@4.18.0)
16
+ - [#247](https://github.com/swapkit/sdk/pull/247) [`f3888bf`](https://github.com/swapkit/sdk/commit/f3888bf4695cdef3353557f2494034acc178c67d) Thanks [@ice-chillios](https://github.com/ice-chillios)! - Bump `@polkadot/keyring`, `@polkadot/util`, `@polkadot/util-crypto` from 13.5.7 to 14.0.3. sr25519 implementation now uses pure-JS `micro-sr25519` instead of WASM, shrinking the substrate bundle. Public API unchanged; `cryptoWaitReady()` remains required for ed25519/secp256k1 paths. (via @swapkit/toolboxes@4.18.0)
17
+ - [#247](https://github.com/swapkit/sdk/pull/247) [`f3888bf`](https://github.com/swapkit/sdk/commit/f3888bf4695cdef3353557f2494034acc178c67d) Thanks [@ice-chillios](https://github.com/ice-chillios)! - Bump `@mysten/sui` from 1.44.0 to 2.17.0. The JSON-RPC entry moved from `@mysten/sui/client` to `@mysten/sui/jsonRpc` and `SuiClient` was renamed to `SuiJsonRpcClient` (aliased locally so no public type changes). `network` is now a mandatory `SuiJsonRpcClient` option. Adds a regression test asserting that built transactions carry a non-empty expiration, guarding against silent reversion of v2's epoch+1 default. (via @swapkit/toolboxes@4.18.0)
18
+ - [#287](https://github.com/swapkit/sdk/pull/287) [`19133e3`](https://github.com/swapkit/sdk/commit/19133e3c212cb0a8854698dc041b5487b9790175) Thanks [@ochhii1337](https://github.com/ochhii1337)! - Allow handling for hex strings in Tron toolbox memos (via @swapkit/toolboxes@4.18.0)
19
+
3
20
  ## 4.4.38
4
21
 
5
22
  ### Patch Changes
@@ -1547,6 +1547,51 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1547
1547
  }) => Promise<string>;
1548
1548
  validateAddress: (address: string) => boolean;
1549
1549
  };
1550
+ LINEA: ChainWallet<Chain.Linea> & {
1551
+ approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
1552
+ approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
1553
+ broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
1554
+ call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
1555
+ createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
1556
+ createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
1557
+ createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
1558
+ createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
1559
+ createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
1560
+ EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
1561
+ estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
1562
+ estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
1563
+ assetValue: import("@swapkit/helpers").AssetValue;
1564
+ funcName?: string;
1565
+ funcParams?: unknown[];
1566
+ txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
1567
+ data?: string;
1568
+ }) => Promise<bigint>;
1569
+ estimateGasPrices: () => Promise<{ [key_2 in FeeOption]: {
1570
+ l1GasPrice?: bigint;
1571
+ gasPrice?: bigint;
1572
+ maxFeePerGas?: bigint;
1573
+ maxPriorityFeePerGas?: bigint;
1574
+ }; }>;
1575
+ estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
1576
+ feeOption: FeeOption;
1577
+ }) => Promise<import("@swapkit/helpers").AssetValue>;
1578
+ getAddress: () => string | Promise<string> | undefined;
1579
+ getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
1580
+ getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
1581
+ isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
1582
+ sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
1583
+ feeOptionKey?: FeeOption;
1584
+ }) => Promise<string>;
1585
+ signAuthorization: ((params: {
1586
+ address: string;
1587
+ nonce?: number | bigint;
1588
+ chainId?: bigint;
1589
+ }) => Promise<import("ethers").Authorization>) | undefined;
1590
+ signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1591
+ signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
1592
+ transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
1593
+ validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
1594
+ };
1550
1595
  MAYA: ChainWallet<Chain.Maya> & import("@swapkit/toolboxes/cosmos").ThorchainWallet;
1551
1596
  MEGAETH: ChainWallet<Chain.MegaETH> & {
1552
1597
  approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
@@ -1759,6 +1804,51 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
1759
1804
  transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
1760
1805
  validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
1761
1806
  };
1807
+ XPL: ChainWallet<Chain.Plasma> & {
1808
+ approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
1809
+ approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
1810
+ broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
1811
+ call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
1812
+ createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
1813
+ createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
1814
+ createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
1815
+ createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
1816
+ createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
1817
+ EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
1818
+ estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
1819
+ estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
1820
+ assetValue: import("@swapkit/helpers").AssetValue;
1821
+ funcName?: string;
1822
+ funcParams?: unknown[];
1823
+ txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
1824
+ data?: string;
1825
+ }) => Promise<bigint>;
1826
+ estimateGasPrices: () => Promise<{ [key_2 in FeeOption]: {
1827
+ l1GasPrice?: bigint;
1828
+ gasPrice?: bigint;
1829
+ maxFeePerGas?: bigint;
1830
+ maxPriorityFeePerGas?: bigint;
1831
+ }; }>;
1832
+ estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
1833
+ feeOption: FeeOption;
1834
+ }) => Promise<import("@swapkit/helpers").AssetValue>;
1835
+ getAddress: () => string | Promise<string> | undefined;
1836
+ getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
1837
+ getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
1838
+ isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
1839
+ sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
1840
+ feeOptionKey?: FeeOption;
1841
+ }) => Promise<string>;
1842
+ signAuthorization: ((params: {
1843
+ address: string;
1844
+ nonce?: number | bigint;
1845
+ chainId?: bigint;
1846
+ }) => Promise<import("ethers").Authorization>) | undefined;
1847
+ signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
1848
+ signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
1849
+ transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
1850
+ validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
1851
+ };
1762
1852
  DOT: ChainWallet<Chain.Polkadot> & {
1763
1853
  broadcast: (tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
1764
1854
  convertAddress: (address: string, newPrefix: number) => string;
@@ -2001,6 +2091,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2001
2091
  broadcastTransaction: (transferCell: import("@ton/ton/dist").Cell) => Promise<string>;
2002
2092
  createTransaction: ({ sender, ...params }: GenericTransferParams & {
2003
2093
  sender?: string;
2094
+ sweep?: boolean;
2004
2095
  }) => Promise<import("@swapkit/toolboxes/ton/types").TONTransactionMessage[]>;
2005
2096
  estimateTransactionFee: ({ sender, ...params }: GenericTransferParams & {
2006
2097
  sender?: string;
@@ -2013,7 +2104,9 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
2013
2104
  }) => Promise<import("@ton/ton/dist").Address>;
2014
2105
  sign: (messages: import("@swapkit/toolboxes/ton/types").TONTransactionMessage[]) => Promise<import("@ton/ton/dist").Cell>;
2015
2106
  signAndBroadcastTransaction: (messages: import("@swapkit/toolboxes/ton/types").TONTransactionMessage[]) => Promise<string>;
2016
- transfer: ({ assetValue, recipient, memo }: GenericTransferParams) => Promise<string>;
2107
+ transfer: ({ assetValue, recipient, memo, sweep }: GenericTransferParams & {
2108
+ sweep?: boolean;
2109
+ }) => Promise<string>;
2017
2110
  validateAddress: typeof import("@swapkit/toolboxes/ton/toolbox").validateTonAddress;
2018
2111
  };
2019
2112
  TRON: ChainWallet<Chain.Tron> & {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "author": "swapkit-dev",
3
3
  "dependencies": {
4
- "@swapkit/helpers": "4.15.0",
5
- "@swapkit/plugins": "4.6.52",
6
- "@swapkit/toolboxes": "4.17.6",
7
- "@swapkit/wallet-core": "4.3.7"
4
+ "@swapkit/helpers": "4.15.1",
5
+ "@swapkit/plugins": "4.6.54",
6
+ "@swapkit/toolboxes": "4.19.0",
7
+ "@swapkit/wallet-core": "4.3.8"
8
8
  },
9
9
  "description": "SwapKit - Core",
10
10
  "devDependencies": { "@stricahq/typhonjs": "3.1.0", "cosmjs-types": "0.11.0", "ts-pattern": "5.9.0" },
@@ -26,5 +26,5 @@
26
26
  "type-check:go": "tsgo"
27
27
  },
28
28
  "type": "module",
29
- "version": "4.4.38"
29
+ "version": "4.4.40"
30
30
  }