Skip to content

maestro-org/maestro-bitcoin-metaprotocols-canister

Repository files navigation

Bitcoin Metaprotocols Canister

ICP canister for Bitcoin metaprotocols. Born out of a collaboration between Maestro and Liquidium.

Current deployments

Prerequisites

To get started, ensure you have the following installed:

  • Rust
  • DFX
  • WebAssembly target for Rust:
rustup target add wasm32-unknown-unknown

Running Locally

Follow the below steps or follow our usage guide for a more guided walkthrough of deploying and interacting with the canister.

Setup identity (Optional)

Create new dedicated identity, or:

Use the default one for local development:

dfx identity use default

If the --network argument is not provided, it defaults to the public playground. For local deployments use --network=local. For mainnet use --network=ic.

Start Local Subnet

Start the local subnet in a dedicated terminal:

dfx start --clean

Canister Management

Create Canisters

dfx canister create --network=local bitcoin-metaprotocols-canister-dev

Generate DID

dfx generate --network=local bitcoin-metaprotocols-canister-dev

Build Canister

dfx build --network=local bitcoin-metaprotocols-canister-dev

Deploy Canister

dfx deploy --network=local bitcoin-metaprotocols-canister-dev

Get Canister Info

dfx canister info --network=local bitcoin-metaprotocols-canister-dev

Update Canister Settings (Optional)

Set the canister principal:

dfx canister update-settings --network=local bitcoin-metaprotocols-canister-dev --set-controller <id>

API Key Management

Set the API key:

dfx canister call --network=local --update bitcoin-metaprotocols-canister-dev set_api_key '("<maestro_api_key>")'

Testing

Test Address Inscriptions

dfx canister call --network=local --update bitcoin-metaprotocols-canister-dev get_address_inscriptions '("bc1pa2lw8d6u3kkexzqn9hqgzultkzjjc9rxtveldes68ryfdq8tmslqwfuccl", "10")'

Test UTXO Inscriptions

dfx canister call --network=local --update bitcoin-metaprotocols-canister-dev get_utxo_inscriptions '("604abd1c0ff2ce5a89b004a0601a75280ed3b76384af37b0a46a23471e9288e7", "1")'

Monitor canister logs

dfx canister logs --network=local bitcoin-metaprotocols-canister-dev

Other resources

About

ICP canister for Bitcoin metaprotocols

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages