This is a Universal Registrar driver for did:btc1 identifiers.
(work in progress)
docker compose build
docker compose up
curl -X POST "http://localhost:9080/1.0/create?method=btc1" \
-H "Content-Type: application/json" \
-d '{
"didDocument": {
"@context": ["https://www.w3.org/ns/did/v1"]
},
"options": {
"clientSecretMode": true,
"network": "mutinynet"
},
"secret": { }
}'
curl -X POST "http://localhost:9080/1.0/create?method=btc1" \
-H "Content-Type: application/json" \
-d '{
"didDocument" : {
"@context": ["https://www.w3.org/ns/did/v1"],
"verificationMethod" : [ {
"type" : "Multikey",
"id" : "#initialKey",
"publicKeyMultibase" : "zQ3shrogQZQDjQe6boF6Sas9occwW7rZVVLR3qQ85qt7JHXq4"
} ],
"assertionMethod" : [ "#initialKey" ],
"capabilityDelegation" : [ "#initialKey" ],
"capabilityInvocation" : [ "#initialKey" ],
"authentication" : [ "#initialKey" ]
},
"options" : {
"clientSecretMode" : true,
"network" : "mutinynet"
},
"secret" : { }
}'
The driver recognizes the following environment variables:
- Specifies how the driver interacts with the Bitcoin blockchain.
- Possible values:
bitcoind
: Connects to a bitcoind instance via JSON-RPCbtcd
: Connects to a btcd instance via JSON-RPCbitcoinj
: Connects to Bitcoin using a local bitcoinj clientblockcypherapi
: Connects to BlockCypher's APIesploraelectrsrest
: Connects to Esplora/Electrs REST API
- Default value:
bitcoind
- Specifies the JSON-RPC URLs of the Bitcoin connections.
- Specifies the server TLS certificates of the Bitcoin connections.
- Default value: ``
{
"network": "mutinynet"
}
network
: The name of the network where a DID should be registered. Values depend onbitcoinConnections
environment variable, but are typically:bitcoin
,testnet3
,signet
,mutinynet
.