@originals/sdk 1.2.0 → 1.4.2
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/package.json +1 -1
- package/src/did/DIDManager.ts +1 -1
- package/src/did/WebVHManager.ts +11 -2
- package/src/examples/create-module-original.ts +435 -0
- package/src/examples/full-lifecycle-flow.ts +514 -0
- package/src/examples/run.ts +59 -4
- package/src/index.ts +69 -3
- package/src/kinds/KindRegistry.ts +290 -0
- package/src/kinds/index.ts +74 -0
- package/src/kinds/types.ts +470 -0
- package/src/kinds/validators/AgentValidator.ts +257 -0
- package/src/kinds/validators/AppValidator.ts +211 -0
- package/src/kinds/validators/DatasetValidator.ts +242 -0
- package/src/kinds/validators/DocumentValidator.ts +311 -0
- package/src/kinds/validators/MediaValidator.ts +269 -0
- package/src/kinds/validators/ModuleValidator.ts +225 -0
- package/src/kinds/validators/base.ts +276 -0
- package/src/kinds/validators/index.ts +12 -0
- package/src/lifecycle/LifecycleManager.ts +909 -1
- package/src/resources/ResourceManager.ts +655 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/types.ts +202 -0
- package/src/types/common.ts +1 -1
- package/src/vc/CredentialManager.ts +647 -2
- package/tests/integration/createTypedOriginal.test.ts +379 -0
- package/tests/performance/BatchOperations.perf.test.ts +2 -2
- package/tests/unit/kinds/KindRegistry.test.ts +329 -0
- package/tests/unit/kinds/types.test.ts +409 -0
- package/tests/unit/kinds/validators.test.ts +651 -0
- package/tests/unit/lifecycle/LifecycleManager.cleanapi.test.ts +441 -0
- package/tests/unit/resources/ResourceManager.test.ts +740 -0
- package/tests/unit/vc/CredentialManager.helpers.test.ts +527 -0
- package/.turbo/turbo-build.log +0 -1
- package/dist/adapters/FeeOracleMock.d.ts +0 -6
- package/dist/adapters/FeeOracleMock.js +0 -8
- package/dist/adapters/index.d.ts +0 -4
- package/dist/adapters/index.js +0 -4
- package/dist/adapters/providers/OrdHttpProvider.d.ts +0 -56
- package/dist/adapters/providers/OrdHttpProvider.js +0 -110
- package/dist/adapters/providers/OrdMockProvider.d.ts +0 -70
- package/dist/adapters/providers/OrdMockProvider.js +0 -75
- package/dist/adapters/types.d.ts +0 -71
- package/dist/adapters/types.js +0 -1
- package/dist/bitcoin/BitcoinManager.d.ts +0 -15
- package/dist/bitcoin/BitcoinManager.js +0 -262
- package/dist/bitcoin/BroadcastClient.d.ts +0 -30
- package/dist/bitcoin/BroadcastClient.js +0 -35
- package/dist/bitcoin/OrdinalsClient.d.ts +0 -21
- package/dist/bitcoin/OrdinalsClient.js +0 -105
- package/dist/bitcoin/PSBTBuilder.d.ts +0 -24
- package/dist/bitcoin/PSBTBuilder.js +0 -80
- package/dist/bitcoin/fee-calculation.d.ts +0 -14
- package/dist/bitcoin/fee-calculation.js +0 -31
- package/dist/bitcoin/providers/OrdNodeProvider.d.ts +0 -38
- package/dist/bitcoin/providers/OrdNodeProvider.js +0 -67
- package/dist/bitcoin/providers/OrdinalsProvider.d.ts +0 -33
- package/dist/bitcoin/providers/OrdinalsProvider.js +0 -50
- package/dist/bitcoin/providers/types.d.ts +0 -63
- package/dist/bitcoin/providers/types.js +0 -1
- package/dist/bitcoin/transactions/commit.d.ts +0 -89
- package/dist/bitcoin/transactions/commit.js +0 -311
- package/dist/bitcoin/transactions/index.d.ts +0 -7
- package/dist/bitcoin/transactions/index.js +0 -8
- package/dist/bitcoin/transfer.d.ts +0 -9
- package/dist/bitcoin/transfer.js +0 -26
- package/dist/bitcoin/utxo-selection.d.ts +0 -78
- package/dist/bitcoin/utxo-selection.js +0 -237
- package/dist/bitcoin/utxo.d.ts +0 -26
- package/dist/bitcoin/utxo.js +0 -78
- package/dist/contexts/credentials-v1.json +0 -195
- package/dist/contexts/credentials-v2-examples.json +0 -5
- package/dist/contexts/credentials-v2.json +0 -301
- package/dist/contexts/credentials.json +0 -195
- package/dist/contexts/data-integrity-v2.json +0 -81
- package/dist/contexts/dids.json +0 -57
- package/dist/contexts/ed255192020.json +0 -93
- package/dist/contexts/ordinals-plus.json +0 -23
- package/dist/contexts/originals.json +0 -22
- package/dist/core/OriginalsSDK.d.ts +0 -158
- package/dist/core/OriginalsSDK.js +0 -274
- package/dist/crypto/Multikey.d.ts +0 -30
- package/dist/crypto/Multikey.js +0 -149
- package/dist/crypto/Signer.d.ts +0 -21
- package/dist/crypto/Signer.js +0 -196
- package/dist/crypto/noble-init.d.ts +0 -18
- package/dist/crypto/noble-init.js +0 -106
- package/dist/did/BtcoDidResolver.d.ts +0 -57
- package/dist/did/BtcoDidResolver.js +0 -166
- package/dist/did/DIDManager.d.ts +0 -101
- package/dist/did/DIDManager.js +0 -493
- package/dist/did/Ed25519Verifier.d.ts +0 -30
- package/dist/did/Ed25519Verifier.js +0 -59
- package/dist/did/KeyManager.d.ts +0 -17
- package/dist/did/KeyManager.js +0 -207
- package/dist/did/WebVHManager.d.ts +0 -100
- package/dist/did/WebVHManager.js +0 -304
- package/dist/did/createBtcoDidDocument.d.ts +0 -10
- package/dist/did/createBtcoDidDocument.js +0 -42
- package/dist/did/providers/OrdinalsClientProviderAdapter.d.ts +0 -23
- package/dist/did/providers/OrdinalsClientProviderAdapter.js +0 -51
- package/dist/events/EventEmitter.d.ts +0 -115
- package/dist/events/EventEmitter.js +0 -198
- package/dist/events/index.d.ts +0 -7
- package/dist/events/index.js +0 -6
- package/dist/events/types.d.ts +0 -286
- package/dist/events/types.js +0 -9
- package/dist/examples/basic-usage.d.ts +0 -3
- package/dist/examples/basic-usage.js +0 -62
- package/dist/examples/run.d.ts +0 -1
- package/dist/examples/run.js +0 -4
- package/dist/index.d.ts +0 -39
- package/dist/index.js +0 -47
- package/dist/lifecycle/BatchOperations.d.ts +0 -147
- package/dist/lifecycle/BatchOperations.js +0 -251
- package/dist/lifecycle/LifecycleManager.d.ts +0 -116
- package/dist/lifecycle/LifecycleManager.js +0 -971
- package/dist/lifecycle/OriginalsAsset.d.ts +0 -164
- package/dist/lifecycle/OriginalsAsset.js +0 -380
- package/dist/lifecycle/ProvenanceQuery.d.ts +0 -126
- package/dist/lifecycle/ProvenanceQuery.js +0 -220
- package/dist/lifecycle/ResourceVersioning.d.ts +0 -73
- package/dist/lifecycle/ResourceVersioning.js +0 -127
- package/dist/migration/MigrationManager.d.ts +0 -86
- package/dist/migration/MigrationManager.js +0 -412
- package/dist/migration/audit/AuditLogger.d.ts +0 -51
- package/dist/migration/audit/AuditLogger.js +0 -156
- package/dist/migration/checkpoint/CheckpointManager.d.ts +0 -31
- package/dist/migration/checkpoint/CheckpointManager.js +0 -96
- package/dist/migration/checkpoint/CheckpointStorage.d.ts +0 -26
- package/dist/migration/checkpoint/CheckpointStorage.js +0 -89
- package/dist/migration/index.d.ts +0 -22
- package/dist/migration/index.js +0 -27
- package/dist/migration/operations/BaseMigration.d.ts +0 -48
- package/dist/migration/operations/BaseMigration.js +0 -83
- package/dist/migration/operations/PeerToBtcoMigration.d.ts +0 -25
- package/dist/migration/operations/PeerToBtcoMigration.js +0 -67
- package/dist/migration/operations/PeerToWebvhMigration.d.ts +0 -19
- package/dist/migration/operations/PeerToWebvhMigration.js +0 -46
- package/dist/migration/operations/WebvhToBtcoMigration.d.ts +0 -25
- package/dist/migration/operations/WebvhToBtcoMigration.js +0 -67
- package/dist/migration/rollback/RollbackManager.d.ts +0 -29
- package/dist/migration/rollback/RollbackManager.js +0 -146
- package/dist/migration/state/StateMachine.d.ts +0 -25
- package/dist/migration/state/StateMachine.js +0 -76
- package/dist/migration/state/StateTracker.d.ts +0 -36
- package/dist/migration/state/StateTracker.js +0 -123
- package/dist/migration/types.d.ts +0 -306
- package/dist/migration/types.js +0 -33
- package/dist/migration/validation/BitcoinValidator.d.ts +0 -13
- package/dist/migration/validation/BitcoinValidator.js +0 -83
- package/dist/migration/validation/CredentialValidator.d.ts +0 -13
- package/dist/migration/validation/CredentialValidator.js +0 -46
- package/dist/migration/validation/DIDCompatibilityValidator.d.ts +0 -16
- package/dist/migration/validation/DIDCompatibilityValidator.js +0 -127
- package/dist/migration/validation/LifecycleValidator.d.ts +0 -10
- package/dist/migration/validation/LifecycleValidator.js +0 -52
- package/dist/migration/validation/StorageValidator.d.ts +0 -10
- package/dist/migration/validation/StorageValidator.js +0 -65
- package/dist/migration/validation/ValidationPipeline.d.ts +0 -29
- package/dist/migration/validation/ValidationPipeline.js +0 -180
- package/dist/storage/LocalStorageAdapter.d.ts +0 -11
- package/dist/storage/LocalStorageAdapter.js +0 -53
- package/dist/storage/MemoryStorageAdapter.d.ts +0 -6
- package/dist/storage/MemoryStorageAdapter.js +0 -21
- package/dist/storage/StorageAdapter.d.ts +0 -16
- package/dist/storage/StorageAdapter.js +0 -1
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.js +0 -2
- package/dist/types/bitcoin.d.ts +0 -84
- package/dist/types/bitcoin.js +0 -1
- package/dist/types/common.d.ts +0 -82
- package/dist/types/common.js +0 -1
- package/dist/types/credentials.d.ts +0 -75
- package/dist/types/credentials.js +0 -1
- package/dist/types/did.d.ts +0 -26
- package/dist/types/did.js +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.js +0 -5
- package/dist/types/network.d.ts +0 -78
- package/dist/types/network.js +0 -145
- package/dist/utils/EventLogger.d.ts +0 -71
- package/dist/utils/EventLogger.js +0 -232
- package/dist/utils/Logger.d.ts +0 -106
- package/dist/utils/Logger.js +0 -257
- package/dist/utils/MetricsCollector.d.ts +0 -110
- package/dist/utils/MetricsCollector.js +0 -264
- package/dist/utils/bitcoin-address.d.ts +0 -38
- package/dist/utils/bitcoin-address.js +0 -113
- package/dist/utils/cbor.d.ts +0 -2
- package/dist/utils/cbor.js +0 -9
- package/dist/utils/encoding.d.ts +0 -37
- package/dist/utils/encoding.js +0 -120
- package/dist/utils/hash.d.ts +0 -1
- package/dist/utils/hash.js +0 -5
- package/dist/utils/retry.d.ts +0 -10
- package/dist/utils/retry.js +0 -35
- package/dist/utils/satoshi-validation.d.ts +0 -60
- package/dist/utils/satoshi-validation.js +0 -156
- package/dist/utils/serialization.d.ts +0 -14
- package/dist/utils/serialization.js +0 -76
- package/dist/utils/telemetry.d.ts +0 -17
- package/dist/utils/telemetry.js +0 -24
- package/dist/utils/validation.d.ts +0 -5
- package/dist/utils/validation.js +0 -98
- package/dist/vc/CredentialManager.d.ts +0 -22
- package/dist/vc/CredentialManager.js +0 -227
- package/dist/vc/Issuer.d.ts +0 -27
- package/dist/vc/Issuer.js +0 -70
- package/dist/vc/Verifier.d.ts +0 -16
- package/dist/vc/Verifier.js +0 -50
- package/dist/vc/cryptosuites/bbs.d.ts +0 -44
- package/dist/vc/cryptosuites/bbs.js +0 -213
- package/dist/vc/cryptosuites/bbsSimple.d.ts +0 -9
- package/dist/vc/cryptosuites/bbsSimple.js +0 -12
- package/dist/vc/cryptosuites/eddsa.d.ts +0 -30
- package/dist/vc/cryptosuites/eddsa.js +0 -81
- package/dist/vc/documentLoader.d.ts +0 -16
- package/dist/vc/documentLoader.js +0 -59
- package/dist/vc/proofs/data-integrity.d.ts +0 -21
- package/dist/vc/proofs/data-integrity.js +0 -15
- package/dist/vc/utils/jsonld.d.ts +0 -2
- package/dist/vc/utils/jsonld.js +0 -15
- package/test/logs/did_webvh_QmNTn9Kkp8dQ75WrF9xqJ2kuDp9QhKc3aPiERRMj8XoTBN_example_com.jsonl +0 -1
- package/test/logs/did_webvh_QmNu4MNr8Lr5txx5gYNhuhZDchXsZEu3hJXKYuphpWTPDp_example_com_users_etc_passwd.jsonl +0 -1
- package/test/logs/did_webvh_QmR9MrGZACzjKETA8SBRNCKG11HxU85c4bVR2qN5eDCfsD_example_com.jsonl +0 -1
- package/test/logs/did_webvh_QmUc5suaqRM2P4nrXxZwqYMfqzhdMqjuL7oJaJbEpCQVCd_example_com_users_etc_passwd.jsonl +0 -1
- package/test/logs/did_webvh_QmUkiB2RCV2VZ1RTXsCebWN25Eiy9TLvpzDWAJNjhgvB4X_example_com_etc_passwd.jsonl +0 -1
- package/test/logs/did_webvh_QmUoRTe8UMwpAQXZSAW7pjAgZK1tq2X3C6Kfxq3UXGcaGy_example_com_secret.jsonl +0 -1
- package/test/logs/did_webvh_QmWWot3chx1t6KwTmcE5i2FeDZ5JMkQw3qXycsKDVmJ9Be_example_com_users_alice.jsonl +0 -1
- package/test/logs/did_webvh_QmWvVgALL5kjZdpgR7KZay7J8UiiUr834kkRmWeFAxjAuC_example_com_users_etc_passwd.jsonl +0 -1
- package/test/logs/did_webvh_QmWwaRQHUZAFcKihFC6xR6tRTTrQhHPTku6azf1egWbpy1_example_com_users_alice.jsonl +0 -1
- package/test/logs/did_webvh_QmXJLtkz23r7AozbtXsZMKWnVU6rd38CkVtjdWuATU3Yp6_example_com_users_alice123_profile.jsonl +0 -1
- package/test/logs/did_webvh_QmYsce448po14oDE1wXbyaP6wY9HQgHSKLwdezn1k577SF_example_com_my_org_user_name_test_123.jsonl +0 -1
- package/test/logs/did_webvh_QmZBeNzzqajxdfwcDUPZ4P8C5YSXyRztrAwmPiKuKUxmAK_example_com.jsonl +0 -1
- package/test/logs/did_webvh_QmZhJsqxizwVbRtqCUkmE6XQunSxtxMt3gbTYadVBNAaEq_example_com.jsonl +0 -1
- package/test/logs/did_webvh_QmZk7NHU2D57RzzbMq4tWW9gBa9AqtVTWfiRM6RFdwGVj2_example_com.jsonl +0 -1
- package/test/logs/did_webvh_QmZshSXp9w8ovH62zGGBS1b5pGGPsuYiu1VQ935sga2hWF_example_com_level1_level2.jsonl +0 -1
- package/test/logs/did_webvh_QmbWAmw7HQL7vKJyCsctZihXf1rmT4sGvggKCPKWcUWjw1_example_com.jsonl +0 -1
- package/test/logs/did_webvh_QmbdLUMbYs3juR39TLB6hhrFWLcNg45ybUzeBJCS1MhCh1_example_com_C_Windows_System32.jsonl +0 -1
- package/test/logs/did_webvh_QmcaQ1Ma4gkSbae85aCm8Mv4rvdT2Sb2RR3JzYwrm5XBq8_example_com_etc_passwd.jsonl +0 -1
- package/test/logs/did_webvh_QmcbA7WQhsBqZSoDpKJHjV8Q5o53h8vmgJhQfo6rqTY5ho_example_com.jsonl +0 -1
- package/test/logs/did_webvh_Qmdy8uWr2gkUJrXsThynAug3DASTWwb3onEj89LKmMGZYB_example_com.jsonl +0 -1
- package/tests/e2e/README.md +0 -97
- package/tests/e2e/example.spec.ts +0 -78
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"@version": 1.1,
|
|
4
|
-
"@protected": true,
|
|
5
|
-
"id": "@id",
|
|
6
|
-
"type": "@type",
|
|
7
|
-
"VerifiableCredential": {
|
|
8
|
-
"@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
|
|
9
|
-
"@context": {
|
|
10
|
-
"@version": 1.1,
|
|
11
|
-
"@protected": true,
|
|
12
|
-
"id": "@id",
|
|
13
|
-
"type": "@type",
|
|
14
|
-
"cred": "https://www.w3.org/2018/credentials#",
|
|
15
|
-
"sec": "https://w3id.org/security#",
|
|
16
|
-
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
17
|
-
"credentialSchema": {
|
|
18
|
-
"@id": "cred:credentialSchema",
|
|
19
|
-
"@type": "@id",
|
|
20
|
-
"@context": {
|
|
21
|
-
"@version": 1.1,
|
|
22
|
-
"@protected": true,
|
|
23
|
-
"id": "@id",
|
|
24
|
-
"type": "@type",
|
|
25
|
-
"cred": "https://www.w3.org/2018/credentials#",
|
|
26
|
-
"JsonSchemaValidator2018": "cred:JsonSchemaValidator2018"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"credentialStatus": { "@id": "cred:credentialStatus", "@type": "@id" },
|
|
30
|
-
"credentialSubject": { "@id": "cred:credentialSubject", "@type": "@id" },
|
|
31
|
-
"evidence": { "@id": "cred:evidence", "@type": "@id" },
|
|
32
|
-
"expirationDate": { "@id": "cred:expirationDate", "@type": "xsd:dateTime" },
|
|
33
|
-
"holder": { "@id": "cred:holder", "@type": "@id" },
|
|
34
|
-
"issued": { "@id": "cred:issued", "@type": "xsd:dateTime" },
|
|
35
|
-
"issuer": { "@id": "cred:issuer", "@type": "@id" },
|
|
36
|
-
"issuanceDate": { "@id": "cred:issuanceDate", "@type": "xsd:dateTime" },
|
|
37
|
-
"proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
|
|
38
|
-
"refreshService": {
|
|
39
|
-
"@id": "cred:refreshService",
|
|
40
|
-
"@type": "@id",
|
|
41
|
-
"@context": {
|
|
42
|
-
"@version": 1.1,
|
|
43
|
-
"@protected": true,
|
|
44
|
-
"id": "@id",
|
|
45
|
-
"type": "@type",
|
|
46
|
-
"cred": "https://www.w3.org/2018/credentials#",
|
|
47
|
-
"ManualRefreshService2018": "cred:ManualRefreshService2018"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"termsOfUse": { "@id": "cred:termsOfUse", "@type": "@id" },
|
|
51
|
-
"validFrom": { "@id": "cred:validFrom", "@type": "xsd:dateTime" },
|
|
52
|
-
"validUntil": { "@id": "cred:validUntil", "@type": "xsd:dateTime" }
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"VerifiablePresentation": {
|
|
56
|
-
"@id": "https://www.w3.org/2018/credentials#VerifiablePresentation",
|
|
57
|
-
"@context": {
|
|
58
|
-
"@version": 1.1,
|
|
59
|
-
"@protected": true,
|
|
60
|
-
"id": "@id",
|
|
61
|
-
"type": "@type",
|
|
62
|
-
"cred": "https://www.w3.org/2018/credentials#",
|
|
63
|
-
"sec": "https://w3id.org/security#",
|
|
64
|
-
"holder": { "@id": "cred:holder", "@type": "@id" },
|
|
65
|
-
"proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
|
|
66
|
-
"verifiableCredential": { "@id": "cred:verifiableCredential", "@type": "@id", "@container": "@graph" }
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"EcdsaSecp256k1Signature2019": {
|
|
70
|
-
"@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019",
|
|
71
|
-
"@context": {
|
|
72
|
-
"@version": 1.1,
|
|
73
|
-
"@protected": true,
|
|
74
|
-
"id": "@id",
|
|
75
|
-
"type": "@type",
|
|
76
|
-
"sec": "https://w3id.org/security#",
|
|
77
|
-
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
78
|
-
"challenge": "sec:challenge",
|
|
79
|
-
"created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
|
|
80
|
-
"domain": "sec:domain",
|
|
81
|
-
"expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
|
|
82
|
-
"jws": "sec:jws",
|
|
83
|
-
"nonce": "sec:nonce",
|
|
84
|
-
"proofPurpose": {
|
|
85
|
-
"@id": "sec:proofPurpose",
|
|
86
|
-
"@type": "@vocab",
|
|
87
|
-
"@context": {
|
|
88
|
-
"@version": 1.1,
|
|
89
|
-
"@protected": true,
|
|
90
|
-
"id": "@id",
|
|
91
|
-
"type": "@type",
|
|
92
|
-
"sec": "https://w3id.org/security#",
|
|
93
|
-
"assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
|
|
94
|
-
"authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"proofValue": "sec:proofValue",
|
|
98
|
-
"verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"EcdsaSecp256r1Signature2019": {
|
|
102
|
-
"@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019",
|
|
103
|
-
"@context": {
|
|
104
|
-
"@version": 1.1,
|
|
105
|
-
"@protected": true,
|
|
106
|
-
"id": "@id",
|
|
107
|
-
"type": "@type",
|
|
108
|
-
"sec": "https://w3id.org/security#",
|
|
109
|
-
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
110
|
-
"challenge": "sec:challenge",
|
|
111
|
-
"created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
|
|
112
|
-
"domain": "sec:domain",
|
|
113
|
-
"expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
|
|
114
|
-
"jws": "sec:jws",
|
|
115
|
-
"nonce": "sec:nonce",
|
|
116
|
-
"proofPurpose": {
|
|
117
|
-
"@id": "sec:proofPurpose",
|
|
118
|
-
"@type": "@vocab",
|
|
119
|
-
"@context": {
|
|
120
|
-
"@version": 1.1,
|
|
121
|
-
"@protected": true,
|
|
122
|
-
"id": "@id",
|
|
123
|
-
"type": "@type",
|
|
124
|
-
"sec": "https://w3id.org/security#",
|
|
125
|
-
"assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
|
|
126
|
-
"authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"proofValue": "sec:proofValue",
|
|
130
|
-
"verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
"Ed25519Signature2018": {
|
|
134
|
-
"@id": "https://w3id.org/security#Ed25519Signature2018",
|
|
135
|
-
"@context": {
|
|
136
|
-
"@version": 1.1,
|
|
137
|
-
"@protected": true,
|
|
138
|
-
"id": "@id",
|
|
139
|
-
"type": "@type",
|
|
140
|
-
"sec": "https://w3id.org/security#",
|
|
141
|
-
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
142
|
-
"challenge": "sec:challenge",
|
|
143
|
-
"created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
|
|
144
|
-
"domain": "sec:domain",
|
|
145
|
-
"expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
|
|
146
|
-
"jws": "sec:jws",
|
|
147
|
-
"nonce": "sec:nonce",
|
|
148
|
-
"proofPurpose": {
|
|
149
|
-
"@id": "sec:proofPurpose",
|
|
150
|
-
"@type": "@vocab",
|
|
151
|
-
"@context": {
|
|
152
|
-
"@version": 1.1,
|
|
153
|
-
"@protected": true,
|
|
154
|
-
"id": "@id",
|
|
155
|
-
"type": "@type",
|
|
156
|
-
"sec": "https://w3id.org/security#",
|
|
157
|
-
"assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
|
|
158
|
-
"authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"proofValue": "sec:proofValue",
|
|
162
|
-
"verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"RsaSignature2018": {
|
|
166
|
-
"@id": "https://w3id.org/security#RsaSignature2018",
|
|
167
|
-
"@context": {
|
|
168
|
-
"@version": 1.1,
|
|
169
|
-
"@protected": true,
|
|
170
|
-
"challenge": "sec:challenge",
|
|
171
|
-
"created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
|
|
172
|
-
"domain": "sec:domain",
|
|
173
|
-
"expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
|
|
174
|
-
"jws": "sec:jws",
|
|
175
|
-
"nonce": "sec:nonce",
|
|
176
|
-
"proofPurpose": {
|
|
177
|
-
"@id": "sec:proofPurpose",
|
|
178
|
-
"@type": "@vocab",
|
|
179
|
-
"@context": {
|
|
180
|
-
"@version": 1.1,
|
|
181
|
-
"@protected": true,
|
|
182
|
-
"id": "@id",
|
|
183
|
-
"type": "@type",
|
|
184
|
-
"sec": "https://w3id.org/security#",
|
|
185
|
-
"assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
|
|
186
|
-
"authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
"proofValue": "sec:proofValue",
|
|
190
|
-
"verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"proof": { "@id": "https://w3id.org/security#proof", "@type": "@id", "@container": "@graph" }
|
|
194
|
-
}
|
|
195
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"id": "@id",
|
|
4
|
-
"type": "@type",
|
|
5
|
-
"@protected": true,
|
|
6
|
-
"proof": {
|
|
7
|
-
"@id": "https://w3id.org/security#proof",
|
|
8
|
-
"@type": "@id",
|
|
9
|
-
"@container": "@graph"
|
|
10
|
-
},
|
|
11
|
-
"DataIntegrityProof": {
|
|
12
|
-
"@id": "https://w3id.org/security#DataIntegrityProof",
|
|
13
|
-
"@context": {
|
|
14
|
-
"@protected": true,
|
|
15
|
-
"id": "@id",
|
|
16
|
-
"type": "@type",
|
|
17
|
-
"challenge": "https://w3id.org/security#challenge",
|
|
18
|
-
"created": {
|
|
19
|
-
"@id": "http://purl.org/dc/terms/created",
|
|
20
|
-
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
21
|
-
},
|
|
22
|
-
"domain": "https://w3id.org/security#domain",
|
|
23
|
-
"expires": {
|
|
24
|
-
"@id": "https://w3id.org/security#expiration",
|
|
25
|
-
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
26
|
-
},
|
|
27
|
-
"nonce": "https://w3id.org/security#nonce",
|
|
28
|
-
"previousProof": {
|
|
29
|
-
"@id": "https://w3id.org/security#previousProof",
|
|
30
|
-
"@type": "@id"
|
|
31
|
-
},
|
|
32
|
-
"proofPurpose": {
|
|
33
|
-
"@id": "https://w3id.org/security#proofPurpose",
|
|
34
|
-
"@type": "@vocab",
|
|
35
|
-
"@context": {
|
|
36
|
-
"@protected": true,
|
|
37
|
-
"id": "@id",
|
|
38
|
-
"type": "@type",
|
|
39
|
-
"assertionMethod": {
|
|
40
|
-
"@id": "https://w3id.org/security#assertionMethod",
|
|
41
|
-
"@type": "@id",
|
|
42
|
-
"@container": "@set"
|
|
43
|
-
},
|
|
44
|
-
"authentication": {
|
|
45
|
-
"@id": "https://w3id.org/security#authenticationMethod",
|
|
46
|
-
"@type": "@id",
|
|
47
|
-
"@container": "@set"
|
|
48
|
-
},
|
|
49
|
-
"capabilityInvocation": {
|
|
50
|
-
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
51
|
-
"@type": "@id",
|
|
52
|
-
"@container": "@set"
|
|
53
|
-
},
|
|
54
|
-
"capabilityDelegation": {
|
|
55
|
-
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
56
|
-
"@type": "@id",
|
|
57
|
-
"@container": "@set"
|
|
58
|
-
},
|
|
59
|
-
"keyAgreement": {
|
|
60
|
-
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
61
|
-
"@type": "@id",
|
|
62
|
-
"@container": "@set"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"cryptosuite": {
|
|
67
|
-
"@id": "https://w3id.org/security#cryptosuite",
|
|
68
|
-
"@type": "https://w3id.org/security#cryptosuiteString"
|
|
69
|
-
},
|
|
70
|
-
"proofValue": {
|
|
71
|
-
"@id": "https://w3id.org/security#proofValue",
|
|
72
|
-
"@type": "https://w3id.org/security#multibase"
|
|
73
|
-
},
|
|
74
|
-
"verificationMethod": {
|
|
75
|
-
"@id": "https://w3id.org/security#verificationMethod",
|
|
76
|
-
"@type": "@id"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
package/dist/contexts/dids.json
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"@protected": true,
|
|
4
|
-
"id": "@id",
|
|
5
|
-
"type": "@type",
|
|
6
|
-
"alsoKnownAs": {
|
|
7
|
-
"@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
|
|
8
|
-
"@type": "@id"
|
|
9
|
-
},
|
|
10
|
-
"assertionMethod": {
|
|
11
|
-
"@id": "https://w3id.org/security#assertionMethod",
|
|
12
|
-
"@type": "@id",
|
|
13
|
-
"@container": "@set"
|
|
14
|
-
},
|
|
15
|
-
"authentication": {
|
|
16
|
-
"@id": "https://w3id.org/security#authenticationMethod",
|
|
17
|
-
"@type": "@id",
|
|
18
|
-
"@container": "@set"
|
|
19
|
-
},
|
|
20
|
-
"capabilityDelegation": {
|
|
21
|
-
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
22
|
-
"@type": "@id",
|
|
23
|
-
"@container": "@set"
|
|
24
|
-
},
|
|
25
|
-
"capabilityInvocation": {
|
|
26
|
-
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
27
|
-
"@type": "@id",
|
|
28
|
-
"@container": "@set"
|
|
29
|
-
},
|
|
30
|
-
"controller": {
|
|
31
|
-
"@id": "https://w3id.org/security#controller",
|
|
32
|
-
"@type": "@id"
|
|
33
|
-
},
|
|
34
|
-
"keyAgreement": {
|
|
35
|
-
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
36
|
-
"@type": "@id",
|
|
37
|
-
"@container": "@set"
|
|
38
|
-
},
|
|
39
|
-
"service": {
|
|
40
|
-
"@id": "https://www.w3.org/ns/did#service",
|
|
41
|
-
"@type": "@id",
|
|
42
|
-
"@context": {
|
|
43
|
-
"@protected": true,
|
|
44
|
-
"id": "@id",
|
|
45
|
-
"type": "@type",
|
|
46
|
-
"serviceEndpoint": {
|
|
47
|
-
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
|
|
48
|
-
"@type": "@id"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"verificationMethod": {
|
|
53
|
-
"@id": "https://w3id.org/security#verificationMethod",
|
|
54
|
-
"@type": "@id"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"id": "@id",
|
|
4
|
-
"type": "@type",
|
|
5
|
-
"@protected": true,
|
|
6
|
-
"proof": {
|
|
7
|
-
"@id": "https://w3id.org/security#proof",
|
|
8
|
-
"@type": "@id",
|
|
9
|
-
"@container": "@graph"
|
|
10
|
-
},
|
|
11
|
-
"Ed25519VerificationKey2020": {
|
|
12
|
-
"@id": "https://w3id.org/security#Ed25519VerificationKey2020",
|
|
13
|
-
"@context": {
|
|
14
|
-
"@protected": true,
|
|
15
|
-
"id": "@id",
|
|
16
|
-
"type": "@type",
|
|
17
|
-
"controller": {
|
|
18
|
-
"@id": "https://w3id.org/security#controller",
|
|
19
|
-
"@type": "@id"
|
|
20
|
-
},
|
|
21
|
-
"revoked": {
|
|
22
|
-
"@id": "https://w3id.org/security#revoked",
|
|
23
|
-
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
24
|
-
},
|
|
25
|
-
"publicKeyMultibase": {
|
|
26
|
-
"@id": "https://w3id.org/security#publicKeyMultibase",
|
|
27
|
-
"@type": "https://w3id.org/security#multibase"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"Ed25519Signature2020": {
|
|
32
|
-
"@id": "https://w3id.org/security#Ed25519Signature2020",
|
|
33
|
-
"@context": {
|
|
34
|
-
"@protected": true,
|
|
35
|
-
"id": "@id",
|
|
36
|
-
"type": "@type",
|
|
37
|
-
"challenge": "https://w3id.org/security#challenge",
|
|
38
|
-
"created": {
|
|
39
|
-
"@id": "http://purl.org/dc/terms/created",
|
|
40
|
-
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
41
|
-
},
|
|
42
|
-
"domain": "https://w3id.org/security#domain",
|
|
43
|
-
"expires": {
|
|
44
|
-
"@id": "https://w3id.org/security#expiration",
|
|
45
|
-
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
46
|
-
},
|
|
47
|
-
"nonce": "https://w3id.org/security#nonce",
|
|
48
|
-
"proofPurpose": {
|
|
49
|
-
"@id": "https://w3id.org/security#proofPurpose",
|
|
50
|
-
"@type": "@vocab",
|
|
51
|
-
"@context": {
|
|
52
|
-
"@protected": true,
|
|
53
|
-
"id": "@id",
|
|
54
|
-
"type": "@type",
|
|
55
|
-
"assertionMethod": {
|
|
56
|
-
"@id": "https://w3id.org/security#assertionMethod",
|
|
57
|
-
"@type": "@id",
|
|
58
|
-
"@container": "@set"
|
|
59
|
-
},
|
|
60
|
-
"authentication": {
|
|
61
|
-
"@id": "https://w3id.org/security#authenticationMethod",
|
|
62
|
-
"@type": "@id",
|
|
63
|
-
"@container": "@set"
|
|
64
|
-
},
|
|
65
|
-
"capabilityInvocation": {
|
|
66
|
-
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
67
|
-
"@type": "@id",
|
|
68
|
-
"@container": "@set"
|
|
69
|
-
},
|
|
70
|
-
"capabilityDelegation": {
|
|
71
|
-
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
72
|
-
"@type": "@id",
|
|
73
|
-
"@container": "@set"
|
|
74
|
-
},
|
|
75
|
-
"keyAgreement": {
|
|
76
|
-
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
77
|
-
"@type": "@id",
|
|
78
|
-
"@container": "@set"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"proofValue": {
|
|
83
|
-
"@id": "https://w3id.org/security#proofValue",
|
|
84
|
-
"@type": "https://w3id.org/security#multibase"
|
|
85
|
-
},
|
|
86
|
-
"verificationMethod": {
|
|
87
|
-
"@id": "https://w3id.org/security#verificationMethod",
|
|
88
|
-
"@type": "@id"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"@version": 1.1,
|
|
4
|
-
"id": "@id",
|
|
5
|
-
"type": "@type",
|
|
6
|
-
"VerifiableCollectible": "https://ordinals.plus/vocab/v1#VerifiableCollectible",
|
|
7
|
-
"VerifiableCollectibleCredential": "https://ordinals.plus/vocab/v1#VerifiableCollectibleCredential",
|
|
8
|
-
"VerifiableCollectibleTrait": "https://ordinals.plus/vocab/v1#VerifiableCollectibleTrait",
|
|
9
|
-
"VerifiableCollectibleTraitCredential": "https://ordinals.plus/vocab/v1#VerifiableCollectibleTraitCredential",
|
|
10
|
-
"CuratedCollection": "https://ordinals.plus/vocab/v1#CuratedCollection",
|
|
11
|
-
"CuratedCollectionCredential": "https://ordinals.plus/vocab/v1#CuratedCollectionCredential",
|
|
12
|
-
"attributes": {
|
|
13
|
-
"@id": "https://ordinals.plus/vocab/v1#attributes",
|
|
14
|
-
"@container": "@set"
|
|
15
|
-
},
|
|
16
|
-
"items": {
|
|
17
|
-
"@id": "https://ordinals.plus/vocab/v1#items",
|
|
18
|
-
"@container": "@set"
|
|
19
|
-
},
|
|
20
|
-
"traitType": "https://ordinals.plus/vocab/v1#traitType",
|
|
21
|
-
"value": "https://ordinals.plus/vocab/v1#traitValue"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"@version": 1.1,
|
|
4
|
-
"type": "@type",
|
|
5
|
-
"id": "@id",
|
|
6
|
-
"Originals": "https://originals.build",
|
|
7
|
-
"OriginalsBundle": "Originals:OriginalsBundle",
|
|
8
|
-
"ResourceCreated": "Originals:ResourceCreated",
|
|
9
|
-
"ResourceUpdated": "Originals:ResourceUpdated",
|
|
10
|
-
"ResourceMigrated": "Originals:ResourceMigrated",
|
|
11
|
-
"attributes": {
|
|
12
|
-
"@id": "Originals:attributes",
|
|
13
|
-
"@container": "@set"
|
|
14
|
-
},
|
|
15
|
-
"resources": "Originals:resources",
|
|
16
|
-
"verifiableCredentials": "Originals:verifiableCredentials",
|
|
17
|
-
"content": "Originals:content",
|
|
18
|
-
"trait_type": "Originals:trait_type",
|
|
19
|
-
"display_type": "Originals:display_type",
|
|
20
|
-
"value": "Originals:value"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { DIDManager } from '../did/DIDManager';
|
|
2
|
-
import { CredentialManager } from '../vc/CredentialManager';
|
|
3
|
-
import { LifecycleManager } from '../lifecycle/LifecycleManager';
|
|
4
|
-
import { BitcoinManager } from '../bitcoin/BitcoinManager';
|
|
5
|
-
import { OriginalsConfig, KeyStore, ExternalSigner, ExternalVerifier } from '../types';
|
|
6
|
-
import { DIDDocument, VerificationMethod, ServiceEndpoint } from '../types/did';
|
|
7
|
-
import { Logger } from '../utils/Logger';
|
|
8
|
-
import { MetricsCollector } from '../utils/MetricsCollector';
|
|
9
|
-
interface DIDLogEntry {
|
|
10
|
-
versionId: string;
|
|
11
|
-
versionTime: string;
|
|
12
|
-
parameters: Record<string, unknown>;
|
|
13
|
-
state: Record<string, unknown>;
|
|
14
|
-
proof?: Record<string, unknown>[];
|
|
15
|
-
}
|
|
16
|
-
type DIDLog = DIDLogEntry[];
|
|
17
|
-
interface DIDResolutionMeta {
|
|
18
|
-
versionId: string;
|
|
19
|
-
created: string;
|
|
20
|
-
updated: string;
|
|
21
|
-
previousLogEntryHash?: string;
|
|
22
|
-
updateKeys: string[];
|
|
23
|
-
scid: string;
|
|
24
|
-
prerotation: boolean;
|
|
25
|
-
portable: boolean;
|
|
26
|
-
nextKeyHashes: string[];
|
|
27
|
-
deactivated: boolean;
|
|
28
|
-
witness?: unknown;
|
|
29
|
-
watchers?: string[] | null;
|
|
30
|
-
error?: string;
|
|
31
|
-
problemDetails?: unknown;
|
|
32
|
-
latestVersionId?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface OriginalResult {
|
|
35
|
-
did: string;
|
|
36
|
-
doc: DIDDocument;
|
|
37
|
-
log: DIDLog;
|
|
38
|
-
meta: DIDResolutionMeta;
|
|
39
|
-
}
|
|
40
|
-
export interface CreateDIDOriginalOptions {
|
|
41
|
-
type: 'did';
|
|
42
|
-
domain: string;
|
|
43
|
-
signer: ExternalSigner;
|
|
44
|
-
verifier?: ExternalVerifier;
|
|
45
|
-
updateKeys: string[];
|
|
46
|
-
verificationMethods: VerificationMethod[];
|
|
47
|
-
paths?: string[];
|
|
48
|
-
controller?: string;
|
|
49
|
-
context?: string | string[] | object | object[];
|
|
50
|
-
alsoKnownAs?: string[];
|
|
51
|
-
portable?: boolean;
|
|
52
|
-
nextKeyHashes?: string[];
|
|
53
|
-
authentication?: string[];
|
|
54
|
-
assertionMethod?: string[];
|
|
55
|
-
keyAgreement?: string[];
|
|
56
|
-
services?: ServiceEndpoint[];
|
|
57
|
-
}
|
|
58
|
-
export interface UpdateDIDOriginalOptions {
|
|
59
|
-
type: 'did';
|
|
60
|
-
log: DIDLog;
|
|
61
|
-
signer: ExternalSigner;
|
|
62
|
-
verifier?: ExternalVerifier;
|
|
63
|
-
updateKeys?: string[];
|
|
64
|
-
verificationMethods?: VerificationMethod[];
|
|
65
|
-
services?: ServiceEndpoint[];
|
|
66
|
-
controller?: string;
|
|
67
|
-
context?: string | string[] | object | object[];
|
|
68
|
-
alsoKnownAs?: string[];
|
|
69
|
-
portable?: boolean;
|
|
70
|
-
nextKeyHashes?: string[];
|
|
71
|
-
authentication?: string[];
|
|
72
|
-
assertionMethod?: string[];
|
|
73
|
-
keyAgreement?: string[];
|
|
74
|
-
domain?: string;
|
|
75
|
-
}
|
|
76
|
-
export type CreateOriginalOptions = CreateDIDOriginalOptions;
|
|
77
|
-
export type UpdateOriginalOptions = UpdateDIDOriginalOptions;
|
|
78
|
-
export interface OriginalsSDKOptions extends Partial<OriginalsConfig> {
|
|
79
|
-
keyStore?: KeyStore;
|
|
80
|
-
}
|
|
81
|
-
export declare class OriginalsSDK {
|
|
82
|
-
readonly did: DIDManager;
|
|
83
|
-
readonly credentials: CredentialManager;
|
|
84
|
-
readonly lifecycle: LifecycleManager;
|
|
85
|
-
readonly bitcoin: BitcoinManager;
|
|
86
|
-
readonly logger: Logger;
|
|
87
|
-
readonly metrics: MetricsCollector;
|
|
88
|
-
private eventLogger;
|
|
89
|
-
private config;
|
|
90
|
-
constructor(config: OriginalsConfig, keyStore?: KeyStore);
|
|
91
|
-
/**
|
|
92
|
-
* Set up event logging integration
|
|
93
|
-
*/
|
|
94
|
-
private setupEventLogging;
|
|
95
|
-
/**
|
|
96
|
-
* Validates that the SDK is properly configured for Bitcoin operations.
|
|
97
|
-
* Throws a StructuredError if ordinalsProvider is not configured.
|
|
98
|
-
*
|
|
99
|
-
* @throws {StructuredError} When ordinalsProvider is not configured
|
|
100
|
-
*/
|
|
101
|
-
validateBitcoinConfig(): void;
|
|
102
|
-
static create(options?: OriginalsSDKOptions): OriginalsSDK;
|
|
103
|
-
/**
|
|
104
|
-
* Prepare data for signing using didwebvh-ts's canonical approach
|
|
105
|
-
* This is a public static helper method that wraps didwebvh-ts's prepareDataForSigning
|
|
106
|
-
* to ensure didwebvh-ts is only imported within the SDK
|
|
107
|
-
*/
|
|
108
|
-
static prepareDIDDataForSigning(document: Record<string, unknown>, proof: Record<string, unknown>): Promise<Uint8Array>;
|
|
109
|
-
/**
|
|
110
|
-
* Verify a DID signature using Ed25519
|
|
111
|
-
* This is a public static helper method that provides browser-compatible Ed25519 verification
|
|
112
|
-
* Works with Uint8Array inputs (no Buffer required)
|
|
113
|
-
*
|
|
114
|
-
* @param signature - The signature bytes (Uint8Array)
|
|
115
|
-
* @param message - The message bytes that were signed (Uint8Array)
|
|
116
|
-
* @param publicKey - The public key bytes (Uint8Array, should be 32 bytes for Ed25519)
|
|
117
|
-
* @returns True if the signature is valid
|
|
118
|
-
*/
|
|
119
|
-
static verifyDIDSignature(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array): Promise<boolean>;
|
|
120
|
-
/**
|
|
121
|
-
* Create a new Original
|
|
122
|
-
* This is a convenience proxy that routes to the appropriate specialized creation method.
|
|
123
|
-
* Currently proxies to createDIDOriginal(), but can be extended for other Original types.
|
|
124
|
-
*
|
|
125
|
-
* @param options - Creation options (discriminated union by type)
|
|
126
|
-
* @returns Created DID, document, log, and metadata
|
|
127
|
-
*/
|
|
128
|
-
static createOriginal(options: CreateOriginalOptions): Promise<OriginalResult>;
|
|
129
|
-
/**
|
|
130
|
-
* Create a new DID-based Original (DID document/log)
|
|
131
|
-
* This wraps didwebvh-ts's createDID function to ensure didwebvh-ts is only imported within the SDK.
|
|
132
|
-
*
|
|
133
|
-
* A DID-based Original represents a decentralized identity that can be used as the foundation
|
|
134
|
-
* for other Originals (e.g., asset Originals, credential Originals, etc.).
|
|
135
|
-
*
|
|
136
|
-
* @param options - Creation options matching didwebvh-ts createDID interface
|
|
137
|
-
* @returns Created DID, document, log, and metadata
|
|
138
|
-
*/
|
|
139
|
-
static createDIDOriginal(options: CreateDIDOriginalOptions): Promise<OriginalResult>;
|
|
140
|
-
/**
|
|
141
|
-
* Update an existing Original
|
|
142
|
-
* This is a convenience proxy that routes to the appropriate specialized update method.
|
|
143
|
-
* Currently proxies to updateDIDOriginal(), but can be extended for other Original types.
|
|
144
|
-
*
|
|
145
|
-
* @param options - Update options (discriminated union by type)
|
|
146
|
-
* @returns Updated DID, document, log, and metadata
|
|
147
|
-
*/
|
|
148
|
-
static updateOriginal(options: UpdateOriginalOptions): Promise<OriginalResult>;
|
|
149
|
-
/**
|
|
150
|
-
* Update an existing DID-based Original (DID document/log)
|
|
151
|
-
* This wraps didwebvh-ts's updateDID function to ensure didwebvh-ts is only imported within the SDK.
|
|
152
|
-
*
|
|
153
|
-
* @param options - Update options matching didwebvh-ts updateDID interface
|
|
154
|
-
* @returns Updated DID, document, log, and metadata
|
|
155
|
-
*/
|
|
156
|
-
static updateDIDOriginal(options: UpdateDIDOriginalOptions): Promise<OriginalResult>;
|
|
157
|
-
}
|
|
158
|
-
export {};
|