Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <timo@animo.id>
  • Loading branch information
TimoGlastra committed Nov 7, 2023
1 parent 0865ea5 commit f2b5e36
Show file tree
Hide file tree
Showing 92 changed files with 46 additions and 8,476 deletions.
21 changes: 0 additions & 21 deletions .github/actions/setup-postgres-wallet-plugin/action.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ env:
TEST_AGENT_PUBLIC_DID_SEED: 000000000000000000000000Trustee9
ENDORSER_AGENT_PUBLIC_DID_SEED: 00000000000000000000000Endorser9
GENESIS_TXN_PATH: network/genesis/local-genesis.txn
LIB_INDY_STRG_POSTGRES: /home/runner/work/aries-framework-javascript/indy-sdk/experimental/plugins/postgres_storage/target/release # for Linux
NODE_OPTIONS: --max_old_space_size=6144

# Make sure we're not running multiple release steps at the same time as this can give issues with determining the next npm version to release.
Expand Down Expand Up @@ -107,9 +106,6 @@ jobs:
- name: Setup Postgres
uses: ./.github/actions/setup-postgres

- name: Setup Postgres wallet plugin
uses: ./.github/actions/setup-postgres-wallet-plugin

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ Aries Framework JavaScript is a framework written in TypeScript for building **S
</a>
</td>
</tr>
<tr>
<td>@aries-framework/indy-sdk</td>
<td>
<a href="https://npmjs.com/package/@aries-framework/indy-sdk">
<img alt="@aries-framework/indy-sdk version" src="https://img.shields.io/npm/v/@aries-framework/indy-sdk"/>
</a>
</td>
</tr>
<tr>
<td>@aries-framework/indy-vdr</td>
<td>
Expand Down Expand Up @@ -161,6 +153,14 @@ Aries Framework JavaScript is a framework written in TypeScript for building **S
</a>
</td>
</tr>
<tr>
<td>~~@aries-framework/indy-sdk~~ (deprecated, unmaintained after 0.4.x)</td>
<td>
<a href="https://npmjs.com/package/@aries-framework/indy-sdk">
<img alt="@aries-framework/indy-sdk version" src="https://img.shields.io/npm/v/@aries-framework/indy-sdk"/>
</a>
</td>
</tr>
</table>

## Getting Started
Expand Down
85 changes: 0 additions & 85 deletions TROUBLESHOOTING.md

This file was deleted.

2 changes: 0 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
"@aries-framework/anoncreds-rs": "*",
"@aries-framework/askar": "*",
"@aries-framework/core": "*",
"@aries-framework/indy-sdk": "*",
"@aries-framework/indy-vdr": "*",
"@aries-framework/cheqd": "*",
"@aries-framework/node": "*",
"@types/figlet": "^1.5.4",
"@types/indy-sdk": "^1.16.26",
"@types/inquirer": "^8.2.6",
"clear": "^0.1.0",
"figlet": "^1.5.2",
Expand Down
51 changes: 1 addition & 50 deletions demo/src/BaseAgent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { InitConfig } from '@aries-framework/core'
import type { IndySdkPoolConfig } from '@aries-framework/indy-sdk'
import type { IndyVdrPoolConfig } from '@aries-framework/indy-vdr'

import {
Expand Down Expand Up @@ -32,14 +31,11 @@ import {
Agent,
HttpOutboundTransport,
} from '@aries-framework/core'
import { IndySdkAnonCredsRegistry, IndySdkModule, IndySdkSovDidResolver } from '@aries-framework/indy-sdk'
import { IndyVdrIndyDidResolver, IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'
import { agentDependencies, HttpInboundTransport } from '@aries-framework/node'
import { anoncreds } from '@hyperledger/anoncreds-nodejs'
import { ariesAskar } from '@hyperledger/aries-askar-nodejs'
import { indyVdr } from '@hyperledger/indy-vdr-nodejs'
import { randomUUID } from 'crypto'
import indySdk from 'indy-sdk'

import { greenText } from './OutputClass'

Expand All @@ -49,13 +45,11 @@ const bcovrin = `{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blsk
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"138.197.138.255","client_port":9708,"node_ip":"138.197.138.255","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}`

export const indyNetworkConfig = {
// Need unique network id as we will have multiple agent processes in the agent
id: randomUUID(),
genesisTransactions: bcovrin,
indyNamespace: 'bcovrin:test',
isProduction: false,
connectOnStartup: true,
} satisfies IndySdkPoolConfig | IndyVdrPoolConfig
} satisfies IndyVdrPoolConfig

type DemoAgent = Agent<ReturnType<typeof getAskarAnonCredsIndyModules>>

Expand Down Expand Up @@ -167,46 +161,3 @@ function getAskarAnonCredsIndyModules() {
}),
} as const
}

