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

feat: initial 0.5.0 support #87

Merged
merged 11 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion apps/expo/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module.exports = function (api) {
'@internal/ui': '../../packages/ui',
'@internal/agent': '../../packages/agent',
'@internal/utils': '../../packages/utils',
'@internal/openid4vc-client': '../../packages/openid4vc-client',
},
extensions: ['.js', '.jsx', '.tsx', '.ios.js', '.android.js'],
},
Expand Down
4 changes: 3 additions & 1 deletion apps/expo/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'react-native-get-random-values'
// TODO: why is this needed since update to 0.5.0?
import 'fast-text-encoding'
Copy link
Member Author

Choose a reason for hiding this comment

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

Still need to figure out what library is using TextEncoder / TextDecoder.

Askar used it in 0.1.0 and that's why it was imported, but not sure why it's needed now

import 'expo-router/entry'

import { Buffer } from '@aries-framework/core'
import { Buffer } from '@credo-ts/core'

// eslint-disable-next-line no-undef
global.Buffer = Buffer
8 changes: 4 additions & 4 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"dependencies": {
"@babel/runtime": "^7.18.9",
"@hyperledger/anoncreds-react-native": "^0.1.0",
"@hyperledger/aries-askar-react-native": "0.1.0",
"@hyperledger/indy-vdr-react-native": "^0.1.0",
"@hyperledger/anoncreds-react-native": "0.2.0-dev.9",
"@hyperledger/aries-askar-react-native": "0.2.0-dev.6",
"@hyperledger/indy-vdr-react-native": "0.2.0-dev.7",
"@internal/agent": "*",
"@internal/ui": "*",
"@react-native-community/blur": "^4.3.2",
Expand Down Expand Up @@ -52,7 +52,7 @@
"devDependencies": {
"@babel/core": "^7.17.9",
"@expo/metro-config": "~0.10.0",
"@tamagui/babel-plugin": "latest",
"@tamagui/babel-plugin": "1.26.1",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"metro-minify-terser": "^0.74.1",
"typescript": "^4.7.4"
Expand Down
4 changes: 2 additions & 2 deletions apps/expo/utils/walletKeyStore.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { uuid } from '@aries-framework/core/build/utils/uuid'
import { utils } from '@credo-ts/core'
import * as SecureStore from 'expo-secure-store'

const STORE_KEY = 'wallet-key' as const

const generateNewWalletKey = (): string => {
return uuid()
return utils.uuid()
}

export const getSecureWalletKey = async (): Promise<string> => {
Expand Down
Empty file added noop/index.js
Empty file.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"resolutions": {
"@unimodules/react-native-adapter": "./noop",
"@unimodules/core": "./noop",
"ref-napi": "npm:@2060.io/[email protected]",
"@cosmjs/amino": "npm:@cosmjs-rn/amino@^0.27.1",
"@cosmjs/encoding": "npm:@cosmjs-rn/encoding@^0.27.1",
"@cosmjs/math": "npm:@cosmjs-rn/math@^0.27.1",
Expand All @@ -40,7 +39,12 @@
"@cosmjs/utils": "npm:@cosmjs-rn/utils@^0.27.1",
"@cosmjs/proto-signing": "npm:@cosmjs-rn/proto-signing@^0.27.1",
"@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1",
"@sphereon/[email protected]": "patch:@sphereon/did-auth-siop@npm%3A0.3.2-unstable.0#./.yarn/patches/@sphereon-did-auth-siop-npm-0.3.2-unstable.0-6a34120d09.patch"
"@sd-jwt/core": "0.2.1-alpha.0",
"@sd-jwt/present": "0.2.1-alpha.0",
"@sd-jwt/decode": "0.2.1-alpha.0",
"@sd-jwt/utils": "0.2.1-alpha.0",
"@aries-framework/core": "npm:@credo-ts/[email protected]",
"@aries-framework/question-answer": "npm:@credo-ts/[email protected]"
},
"dependencies": {
"@babel/runtime": "^7.18.9",
Expand Down
34 changes: 17 additions & 17 deletions packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
"private": true,
"main": "src/index.ts",
"dependencies": {
"@aries-framework/anoncreds": "0.4.2",
"@aries-framework/anoncreds-rs": "0.4.2",
"@aries-framework/askar": "0.4.2",
"@aries-framework/cheqd": "0.4.2",
"@aries-framework/core": "0.4.2",
"@aries-framework/indy-vdr": "0.4.2",
"@aries-framework/react-hooks": "0.4.2",
"@aries-framework/react-native": "0.4.2",
"@internal/openid4vc-client": "*",
"@aries-framework/core": "npm:@credo-ts/[email protected]",
"@aries-framework/question-answer": "npm:@credo-ts/[email protected]",
"@aries-framework/react-hooks": "^0.5.0",
"@credo-ts/anoncreds": "0.5.0-alpha.126",
"@credo-ts/askar": "0.5.0-alpha.126",
"@credo-ts/cheqd": "0.5.0-alpha.126",
"@credo-ts/core": "0.5.0-alpha.126",
"@credo-ts/indy-vdr": "0.5.0-alpha.126",
"@credo-ts/openid4vc": "0.5.0-alpha.126",
"@credo-ts/react-native": "0.5.0-alpha.126",
"@internal/utils": "*",
"@tanstack/react-query": "^4.33.0",
"query-string": "^8.1.0",
"rxjs": "^7.8.1"
},
"peerDependencies": {
"@hyperledger/anoncreds-react-native": "^0.1.0",
"@hyperledger/aries-askar-react-native": "0.1.0",
"@hyperledger/indy-vdr-react-native": "^0.1.0"
"react-native": {
"@aries-framework/core": "@credo-ts/core",
"@aries-framework/question-answer": "@credo-ts/question-answer"
},
"devDependencies": {
"@hyperledger/anoncreds-react-native": "^0.1.0",
"@hyperledger/aries-askar-react-native": "0.1.0",
"@hyperledger/indy-vdr-react-native": "^0.1.0"
"peerDependencies": {
"@hyperledger/anoncreds-react-native": "*",
"@hyperledger/aries-askar-react-native": "*",
"@hyperledger/indy-vdr-react-native": "*"
}
}
23 changes: 10 additions & 13 deletions packages/agent/src/agent.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAgent as useAgentLib } from '@aries-framework/react-hooks'
import {
AnonCredsCredentialFormatService,
AnonCredsModule,
Expand All @@ -6,15 +7,14 @@ import {
LegacyIndyProofFormatService,
V1CredentialProtocol,
V1ProofProtocol,
} from '@aries-framework/anoncreds'
import { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'
import { AskarModule } from '@aries-framework/askar'
} from '@credo-ts/anoncreds'
import { AskarModule } from '@credo-ts/askar'
import {
CheqdAnonCredsRegistry,
CheqdDidResolver,
CheqdModule,
CheqdModuleConfig,
} from '@aries-framework/cheqd'
} from '@credo-ts/cheqd'
import {
JwkDidRegistrar,
JwkDidResolver,
Expand All @@ -36,19 +36,18 @@ import {
WsOutboundTransport,
ConnectionsModule,
MediatorPickupStrategy,
} from '@aries-framework/core'
} from '@credo-ts/core'
import {
IndyVdrAnonCredsRegistry,
IndyVdrIndyDidResolver,
IndyVdrModule,
IndyVdrSovDidResolver,
} from '@aries-framework/indy-vdr'
import { useAgent as useAgentLib } from '@aries-framework/react-hooks'
import { agentDependencies } from '@aries-framework/react-native'
} from '@credo-ts/indy-vdr'
import { OpenId4VcHolderModule } from '@credo-ts/openid4vc'
import { agentDependencies } from '@credo-ts/react-native'
import { anoncreds } from '@hyperledger/anoncreds-react-native'
import { ariesAskar } from '@hyperledger/aries-askar-react-native'
import { indyVdr } from '@hyperledger/indy-vdr-react-native'
import { OpenId4VcClientModule } from '@internal/openid4vc-client'

import { indyNetworks } from './indyNetworks'

Expand All @@ -68,11 +67,9 @@ export const initializeAgent = async (walletKey: string) => {
askar: new AskarModule({
ariesAskar: ariesAskar,
}),
anoncredsRs: new AnonCredsRsModule({
anoncreds,
}),
anoncreds: new AnonCredsModule({
registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],
anoncreds,
}),
mediationRecipient: new MediationRecipientModule({
// We want to manually connect to the mediator, so it doesn't impact wallet startup
Expand All @@ -89,7 +86,7 @@ export const initializeAgent = async (walletKey: string) => {
new IndyVdrIndyDidResolver(),
],
}),
openId4VcClient: new OpenId4VcClientModule(),
openId4VcHolder: new OpenId4VcHolderModule(),
indyVdr: new IndyVdrModule({
indyVdr,
networks: indyNetworks,
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/didcomm/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CredentialExchangeRecord, ProofExchangeRecord } from '@aries-framework/core'
import type { CredentialExchangeRecord, ProofExchangeRecord } from '@credo-ts/core'

export interface DidCommCredentialExchangeDisplayMetadata {
issuerName?: string
Expand Down
Loading
Loading