@mainnet-cash/bcmr 2.7.33 → 3.0.0-next.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/src/Bcmr.test.ts
CHANGED
|
@@ -185,7 +185,7 @@ describe(`Test BCMR support`, () => {
|
|
|
185
185
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
186
186
|
|
|
187
187
|
const response = await alice.send([
|
|
188
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
188
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
189
189
|
opreturnData,
|
|
190
190
|
]);
|
|
191
191
|
const authChain = await BCMR.buildAuthChain({
|
|
@@ -205,7 +205,7 @@ describe(`Test BCMR support`, () => {
|
|
|
205
205
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
206
206
|
|
|
207
207
|
const response = await alice.send([
|
|
208
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
208
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
209
209
|
opreturnData,
|
|
210
210
|
]);
|
|
211
211
|
await expect(
|
|
@@ -226,7 +226,7 @@ describe(`Test BCMR support`, () => {
|
|
|
226
226
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
227
227
|
|
|
228
228
|
const response = await alice.send([
|
|
229
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
229
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
230
230
|
opreturnData,
|
|
231
231
|
]);
|
|
232
232
|
const chain = await BCMR.buildAuthChain({
|
|
@@ -260,7 +260,7 @@ describe(`Test BCMR support`, () => {
|
|
|
260
260
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
261
261
|
|
|
262
262
|
const response = await alice.send([
|
|
263
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
263
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
264
264
|
opreturnData,
|
|
265
265
|
]);
|
|
266
266
|
const chain = await BCMR.buildAuthChain({
|
|
@@ -294,7 +294,7 @@ describe(`Test BCMR support`, () => {
|
|
|
294
294
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
295
295
|
|
|
296
296
|
const response = await alice.send([
|
|
297
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
297
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
298
298
|
opreturnData,
|
|
299
299
|
]);
|
|
300
300
|
const chain = await BCMR.buildAuthChain({
|
|
@@ -325,7 +325,7 @@ describe(`Test BCMR support`, () => {
|
|
|
325
325
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
326
326
|
|
|
327
327
|
const response = await alice.send([
|
|
328
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
328
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
329
329
|
opreturnData,
|
|
330
330
|
]);
|
|
331
331
|
const chain = await BCMR.buildAuthChain({
|
|
@@ -355,7 +355,7 @@ describe(`Test BCMR support`, () => {
|
|
|
355
355
|
];
|
|
356
356
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
357
357
|
const response = await alice.send([
|
|
358
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
358
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
359
359
|
opreturnData,
|
|
360
360
|
]);
|
|
361
361
|
const chain = await BCMR.buildAuthChain({
|
|
@@ -386,7 +386,7 @@ describe(`Test BCMR support`, () => {
|
|
|
386
386
|
)
|
|
387
387
|
);
|
|
388
388
|
const response = await alice.send([
|
|
389
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
389
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 1000n }),
|
|
390
390
|
opreturnData,
|
|
391
391
|
]);
|
|
392
392
|
await BCMR.buildAuthChain({
|
|
@@ -408,7 +408,7 @@ describe(`Test BCMR support`, () => {
|
|
|
408
408
|
];
|
|
409
409
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
410
410
|
const response = await alice.send([
|
|
411
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
411
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 10000n }),
|
|
412
412
|
opreturnData,
|
|
413
413
|
]);
|
|
414
414
|
|
|
@@ -481,7 +481,7 @@ describe(`Test BCMR support`, () => {
|
|
|
481
481
|
];
|
|
482
482
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
483
483
|
const response = await alice.send([
|
|
484
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
484
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 10000n }),
|
|
485
485
|
opreturnData,
|
|
486
486
|
]);
|
|
487
487
|
if (mineCombo[0]) await mine({ cashaddr: alice.cashaddr!, blocks: 1 });
|
|
@@ -490,7 +490,7 @@ describe(`Test BCMR support`, () => {
|
|
|
490
490
|
"mainnet.cash/.well-known/bitcoin-cash-metadata-registry_v2.json";
|
|
491
491
|
const opreturnData2 = OpReturnData.fromArray(chunks);
|
|
492
492
|
const response2 = await bob.send([
|
|
493
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
493
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 9500n }),
|
|
494
494
|
opreturnData2,
|
|
495
495
|
]);
|
|
496
496
|
if (mineCombo[1]) await mine({ cashaddr: alice.cashaddr!, blocks: 1 });
|
|
@@ -501,8 +501,7 @@ describe(`Test BCMR support`, () => {
|
|
|
501
501
|
const response3 = await bob.send([
|
|
502
502
|
new SendRequest({
|
|
503
503
|
cashaddr: charlie.cashaddr!,
|
|
504
|
-
value:
|
|
505
|
-
unit: "sat",
|
|
504
|
+
value: 900n,
|
|
506
505
|
}),
|
|
507
506
|
opreturnData3,
|
|
508
507
|
]);
|
|
@@ -600,7 +599,7 @@ describe(`Test BCMR support`, () => {
|
|
|
600
599
|
];
|
|
601
600
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
602
601
|
const response = await alice.send([
|
|
603
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
602
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 10000n }),
|
|
604
603
|
opreturnData,
|
|
605
604
|
]);
|
|
606
605
|
|
|
@@ -622,7 +621,7 @@ describe(`Test BCMR support`, () => {
|
|
|
622
621
|
];
|
|
623
622
|
const opreturnData2 = OpReturnData.fromArray(chunks);
|
|
624
623
|
const response2 = await bob.send([
|
|
625
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
624
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 9500n }),
|
|
626
625
|
opreturnData2,
|
|
627
626
|
]);
|
|
628
627
|
|
|
@@ -647,7 +646,7 @@ describe(`Test BCMR support`, () => {
|
|
|
647
646
|
];
|
|
648
647
|
const opreturnData3 = OpReturnData.fromArray(chunks);
|
|
649
648
|
const response3 = await bob.send([
|
|
650
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
649
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 9000n }),
|
|
651
650
|
opreturnData3,
|
|
652
651
|
]);
|
|
653
652
|
|
|
@@ -667,7 +666,7 @@ describe(`Test BCMR support`, () => {
|
|
|
667
666
|
];
|
|
668
667
|
const opreturnData4 = OpReturnData.fromArray(chunks);
|
|
669
668
|
const response4 = await bob.send([
|
|
670
|
-
new SendRequest({ cashaddr: bob.cashaddr!, value:
|
|
669
|
+
new SendRequest({ cashaddr: bob.cashaddr!, value: 8500n }),
|
|
671
670
|
opreturnData4,
|
|
672
671
|
]);
|
|
673
672
|
|
|
@@ -822,7 +821,7 @@ describe(`Test BCMR support`, () => {
|
|
|
822
821
|
const opreturnData = OpReturnData.fromArray(chunks);
|
|
823
822
|
|
|
824
823
|
const response = await alice.send([
|
|
825
|
-
new SendRequest({ cashaddr: alice.cashaddr!, value:
|
|
824
|
+
new SendRequest({ cashaddr: alice.cashaddr!, value: 3000n }),
|
|
826
825
|
opreturnData,
|
|
827
826
|
]);
|
|
828
827
|
const chain = await BCMR.buildAuthChain({
|
|
@@ -843,8 +842,7 @@ describe(`Test BCMR support`, () => {
|
|
|
843
842
|
[
|
|
844
843
|
new SendRequest({
|
|
845
844
|
cashaddr: alice.cashaddr!,
|
|
846
|
-
value:
|
|
847
|
-
unit: "sat",
|
|
845
|
+
value: 2000n,
|
|
848
846
|
}),
|
|
849
847
|
],
|
|
850
848
|
{ utxoIds: [`${response.txId}:0:3000`] }
|
|
@@ -854,8 +852,7 @@ describe(`Test BCMR support`, () => {
|
|
|
854
852
|
[
|
|
855
853
|
new SendRequest({
|
|
856
854
|
cashaddr: alice.cashaddr!,
|
|
857
|
-
value:
|
|
858
|
-
unit: "sat",
|
|
855
|
+
value: 1000n,
|
|
859
856
|
}),
|
|
860
857
|
opreturnData,
|
|
861
858
|
],
|