nexa-wallet-sdk 0.5.2 → 0.5.3
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.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.web.mjs +5 -3
- package/dist/index.web.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -149,7 +149,7 @@ $parcel$export(module.exports, "SighashType", () => $l50U0$libnexats.SighashType
|
|
|
149
149
|
$parcel$export(module.exports, "AccountKeysUtils", () => $4d68f29c39c1a3e4$export$94f569bf4eb0f6f6);
|
|
150
150
|
// @ts-ignore
|
|
151
151
|
var $2dd241e44b9dc3c2$exports = {};
|
|
152
|
-
$2dd241e44b9dc3c2$exports = JSON.parse("{\"name\":\"nexa-wallet-sdk\",\"version\":\"0.5.
|
|
152
|
+
$2dd241e44b9dc3c2$exports = JSON.parse("{\"name\":\"nexa-wallet-sdk\",\"version\":\"0.5.3\",\"type\":\"module\",\"source\":\"src/index.ts\",\"types\":\"dist/index.d.ts\",\"main\":\"dist/index.cjs\",\"module\":\"dist/index.mjs\",\"browser\":\"dist/index.web.mjs\",\"exports\":{\"types\":\"./dist/index.d.ts\",\"node\":{\"import\":\"./dist/index.mjs\",\"require\":\"./dist/index.cjs\"},\"browser\":\"./dist/index.web.mjs\",\"default\":\"./dist/index.mjs\"},\"scripts\":{\"build\":\"parcel build\",\"lint\":\"eslint .\",\"fix-lint\":\"eslint --fix .\",\"dev\":\"parcel watch\",\"test\":\"vitest run\",\"clean\":\"rm -rf dist .parcel-cache\",\"docs\":\"typedoc\",\"docs:serve\":\"typedoc && npx serve docs -l 8080\",\"docs:mkdocs\":\"typedoc && mkdocs serve\",\"docs:build\":\"typedoc && mkdocs build\",\"docs:setup\":\"./scripts/setup-docs.sh\",\"wallet-cli\":\"node examples/wallet-cli.cjs\"},\"repository\":{\"type\":\"git\",\"url\":\"git+ssh://git@gitlab.com/nexa/wallet-sdk-ts.git\"},\"keywords\":[\"nexa\",\"wallet\",\"web3\",\"crypto\",\"dapp\",\"walletcomms\",\"walletsdk\"],\"contributors\":[{\"name\":\"Dolaned\"},{\"name\":\"Griffith\"},{\"name\":\"Vgrunner\"},{\"name\":\"myendy\"}],\"author\":\"Dolaned\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://gitlab.com/nexa/wallet-sdk-ts/issues\"},\"homepage\":\"https://gitlab.com/nexa/wallet-sdk-ts#readme\",\"description\":\"Wallet SDK for the Nexa blockchain\",\"devDependencies\":{\"@parcel/packager-ts\":\"^2.15.4\",\"@parcel/transformer-typescript-types\":\"^2.15.4\",\"@types/lodash-es\":\"^4.17.12\",\"@types/node\":\"^22.13.1\",\"eslint\":\"^9.20.1\",\"parcel\":\"^2.15.4\",\"typedoc\":\"^0.28.7\",\"typedoc-plugin-markdown\":\"^4.7.0\",\"typedoc-plugin-rename-defaults\":\"^0.7.3\",\"typescript\":\"^5.8.3\",\"typescript-eslint\":\"^8.24.1\",\"vitest\":\"^3.0.8\"},\"targets\":{\"main\":{\"context\":\"node\",\"outputFormat\":\"commonjs\",\"distDir\":\"dist\",\"isLibrary\":true,\"includeNodeModules\":[\"lodash-es\"]},\"module\":{\"context\":\"node\",\"outputFormat\":\"esmodule\",\"distDir\":\"dist\",\"isLibrary\":true},\"browser\":{\"context\":\"browser\",\"outputFormat\":\"esmodule\",\"distDir\":\"dist\",\"isLibrary\":true}},\"dependencies\":{\"@vgrunner/electrum-cash\":\"^2.0.12\",\"bip39\":\"^3.1.0\",\"js-big-decimal\":\"^2.2.0\",\"libnexa-ts\":\"^1.0.5\",\"lodash-es\":\"^4.17.21\",\"prompt-sync\":\"^4.2.0\",\"wallet-comms-sdk\":\"^0.6.1\"},\"files\":[\"dist\"],\"directories\":{\"test\":\"tests\"},\"@parcel/resolver-default\":{\"packageExports\":true}}");
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
|
|
@@ -1659,7 +1659,7 @@ async function $b4a043612f1c4089$export$661377a8795b235c(txBuilder, keys, token,
|
|
|
1659
1659
|
// Preserve the melt authority for future use
|
|
1660
1660
|
if ((0, $l50U0$libnexats.GroupToken).allowsRenew(BigInt.asUintN(64, BigInt(utxo.token_amount)))) {
|
|
1661
1661
|
const authChangeAddress = keys.changeKeys.length > 0 ? keys.changeKeys[keys.changeKeys.length - 1].address : keys.receiveKeys[keys.receiveKeys.length - 1].address;
|
|
1662
|
-
txBuilder.to(authChangeAddress, (0, $l50U0$libnexats.Transaction).DUST_AMOUNT,
|
|
1662
|
+
txBuilder.to(authChangeAddress, (0, $l50U0$libnexats.Transaction).DUST_AMOUNT, authTokenId, (0, $22e282633cad8f97$export$636fb0b03b94ac81)(utxo.token_amount));
|
|
1663
1663
|
}
|
|
1664
1664
|
privateKeys.push(key.key.privateKey);
|
|
1665
1665
|
meltAuthorityFound = true;
|
|
@@ -3558,6 +3558,8 @@ async function $52632971edbdb934$export$cfda880a425a2203(txBuilder, addresses, t
|
|
|
3558
3558
|
satoshis: utxo.value
|
|
3559
3559
|
});
|
|
3560
3560
|
if (spentOutpoints) spentOutpoints.add(utxo.outpoint_hash);
|
|
3561
|
+
// Preserve the melt authority for future use if renewable
|
|
3562
|
+
if ((0, $l50U0$libnexats.GroupToken).allowsRenew(BigInt.asUintN(64, BigInt(utxo.token_amount)))) txBuilder.to(item.address, (0, $l50U0$libnexats.Transaction).DUST_AMOUNT, authTokenId, (0, $22e282633cad8f97$export$636fb0b03b94ac81)(utxo.token_amount));
|
|
3561
3563
|
usedAddresses.push(item.address);
|
|
3562
3564
|
meltAuthorityFound = true;
|
|
3563
3565
|
break;
|
|
@@ -3679,7 +3681,7 @@ class $2ce5b75d10954bb1$export$2e2bcd8739ae039 extends (0, $57b0117fe8233fef$exp
|
|
|
3679
3681
|
* Adds a token melting operation to the transaction
|
|
3680
3682
|
* @param token Token ID to melt
|
|
3681
3683
|
* @param amount Amount to melt
|
|
3682
|
-
* @param toAddr Destination address for melted tokens
|
|
3684
|
+
* @param toAddr Destination address for change of melted tokens
|
|
3683
3685
|
* @param parent Optional parent token ID (for NFT/SFT melting)
|
|
3684
3686
|
* @returns This instance for chaining
|
|
3685
3687
|
*/ melt(token, amount, toAddr, parent) {
|