Comments (1)
From @usingtechnology on JIRA
A Tenant may need a public DID for connections, and in our case, needs it for issuance.
Tenant UI will have to coordinate a series of calls, the logic in acapy exists in the routes, not in services, so API must be called.
Basic flow is:
create local did for wallet
oob register the did on the ledger
create public did
Step 2 is a custom endpoint in innkeeper plugin.
Example
POST /wallet/did/create
curl -X 'POST' \
'http://localhost:8032/wallet/did/create' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ3YWxsZXRfaWQiOiI1MGY5NmI2MS00MzE5LTQ1ZTgtOGVlYS03MmI4NGQ4MWRjYmIiLCJpYXQiOjE2NzM2NDA5MTcsImV4cCI6MTY3MzcyNzMxN30.LSmonQOh-oaQP9lxPwqSRGqmto2fLfLOaYn4OwJriIs' \
-H 'Content-Type: application/json' \
-d '{
"method": "sov",
"options": {
"key_type": "ed25519"
}
}'
{
"result": {
"did": "4M6nhNokXJDKxQTeFZvd1R",
"verkey": "2pnssLSL1rzFGS5YTcbMCJ34UDTot9HTnVswANNxN3RQ",
"posture": "wallet_only",
"key_type": "ed25519",
"method": "sov"
}
}
will need the did and verkey.
POST /tenant/register-public-did
alias is agent name/wallet name (optional).
this is a custom endpoint to do out of band registration
curl -X 'POST' \
'http://localhost:8032/tenant/register-public-did?did=4M6nhNokXJDKxQTeFZvd1R&verkey=2pnssLSL1rzFGS5YTcbMCJ34UDTot9HTnVswANNxN3RQ&alias=abcd123' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ3YWxsZXRfaWQiOiI1MGY5NmI2MS00MzE5LTQ1ZTgtOGVlYS03MmI4NGQ4MWRjYmIiLCJpYXQiOjE2NzM2NDA5MTcsImV4cCI6MTY3MzcyNzMxN30.LSmonQOh-oaQP9lxPwqSRGqmto2fLfLOaYn4OwJriIs' \
-d ''
POST /wallet/did/public
{
"txn": {
"connection_id": "15ce5a4c-da3c-4379-8f41-05d611d6c949",
"messages_attach": [
{
"@id": "5526cc62-ea8c-44a7-bbe2-264e10e5d4e9",
"mime-type": "application/json",
"data": {
"json": {
"endorser": "SVfHGCEEvEFmpBPcxgNqRR",
"identifier": "4M6nhNokXJDKxQTeFZvd1R",
"operation": {
"dest": "4M6nhNokXJDKxQTeFZvd1R",
"raw": "{\"endpoint\":{\"endpoint\":\"https://d076-207-6-152-178.ngrok.io\",\"routingKeys\":[]}}",
"type": "100"
},
"protocolVersion": 2,
"reqId": 1673641428388431400,
"signature": "2Zsd6Na9zz36b1Dhy19YRu6QbcT5fYikc4u9sjEtjnDJvgWSGdRngSDveC13gutRFo32rfUxsvJ8QrZQa8Ad2YFq"
}
}
}
],
"timing": {
"expires_time": null
},
"created_at": "2023-01-13T20:23:48.415321Z",
"signature_response": [],
"meta_data": {
"context": {},
"processing": {}
},
"_type": "http://didcomm.org/sign-attachment/%VER/signature-request",
"state": "request_sent",
"signature_request": [
{
"context": "did:sov",
"method": "add-signature",
"signature_type": "<requested signature type>",
"signer_goal_code": "aries.transaction.endorse",
"author_goal_code": "aries.transaction.ledger.write"
}
],
"formats": [
{
"attach_id": "5526cc62-ea8c-44a7-bbe2-264e10e5d4e9",
"format": "dif/endorse-transaction/[email protected]"
}
],
"transaction_id": "0171f076-764c-4cfe-baa8-9f9498b26b06",
"trace": false,
"updated_at": "2023-01-13T20:23:48.425043Z"
}
}
GET /wallet/did/public
curl -X 'GET' \
'http://localhost:8032/wallet/did/public' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ3YWxsZXRfaWQiOiI1MGY5NmI2MS00MzE5LTQ1ZTgtOGVlYS03MmI4NGQ4MWRjYmIiLCJpYXQiOjE2NzM2NDA5MTcsImV4cCI6MTY3MzcyNzMxN30.LSmonQOh-oaQP9lxPwqSRGqmto2fLfLOaYn4OwJriIs'
{
"result": {
"did": "4M6nhNokXJDKxQTeFZvd1R",
"verkey": "2pnssLSL1rzFGS5YTcbMCJ34UDTot9HTnVswANNxN3RQ",
"posture": "posted",
"key_type": "ed25519",
"method": "sov"
}
}
from traction.
Related Issues (20)
- Per-Tenant Logging Validation HOT 1
- Errors when registering DID with non-auto endorsers
- Docker buildkit compatibility issues HOT 1
- Feature: create admin/non-admin api-keys. HOT 5
- Tenant UI: JSON toggle on Create Schema is broken
- In local Traction setup, can't connect to the second Endorser (the bcovrin-dev one) HOT 9
- Enhancements to tenant logging HOT 10
- Tenant UI - Accept Invitation should infer the protocol HOT 1
- Unable to set up either External Postgres or Internal Postgres with Helm Chart HOT 2
- Log consumption for tenants HOT 1
- Enable did:peer:4 in deployments HOT 1
- Update Helm Chart to add ArgoCD deployment compatibility
- In the Tenant UI add tooltips or some help text on the disabled "Issuer" feature buttons HOT 1
- Read only API keys HOT 6
- Use present-proof v2.0 in the Tenant UI HOT 1
- Update Tenant UI to use did-exchange HOT 3
- Use v2.0 issuance in the Tenant UI HOT 1
- Troubleshooting on demo rpc app startup HOT 1
- Use authentication decorators HOT 1
- Ensure workflows are only executed on the main BCGov repository HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traction.