+9
-18
@@ -1,3 +1,4 @@
|
||||
import { Transaction } from '@xo/primitives';
|
||||
import { Blockchain, WalletHD } from '@xo/wallet';
|
||||
|
||||
const blockchain = new Blockchain(
|
||||
@@ -8,24 +9,6 @@ const blockchain = new Blockchain(
|
||||
|
||||
await blockchain.start();
|
||||
|
||||
console.log(
|
||||
await blockchain.request(
|
||||
'blockchain.address.get_history',
|
||||
'bitcoincash:qqyy3mss5vmthgnu0m5sm39pcfq8z799ku2nxernca',
|
||||
861_606,
|
||||
861_607
|
||||
)
|
||||
);
|
||||
|
||||
/*
|
||||
console.log(
|
||||
await blockchain.request(
|
||||
'blockchain.transaction.get',
|
||||
'da776b9c273ec406f7ecd488950216aa17a04018201298f263e2fcdb0b903d29'
|
||||
)
|
||||
);
|
||||
*/
|
||||
|
||||
const wallet = WalletHD.fromMnemonic(
|
||||
'harsh gospel job ordinary garden clay eight cactus replace general prison permit',
|
||||
blockchain
|
||||
@@ -33,4 +16,12 @@ const wallet = WalletHD.fromMnemonic(
|
||||
|
||||
await wallet.scan();
|
||||
|
||||
const transactions = wallet.getTransactions();
|
||||
|
||||
transactions.forEach((tx) => {
|
||||
blockchain.broadcastTransaction(tx);
|
||||
});
|
||||
|
||||
console.log(blockchain.pendingTransactions.deriveUtxoState());
|
||||
|
||||
console.log(wallet.privateKey());
|
||||
|
||||
Reference in New Issue
Block a user