@twin.org/node 0.0.3-next.53 → 0.0.3-next.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales/en.json +37 -15
- package/docs/changelog.md +28 -0
- package/docs/open-api/spec.json +315 -99
- package/docs/usage.md +91 -51
- package/package.json +2 -2
package/dist/locales/en.json
CHANGED
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"bootstrapLegacy": {
|
|
20
20
|
"noFeaturesEnabled": "No features are enabled in legacy bootstrap mode, at least one feature must be enabled.",
|
|
21
|
-
"organizationNotSet": "The organisation identity has not been set. Run
|
|
21
|
+
"organizationNotSet": "The organisation identity has not been set. Run \"set-node-org-id\"."
|
|
22
22
|
},
|
|
23
23
|
"identityCreate": {
|
|
24
24
|
"invalidMnemonic": "The mnemonic is invalid, it should be 24 words from the standard wordlist.",
|
|
25
|
+
"onlyOneAssignmentOptionAllowed": "Only one of node-id, node-organization-id, or tenant-organization-id can be set at the same time.",
|
|
25
26
|
"nodeOrganizationIdNotAvailableInMultiTenantMode": "The node-organization-id option is not available in multi-tenant mode, use tenant-organization-id instead."
|
|
26
27
|
},
|
|
27
28
|
"identityImport": {
|
|
@@ -61,8 +62,7 @@
|
|
|
61
62
|
"notAvailableInMultiTenantMode": "The set-node-org-id command is not available in multi-tenant mode, use set-tenant-org-id instead."
|
|
62
63
|
},
|
|
63
64
|
"applyOrganizationIdToTenant": {
|
|
64
|
-
"tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command."
|
|
65
|
-
"organizationIdAlreadyInUse": "The organization ID \"{organizationId}\" is already assigned to tenant \"{conflictingTenantId}\"."
|
|
65
|
+
"tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command."
|
|
66
66
|
},
|
|
67
67
|
"removeTenantOrgAlias": {
|
|
68
68
|
"tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command.",
|
|
@@ -236,6 +236,11 @@
|
|
|
236
236
|
"lockTimeout": "Failed to acquire lock for key \"{key}\" within the timeout of {timeout} milliseconds",
|
|
237
237
|
"bufferFetchFailed": "Failed to retrieve shared buffer for key \"{key}\" from the main thread"
|
|
238
238
|
},
|
|
239
|
+
"sharedObjectBuffer": {
|
|
240
|
+
"notCreated": "The shared buffer for object \"{objectId}\" has not been created",
|
|
241
|
+
"capacityExceeded": "The payload size of {required} bytes exceeds the maximum capacity of {capacity} bytes for object \"{objectId}\"",
|
|
242
|
+
"bufferFetchFailed": "Failed to retrieve shared buffer for object \"{objectId}\" from the main thread"
|
|
243
|
+
},
|
|
239
244
|
"fetchHelper": {
|
|
240
245
|
"decodingJSON": "Decoding JSON failed for route \"{url}\"",
|
|
241
246
|
"failureStatusText": "The request to the API failed: \"{statusText}\"",
|
|
@@ -349,7 +354,9 @@
|
|
|
349
354
|
},
|
|
350
355
|
"tenantAdminService": {
|
|
351
356
|
"apiKeyAlreadyInUse": "The provided API key is already in use by another tenant.",
|
|
352
|
-
"
|
|
357
|
+
"tenantAlreadyExists": "Tenant with ID \"{existingId}\" already exists.",
|
|
358
|
+
"tenantNotFound": "Tenant with ID \"{notFoundId}\" not found.",
|
|
359
|
+
"organizationIdAlreadyExists": "A tenant with organization ID \"{existingId}\" already exists."
|
|
353
360
|
},
|
|
354
361
|
"commands": {
|
|
355
362
|
"common": {
|
|
@@ -383,9 +390,6 @@
|
|
|
383
390
|
"failedLoading": "Failed to load file state storage from \"{filename}\"",
|
|
384
391
|
"failedSaving": "Failed to save file state storage to \"{filename}\""
|
|
385
392
|
},
|
|
386
|
-
"engineModuleHelper": {
|
|
387
|
-
"moduleNotClass": "The module \"{moduleName}\" does not export a class \"{className}\""
|
|
388
|
-
},
|
|
389
393
|
"moduleHelper": {
|
|
390
394
|
"moduleNotFound": "Failed to load module \"{module}\"",
|
|
391
395
|
"entryNotFound": "Failed to load entry \"{entry}\" from module \"{module}\"",
|
|
@@ -740,8 +744,11 @@
|
|
|
740
744
|
"fileEntityStorageConnector": {
|
|
741
745
|
"directoryCreateFailed": "Creating directory \"{directory}\" failed",
|
|
742
746
|
"emptyFailed": "Unable to empty entity storage",
|
|
747
|
+
"readStoreCorrupt": "The entity storage store file in directory \"{directory}\" contains corrupt JSON",
|
|
748
|
+
"readStoreFailed": "Unable to read the entity storage store file in directory \"{directory}\"",
|
|
743
749
|
"removeBatchFailed": "Unable to remove batch of entities",
|
|
744
|
-
"teardownFailed": "Unable to teardown entity storage"
|
|
750
|
+
"teardownFailed": "Unable to teardown entity storage",
|
|
751
|
+
"writeStoreFailed": "Unable to write the entity storage store file in directory \"{directory}\""
|
|
745
752
|
},
|
|
746
753
|
"firestoreEntityStorageConnector": {
|
|
747
754
|
"firestoreCreationFailed": "Failed to connect to Firestore",
|
|
@@ -1228,7 +1235,8 @@
|
|
|
1228
1235
|
},
|
|
1229
1236
|
"policyNegotiationAdminPointService": {
|
|
1230
1237
|
"policyNotFound": "Contract negotiation with id: \"{notFoundId}\" not found",
|
|
1231
|
-
"cleanupFailed": "Failed to cleanup old negotiations"
|
|
1238
|
+
"cleanupFailed": "Failed to cleanup old negotiations",
|
|
1239
|
+
"negotiationAlreadyExists": "Contract negotiation with correlationId: \"{existingId}\" already exists"
|
|
1232
1240
|
},
|
|
1233
1241
|
"policyExecutionPointService": {
|
|
1234
1242
|
"actionExecutionFailed": "Action execution failed for id: \"{actionId}\", at stage \"{stage}\", policy id: \"{policyId}\""
|
|
@@ -1376,14 +1384,12 @@
|
|
|
1376
1384
|
"nodeIdentityCreate": "Creating node identity",
|
|
1377
1385
|
"nodeAuthKeyCreate": "Creating node auth key",
|
|
1378
1386
|
"trustVerificationMethodCreate": "Creating trust verification method for organisation identity",
|
|
1379
|
-
"nodeIdentitySet": "Setting node identity",
|
|
1380
1387
|
"nodeTenantCreate": "Creating node tenant",
|
|
1381
1388
|
"organisationCreate": "Creating organisation identity",
|
|
1382
1389
|
"blobStorageKeyCreate": "Creating blob storage encryption key for organisation identity",
|
|
1383
1390
|
"attestationMethodCreate": "Creating attestation method for organisation identity",
|
|
1384
1391
|
"immutableProofMethodCreate": "Creating immutable proof method for organisation identity",
|
|
1385
1392
|
"nodeOrganizationIdSet": "Setting node organisation ID",
|
|
1386
|
-
"tenantOrganizationIdSet": "Setting tenant organisation ID",
|
|
1387
1393
|
"adminIdentityCreate": "Creating admin user identity",
|
|
1388
1394
|
"adminUserCreate": "Creating admin user",
|
|
1389
1395
|
"tenantFallback": "No Node-labelled tenant found; using first available tenant"
|
|
@@ -1420,6 +1426,9 @@
|
|
|
1420
1426
|
"output-env-prefix": {
|
|
1421
1427
|
"description": "Prefix to use for variables in the output .env file."
|
|
1422
1428
|
},
|
|
1429
|
+
"node-id": {
|
|
1430
|
+
"description": "If true, set the created identity DID as the node identity."
|
|
1431
|
+
},
|
|
1423
1432
|
"node-organization-id": {
|
|
1424
1433
|
"description": "If true, set the created identity DID as the node organization ID (not available in multi-tenant mode)."
|
|
1425
1434
|
},
|
|
@@ -1432,12 +1441,12 @@
|
|
|
1432
1441
|
"processingMnemonic": "Processing mnemonic",
|
|
1433
1442
|
"readingMnemonic": "Reading mnemonic",
|
|
1434
1443
|
"storingMnemonic": "Storing mnemonic",
|
|
1435
|
-
"existingMnemonic": "Mnemonic already exists",
|
|
1444
|
+
"existingMnemonic": "Mnemonic already exists, skipping creation",
|
|
1436
1445
|
"noExistingMnemonic": "No existing mnemonic found",
|
|
1437
1446
|
"generatingMnemonic": "Generating mnemonic",
|
|
1438
1447
|
"processingIdentity": "Processing identity",
|
|
1439
1448
|
"resolvingIdentity": "Resolving identity",
|
|
1440
|
-
"existingIdentity": "Identity already exists",
|
|
1449
|
+
"existingIdentity": "Identity already exists, skipping creation",
|
|
1441
1450
|
"noIdentityFound": "No identity found",
|
|
1442
1451
|
"creatingIdentity": "Creating identity",
|
|
1443
1452
|
"createdIdentity": "Created identity",
|
|
@@ -1614,7 +1623,8 @@
|
|
|
1614
1623
|
},
|
|
1615
1624
|
"labels": {
|
|
1616
1625
|
"resolvingIdentity": "Resolving identity",
|
|
1617
|
-
"stored": "The node identity has been stored"
|
|
1626
|
+
"stored": "The node identity has been stored",
|
|
1627
|
+
"skipping": "The node identity has not changed, skipping"
|
|
1618
1628
|
}
|
|
1619
1629
|
},
|
|
1620
1630
|
"tenant-create": {
|
|
@@ -1663,7 +1673,7 @@
|
|
|
1663
1673
|
},
|
|
1664
1674
|
"tenant-import": {
|
|
1665
1675
|
"description": "Import a tenant with associated api key",
|
|
1666
|
-
"example": "tenant-import --tenant-id=\"0011..aabb\" --api-key=\"aabb..0099\" --label=\"My Tenant\" --public-origin=\"https://example.com:1234\"",
|
|
1676
|
+
"example": "tenant-import --tenant-id=\"0011..aabb\" --api-key=\"aabb..0099\" --organization-id=\"did:iota:...\" --label=\"My Tenant\" --public-origin=\"https://example.com:1234\"",
|
|
1667
1677
|
"params": {
|
|
1668
1678
|
"env-prefix": {
|
|
1669
1679
|
"description": "Prefix to use for standard .env files e.g. TWIN_."
|
|
@@ -1674,6 +1684,9 @@
|
|
|
1674
1684
|
"api-key": {
|
|
1675
1685
|
"description": "The API key to associate with the tenant id."
|
|
1676
1686
|
},
|
|
1687
|
+
"organization-id": {
|
|
1688
|
+
"description": "The organization DID to associate with the tenant."
|
|
1689
|
+
},
|
|
1677
1690
|
"label": {
|
|
1678
1691
|
"description": "A descriptive label for the tenant."
|
|
1679
1692
|
},
|
|
@@ -1702,6 +1715,9 @@
|
|
|
1702
1715
|
"api-key": {
|
|
1703
1716
|
"description": "The API key to associate with the tenant id."
|
|
1704
1717
|
},
|
|
1718
|
+
"organization-id": {
|
|
1719
|
+
"description": "The organization DID to associate with the tenant."
|
|
1720
|
+
},
|
|
1705
1721
|
"label": {
|
|
1706
1722
|
"description": "A descriptive label for the tenant."
|
|
1707
1723
|
},
|
|
@@ -2253,6 +2269,9 @@
|
|
|
2253
2269
|
"retrieving": "Retrieving policies for locator \"locator\"",
|
|
2254
2270
|
"retrieved": "Retrieved {count} policies for locator \"locator\"."
|
|
2255
2271
|
},
|
|
2272
|
+
"policyNegotiationAdminPointService": {
|
|
2273
|
+
"negotiationCreated": "Contract negotiation pre-registered (id: \"{id}\")"
|
|
2274
|
+
},
|
|
2256
2275
|
"policyExecutionPointService": {
|
|
2257
2276
|
"executingActions": "Executing actions for stage: \"{stage}\", policy id: \"{policyId}\"",
|
|
2258
2277
|
"executingAction": "Executing action for stage: \"{stage}\", policy id: \"{policyId}\""
|
|
@@ -2312,6 +2331,9 @@
|
|
|
2312
2331
|
},
|
|
2313
2332
|
"policyNegotiationAdminPointService": {
|
|
2314
2333
|
"sendTerminateFailed": "Failed to send terminate to consumer for negotiation id: \"{id}\", correlation id: \"{correlationId}\""
|
|
2334
|
+
},
|
|
2335
|
+
"policyNegotiationPointService": {
|
|
2336
|
+
"terminatedCallbackFailed": "Failed to notify requester via terminated() for negotiation id: \"{negotiationId}\""
|
|
2315
2337
|
}
|
|
2316
2338
|
},
|
|
2317
2339
|
"cli": {
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.55](https://github.com/iotaledger/twin-node/compare/node-v0.0.3-next.54...node-v0.0.3-next.55) (2026-06-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **node:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/node-core bumped from 0.0.3-next.54 to 0.0.3-next.55
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.54](https://github.com/iotaledger/twin-node/compare/node-v0.0.3-next.53...node-v0.0.3-next.54) (2026-06-12)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* improved cli commands ([#206](https://github.com/iotaledger/twin-node/issues/206)) ([cf00850](https://github.com/iotaledger/twin-node/commit/cf0085023a66e187aaaaf3889128c845c73a1faf))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/node-core bumped from 0.0.3-next.53 to 0.0.3-next.54
|
|
30
|
+
|
|
3
31
|
## [0.0.3-next.53](https://github.com/iotaledger/twin-node/compare/node-v0.0.3-next.52...node-v0.0.3-next.53) (2026-06-11)
|
|
4
32
|
|
|
5
33
|
|
package/docs/open-api/spec.json
CHANGED
|
@@ -18243,9 +18243,17 @@
|
|
|
18243
18243
|
"papQueryResponseExample": {
|
|
18244
18244
|
"value": [
|
|
18245
18245
|
{
|
|
18246
|
-
"@context":
|
|
18246
|
+
"@context": [
|
|
18247
|
+
"http://www.w3.org/ns/odrl.jsonld",
|
|
18248
|
+
{
|
|
18249
|
+
"dateCreated": "https://schema.org/dateCreated",
|
|
18250
|
+
"dateModified": "https://schema.org/dateModified"
|
|
18251
|
+
}
|
|
18252
|
+
],
|
|
18247
18253
|
"@type": "Set",
|
|
18248
18254
|
"@id": "urn:rights-management:abc123def456",
|
|
18255
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
18256
|
+
"dateModified": "2025-09-03T00:00:00.000Z",
|
|
18249
18257
|
"permission": [
|
|
18250
18258
|
{
|
|
18251
18259
|
"target": "http://example.com/asset/1",
|
|
@@ -18468,9 +18476,17 @@
|
|
|
18468
18476
|
"examples": {
|
|
18469
18477
|
"papGetResponseExample": {
|
|
18470
18478
|
"value": {
|
|
18471
|
-
"@context":
|
|
18479
|
+
"@context": [
|
|
18480
|
+
"http://www.w3.org/ns/odrl.jsonld",
|
|
18481
|
+
{
|
|
18482
|
+
"dateCreated": "https://schema.org/dateCreated",
|
|
18483
|
+
"dateModified": "https://schema.org/dateModified"
|
|
18484
|
+
}
|
|
18485
|
+
],
|
|
18472
18486
|
"@type": "Set",
|
|
18473
18487
|
"@id": "urn:rights-management:abc123def456",
|
|
18488
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
18489
|
+
"dateModified": "2025-09-03T00:00:00.000Z",
|
|
18474
18490
|
"permission": [
|
|
18475
18491
|
{
|
|
18476
18492
|
"target": "http://example.com/asset/1",
|
|
@@ -18661,14 +18677,22 @@
|
|
|
18661
18677
|
"content": {
|
|
18662
18678
|
"application/json": {
|
|
18663
18679
|
"schema": {
|
|
18664
|
-
"$ref": "
|
|
18680
|
+
"$ref": "#/components/schemas/RightsManagementAgreement"
|
|
18665
18681
|
},
|
|
18666
18682
|
"examples": {
|
|
18667
18683
|
"papGetResponseExample": {
|
|
18668
18684
|
"value": {
|
|
18669
|
-
"@context":
|
|
18685
|
+
"@context": [
|
|
18686
|
+
"http://www.w3.org/ns/odrl.jsonld",
|
|
18687
|
+
{
|
|
18688
|
+
"dateCreated": "https://schema.org/dateCreated",
|
|
18689
|
+
"dateModified": "https://schema.org/dateModified"
|
|
18690
|
+
}
|
|
18691
|
+
],
|
|
18670
18692
|
"@type": "Agreement",
|
|
18671
18693
|
"@id": "urn:rights-management:abc123def456",
|
|
18694
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
18695
|
+
"dateModified": "2025-09-03T00:00:00.000Z",
|
|
18672
18696
|
"permission": [
|
|
18673
18697
|
{
|
|
18674
18698
|
"target": "http://example.com/asset/1",
|
|
@@ -18774,14 +18798,22 @@
|
|
|
18774
18798
|
"content": {
|
|
18775
18799
|
"application/json": {
|
|
18776
18800
|
"schema": {
|
|
18777
|
-
"$ref": "
|
|
18801
|
+
"$ref": "#/components/schemas/RightsManagementOffer"
|
|
18778
18802
|
},
|
|
18779
18803
|
"examples": {
|
|
18780
18804
|
"papGetResponseExample": {
|
|
18781
18805
|
"value": {
|
|
18782
|
-
"@context":
|
|
18806
|
+
"@context": [
|
|
18807
|
+
"http://www.w3.org/ns/odrl.jsonld",
|
|
18808
|
+
{
|
|
18809
|
+
"dateCreated": "https://schema.org/dateCreated",
|
|
18810
|
+
"dateModified": "https://schema.org/dateModified"
|
|
18811
|
+
}
|
|
18812
|
+
],
|
|
18783
18813
|
"@type": "Offer",
|
|
18784
18814
|
"@id": "urn:rights-management:abc123def456",
|
|
18815
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
18816
|
+
"dateModified": "2025-09-03T00:00:00.000Z",
|
|
18785
18817
|
"permission": [
|
|
18786
18818
|
{
|
|
18787
18819
|
"target": "http://example.com/asset/1",
|
|
@@ -18887,14 +18919,22 @@
|
|
|
18887
18919
|
"content": {
|
|
18888
18920
|
"application/json": {
|
|
18889
18921
|
"schema": {
|
|
18890
|
-
"$ref": "
|
|
18922
|
+
"$ref": "#/components/schemas/RightsManagementSet"
|
|
18891
18923
|
},
|
|
18892
18924
|
"examples": {
|
|
18893
18925
|
"papGetResponseExample": {
|
|
18894
18926
|
"value": {
|
|
18895
|
-
"@context":
|
|
18927
|
+
"@context": [
|
|
18928
|
+
"http://www.w3.org/ns/odrl.jsonld",
|
|
18929
|
+
{
|
|
18930
|
+
"dateCreated": "https://schema.org/dateCreated",
|
|
18931
|
+
"dateModified": "https://schema.org/dateModified"
|
|
18932
|
+
}
|
|
18933
|
+
],
|
|
18896
18934
|
"@type": "Set",
|
|
18897
18935
|
"@id": "urn:rights-management:abc123def456",
|
|
18936
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
18937
|
+
"dateModified": "2025-09-03T00:00:00.000Z",
|
|
18898
18938
|
"permission": [
|
|
18899
18939
|
{
|
|
18900
18940
|
"target": "http://example.com/asset/1",
|
|
@@ -20003,24 +20043,133 @@
|
|
|
20003
20043
|
}
|
|
20004
20044
|
}
|
|
20005
20045
|
},
|
|
20006
|
-
"/rights-management/negotiations/admin
|
|
20046
|
+
"/rights-management/negotiations/admin": {
|
|
20047
|
+
"post": {
|
|
20048
|
+
"operationId": "pnapCreate",
|
|
20049
|
+
"summary": "Pre-register a consumer-side policy negotiation entry",
|
|
20050
|
+
"tags": [
|
|
20051
|
+
"Policy Negotiation Administration Point"
|
|
20052
|
+
],
|
|
20053
|
+
"security": [
|
|
20054
|
+
{
|
|
20055
|
+
"jwtBearerAuthScheme": []
|
|
20056
|
+
}
|
|
20057
|
+
],
|
|
20058
|
+
"requestBody": {
|
|
20059
|
+
"description": "The request structure for creating a policy negotiation entry.",
|
|
20060
|
+
"required": true,
|
|
20061
|
+
"content": {
|
|
20062
|
+
"application/json": {
|
|
20063
|
+
"schema": {
|
|
20064
|
+
"$ref": "#/components/schemas/PnapCreateRequest"
|
|
20065
|
+
},
|
|
20066
|
+
"examples": {
|
|
20067
|
+
"pnapCreateRequestExample": {
|
|
20068
|
+
"value": {
|
|
20069
|
+
"id": "urn:contract-negotiation:consumer-pid"
|
|
20070
|
+
}
|
|
20071
|
+
}
|
|
20072
|
+
}
|
|
20073
|
+
}
|
|
20074
|
+
}
|
|
20075
|
+
},
|
|
20076
|
+
"responses": {
|
|
20077
|
+
"201": {
|
|
20078
|
+
"description": "The rest request ended in created response.",
|
|
20079
|
+
"headers": {
|
|
20080
|
+
"location": {
|
|
20081
|
+
"schema": {
|
|
20082
|
+
"type": "string"
|
|
20083
|
+
},
|
|
20084
|
+
"description": "e.g. urn:contract-negotiation:01970000-0000-7000-8000-000000000000"
|
|
20085
|
+
}
|
|
20086
|
+
}
|
|
20087
|
+
},
|
|
20088
|
+
"400": {
|
|
20089
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
20090
|
+
"content": {
|
|
20091
|
+
"application/json": {
|
|
20092
|
+
"schema": {
|
|
20093
|
+
"$ref": "#/components/schemas/Error"
|
|
20094
|
+
},
|
|
20095
|
+
"examples": {
|
|
20096
|
+
"exampleResponse": {
|
|
20097
|
+
"value": {
|
|
20098
|
+
"name": "GeneralError",
|
|
20099
|
+
"message": "errorMessage",
|
|
20100
|
+
"properties": {
|
|
20101
|
+
"foo": "bar"
|
|
20102
|
+
}
|
|
20103
|
+
}
|
|
20104
|
+
}
|
|
20105
|
+
}
|
|
20106
|
+
}
|
|
20107
|
+
}
|
|
20108
|
+
},
|
|
20109
|
+
"401": {
|
|
20110
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
20111
|
+
"content": {
|
|
20112
|
+
"application/json": {
|
|
20113
|
+
"schema": {
|
|
20114
|
+
"$ref": "#/components/schemas/Error"
|
|
20115
|
+
},
|
|
20116
|
+
"examples": {
|
|
20117
|
+
"exampleResponse": {
|
|
20118
|
+
"value": {
|
|
20119
|
+
"name": "UnauthorizedError",
|
|
20120
|
+
"message": "errorMessage"
|
|
20121
|
+
}
|
|
20122
|
+
}
|
|
20123
|
+
}
|
|
20124
|
+
}
|
|
20125
|
+
}
|
|
20126
|
+
},
|
|
20127
|
+
"500": {
|
|
20128
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
20129
|
+
"content": {
|
|
20130
|
+
"application/json": {
|
|
20131
|
+
"schema": {
|
|
20132
|
+
"$ref": "#/components/schemas/Error"
|
|
20133
|
+
},
|
|
20134
|
+
"examples": {
|
|
20135
|
+
"exampleResponse": {
|
|
20136
|
+
"value": {
|
|
20137
|
+
"name": "InternalServerError",
|
|
20138
|
+
"message": "errorMessage"
|
|
20139
|
+
}
|
|
20140
|
+
}
|
|
20141
|
+
}
|
|
20142
|
+
}
|
|
20143
|
+
}
|
|
20144
|
+
}
|
|
20145
|
+
}
|
|
20146
|
+
},
|
|
20007
20147
|
"get": {
|
|
20008
|
-
"operationId": "
|
|
20009
|
-
"summary": "
|
|
20148
|
+
"operationId": "pnapQuery",
|
|
20149
|
+
"summary": "Query policy negotiations",
|
|
20010
20150
|
"tags": [
|
|
20011
20151
|
"Policy Negotiation Administration Point"
|
|
20012
20152
|
],
|
|
20013
20153
|
"parameters": [
|
|
20014
20154
|
{
|
|
20015
|
-
"name": "
|
|
20016
|
-
"description": "The
|
|
20017
|
-
"in": "
|
|
20018
|
-
"required":
|
|
20155
|
+
"name": "state",
|
|
20156
|
+
"description": "The state of the policy negotiations.",
|
|
20157
|
+
"in": "query",
|
|
20158
|
+
"required": false,
|
|
20159
|
+
"schema": {
|
|
20160
|
+
"$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolContractNegotiationStateType"
|
|
20161
|
+
},
|
|
20162
|
+
"example": "ACCEPTED"
|
|
20163
|
+
},
|
|
20164
|
+
{
|
|
20165
|
+
"name": "cursor",
|
|
20166
|
+
"description": "The cursor for pagination.",
|
|
20167
|
+
"in": "query",
|
|
20168
|
+
"required": false,
|
|
20019
20169
|
"schema": {
|
|
20020
20170
|
"type": "string"
|
|
20021
20171
|
},
|
|
20022
|
-
"
|
|
20023
|
-
"example": "policy-1"
|
|
20172
|
+
"example": "next-cursor"
|
|
20024
20173
|
}
|
|
20025
20174
|
],
|
|
20026
20175
|
"security": [
|
|
@@ -20030,21 +20179,23 @@
|
|
|
20030
20179
|
],
|
|
20031
20180
|
"responses": {
|
|
20032
20181
|
"200": {
|
|
20033
|
-
"description": "The response structure for policy
|
|
20182
|
+
"description": "The response structure for querying manual policy negotiations.",
|
|
20034
20183
|
"content": {
|
|
20035
20184
|
"application/json": {
|
|
20036
20185
|
"schema": {
|
|
20037
|
-
"$ref": "#/components/schemas/
|
|
20186
|
+
"$ref": "#/components/schemas/PnapQueryResponse"
|
|
20038
20187
|
},
|
|
20039
20188
|
"examples": {
|
|
20040
|
-
"
|
|
20041
|
-
"value":
|
|
20042
|
-
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
|
|
20046
|
-
|
|
20047
|
-
|
|
20189
|
+
"pnapQueryResponseExample": {
|
|
20190
|
+
"value": [
|
|
20191
|
+
{
|
|
20192
|
+
"id": "pid",
|
|
20193
|
+
"correlationId": "cid",
|
|
20194
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
20195
|
+
"state": "REQUESTED",
|
|
20196
|
+
"organizationIdentity": "did:iota:123456789abcdefghi"
|
|
20197
|
+
}
|
|
20198
|
+
]
|
|
20048
20199
|
}
|
|
20049
20200
|
}
|
|
20050
20201
|
}
|
|
@@ -20108,10 +20259,12 @@
|
|
|
20108
20259
|
}
|
|
20109
20260
|
}
|
|
20110
20261
|
}
|
|
20111
|
-
}
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
|
|
20262
|
+
}
|
|
20263
|
+
},
|
|
20264
|
+
"/rights-management/negotiations/admin/{policyId}": {
|
|
20265
|
+
"get": {
|
|
20266
|
+
"operationId": "pnapGet",
|
|
20267
|
+
"summary": "Get a policy negotiation",
|
|
20115
20268
|
"tags": [
|
|
20116
20269
|
"Policy Negotiation Administration Point"
|
|
20117
20270
|
],
|
|
@@ -20133,31 +20286,27 @@
|
|
|
20133
20286
|
"jwtBearerAuthScheme": []
|
|
20134
20287
|
}
|
|
20135
20288
|
],
|
|
20136
|
-
"
|
|
20137
|
-
"
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
|
|
20143
|
-
|
|
20144
|
-
|
|
20145
|
-
|
|
20146
|
-
|
|
20147
|
-
|
|
20148
|
-
|
|
20149
|
-
|
|
20150
|
-
|
|
20151
|
-
|
|
20289
|
+
"responses": {
|
|
20290
|
+
"200": {
|
|
20291
|
+
"description": "The response structure for policy negotiation request.",
|
|
20292
|
+
"content": {
|
|
20293
|
+
"application/json": {
|
|
20294
|
+
"schema": {
|
|
20295
|
+
"$ref": "#/components/schemas/PolicyNegotiation"
|
|
20296
|
+
},
|
|
20297
|
+
"examples": {
|
|
20298
|
+
"pnapGetResponseExample": {
|
|
20299
|
+
"value": {
|
|
20300
|
+
"id": "pid",
|
|
20301
|
+
"correlationId": "cid",
|
|
20302
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
20303
|
+
"state": "REQUESTED",
|
|
20304
|
+
"organizationIdentity": "did:iota:123456789abcdefghi"
|
|
20305
|
+
}
|
|
20152
20306
|
}
|
|
20153
20307
|
}
|
|
20154
20308
|
}
|
|
20155
20309
|
}
|
|
20156
|
-
}
|
|
20157
|
-
},
|
|
20158
|
-
"responses": {
|
|
20159
|
-
"204": {
|
|
20160
|
-
"description": "The rest request ended in success with no data."
|
|
20161
20310
|
},
|
|
20162
20311
|
"400": {
|
|
20163
20312
|
"description": "The server cannot process the request, see the content for more details.",
|
|
@@ -20218,16 +20367,16 @@
|
|
|
20218
20367
|
}
|
|
20219
20368
|
}
|
|
20220
20369
|
},
|
|
20221
|
-
"
|
|
20222
|
-
"operationId": "
|
|
20223
|
-
"summary": "
|
|
20370
|
+
"put": {
|
|
20371
|
+
"operationId": "pnapSet",
|
|
20372
|
+
"summary": "Set a policy negotiation",
|
|
20224
20373
|
"tags": [
|
|
20225
20374
|
"Policy Negotiation Administration Point"
|
|
20226
20375
|
],
|
|
20227
20376
|
"parameters": [
|
|
20228
20377
|
{
|
|
20229
20378
|
"name": "policyId",
|
|
20230
|
-
"description": "The ID of the policy being
|
|
20379
|
+
"description": "The ID of the policy being requested.",
|
|
20231
20380
|
"in": "path",
|
|
20232
20381
|
"required": true,
|
|
20233
20382
|
"schema": {
|
|
@@ -20242,6 +20391,28 @@
|
|
|
20242
20391
|
"jwtBearerAuthScheme": []
|
|
20243
20392
|
}
|
|
20244
20393
|
],
|
|
20394
|
+
"requestBody": {
|
|
20395
|
+
"description": "The request structure for setting a policy negotiation.",
|
|
20396
|
+
"required": true,
|
|
20397
|
+
"content": {
|
|
20398
|
+
"application/json": {
|
|
20399
|
+
"schema": {
|
|
20400
|
+
"$ref": "#/components/schemas/PolicyNegotiation"
|
|
20401
|
+
},
|
|
20402
|
+
"examples": {
|
|
20403
|
+
"pnapSetRequestExample": {
|
|
20404
|
+
"value": {
|
|
20405
|
+
"id": "pid",
|
|
20406
|
+
"correlationId": "cid",
|
|
20407
|
+
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
20408
|
+
"state": "REQUESTED",
|
|
20409
|
+
"organizationIdentity": "did:iota:123456789abcdefghi"
|
|
20410
|
+
}
|
|
20411
|
+
}
|
|
20412
|
+
}
|
|
20413
|
+
}
|
|
20414
|
+
}
|
|
20415
|
+
},
|
|
20245
20416
|
"responses": {
|
|
20246
20417
|
"204": {
|
|
20247
20418
|
"description": "The rest request ended in success with no data."
|
|
@@ -20304,35 +20475,24 @@
|
|
|
20304
20475
|
}
|
|
20305
20476
|
}
|
|
20306
20477
|
}
|
|
20307
|
-
}
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
"operationId": "pnapQuery",
|
|
20312
|
-
"summary": "Query policy negotiations",
|
|
20478
|
+
},
|
|
20479
|
+
"delete": {
|
|
20480
|
+
"operationId": "pnapRemove",
|
|
20481
|
+
"summary": "Remove a policy negotiation",
|
|
20313
20482
|
"tags": [
|
|
20314
20483
|
"Policy Negotiation Administration Point"
|
|
20315
20484
|
],
|
|
20316
20485
|
"parameters": [
|
|
20317
20486
|
{
|
|
20318
|
-
"name": "
|
|
20319
|
-
"description": "The
|
|
20320
|
-
"in": "
|
|
20321
|
-
"required":
|
|
20322
|
-
"schema": {
|
|
20323
|
-
"$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolContractNegotiationStateType"
|
|
20324
|
-
},
|
|
20325
|
-
"example": "ACCEPTED"
|
|
20326
|
-
},
|
|
20327
|
-
{
|
|
20328
|
-
"name": "cursor",
|
|
20329
|
-
"description": "The cursor for pagination.",
|
|
20330
|
-
"in": "query",
|
|
20331
|
-
"required": false,
|
|
20487
|
+
"name": "policyId",
|
|
20488
|
+
"description": "The ID of the policy being removed.",
|
|
20489
|
+
"in": "path",
|
|
20490
|
+
"required": true,
|
|
20332
20491
|
"schema": {
|
|
20333
20492
|
"type": "string"
|
|
20334
20493
|
},
|
|
20335
|
-
"
|
|
20494
|
+
"style": "simple",
|
|
20495
|
+
"example": "policy-1"
|
|
20336
20496
|
}
|
|
20337
20497
|
],
|
|
20338
20498
|
"security": [
|
|
@@ -20341,28 +20501,8 @@
|
|
|
20341
20501
|
}
|
|
20342
20502
|
],
|
|
20343
20503
|
"responses": {
|
|
20344
|
-
"
|
|
20345
|
-
"description": "The
|
|
20346
|
-
"content": {
|
|
20347
|
-
"application/json": {
|
|
20348
|
-
"schema": {
|
|
20349
|
-
"$ref": "#/components/schemas/PnapQueryResponse"
|
|
20350
|
-
},
|
|
20351
|
-
"examples": {
|
|
20352
|
-
"pnapQueryResponseExample": {
|
|
20353
|
-
"value": [
|
|
20354
|
-
{
|
|
20355
|
-
"id": "pid",
|
|
20356
|
-
"correlationId": "cid",
|
|
20357
|
-
"dateCreated": "2025-09-03T00:00:00.000Z",
|
|
20358
|
-
"state": "REQUESTED",
|
|
20359
|
-
"organizationIdentity": "did:iota:123456789abcdefghi"
|
|
20360
|
-
}
|
|
20361
|
-
]
|
|
20362
|
-
}
|
|
20363
|
-
}
|
|
20364
|
-
}
|
|
20365
|
-
}
|
|
20504
|
+
"204": {
|
|
20505
|
+
"description": "The rest request ended in success with no data."
|
|
20366
20506
|
},
|
|
20367
20507
|
"400": {
|
|
20368
20508
|
"description": "The server cannot process the request, see the content for more details.",
|
|
@@ -22595,6 +22735,14 @@
|
|
|
22595
22735
|
"description": "The body of the request - the policy to create (id will be auto-generated if not provided).",
|
|
22596
22736
|
"type": "object",
|
|
22597
22737
|
"properties": {
|
|
22738
|
+
"dateCreated": {
|
|
22739
|
+
"type": "string",
|
|
22740
|
+
"description": "schema.org dateCreated — ISO 8601 date-time set by PAP on create."
|
|
22741
|
+
},
|
|
22742
|
+
"dateModified": {
|
|
22743
|
+
"type": "string",
|
|
22744
|
+
"description": "schema.org dateModified — ISO 8601 date-time set by PAP on create and update."
|
|
22745
|
+
},
|
|
22598
22746
|
"@context": {
|
|
22599
22747
|
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlContextType"
|
|
22600
22748
|
},
|
|
@@ -22811,6 +22959,19 @@
|
|
|
22811
22959
|
},
|
|
22812
22960
|
"description": "The body of the response."
|
|
22813
22961
|
},
|
|
22962
|
+
"PnapCreateRequest": {
|
|
22963
|
+
"type": "object",
|
|
22964
|
+
"properties": {
|
|
22965
|
+
"id": {
|
|
22966
|
+
"type": "string",
|
|
22967
|
+
"description": "The consumer-side negotiation identifier (DSP consumerPid)."
|
|
22968
|
+
}
|
|
22969
|
+
},
|
|
22970
|
+
"required": [
|
|
22971
|
+
"id"
|
|
22972
|
+
],
|
|
22973
|
+
"description": "The partial negotiation to pre-register."
|
|
22974
|
+
},
|
|
22814
22975
|
"PnapQueryResponse": {
|
|
22815
22976
|
"type": "array",
|
|
22816
22977
|
"items": {
|
|
@@ -22971,6 +23132,30 @@
|
|
|
22971
23132
|
],
|
|
22972
23133
|
"description": "Transfer Process (DSP compliant) with state REQUESTED, or error."
|
|
22973
23134
|
},
|
|
23135
|
+
"RightsManagementAgreement": {
|
|
23136
|
+
"description": "Agreement policy returned by PAP, including optional PAP-managed lifecycle metadata.",
|
|
23137
|
+
"type": "object",
|
|
23138
|
+
"allOf": [
|
|
23139
|
+
{
|
|
23140
|
+
"$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolAgreement"
|
|
23141
|
+
},
|
|
23142
|
+
{
|
|
23143
|
+
"$ref": "#/components/schemas/RightsManagementPolicyMetadata"
|
|
23144
|
+
}
|
|
23145
|
+
]
|
|
23146
|
+
},
|
|
23147
|
+
"RightsManagementOffer": {
|
|
23148
|
+
"description": "Offer policy returned by PAP, including optional PAP-managed lifecycle metadata.",
|
|
23149
|
+
"type": "object",
|
|
23150
|
+
"allOf": [
|
|
23151
|
+
{
|
|
23152
|
+
"$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolOffer"
|
|
23153
|
+
},
|
|
23154
|
+
{
|
|
23155
|
+
"$ref": "#/components/schemas/RightsManagementPolicyMetadata"
|
|
23156
|
+
}
|
|
23157
|
+
]
|
|
23158
|
+
},
|
|
22974
23159
|
"RightsManagementPolicy": {
|
|
22975
23160
|
"description": "Base type for any ODRL policy stored and managed by the TWIN rights-management PAP.",
|
|
22976
23161
|
"type": "object",
|
|
@@ -23183,6 +23368,37 @@
|
|
|
23183
23368
|
"@context",
|
|
23184
23369
|
"@id",
|
|
23185
23370
|
"@type"
|
|
23371
|
+
],
|
|
23372
|
+
"allOf": [
|
|
23373
|
+
{
|
|
23374
|
+
"$ref": "#/components/schemas/RightsManagementPolicyMetadata"
|
|
23375
|
+
}
|
|
23376
|
+
]
|
|
23377
|
+
},
|
|
23378
|
+
"RightsManagementPolicyMetadata": {
|
|
23379
|
+
"description": "PAP-managed metadata attached to stored and returned ODRL policies.",
|
|
23380
|
+
"type": "object",
|
|
23381
|
+
"properties": {
|
|
23382
|
+
"dateCreated": {
|
|
23383
|
+
"type": "string",
|
|
23384
|
+
"description": "schema.org dateCreated — ISO 8601 date-time set by PAP on create."
|
|
23385
|
+
},
|
|
23386
|
+
"dateModified": {
|
|
23387
|
+
"type": "string",
|
|
23388
|
+
"description": "schema.org dateModified — ISO 8601 date-time set by PAP on create and update."
|
|
23389
|
+
}
|
|
23390
|
+
}
|
|
23391
|
+
},
|
|
23392
|
+
"RightsManagementSet": {
|
|
23393
|
+
"description": "Set policy returned by PAP, including optional PAP-managed lifecycle metadata.",
|
|
23394
|
+
"type": "object",
|
|
23395
|
+
"allOf": [
|
|
23396
|
+
{
|
|
23397
|
+
"$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolSet"
|
|
23398
|
+
},
|
|
23399
|
+
{
|
|
23400
|
+
"$ref": "#/components/schemas/RightsManagementPolicyMetadata"
|
|
23401
|
+
}
|
|
23186
23402
|
]
|
|
23187
23403
|
},
|
|
23188
23404
|
"Rule": {
|
package/docs/usage.md
CHANGED
|
@@ -44,6 +44,45 @@ vault-key-create: Create a vault key for an identity
|
|
|
44
44
|
vault-key-import: Import a vault key for an identity
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Server Configuration
|
|
48
|
+
|
|
49
|
+
Key environment variables that control how the node server handles authentication. A full reference is in the `.env` example files.
|
|
50
|
+
|
|
51
|
+
| Variable | Default | Description |
|
|
52
|
+
| -------------------------- | -------------- | ---------------------------------------------- |
|
|
53
|
+
| `TWIN_AUTH_API_KEY_HEADER` | `x-api-key` | HTTP header name for the API key on requests. |
|
|
54
|
+
| `TWIN_AUTH_SIGNING_KEY_ID` | `auth-signing` | Vault key ID used to sign authentication JWTs. |
|
|
55
|
+
|
|
56
|
+
## bootstrap-legacy --help
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
bootstrap-legacy: Bootstrap in legacy mode for backwards compatibility, **will be deprecated in future versions**
|
|
60
|
+
|
|
61
|
+
env-prefix: (string, optional)
|
|
62
|
+
Prefix to use for standard .env files e.g. TWIN_.
|
|
63
|
+
|
|
64
|
+
load-env: (string, optional)
|
|
65
|
+
Comma separated list of paths to .env files to read input parameters from.
|
|
66
|
+
|
|
67
|
+
Example: bootstrap-legacy --load-env=".env.bootstrap-legacy"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The command reads the following environment variables (use `load-env` to supply them from a file):
|
|
71
|
+
|
|
72
|
+
| Variable | Default | Description |
|
|
73
|
+
| ---------------------------- | ------------------------------ | --------------------------------------------------------------------------- |
|
|
74
|
+
| `TWIN_NODE_IDENTITY` | generated | The DID of the node identity. |
|
|
75
|
+
| `TWIN_NODE_MNEMONIC` | randomly generated | The Bip39 mnemonic for the node identity seed. |
|
|
76
|
+
| `TWIN_FEATURES` | `admin-user,wallet` | Comma-separated feature flags: `admin-user`, `wallet`. |
|
|
77
|
+
| `TWIN_ORGANIZATION_IDENTITY` | generated | The DID to use for the organisation identity. |
|
|
78
|
+
| `TWIN_ORGANIZATION_MNEMONIC` | randomly generated | The Bip39 mnemonic for the organisation identity seed. |
|
|
79
|
+
| `TWIN_TENANT_ID` | generated | The tenant ID for the node tenant (multi-tenant only). |
|
|
80
|
+
| `TWIN_TENANT_API_KEY` | generated | The API key for the node tenant (multi-tenant only). |
|
|
81
|
+
| `TWIN_ADMIN_USER_IDENTITY` | generated | The DID for the admin user identity (`admin-user` feature). |
|
|
82
|
+
| `TWIN_ADMIN_USER_MNEMONIC` | randomly generated | The Bip39 mnemonic for the admin user identity seed (`admin-user` feature). |
|
|
83
|
+
| `TWIN_ADMIN_USER_NAME` | `admin@node` or `admin@tenant` | The email/username for the admin user (`admin-user` feature). |
|
|
84
|
+
| `TWIN_ADMIN_USER_PASSWORD` | randomly generated | The password for the admin user (`admin-user` feature). |
|
|
85
|
+
|
|
47
86
|
## identity-create --help
|
|
48
87
|
|
|
49
88
|
```text
|
|
@@ -76,145 +115,146 @@ Path to a .env file to store the command output.
|
|
|
76
115
|
output-env-prefix: (string, optional)
|
|
77
116
|
Prefix to use for variables in the output .env file.
|
|
78
117
|
|
|
118
|
+
node-id: (boolean, default: 'false', optional)
|
|
119
|
+
If true, set the created identity DID as the node identity.
|
|
120
|
+
|
|
121
|
+
node-organization-id: (boolean, default: 'false', optional)
|
|
122
|
+
If true, set the created identity DID as the node organization ID (not available in multi-tenant mode).
|
|
123
|
+
|
|
124
|
+
tenant-organization-id: (string, hex(32), optional)
|
|
125
|
+
The tenant ID to set the created identity DID as the organization ID for (requires multi-tenant mode).
|
|
126
|
+
|
|
79
127
|
Example: identity-create --mnemonic="..." --fund-wallet=true
|
|
80
128
|
```
|
|
81
129
|
|
|
82
130
|
## Example
|
|
83
131
|
|
|
84
|
-
### Bootstrap legacy
|
|
132
|
+
### Bootstrap legacy (single command)
|
|
133
|
+
|
|
134
|
+
Runs the complete bootstrap sequence in one step using values from `.env.bootstrap-legacy`:
|
|
85
135
|
|
|
86
136
|
```shell
|
|
87
137
|
twin-node bootstrap-legacy --load-env=".env.bootstrap-legacy"
|
|
88
138
|
```
|
|
89
139
|
|
|
90
|
-
|
|
140
|
+
The sections below show the equivalent step-by-step commands that replicate the bootstrap-legacy process.
|
|
91
141
|
|
|
92
|
-
|
|
93
|
-
twin-node identity-create --fund-wallet=true --output-json="node-identity.json" --output-env="node-identity.env" --output-env-prefix=node
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Import existing identity details
|
|
142
|
+
---
|
|
97
143
|
|
|
98
|
-
|
|
99
|
-
twin-node identity-import --load-env="my-identity.env" --identity=!MY_DID --mnemonic=!MY_MNEMONIC
|
|
100
|
-
```
|
|
144
|
+
### Step 1 - Create the node identity and associate it with the node
|
|
101
145
|
|
|
102
|
-
|
|
146
|
+
Supply `--fund-wallet=true` when the `wallet` feature is enabled. `--node-id=true` sets the created identity as the node identity in the same step.
|
|
103
147
|
|
|
104
148
|
```shell
|
|
105
|
-
twin-node node-
|
|
149
|
+
twin-node identity-create --node-id=true --fund-wallet=true --output-json="node-identity.json" --output-env="node-identity.env" --output-env-prefix=node
|
|
106
150
|
```
|
|
107
151
|
|
|
108
|
-
###
|
|
152
|
+
### Step 2 - Create the authentication signing key for the node
|
|
109
153
|
|
|
110
154
|
```shell
|
|
111
|
-
twin-node vault-key-create --load-env="node-identity.env" --identity=!NODE_DID --key-id=!TWIN_AUTH_SIGNING_KEY_ID --output-json="node-auth-key.json" --output-env="node-auth-key.env"
|
|
155
|
+
twin-node vault-key-create --load-env="node-identity.env" --identity=!NODE_DID --key-type=Ed25519 --key-id=!TWIN_AUTH_SIGNING_KEY_ID --overwrite-mode=skip --output-json="node-auth-key.json" --output-env="node-auth-key.env"
|
|
112
156
|
```
|
|
113
157
|
|
|
114
|
-
|
|
158
|
+
To import an existing authentication signing key instead:
|
|
115
159
|
|
|
116
160
|
```shell
|
|
117
161
|
twin-node vault-key-import --load-env="node-identity.env,node-auth-key.json" --identity=!NODE_DID --key-id=!TWIN_AUTH_SIGNING_KEY_ID --key-type=!KEY_TYPE --private-key-hex=!PRIVATE_KEY_HEX
|
|
118
162
|
```
|
|
119
163
|
|
|
120
|
-
###
|
|
164
|
+
### Step 3 - Create the organisation identity
|
|
121
165
|
|
|
122
166
|
```shell
|
|
123
|
-
twin-node
|
|
167
|
+
twin-node identity-create --load-env="node-identity.env" --fund-wallet=true --output-json="organization-identity.json" --output-env="organization-identity.env" --output-env-prefix=organization
|
|
124
168
|
```
|
|
125
169
|
|
|
126
|
-
###
|
|
170
|
+
### Step 4 - Add the trust verification method to the organisation identity
|
|
127
171
|
|
|
128
172
|
```shell
|
|
129
|
-
twin-node identity-create --load-env="node-identity.env" --
|
|
173
|
+
twin-node identity-verification-method-create --load-env="node-identity.env,organization-identity.env" --identity=!ORGANIZATION_DID --verification-method-type=assertionMethod --verification-method-id=!TWIN_TRUST_VERIFICATION_METHOD_ID --overwrite-mode=skip --output-json="organization-trust.json" --output-env="organization-trust.env"
|
|
130
174
|
```
|
|
131
175
|
|
|
132
|
-
###
|
|
176
|
+
### Step 5 - Set the organisation identity on the node (single-tenant)
|
|
133
177
|
|
|
134
178
|
```shell
|
|
135
|
-
twin-node
|
|
179
|
+
twin-node set-node-org-id --load-env="organization-identity.env" --organization-id=!ORGANIZATION_DID
|
|
136
180
|
```
|
|
137
181
|
|
|
138
|
-
###
|
|
182
|
+
### Step 6 - Create the node tenant and associate the organisation (multi-tenant only)
|
|
139
183
|
|
|
140
184
|
```shell
|
|
141
|
-
twin-node tenant-
|
|
185
|
+
twin-node tenant-create --load-env="node-identity.env" --label="Node" --output-json="node-tenant.json" --output-env="node-tenant.env" --output-env-prefix=node
|
|
142
186
|
```
|
|
143
187
|
|
|
144
|
-
### Update a tenant to be used by the node
|
|
145
|
-
|
|
146
188
|
```shell
|
|
147
|
-
twin-node tenant-
|
|
189
|
+
twin-node set-tenant-org-id --load-env="node-tenant.env,organization-identity.env" --tenant-id=!NODE_TENANT_ID --organization-id=!ORGANIZATION_DID
|
|
148
190
|
```
|
|
149
191
|
|
|
150
|
-
|
|
192
|
+
To import an existing tenant instead:
|
|
151
193
|
|
|
152
194
|
```shell
|
|
153
|
-
twin-node
|
|
195
|
+
twin-node tenant-import --load-env="node-tenant.json" --tenant-id=!NODE_TENANT_ID --api-key=!NODE_API_KEY --label=!NODE_LABEL --public-origin="https://api.example.com"
|
|
154
196
|
```
|
|
155
197
|
|
|
156
|
-
|
|
198
|
+
To update an existing tenant:
|
|
157
199
|
|
|
158
200
|
```shell
|
|
159
|
-
twin-node
|
|
201
|
+
twin-node tenant-update --load-env="node-tenant.json" --tenant-id=!NODE_TENANT_ID --label="New Label"
|
|
160
202
|
```
|
|
161
203
|
|
|
162
|
-
|
|
204
|
+
To remove a stale organisation alias from a tenant:
|
|
163
205
|
|
|
164
206
|
```shell
|
|
165
207
|
twin-node remove-tenant-org-alias --load-env="node-tenant.env" --tenant-id=!NODE_TENANT_ID --alias=!OLD_ORGANIZATION_DID
|
|
166
208
|
```
|
|
167
209
|
|
|
168
|
-
|
|
210
|
+
---
|
|
169
211
|
|
|
170
|
-
|
|
171
|
-
twin-node identity-verification-method-create --load-env="node-identity.env,organization-identity.env" --identity=!ORGANIZATION_DID --controller=!NODE_DID --verification-method-id=!TWIN_ATTESTATION_VERIFICATION_METHOD_ID --output-json="organization-attestation.json" --output-env="organization-attestation.env"
|
|
172
|
-
```
|
|
212
|
+
The following steps run when the `admin-user` feature is enabled.
|
|
173
213
|
|
|
174
|
-
###
|
|
214
|
+
### Step 7 - Add the blob encryption key to the organisation (if blob encryption is enabled)
|
|
175
215
|
|
|
176
216
|
```shell
|
|
177
|
-
twin-node
|
|
217
|
+
twin-node vault-key-create --load-env="organization-identity.env" --identity=!ORGANIZATION_DID --key-type=ChaCha20Poly1305 --key-id=!TWIN_BLOB_STORAGE_ENCRYPTION_KEY_ID --overwrite-mode=skip --output-json="organization-blob-encryption.json" --output-env="organization-blob-encryption.env"
|
|
178
218
|
```
|
|
179
219
|
|
|
180
|
-
###
|
|
220
|
+
### Step 8 - Add the attestation verification method to the organisation (if attestation is enabled)
|
|
181
221
|
|
|
182
222
|
```shell
|
|
183
|
-
twin-node identity-
|
|
223
|
+
twin-node identity-verification-method-create --load-env="node-identity.env,organization-identity.env" --identity=!ORGANIZATION_DID --verification-method-type=assertionMethod --verification-method-id=!TWIN_ATTESTATION_VERIFICATION_METHOD_ID --overwrite-mode=skip --output-json="organization-attestation.json" --output-env="organization-attestation.env"
|
|
184
224
|
```
|
|
185
225
|
|
|
186
|
-
|
|
226
|
+
To import an existing attestation verification method:
|
|
187
227
|
|
|
188
228
|
```shell
|
|
189
|
-
twin-node identity-verification-method-
|
|
229
|
+
twin-node identity-verification-method-import --load-env="node-identity.env,organization-identity.env,organization-attestation.env" --identity=!ORGANIZATION_DID --verification-method-id=!DID_VERIFICATION_METHOD_ID --private-key-hex=!DID_VERIFICATION_METHOD_PRIVATE_KEY_HEX
|
|
190
230
|
```
|
|
191
231
|
|
|
192
|
-
|
|
232
|
+
To create a verifiable credential using the attestation verification method:
|
|
193
233
|
|
|
194
234
|
```shell
|
|
195
|
-
twin-node identity-
|
|
235
|
+
twin-node identity-verifiable-credential-create --load-env="organization-identity.env,organization-attestation.env" --identity=!ORGANIZATION_DID --verification-method-id=!TWIN_ATTESTATION_VERIFICATION_METHOD_ID --subject-json="subject.json" --output-json="organization-attestation-credential.json" --output-env="organization-attestation-credential.env"
|
|
196
236
|
```
|
|
197
237
|
|
|
198
|
-
### Add
|
|
238
|
+
### Step 9 - Add the immutable proof verification method to the organisation (if immutable proofs are enabled)
|
|
199
239
|
|
|
200
240
|
```shell
|
|
201
|
-
twin-node
|
|
241
|
+
twin-node identity-verification-method-create --load-env="node-identity.env,organization-identity.env" --identity=!ORGANIZATION_DID --verification-method-type=assertionMethod --verification-method-id=!TWIN_IMMUTABLE_PROOF_VERIFICATION_METHOD_ID --overwrite-mode=skip --output-json="organization-immutable-proof.json" --output-env="organization-immutable-proof.env"
|
|
202
242
|
```
|
|
203
243
|
|
|
204
|
-
###
|
|
244
|
+
### Step 10 - Create the admin user identity
|
|
205
245
|
|
|
206
246
|
```shell
|
|
207
|
-
twin-node identity-create --load-env="organization-identity.env" --controller=!ORGANIZATION_DID --output-json="user-identity.json" --output-env="user-identity.env" --output-env-prefix=
|
|
247
|
+
twin-node identity-create --load-env="organization-identity.env" --controller=!ORGANIZATION_DID --output-json="admin-user-identity.json" --output-env="admin-user-identity.env" --output-env-prefix=admin_user
|
|
208
248
|
```
|
|
209
249
|
|
|
210
|
-
###
|
|
250
|
+
### Step 11 - Create the admin user account
|
|
211
251
|
|
|
212
252
|
```shell
|
|
213
|
-
twin-node user-create --load-env="organization-identity.env,user-identity.env,node-tenant.env" --user-identity=!
|
|
253
|
+
twin-node user-create --load-env="organization-identity.env,admin-user-identity.env,node-tenant.env" --user-identity=!ADMIN_USER_DID --organization-identity=!ORGANIZATION_DID --email="admin@node" --given-name="Node" --family-name="Admin" --scope="tenant-admin,user-admin" --output-json="user-account-admin.json" --output-env="user-account-admin.env" --output-env-prefix=admin
|
|
214
254
|
```
|
|
215
255
|
|
|
216
|
-
|
|
256
|
+
To update an existing user:
|
|
217
257
|
|
|
218
258
|
```shell
|
|
219
|
-
twin-node user-update --load-env="organization-identity.env,user-identity.env,node-tenant.env" --email="admin@node" --scope="tenant-admin,foo"
|
|
259
|
+
twin-node user-update --load-env="organization-identity.env,admin-user-identity.env,node-tenant.env" --email="admin@node" --scope="tenant-admin,user-admin,foo"
|
|
220
260
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/node",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.55",
|
|
4
4
|
"description": "TWIN Node serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/node-core": "0.0.3-next.
|
|
17
|
+
"@twin.org/node-core": "0.0.3-next.55"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "git+https://github.com/iotaledger/twin-node/issues"
|