function getLegacyIndySdkModules() {
const legacyIndyCredentialFormatService = new LegacyIndyCredentialFormatService()
const legacyIndyProofFormatService = new LegacyIndyProofFormatService()

return {
connections: new ConnectionsModule({
autoAcceptConnections: true,
}),
credentials: new CredentialsModule({
autoAcceptCredentials: AutoAcceptCredential.ContentApproved,
credentialProtocols: [
new V1CredentialProtocol({
indyCredentialFormat: legacyIndyCredentialFormatService,
}),
new V2CredentialProtocol({
credentialFormats: [legacyIndyCredentialFormatService],
}),
],
}),
proofs: new ProofsModule({
autoAcceptProofs: AutoAcceptProof.ContentApproved,
proofProtocols: [
new V1ProofProtocol({
indyProofFormat: legacyIndyProofFormatService,
}),
new V2ProofProtocol({
proofFormats: [legacyIndyProofFormatService],
}),
],
}),
anoncreds: new AnonCredsModule({
registries: [new IndySdkAnonCredsRegistry()],
}),
indySdk: new IndySdkModule({
indySdk,
networks: [indyNetworkConfig],
}),
dids: new DidsModule({
resolvers: [new IndySdkSovDidResolver()],
}),
} as const
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-workspaces": "^0.8.0",
"express": "^4.17.1",
"indy-sdk": "^1.16.0-dev-1655",
"jest": "^29.7.0",
"lerna": "^6.5.1",
"prettier": "^2.3.1",
Expand All @@ -65,5 +64,8 @@
},
"engines": {
"node": ">=18"
},
"dependencies": {
"@hyperledger/aries-askar-nodejs": "^0.1.0"
}
}
1 change: 0 additions & 1 deletion packages/anoncreds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
},
"devDependencies": {
"@aries-framework/node": "0.4.2",
"indy-sdk": "^1.16.0-dev-1636",
"rimraf": "^4.4.0",
"rxjs": "^7.8.0",
"typescript": "~4.9.5"
Expand Down
2 changes: 2 additions & 0 deletions packages/anoncreds/src/AnonCredsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ export class AnonCredsApi {
supportRevocation: false,
schema: schemaResult.schema,
},
// NOTE: indy-sdk support has been removed from main repo, but keeping
// this in place to allow the indy-sdk to still be used as a custom package
// FIXME: Indy SDK requires the schema seq no to be passed in here. This is not ideal.
{
indyLedgerSchemaSeqNo: schemaResult.schemaMetadata.indyLedgerSeqNo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ describe('Legacy indy format services', () => {
supportRevocation: false,
},
{
// NOTE: indy-sdk support has been removed from main repo, but keeping
// this in place to allow the indy-sdk to still be used as a custom package
// Need to pass this as the indy-sdk MUST have the seqNo
indyLedgerSchemaSeqNo: schemaMetadata.indyLedgerSeqNo as number,
}
Expand Down
1 change: 1 addition & 0 deletions packages/askar/tests/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { AskarWallet } from '../src/wallet'

export const askarModuleConfig = new AskarModuleConfig({ ariesAskar })
registerAriesAskar({ askar: askarModuleConfig.ariesAskar })
export const askarModule = new AskarModule(askarModuleConfig)

// When using the AskarWallet directly, the native dependency won't be loaded by default.
// So in tests depending on Askar, we import this wallet so we're sure the native dependency is loaded.
Expand Down
2 changes: 0 additions & 2 deletions packages/cheqd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
"tsyringe": "^4.8.0"
},
"devDependencies": {
"@aries-framework/indy-sdk": "0.4.2",
"@types/indy-sdk": "*",
"rimraf": "^4.0.7",
"typescript": "~4.9.4"
}
Expand Down
10 changes: 2 additions & 8 deletions packages/cheqd/tests/setupCheqdModule.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import type { CheqdModuleConfigOptions } from '../src'

import { DidsModule } from '@aries-framework/core'
import { IndySdkModule, IndySdkModuleConfig } from '@aries-framework/indy-sdk'
import indySdk from 'indy-sdk'

import { askarModule } from '../../askar/tests/helpers'
import { CheqdModule, CheqdDidRegistrar, CheqdDidResolver } from '../src'

export const getIndySdkModuleConfig = () =>
new IndySdkModuleConfig({
indySdk,
})

export const getCheqdModuleConfig = (seed?: string, rpcUrl?: string) =>
({
networks: [
Expand All @@ -30,5 +24,5 @@ export const getCheqdModules = (seed?: string, rpcUrl?: string) => ({
registrars: [new CheqdDidRegistrar()],
resolvers: [new CheqdDidResolver()],
}),
indySdk: new IndySdkModule(getIndySdkModuleConfig()),
askarModule,
})
14 changes: 3 additions & 11 deletions packages/indy-sdk-to-askar-migration/tests/migrate.test.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import type { InitConfig } from '@aries-framework/core'

import { AskarModule } from '@aries-framework/askar'
import { utils, KeyDerivationMethod, Agent } from '@aries-framework/core'
import { IndySdkModule } from '@aries-framework/indy-sdk'
import { agentDependencies } from '@aries-framework/node'
import { ariesAskar } from '@hyperledger/aries-askar-nodejs'
import { registerAriesAskar } from '@hyperledger/aries-askar-shared'
import indy from 'indy-sdk'
import { homedir } from 'os'

import { askarModule } from '../../askar/tests/helpers'
import { IndySdkToAskarMigrationUpdater } from '../src'
import { IndySdkToAskarMigrationError } from '../src/errors/IndySdkToAskarMigrationError'

describe('Indy SDK To Askar Migration', () => {
beforeAll(() => {
registerAriesAskar({ askar: ariesAskar })
})

test('indy-sdk sqlite to aries-askar sqlite successful migration', async () => {
const indySdkAndAskarConfig: InitConfig = {
label: `indy | indy-sdk sqlite to aries-askar sqlite successful migration | ${utils.uuid()}`,
Expand Down Expand Up @@ -45,7 +39,7 @@ describe('Indy SDK To Askar Migration', () => {

const askarAgent = new Agent({
config: indySdkAndAskarConfig,
modules: { askar: new AskarModule({ ariesAskar }) },
modules: { askar: askarModule },
dependencies: agentDependencies,
})

Expand Down Expand Up @@ -98,9 +92,7 @@ describe('Indy SDK To Askar Migration', () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
config: { ...indySdkAndAskarConfig, walletConfig: { ...indySdkAndAskarConfig.walletConfig!, key: 'wrong-key' } },
modules: {
askar: new AskarModule({
ariesAskar,
}),
askar: askarModule,
},
dependencies: agentDependencies,
})
Expand Down
Loading

0 comments on commit f2b5e36

Please sign in to comment.