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

[proposal] Make headers call for AgentRestClient dynamic #1314

Merged
merged 35 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3e5b728
chore(ci): merge main into next
uport-automation-bot Sep 21, 2023
acc47e6
feat(data-store): use IPFS CID instead of hex blake2 hashes for crede…
simonas-notcat Sep 21, 2023
41553f4
chore(ci): merge main into next
uport-automation-bot Sep 21, 2023
e2e794f
fix(deps): Update did-vc-libraries
renovate[bot] Sep 21, 2023
2e3972c
fix(utils): use synchronous version of sha256 digest for CID (#1253)
simonas-notcat Sep 22, 2023
e674c58
fix(deps): Update devDeps
renovate[bot] Sep 24, 2023
306a398
feat(core-types): add hash to TCredentialColumns (#1259)
nickreynolds Sep 27, 2023
80272ca
fix(deps): Update dependency did-jwt-vc to v3.2.9
renovate[bot] Sep 27, 2023
5b198ec
fix: regenerate schema (#1260)
nickreynolds Sep 27, 2023
fb192e7
fix(utils): bump did-jwt to 7.4.1 and reuse key conversion code from …
mirceanis Sep 27, 2023
533a9e6
fix(deps): Update dependency ethr-did-resolver to v9
renovate[bot] Sep 28, 2023
93198bc
chore(deps): update devdeps
renovate[bot] Oct 2, 2023
01c01d5
fix(deps): Update did-vc-libraries
renovate[bot] Oct 4, 2023
fbf5c69
chore(deps): bump ethers (#1242)
fermentfan Oct 5, 2023
bfdfc4c
feat(did-manager): matching DIDs by alias should not depend on the pr…
mirceanis Oct 5, 2023
42db383
test: fix ganache setup (#1267)
mirceanis Oct 5, 2023
e94aaf2
feat(credential-w3c): list usable proof formats for an `IIdentifier` …
mirceanis Oct 5, 2023
c1d6032
Merge remote-tracking branch 'origin/main' into next
mirceanis Oct 6, 2023
a324b30
Merge remote-tracking branch 'origin/main' into next
mirceanis Oct 9, 2023
28c65f7
fix(data-store-json): order credentials with weird issuanceDate (#1273)
mirceanis Oct 13, 2023
ba88d6b
fix(deps): update dependency @metamask/eth-sig-util to v7 (#1258)
renovate[bot] Oct 13, 2023
f7a3851
feat(did-comm): returnMessage from sendDIDCommMessage() when availabl…
simonas-notcat Nov 1, 2023
cf44eae
docs: update AWESOME list (#1287)
mirceanis Nov 1, 2023
17a2991
docs: update did:pkh provider name in README.md (#1289)
shoito Nov 7, 2023
d89a4dd
docs: fix the markdown table syntax in did-comm readme (#1292)
shoito Nov 13, 2023
462735d
feat(coordinate-mediation): implement did-comm coordinate-mediation v…
radleylewis Dec 3, 2023
fc94764
feat(utils): move JWK converter to utils package (#1298)
cre8 Dec 8, 2023
ea2d99a
refactor(did-comm): improve Coordinate Mediation V3 API (#1297)
radleylewis Dec 8, 2023
5aa97a2
fix(data-store): return unique credentials for `dataStoreORMGetVerifi…
cre8 Dec 8, 2023
99c53e5
fix(deps): update dependency ethr-did-resolver to v10 (#1291)
renovate[bot] Dec 8, 2023
572e08d
chore(deps): update actions/setup-node action to v4 (#1286)
renovate[bot] Dec 8, 2023
2157e70
fix(deps): add missing ethers dependency to each relevant modules (#1…
hylim-tech-lover Dec 12, 2023
ac1b620
fix(deps): upgrade ethers and did-provider-ethr for sepolia support (…
strumswell Dec 13, 2023
817080c
[proposal] Make headers call for AgentRestClient dynamic
cre8 Jan 16, 2024
3b43ea3
Update packages/remote-client/src/client.ts
mirceanis Jan 16, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
version: 8
- run: pnpm add -g pnpm
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand All @@ -130,7 +130,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-test-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
version: 8
- run: pnpm add -g pnpm
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand All @@ -139,7 +139,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
version: 8
- run: pnpm add -g pnpm
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
7 changes: 5 additions & 2 deletions AWESOME.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ Please help us improve the contents or format of this list by creating a pull re
## Projects

* [Sphereon SSI SDK](https://github.com/Sphereon-Opensource/ssi-sdk)
* [VC Manager plugin](https://github.com/blockchain-lab-um/veramo-vc-manager)
* [SSI using Metamask snap](https://blockchain-lab-um.github.io/ssi-snap-docs/)
* [Data Manager plugin](https://github.com/blockchain-lab-um/masca/tree/develop/packages/datamanager)
* [SSI using Metamask snap (Masca)](https://masca.io/)
* [SSI using Metamask snap (Identify)](https://github.com/tuum-tech/identify/tree/main/packages/snap)
* [OID4VC issuer and verifier](https://github.com/blockchain-lab-um/oid4vc-monorepo)
* [Plugin for did:cheqd](https://github.com/cheqd/did-provider-cheqd)
* [Spherity VC revocation plugin based on ethereum](https://github.com/spherity/ethr-revocation-registry-veramo-plugin)
* [BBS+ issuer](https://github.com/pcibraro/veramo-bls-issuer/tree/main)
* [RN app with credential signing](https://github.com/symfoni/identity-wallet)
* [ID Pocket digital identity wallet](https://rktechworks.com/idpocket)
* add your own project here!
Expand Down
2 changes: 1 addition & 1 deletion __tests__/fixtures/cred3.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"name": "Verifiable Event Attendance",
"chainId": 1,
"version": "1",
"verifyingContract": "0x00000000000000000000000000000000000000000000"
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"primaryType": "VerifiableCredential"
},
Expand Down
22 changes: 13 additions & 9 deletions __tests__/localAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
* This suite also runs a ganache local blockchain to run through some examples of DIDComm using did:ethr identifiers.
*/

import {
createAgent,
} from '../packages/core/src'
import { createAgent } from '../packages/core/src'
import {
IAgentOptions,
ICredentialPlugin,
Expand Down Expand Up @@ -91,8 +89,9 @@ import didCommWithEthrDidFlow from './shared/didCommWithEthrDidFlow'
import utils from './shared/utils'
import web3 from './shared/web3'
import credentialStatus from './shared/credentialStatus'
import ethrDidFlowSigned from "./shared/ethrDidFlowSigned";
import ethrDidFlowSigned from './shared/ethrDidFlowSigned'
import didCommWithPeerDidFlow from './shared/didCommWithPeerDidFlow.js'
import credentialPluginTests from './shared/credentialPluginTests.js'

jest.setTimeout(120000)

Expand All @@ -117,8 +116,7 @@ let dbConnection: Promise<DataSource>
let databaseFile: string

const setup = async (options?: IAgentOptions): Promise<boolean> => {
databaseFile =
options?.context?.databaseFile || ':memory:'
databaseFile = options?.context?.databaseFile || ':memory:'
dbConnection = new DataSource({
name: options?.context?.['dbName'] || 'test',
type: 'sqlite',
Expand Down Expand Up @@ -181,6 +179,11 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
chainId: 5,
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
rpcUrl: 'https://sepolia.infura.io/v3/' + infuraProjectId,
},
{
chainId: 421613,
name: 'arbitrum:goerli',
Expand All @@ -202,7 +205,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
defaultKms: 'local',
}),
'did:peer': new PeerDIDProvider({
defaultKms: 'local'
defaultKms: 'local',
}),
'did:pkh': new PkhDIDProvider({
defaultKms: 'local',
Expand All @@ -220,7 +223,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
{
name: 'ganache',
chainId: 1337,
provider,
provider: provider as any,
registry,
},
],
Expand All @@ -242,7 +245,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
new SdrMessageHandler(),
],
}),
new DIDComm([new DIDCommHttpTransport()]),
new DIDComm({ transports: [new DIDCommHttpTransport()]}),
new CredentialPlugin(),
new CredentialIssuerEIP712(),
new CredentialIssuerLD({
Expand Down Expand Up @@ -303,4 +306,5 @@ describe('Local integration tests', () => {
didCommWithPeerDidFlow(testContext)
credentialStatus(testContext)
ethrDidFlowSigned(testContext)
credentialPluginTests(testContext)
})
16 changes: 13 additions & 3 deletions __tests__/localJsonStoreAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import {
IResolver,
TAgent,
} from '../packages/core-types/src'
import {
createAgent
} from '../packages/core/src'
import { createAgent } from '../packages/core/src'
import { MessageHandler } from '../packages/message-handler/src'
import { KeyManager } from '../packages/key-manager/src'
import { DIDManager } from '../packages/did-manager/src'
Expand Down Expand Up @@ -53,6 +51,7 @@ import {
PrivateKeyStoreJson,
} from '../packages/data-store-json/src'
import { FakeDidProvider, FakeDidResolver } from '../packages/test-utils/src'
import { PeerDIDProvider, getResolver as getDidPeerResolver } from '../packages/did-provider-peer/src'

import { Resolver } from 'did-resolver'
import { getResolver as ethrDidResolver } from 'ethr-did-resolver'
Expand All @@ -77,6 +76,7 @@ import messageHandler from './shared/messageHandler'
import utils from './shared/utils'
import { JsonFileStore } from './utils/json-file-store'
import credentialStatus from './shared/credentialStatus'
import credentialPluginTests from './shared/credentialPluginTests'
import dbInitOptions from "./shared/dbInitOptions";

jest.setTimeout(120000)
Expand Down Expand Up @@ -149,6 +149,11 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
name: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
rpcUrl: 'https://sepolia.infura.io/v3/' + infuraProjectId,
},
{
chainId: 421613,
name: 'arbitrum:goerli',
Expand All @@ -163,6 +168,9 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
'did:key': new KeyDIDProvider({
defaultKms: 'local',
}),
'did:peer': new PeerDIDProvider({
defaultKms: 'local',
}),
'did:pkh': new PkhDIDProvider({
defaultKms: 'local',
}),
Expand All @@ -177,6 +185,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
...ethrDidResolver({ infuraProjectId }),
...webDidResolver(),
...getDidKeyResolver(),
...getDidPeerResolver(),
...getDidPkhResolver(),
...getDidJwkResolver(),
...new FakeDidResolver(() => agent).getDidFakeResolver(),
Expand Down Expand Up @@ -239,5 +248,6 @@ describe('Local json-data-store integration tests', () => {
didCommPacking(testContext)
utils(testContext)
credentialStatus(testContext)
credentialPluginTests(testContext)
dbInitOptions(testContext)
})
12 changes: 12 additions & 0 deletions __tests__/localMemoryStoreAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { KeyManagementSystem } from '../packages/kms-local/src'
import { Web3KeyManagementSystem } from '../packages/kms-web3/src'
import { DataStore, DataStoreORM, Entities, migrations } from '../packages/data-store/src'
import { FakeDidProvider, FakeDidResolver } from '../packages/test-utils/src'
import { PeerDIDProvider, getResolver as getDidPeerResolver } from "../packages/did-provider-peer/src";

import { getResolver as ethrDidResolver } from 'ethr-did-resolver'
import { getResolver as webDidResolver } from 'web-did-resolver'
Expand All @@ -71,6 +72,7 @@ import messageHandler from './shared/messageHandler.js'
import utils from './shared/utils.js'
import credentialStatus from './shared/credentialStatus.js'
import credentialInterop from './shared/credentialInterop.js'
import credentialPluginTests from "./shared/credentialPluginTests.js";

jest.setTimeout(120000)

Expand Down Expand Up @@ -145,6 +147,11 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
name: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
rpcUrl: 'https://sepolia.infura.io/v3/' + infuraProjectId,
},
{
chainId: 421613,
name: 'arbitrum:goerli',
Expand All @@ -159,6 +166,9 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
'did:key': new KeyDIDProvider({
defaultKms: 'local',
}),
'did:peer': new PeerDIDProvider({
defaultKms: 'local'
}),
'did:pkh': new PkhDIDProvider({
defaultKms: 'local',
}),
Expand All @@ -172,6 +182,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
...ethrDidResolver({ infuraProjectId }),
...webDidResolver(),
...getDidKeyResolver(),
...getDidPeerResolver(),
...getDidPkhResolver(),
...getDidJwkResolver(),
...new FakeDidResolver(() => agent).getDidFakeResolver(),
Expand Down Expand Up @@ -234,4 +245,5 @@ describe('Local in-memory integration tests', () => {
utils(testContext)
credentialStatus(testContext)
credentialInterop(testContext)
credentialPluginTests(testContext)
})
14 changes: 13 additions & 1 deletion __tests__/restAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { WebDIDProvider } from '../packages/did-provider-web/src'
import { getDidKeyResolver, KeyDIDProvider } from '../packages/did-provider-key/src'
import { getDidPkhResolver, PkhDIDProvider } from '../packages/did-provider-pkh/src'
import { getDidJwkResolver, JwkDIDProvider } from '../packages/did-provider-jwk/src'
import { getResolver as getDidPeerResolver, PeerDIDProvider } from "../packages/did-provider-peer/src";
import { DIDComm, DIDCommHttpTransport, DIDCommMessageHandler, IDIDComm } from '../packages/did-comm/src'
import {
ISelectiveDisclosure,
Expand Down Expand Up @@ -98,6 +99,7 @@ import messageHandler from './shared/messageHandler'
import didDiscovery from './shared/didDiscovery'
import utils from './shared/utils'
import credentialStatus from './shared/credentialStatus'
import credentialPluginTests from "./shared/credentialPluginTests";

jest.setTimeout(120000)

Expand Down Expand Up @@ -175,6 +177,11 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
name: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
rpcUrl: 'https://sepolia.infura.io/v3/' + infuraProjectId,
},
{
chainId: 421613,
name: 'arbitrum:goerli',
Expand All @@ -189,6 +196,9 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
'did:key': new KeyDIDProvider({
defaultKms: 'local',
}),
'did:peer': new PeerDIDProvider({
defaultKms: 'local'
}),
'did:pkh': new PkhDIDProvider({
defaultKms: 'local',
}),
Expand All @@ -204,6 +214,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
...webDidResolver(),
// key: getUniversalResolver(), // resolve using remote resolver... when uniresolver becomes more stable,
...getDidKeyResolver(),
...getDidPeerResolver(),
...getDidPkhResolver(),
...getDidJwkResolver(),
...new FakeDidResolver(() => serverAgent as TAgent<IDIDManager>).getDidFakeResolver(),
Expand All @@ -219,7 +230,7 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
new SdrMessageHandler(),
],
}),
new DIDComm([new DIDCommHttpTransport()]),
new DIDComm({ transports: [new DIDCommHttpTransport()]}),
// intentionally use the deprecated name to test compatibility
new CredentialIssuer(),
new CredentialIssuerEIP712(),
Expand Down Expand Up @@ -298,4 +309,5 @@ describe('REST integration tests', () => {
didDiscovery(testContext)
utils(testContext)
credentialStatus(testContext)
credentialPluginTests(testContext)
})
Loading