Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/bitcon core support #6

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8873ce6
Fix: import from test-tools repository
RiccardoBiffi Dec 12, 2024
fbb6997
Merge branch 'feature/bitcon-core-support' of https://github.com/Ricc…
RiccardoBiffi Dec 12, 2024
2c4fdc9
Add package scripts
RiccardoBiffi Dec 13, 2024
deb9e0a
Rename balance test
RiccardoBiffi Dec 13, 2024
f009e87
Add Bitcoin Core provider
RiccardoBiffi Dec 13, 2024
3a169fd
Add tests and helpers
RiccardoBiffi Dec 13, 2024
532917e
Ignore package-lock.json
RiccardoBiffi Dec 13, 2024
e30d50b
WIP: update module exports
RiccardoBiffi Dec 13, 2024
5dee924
Format files
RiccardoBiffi Dec 16, 2024
21c42cc
Add unsubscribe functions
RiccardoBiffi Dec 16, 2024
be1c2ec
Renaming and formatting
RiccardoBiffi Dec 16, 2024
f231915
Add electrum tests
RiccardoBiffi Dec 16, 2024
c3bed5a
Add zmq module
RiccardoBiffi Dec 18, 2024
8ab3319
Add a subtest
RiccardoBiffi Dec 18, 2024
9e3abcb
Add bitcoin core subcriptions
RiccardoBiffi Dec 18, 2024
6029fb6
Add zmq in test helper
RiccardoBiffi Dec 18, 2024
ac9eb8d
Fix getTransaction
RiccardoBiffi Dec 18, 2024
5536b2d
Refactor getBalance to get confirmed and unconfirmed balances
RiccardoBiffi Dec 18, 2024
0fc0789
Refactor getAddressHistory and broadcastTransaction
RiccardoBiffi Dec 19, 2024
2b63ec0
Rename subscription methods
RiccardoBiffi Dec 19, 2024
6603f48
WIP: Add bitcoin-core tests
RiccardoBiffi Dec 19, 2024
1c524de
Fix socket management in bitcoin core
RiccardoBiffi Dec 19, 2024
9c8b021
Renaming variables
RiccardoBiffi Dec 20, 2024
2b90895
Remove unnecessary dependency
RiccardoBiffi Dec 20, 2024
a8b6608
Update test configuration
RiccardoBiffi Dec 20, 2024
49a5c08
Format file
RiccardoBiffi Dec 20, 2024
67a7584
Fix function call
RiccardoBiffi Dec 20, 2024
e5e7186
Add placeholder test
RiccardoBiffi Dec 20, 2024
595f86d
Remove unnecessary dependency
RiccardoBiffi Dec 20, 2024
ead872a
Cleanup
RiccardoBiffi Dec 20, 2024
85485d3
Rename variable
RiccardoBiffi Dec 20, 2024
0330ea4
Add tests for Bitcoin Core and Electrum providers
RiccardoBiffi Dec 20, 2024
2dc8080
Updated a comment
RiccardoBiffi Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ build/Release
# Dependency directories
node_modules/

# Dependency versions
package-lock.json

# Optional npm cache directory
.npm
Expand Down
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
//
const BitcoinPay = require('./src/wallet-pay-btc.js')
const FeeEstimate = require('./src/fee-estimate.js')
const Provider = require('./src/electrum.js')
//const Provider = require('./src/electrum.js')
const ElectrumProvider = require('./src/electrum.js')
const BitcoinCoreProvider = require('./src/bitcoin-core.js')
//todo add Provider abstract class for both Electrum and Bitcoin Core.
const KeyManager = require('./src/wallet-key-btc.js')
module.exports = {
BitcoinPay,
FeeEstimate,
Provider,
ElectrumProvider,
BitcoinCoreProvider,
KeyManager
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"lib-wallet": "github:rbndg/lib-wallet-main#export-wallet",
"lib-wallet-store": "github:tetherto/lib-wallet-store#v0.0.1",
"tiny-secp256k1": "2.2.3",
"wallet-seed-bip39": "github:tetherto/lib-wallet-seed-bip39#v0.0.1"
"wallet-seed-bip39": "github:tetherto/lib-wallet-seed-bip39#v0.0.1",
"zeromq": "^6.1.2"
},
"devDependencies": {
"brittle": "^3.5.0",
Expand All @@ -26,6 +27,9 @@
"test:send-tx": "brittle ./test/transactions.test.js",
"test:pay": "brittle ./test/wallet-pay-btc.test.js",
"test:key": "brittle ./test/wallet-key-btc.test.js",
"test:balance": "brittle ./test/balance.test.js",
"test:electrum": "brittle ./test/electrum.test.js",
"test:bitcoin-core": "brittle ./test/bitcoin-core.test.js",
"test:currency": "brittle ./test/currency.test.js"
},
"repository": {
Expand Down
Loading