mainnet-js 3.0.1 → 3.1.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/dist/index.html +1 -1
- package/dist/{mainnet-3.0.1.js → mainnet-3.1.1.js} +5 -5
- package/dist/module/history/getHistory.js +10 -10
- package/dist/module/history/getHistory.js.map +1 -1
- package/dist/module/network/ElectrumNetworkProvider.d.ts +7 -3
- package/dist/module/network/ElectrumNetworkProvider.d.ts.map +1 -1
- package/dist/module/network/ElectrumNetworkProvider.js +51 -25
- package/dist/module/network/ElectrumNetworkProvider.js.map +1 -1
- package/dist/module/network/NetworkProvider.d.ts +14 -6
- package/dist/module/network/NetworkProvider.d.ts.map +1 -1
- package/dist/module/network/index.d.ts +1 -1
- package/dist/module/network/index.d.ts.map +1 -1
- package/dist/module/network/interface.d.ts +4 -3
- package/dist/module/network/interface.d.ts.map +1 -1
- package/dist/module/wallet/Base.d.ts.map +1 -1
- package/dist/module/wallet/Base.js +1 -2
- package/dist/module/wallet/Base.js.map +1 -1
- package/dist/module/wallet/HDWallet.d.ts +8 -0
- package/dist/module/wallet/HDWallet.d.ts.map +1 -1
- package/dist/module/wallet/HDWallet.js +28 -0
- package/dist/module/wallet/HDWallet.js.map +1 -1
- package/dist/module/wallet/Util.d.ts +5 -3
- package/dist/module/wallet/Util.d.ts.map +1 -1
- package/dist/module/wallet/Util.js +28 -22
- package/dist/module/wallet/Util.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/history/getHistory.ts +15 -15
- package/src/network/ElectrumNetworkProvider.ts +105 -39
- package/src/network/NetworkProvider.ts +44 -6
- package/src/network/index.ts +5 -1
- package/src/network/interface.ts +8 -3
- package/src/wallet/Base.ts +1 -4
- package/src/wallet/HDWallet.test.ts +239 -0
- package/src/wallet/HDWallet.ts +36 -0
- package/src/wallet/Util.test.ts +56 -6
- package/src/wallet/Util.ts +67 -46
- package/src/wallet/Wif.test.ts +3 -9
package/src/wallet/Wif.test.ts
CHANGED
|
@@ -995,9 +995,7 @@ describe(`Wallet extrema behavior regression testing`, () => {
|
|
|
995
995
|
OpReturnData.from("MEMO\x10LÖL😅"),
|
|
996
996
|
{ cashaddr: wallet.cashaddr!, value: 546n },
|
|
997
997
|
]);
|
|
998
|
-
transaction =
|
|
999
|
-
result.txId!
|
|
1000
|
-
)) as ElectrumRawTransaction;
|
|
998
|
+
transaction = await wallet.provider!.getRawTransactionObject(result.txId!);
|
|
1001
999
|
expect(transaction.vout[0].scriptPubKey.asm).toContain("OP_RETURN");
|
|
1002
1000
|
expect(transaction.vout[0].scriptPubKey.hex.slice(4)).toBe(
|
|
1003
1001
|
binToHex(utf8ToBin("MEMO\x10LÖL😅"))
|
|
@@ -1007,9 +1005,7 @@ describe(`Wallet extrema behavior regression testing`, () => {
|
|
|
1007
1005
|
[wallet.cashaddr!, 546n],
|
|
1008
1006
|
["OP_RETURN", Uint8Array.from([0x00, 0x01, 0x02])],
|
|
1009
1007
|
]);
|
|
1010
|
-
transaction =
|
|
1011
|
-
result.txId!
|
|
1012
|
-
)) as ElectrumRawTransaction;
|
|
1008
|
+
transaction = await wallet.provider!.getRawTransactionObject(result.txId!);
|
|
1013
1009
|
expect(transaction.vout[1].scriptPubKey.asm).toContain("OP_RETURN");
|
|
1014
1010
|
expect([
|
|
1015
1011
|
...hexToBin(transaction.vout[1].scriptPubKey.hex.slice(4)),
|
|
@@ -1019,9 +1015,7 @@ describe(`Wallet extrema behavior regression testing`, () => {
|
|
|
1019
1015
|
OpReturnData.from(""),
|
|
1020
1016
|
OpReturnData.from(Uint8Array.from([])),
|
|
1021
1017
|
]);
|
|
1022
|
-
transaction =
|
|
1023
|
-
result.txId!
|
|
1024
|
-
)) as ElectrumRawTransaction;
|
|
1018
|
+
transaction = await wallet.provider!.getRawTransactionObject(result.txId!);
|
|
1025
1019
|
expect(transaction.vout[0].scriptPubKey.asm).toContain("OP_RETURN");
|
|
1026
1020
|
expect([...hexToBin(transaction.vout[0].scriptPubKey.hex)]).toStrictEqual([
|
|
1027
1021
|
0x6a, 0x00,
|