@yerofey/cryptowallet-cli 1.30.0 → 1.31.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/README.md +1 -1
- package/package.json +3 -2
- package/src/Method.js +1 -1
- package/src/Wallet.js +21 -3
package/README.md
CHANGED
|
@@ -277,7 +277,7 @@ If you find this tool useful and would like to support its development, consider
|
|
|
277
277
|
- BNB (BEP20): `0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8`
|
|
278
278
|
- BNB (BEP2): `bnb1gtxfz4kllltaeekw3edfd496gpa3ukpakvzncq`
|
|
279
279
|
- SOL: `CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju`
|
|
280
|
-
- TON: `
|
|
280
|
+
- TON: `UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0`
|
|
281
281
|
- DOGE (DOGE): `DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh`
|
|
282
282
|
|
|
283
283
|
**Other Donate Options:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yerofey/cryptowallet-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"description": "Crypto wallet generator CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/yerofey/cryptowallet-cli",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"type": "ton",
|
|
36
|
-
"url": "ton://transfer/
|
|
36
|
+
"url": "ton://transfer/UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"type": "dogecoin",
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
"@harmony-js/account": "^0.1.58",
|
|
108
108
|
"@solana/web3.js": "^1.90.0",
|
|
109
109
|
"@ton/crypto": "^3.2.0",
|
|
110
|
+
"@ton/ton": "^15.0.0",
|
|
110
111
|
"@yerofey/dogecoin-bip84": "^0.0.5",
|
|
111
112
|
"@yerofey/litecoin-bip84": "^0.0.5",
|
|
112
113
|
"bip39": "3.1.0",
|
package/src/Method.js
CHANGED
|
@@ -574,7 +574,7 @@ class Method {
|
|
|
574
574
|
- BTC: bc1qcwamquntxshqsjcra6vryftrfd9z57j02g3ywq
|
|
575
575
|
- ETH: 0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8
|
|
576
576
|
- SOL: CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju
|
|
577
|
-
- TON:
|
|
577
|
+
- TON: UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0
|
|
578
578
|
- DOGE: DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh
|
|
579
579
|
|
|
580
580
|
Donate via PayPal:
|
package/src/Wallet.js
CHANGED
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
mnemonicValidate as TonValidateMnemonic,
|
|
35
35
|
mnemonicNew as newTonMnemonic,
|
|
36
36
|
} from '@ton/crypto';
|
|
37
|
+
import { WalletContractV5R1 } from '@ton/ton';
|
|
37
38
|
|
|
38
39
|
config();
|
|
39
40
|
|
|
@@ -499,21 +500,38 @@ class Wallet {
|
|
|
499
500
|
}
|
|
500
501
|
const keyPair = await TonMnemonicToPrivateKey(mnemonics);
|
|
501
502
|
const tonweb = new TonWeb();
|
|
502
|
-
// TODO: add support for different formats (simpleR1, simpleR2, simpleR3, v2R1, v2R2, v3R1, v3R2, v4R1, v4R2)
|
|
503
503
|
const WalletClass = tonweb.wallet.all.v4R2;
|
|
504
504
|
const wallet = new WalletClass(tonweb.provider, keyPair);
|
|
505
505
|
const address = await wallet.getAddress();
|
|
506
506
|
const nonBounceableAddress = address.toString(true, true, false);
|
|
507
507
|
const bouncableAddress = address.toString(true, true, true);
|
|
508
508
|
|
|
509
|
+
// w5
|
|
510
|
+
const workchain = 0;
|
|
511
|
+
const walletV5 = WalletContractV5R1.create({
|
|
512
|
+
workchain,
|
|
513
|
+
publicKey: keyPair.publicKey,
|
|
514
|
+
});
|
|
515
|
+
const v5Address = walletV5.address;
|
|
516
|
+
const nonBounceableV5Address = v5Address.toString({
|
|
517
|
+
bounceable: false,
|
|
518
|
+
urlSafe: true, // (UQ)
|
|
519
|
+
testOnly: false,
|
|
520
|
+
});
|
|
521
|
+
|
|
509
522
|
Object.assign(result, {
|
|
510
523
|
addresses: [
|
|
511
524
|
{
|
|
512
|
-
title: 'UQ format (new): best for wallets, - non-bounceable',
|
|
525
|
+
title: 'V5R1: UQ format (new): best for wallets, - non-bounceable',
|
|
526
|
+
address: nonBounceableV5Address,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
title: 'V4R2: UQ format (new): best for wallets, - non-bounceable',
|
|
513
530
|
address: nonBounceableAddress,
|
|
514
531
|
},
|
|
515
532
|
{
|
|
516
|
-
title:
|
|
533
|
+
title:
|
|
534
|
+
'V4R2: EQ format (old): best for smart contracts, - bounceable',
|
|
517
535
|
address: bouncableAddress,
|
|
518
536
|
},
|
|
519
537
|
],
|