/api/public/members/register Bearer + Node SigMembers注册身份并签发 Global Digital Identity 与 VC
cURL 请求
bash
curl -X POST 'https://globaldigitalid.net/api/public/members/register' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'X-Node-Signature: YOUR_NODE_SIGNATURE' \
-d '{"subjectCode":"1001","regionCode":"CN-01","holderName":"Alice Chen","mnemonicLength":12}'请求体示例
json
{
"subjectCode": "1001",
"regionCode": "CN-01",
"holderName": "Alice Chen",
"mnemonicLength": 12
}响应
201身份创建成功,返回 Global Digital Identity、DID、助记词与 W3C VC。
json
{
"ok": true,
"gdiId": "732815940192837104",
"did": "did:gdi:732815940192837104",
"subjectType": "natural_person",
"regionCode": "CN-01",
"regionLabel": "中国 · 上海",
"txHash": "0x9f3c1ab4e7d2061b8af31729cd5b48e60a2c7d5f9183642aeb15c70efa92cd",
"blockHeight": 18127345,
"issuedAt": "2026-05-23T08:14:22.118Z",
"mnemonic": [
"abandon",
"ability",
"able",
"about",
"above",
"absent",
"absorb",
"abstract",
"absurd",
"abuse",
"access",
"accident"
],
"vc": {
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://globaldigitalid.net/contexts/v1"
],
"type": [
"VerifiableCredential",
"GlobalDigitalIdentityCredential"
],
"issuer": "did:gdi:node:CN-01",
"validFrom": "2026-05-23T08:14:22.118Z",
"credentialSubject": {
"id": "did:gdi:732815940192837104",
"gdiId": "732815940192837104",
"subjectType": "natural_person",
"regionCode": "CN-01",
"regionLabel": "中国 · 上海",
"holderName": "Alice Chen"
},
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-rdfc-2022",
"created": "2026-05-23T08:14:22.118Z",
"verificationMethod": "did:gdi:node:CN-01#key-1",
"proofPurpose": "assertionMethod",
"proofValue": "0x9f3c1ab4e7d2061b8af31729cd5b48e60a2c7d5f9183642aeb15c70efa92cd"
}
}
}
