@swapkit/core 4.4.49 → 4.5.1
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 +17 -0
- package/dist/types/index.d.ts +39 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @swapkit/core
|
|
2
2
|
|
|
3
|
+
## 4.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#331](https://github.com/swapkit/sdk/pull/331) [`f740a74`](https://github.com/swapkit/sdk/commit/f740a742a0cf879b4e56bb73647d21642bc22e9d) Thanks [@towanTG](https://github.com/towanTG)! - Add client-side support for the Stellar trustline approval flow: swap response types model the `approvalTx` union (EVM | Stellar changeTrust XDR) and `nextActions`, `approveAssetValue`/`isAssetValueApproved` switch between EVM allowances and Stellar trustlines (checking via the new Stellar toolbox `hasTrustline({ address, assetValue })`, approving by signing the API-provided changeTrust XDR with the destination wallet). The swap method itself is unchanged — integrators approve first, re-fetch the route, then swap. (via @swapkit/helpers@4.19.0)
|
|
8
|
+
- Update generated token lists. (via @swapkit/helpers@4.19.0)
|
|
9
|
+
- [#329](https://github.com/swapkit/sdk/pull/329) [`55d9edc`](https://github.com/swapkit/sdk/commit/55d9edcc603e0139588c905e41a59eaaa3275cda) Thanks [@towanTG](https://github.com/towanTG)! - Update NEAR provider token list: add Stellar assets (XLM.XLM, XLM.USDC) and latest NEAR-intents listings (SWEAT, GMX, KAITO, AAVE, LINK, UNI, and more); remove BTC.BTC(OMNI) (via @swapkit/helpers@4.19.0)
|
|
10
|
+
|
|
11
|
+
## 4.5.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#319](https://github.com/swapkit/sdk/pull/319) [`67445d1`](https://github.com/swapkit/sdk/commit/67445d13c963492bbe4283f098b959de010ed0a7) Thanks [@towanTG](https://github.com/towanTG)! - Add Aleo chain metadata, assets, public-balance support, HD derivation, public transfers, fee estimates, broadcasting, transaction status, and keystore/server registration.
|
|
16
|
+
- [#328](https://github.com/swapkit/sdk/pull/328) [`0794dd0`](https://github.com/swapkit/sdk/commit/0794dd0d92a4ab1808c42069d483b91e5ae35f4a) Thanks [@towanTG](https://github.com/towanTG)! - Aleo review follow-up: surface `splitTransactionId` in unshield failure errors so an interrupted unshield is resumable, treat a 404 on the serial-number lookup as the authoritative unspent answer across RPC failover, filter record extraction to `credits.aleo` in `getRecords`, reject toolbox params carrying both a phrase and an external signer (`toolbox_aleo_conflicting_signers`), validate `feeRecordCredits`, and throw a clear `toolbox_aleo_no_rpc_urls` error when no RPC URL is configured. (via @swapkit/toolboxes@4.25.0)
|
|
17
|
+
- [#325](https://github.com/swapkit/sdk/pull/325) [`88aa0cc`](https://github.com/swapkit/sdk/commit/88aa0cc308af1010e5632a7fd9136e43ddbed6a4) Thanks [@paz-ts](https://github.com/paz-ts)! - toSignificant no longer corrupts values with long decimal parts: leading zeros are stripped as a string instead of through Number.parseInt, whose float round-trip rendered full-precision balances on 24-decimal chains like NEAR with two decimal points ("0.0003.2238") and silently lost digits past 2^53 on 18-decimal chains. (via @swapkit/toolboxes@4.25.0)
|
|
18
|
+
- Update generated token lists. (via @swapkit/toolboxes@4.25.0)
|
|
19
|
+
|
|
3
20
|
## 4.4.49
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -212,6 +212,41 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
212
212
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, sweep, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
213
213
|
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
214
214
|
};
|
|
215
|
+
ALEO: ChainWallet<Chain.Aleo> & {
|
|
216
|
+
broadcastTransaction: (transaction: import("@swapkit/toolboxes/aleo/types").AleoTransaction) => Promise<string>;
|
|
217
|
+
createSigner: (phrase: string, derivationPath?: import("@swapkit/helpers").DerivationPathArray) => import("@swapkit/toolboxes/aleo/types").AleoChainSigner;
|
|
218
|
+
createTransaction: ({ assetValue, priorityFee, recipient, sender }: import("@swapkit/toolboxes/aleo/types").AleoCreateTransactionParams) => Promise<{
|
|
219
|
+
functionName: "transfer_public";
|
|
220
|
+
inputs: [string, string];
|
|
221
|
+
priorityFee: number;
|
|
222
|
+
programName: string;
|
|
223
|
+
sender: string;
|
|
224
|
+
}>;
|
|
225
|
+
estimateTransactionFee: ({ assetValue, priorityFee }: import("@swapkit/toolboxes/aleo/types").AleoTransferParams) => AssetValue;
|
|
226
|
+
getAddress: () => Promise<string>;
|
|
227
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
228
|
+
getBalanceFromRpc: (address: string) => Promise<AssetValue[]>;
|
|
229
|
+
getBalances: () => Promise<AssetValue[]>;
|
|
230
|
+
getBalanceWithFallback: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
231
|
+
getRecords: ({ transactionIds }: {
|
|
232
|
+
transactionIds: string[];
|
|
233
|
+
}) => Promise<import("@swapkit/toolboxes/aleo/types").AleoRecord[]>;
|
|
234
|
+
getShieldedBalance: ({ transactionIds }: {
|
|
235
|
+
transactionIds: string[];
|
|
236
|
+
}) => Promise<AssetValue>;
|
|
237
|
+
signAndBroadcastTransaction: (transaction: import("@swapkit/toolboxes/aleo/types").AleoUnsignedTransaction) => Promise<string>;
|
|
238
|
+
signTransaction: (transaction: import("@swapkit/toolboxes/aleo/types").AleoUnsignedTransaction) => Promise<import("@swapkit/toolboxes/aleo/types").AleoTransaction>;
|
|
239
|
+
transfer: (params: import("@swapkit/toolboxes/aleo/types").AleoTransferParams) => Promise<string>;
|
|
240
|
+
unshield: ({ transactionId, feeRecordCredits, }: {
|
|
241
|
+
transactionId: string;
|
|
242
|
+
feeRecordCredits?: number;
|
|
243
|
+
}) => Promise<{
|
|
244
|
+
publicBalance: AssetValue;
|
|
245
|
+
splitTransactionId: string | undefined;
|
|
246
|
+
unshieldTransactionId: string;
|
|
247
|
+
}>;
|
|
248
|
+
validateAddress: typeof import("@swapkit/toolboxes/aleo/helpers").validateAleoAddress;
|
|
249
|
+
};
|
|
215
250
|
APT: ChainWallet<Chain.Aptos> & {
|
|
216
251
|
broadcastTransaction: ({ senderAuthenticator, transaction, }: {
|
|
217
252
|
senderAuthenticator: Awaited<ReturnType<(transaction: Awaited<ReturnType<({ recipient, assetValue, maxGasAmount, sender: _senderAddress, sweep, }: import("@swapkit/toolboxes/aptos/types").AptosCreateTransactionParams) => Promise<import("@aptos-labs/ts-sdk").SimpleTransaction>>>) => Promise<import("@aptos-labs/ts-sdk").AccountAuthenticator>>>;
|
|
@@ -4895,6 +4930,10 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
4895
4930
|
estimateTransactionFee: () => Promise<AssetValue>;
|
|
4896
4931
|
getAddress: () => Promise<string>;
|
|
4897
4932
|
getBalance: (checkAddress?: string) => Promise<AssetValue[]>;
|
|
4933
|
+
hasTrustline: ({ address, assetValue }: {
|
|
4934
|
+
address: string;
|
|
4935
|
+
assetValue: AssetValue;
|
|
4936
|
+
}) => Promise<boolean>;
|
|
4898
4937
|
signAndBroadcastTransaction: (transaction: {
|
|
4899
4938
|
toXDR: () => string;
|
|
4900
4939
|
}) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-dev",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/helpers": "4.
|
|
5
|
-
"@swapkit/plugins": "4.
|
|
6
|
-
"@swapkit/toolboxes": "4.
|
|
7
|
-
"@swapkit/wallet-core": "4.3.
|
|
4
|
+
"@swapkit/helpers": "4.19.0",
|
|
5
|
+
"@swapkit/plugins": "4.7.0",
|
|
6
|
+
"@swapkit/toolboxes": "4.26.0",
|
|
7
|
+
"@swapkit/wallet-core": "4.3.18"
|
|
8
8
|
},
|
|
9
9
|
"description": "SwapKit - Core",
|
|
10
10
|
"devDependencies": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"type-check:go": "tsgo"
|
|
37
37
|
},
|
|
38
38
|
"type": "module",
|
|
39
|
-
"version": "4.
|
|
39
|
+
"version": "4.5.1"
|
|
40
40
|
}
|