Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(data-store): add support for entityPrefix #725

Merged
merged 4 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file modified __tests__/fixtures/local-database-before-migration.sqlite
Binary file not shown.
327 changes: 191 additions & 136 deletions __tests__/initial.migration.test.ts

Large diffs are not rendered by default.

141 changes: 0 additions & 141 deletions __tests__/keyMigration.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion __tests__/localAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import messageHandler from './shared/messageHandler'
import didDiscovery from './shared/didDiscovery'
import dbInitOptions from './shared/dbInitOptions'

const infuraProjectId = '5ffc47f65c4042ce847ef66a3fa70d4c'
const infuraProjectId = '3586660d179141e3801c3895de1c2eba'
const secretKey = '29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c'

let agent: TAgent<
Expand Down
2 changes: 1 addition & 1 deletion __tests__/localMemoryStoreAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import didComm from './shared/didcomm'
import messageHandler from './shared/messageHandler'

const databaseFile = 'local-database2.sqlite'
const infuraProjectId = '5ffc47f65c4042ce847ef66a3fa70d4c'
const infuraProjectId = '3586660d179141e3801c3895de1c2eba'

let agent: TAgent<
IDIDManager &
Expand Down
2 changes: 1 addition & 1 deletion __tests__/restAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import messageHandler from './shared/messageHandler'
import didDiscovery from './shared/didDiscovery'

const databaseFile = 'rest-database.sqlite'
const infuraProjectId = '5ffc47f65c4042ce847ef66a3fa70d4c'
const infuraProjectId = '3586660d179141e3801c3895de1c2eba'
const secretKey = '29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c'
const port = 3002
const basePath = '/agent'
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/default/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ didResolver:
ethr-did-resolver:
$require: ethr-did-resolver?t=function&p=/ethr#getResolver
$args:
- infuraProjectId: 5ffc47f65c4042ce847ef66a3fa70d4c
- infuraProjectId: 3586660d179141e3801c3895de1c2eba

web-did-resolver:
$require: web-did-resolver?t=function&p=/web#getResolver
Expand Down Expand Up @@ -223,39 +223,39 @@ didManager:
$args:
- defaultKms: local
network: mainnet
rpcUrl: https://mainnet.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c
rpcUrl: https://mainnet.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:ethr:rinkeby:
$require: '@veramo/did-provider-ethr#EthrDIDProvider'
$args:
- defaultKms: local
network: rinkeby
rpcUrl: https://rinkeby.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c
rpcUrl: https://rinkeby.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:ethr:ropsten:
$require: '@veramo/did-provider-ethr#EthrDIDProvider'
$args:
- defaultKms: local
network: ropsten
rpcUrl: https://ropsten.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c
rpcUrl: https://ropsten.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:ethr:kovan:
$require: '@veramo/did-provider-ethr#EthrDIDProvider'
$args:
- defaultKms: local
network: kovan
rpcUrl: https://kovan.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c
rpcUrl: https://kovan.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:ethr:goerli:
$require: '@veramo/did-provider-ethr#EthrDIDProvider'
$args:
- defaultKms: local
network: goerli
rpcUrl: https://goerli.infura.io/v3/5ffc47f65c4042ce847ef66a3fa70d4c
rpcUrl: https://goerli.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:web:
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function createSchema(generator: TJS.SchemaGenerator, symbol: string) {
schemaStr = schemaStr.replace(/Where\<(.*)\>/gm, 'Where-$1')
schemaStr = schemaStr.replace(/Order\<(.*)\>/gm, 'Order-$1')
schemaStr = schemaStr.replace(/FindArgs\<(.*)\>/gm, 'FindArgs-$1')
schemaStr = schemaStr.replace(/https \:\/\//gm, 'https://')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere in the api-extractor toolchain there is a bug that introduces a space between https and ://.
This is a workaround.

return JSON.parse(schemaStr)
}

Expand Down
44 changes: 22 additions & 22 deletions packages/core/plugin.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"didDocument": {
"$ref": "#/components/schemas/DIDDocument",
"description": "the DID document from which to extract the fragment. This MUST be the document resolved by {@link resolveDid }"
"description": "the DID document from which to extract the fragment. This MUST be the document resolved by {@link resolveDid }"
},
"didUrl": {
"type": "string",
Expand Down Expand Up @@ -1479,7 +1479,7 @@
"required": [
"hash"
],
"description": "Input arguments for {@link IDataStore.IDataStoreDeleteVerifiableCredentialArgs| IDataStoreDeleteVerifiableCredentialArgs }"
"description": "Input arguments for {@link IDataStore.IDataStoreDeleteVerifiableCredentialArgs | IDataStoreDeleteVerifiableCredentialArgs }"
},
"IDataStoreGetMessageArgs": {
"type": "object",
Expand Down Expand Up @@ -1584,7 +1584,7 @@
"id",
"type"
],
"description": "DIDComm message"
"description": "Represents a DIDComm v1 message payload, with optionally decoded credentials and presentations."
},
"IMetaData": {
"type": "object",
Expand Down Expand Up @@ -1672,13 +1672,13 @@
},
"required": [
"@context",
"type",
"issuer",
"issuanceDate",
"credentialSubject",
"proof"
"issuanceDate",
"issuer",
"proof",
"type"
],
"description": "Verifiable Credential {@link https://github.com/decentralized-identifier/did-jwt-vc }"
"description": "Represents a signed Verifiable Credential payload (includes proof). See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }"
},
"VerifiablePresentation": {
"type": "object",
Expand Down Expand Up @@ -1729,13 +1729,13 @@
}
},
"required": [
"holder",
"@context",
"holder",
"proof",
"type",
"verifier",
"proof"
"verifier"
],
"description": "Verifiable Presentation {@link https://github.com/decentralized-identifier/did-jwt-vc }"
"description": "Represents a signed Verifiable Presentation (includes proof). See {@link https://www.w3.org/TR/vc-data-model/#presentations | VP data model }"
},
"IDataStoreGetVerifiableCredentialArgs": {
"type": "object",
Expand Down Expand Up @@ -2004,7 +2004,7 @@
"id",
"type"
],
"description": "DIDComm message"
"description": "Represents a DIDComm v1 message payload, with optionally decoded credentials and presentations."
},
"VerifiableCredential": {
"type": "object",
Expand Down Expand Up @@ -2075,13 +2075,13 @@
},
"required": [
"@context",
"type",
"issuer",
"issuanceDate",
"credentialSubject",
"proof"
"issuanceDate",
"issuer",
"proof",
"type"
],
"description": "Verifiable Credential {@link https://github.com/decentralized-identifier/did-jwt-vc }"
"description": "Represents a signed Verifiable Credential payload (includes proof). See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }"
},
"VerifiablePresentation": {
"type": "object",
Expand Down Expand Up @@ -2132,13 +2132,13 @@
}
},
"required": [
"holder",
"@context",
"holder",
"proof",
"type",
"verifier",
"proof"
"verifier"
],
"description": "Verifiable Presentation {@link https://github.com/decentralized-identifier/did-jwt-vc }"
"description": "Represents a signed Verifiable Presentation (includes proof). See {@link https://www.w3.org/TR/vc-data-model/#presentations | VP data model }"
}
},
"methods": {
Expand Down
Loading