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

Update basic_bitcoin example to use bitcoinjs-lib #1775

Merged
merged 17 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
"examples/audio_and_video",
"examples/audio_recorder",
"examples/autoreload",
"examples/basic_bitcoin",
"examples/bitcoin",
"examples/bitcoinjs-lib",
"examples/bitcore-lib",
Expand Down
3 changes: 3 additions & 0 deletions examples/basic_bitcoin/.bitcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ regtest=1
rpcuser=ic-btc-integration
rpcpassword=QPQiNaph19FqUsCrBRN0FII7lyM26B51fAMeBQzCb-E=
rpcauth=ic-btc-integration:cdf2741387f3a12438f69092f0fdad8e$62081498c98bee09a0dce2b30671123fa561932992ce377585e8e08bb0c11dfa

# Enable indexing so we can look up transactions by their ids
txindex=1
3 changes: 2 additions & 1 deletion examples/basic_bitcoin/.gitignore
lastmjs marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.azle
.bitcoin
.dfx
*.wasm
lastmjs marked this conversation as resolved.
Show resolved Hide resolved
*.wasm.gz
dfx_generated
node_modules

35 changes: 25 additions & 10 deletions examples/basic_bitcoin/dfx.json
lastmjs marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
{
"canisters": {
"basic_bitcoin": {
"backend": {
lastmjs marked this conversation as resolved.
Show resolved Hide resolved
"type": "custom",
"main": "src/index.ts",
"candid": "src/index.did",
"build": "npx azle basic_bitcoin",
"wasm": ".azle/basic_bitcoin/basic_bitcoin.wasm.gz",
"declarations": {
"output": "test/dfx_generated/basic_bitcoin",
"node_compatibility": true
},
"main": "src/backend/index.ts",
lastmjs marked this conversation as resolved.
Show resolved Hide resolved
"candid": "src/backend/index.did",
"init_arg": "(variant { regtest })",
"build": "npx azle backend",
"env": ["BITCOIN_NETWORK"],
"wasm": ".azle/backend/backend.wasm",
"gzip": true,
"metadata": [
{
"name": "candid:service",
"path": "src/index.did"
"path": "src/backend/index.did"
},
{
"name": "cdk:name",
"content": "azle"
}
]
}
},
"networks": {
"local": {
"bind": "127.0.0.1:8000",
"type": "ephemeral",
"replica": {
"subnet_type": "system"
}
}
},
"defaults": {
"bitcoin": {
"enabled": true,
"nodes": ["127.0.0.1:18444"],
"log_level": "info"
}
}
}
Loading
Loading