From 6cef16a531aebb58ae14a9afa72dac0ca15bc42c Mon Sep 17 00:00:00 2001 From: Nikita Spivachuk Date: Tue, 21 Jun 2022 13:25:22 +0300 Subject: [PATCH] [WIP] #883: Supporting simplified VTP state types --- demo/package.json | 6 +-- packages/core/package.json | 2 +- .../value-transfer/ValueTransferModule.ts | 37 +++---------------- .../handlers/CashAcceptedHandler.ts | 4 -- .../handlers/CashAcceptedWitnessedHandler.ts | 4 -- .../handlers/CashRemovedHandler.ts | 4 -- .../handlers/RequestAcceptedHandler.ts | 4 -- .../RequestAcceptedWitnessedHandler.ts | 4 -- .../value-transfer/handlers/RequestHandler.ts | 4 -- .../handlers/RequestWitnessedHandler.ts | 4 -- .../repository/ValueTransferStateRecord.ts | 31 ++++------------ .../repository/WitnessStateRecord.ts | 12 +++--- .../services/ValueTransferGetterService.ts | 4 -- .../services/ValueTransferGiverService.ts | 9 +---- .../services/ValueTransferService.ts | 17 +++------ .../services/ValueTransferStateService.ts | 29 ++++----------- .../services/ValueTransferWitnessService.ts | 27 +------------- packages/node/package.json | 2 +- packages/react-native/package.json | 2 +- samples/extension-module/package.json | 4 +- 20 files changed, 44 insertions(+), 166 deletions(-) diff --git a/demo/package.json b/demo/package.json index d21aefbf7f..90fe6c34e2 100644 --- a/demo/package.json +++ b/demo/package.json @@ -17,9 +17,9 @@ "refresh": "rm -rf ./node_modules ./yarn.lock && yarn" }, "devDependencies": { - "@aries-framework/core": "npm:@sicpa-dlab/aries-framework-core", - "@aries-framework/node": "npm:@sicpa-dlab/aries-framework-node", - "@sicpa-dlab/value-transfer-protocol-ts": "^0.0.8", + "@aries-framework/core": "file:../packages/core", + "@aries-framework/node": "file:../packages/node", + "@sicpa-dlab/value-transfer-protocol-ts": "file:../../value-transfer-protocol-ts", "@types/figlet": "^1.5.4", "@types/inquirer": "^8.1.3", "clear": "^0.1.0", diff --git a/packages/core/package.json b/packages/core/package.json index 90315010dc..18317fa097 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@multiformats/base-x": "^4.0.1", - "@sicpa-dlab/value-transfer-protocol-ts": "0.0.11", + "@sicpa-dlab/value-transfer-protocol-ts": "file:../../../value-transfer-protocol-ts", "@stablelib/aes": "^1.0.1", "@stablelib/ed25519": "^1.0.2", "@stablelib/sha256": "^1.0.1", diff --git a/packages/core/src/modules/value-transfer/ValueTransferModule.ts b/packages/core/src/modules/value-transfer/ValueTransferModule.ts index 4b902dd5ff..96eb5d6105 100644 --- a/packages/core/src/modules/value-transfer/ValueTransferModule.ts +++ b/packages/core/src/modules/value-transfer/ValueTransferModule.ts @@ -3,11 +3,7 @@ import type { ValueTransferRecord, ValueTransferTags } from './repository' import { Lifecycle, scoped } from 'tsyringe' -import { AgentConfig } from '../../agent/AgentConfig' import { Dispatcher } from '../../agent/Dispatcher' -import { MessageSender } from '../../agent/MessageSender' -import { ConnectionService } from '../connections' -import { DidResolverService } from '../dids' import { ValueTransferResponseCoordinator } from './ValueTransferResponseCoordinator' import { RequestHandler } from './handlers' @@ -27,10 +23,6 @@ import { ValueTransferWitnessService } from './services/ValueTransferWitnessServ @scoped(Lifecycle.ContainerScoped) export class ValueTransferModule { - private config: AgentConfig - private messageSender: MessageSender - private connectionService: ConnectionService - private resolverService: DidResolverService private valueTransferService: ValueTransferService private valueTransferGetterService: ValueTransferGetterService private valueTransferGiverService: ValueTransferGiverService @@ -39,20 +31,12 @@ export class ValueTransferModule { public constructor( dispatcher: Dispatcher, - config: AgentConfig, - messageSender: MessageSender, - connectionService: ConnectionService, - resolverService: DidResolverService, valueTransferService: ValueTransferService, valueTransferGetterService: ValueTransferGetterService, valueTransferGiverService: ValueTransferGiverService, valueTransferWitnessService: ValueTransferWitnessService, valueTransferResponseCoordinator: ValueTransferResponseCoordinator ) { - this.config = config - this.messageSender = messageSender - this.connectionService = connectionService - this.resolverService = resolverService this.valueTransferService = valueTransferService this.valueTransferGetterService = valueTransferGetterService this.valueTransferGiverService = valueTransferGiverService @@ -167,32 +151,23 @@ export class ValueTransferModule { } private registerHandlers(dispatcher: Dispatcher) { - dispatcher.registerHandler( - new RequestHandler(this.config, this.valueTransferService, this.valueTransferWitnessService) - ) + dispatcher.registerHandler(new RequestHandler(this.valueTransferService, this.valueTransferWitnessService)) dispatcher.registerHandler( new RequestWitnessedHandler( - this.config, this.valueTransferService, this.valueTransferGiverService, this.valueTransferResponseCoordinator ) ) + dispatcher.registerHandler(new RequestAcceptedHandler(this.valueTransferService, this.valueTransferWitnessService)) dispatcher.registerHandler( - new RequestAcceptedHandler(this.config, this.valueTransferService, this.valueTransferWitnessService) - ) - dispatcher.registerHandler( - new RequestAcceptedWitnessedHandler(this.config, this.valueTransferService, this.valueTransferGetterService) - ) - dispatcher.registerHandler( - new CashAcceptedHandler(this.config, this.valueTransferService, this.valueTransferWitnessService) - ) - dispatcher.registerHandler( - new CashAcceptedWitnessedHandler(this.config, this.valueTransferService, this.valueTransferGiverService) + new RequestAcceptedWitnessedHandler(this.valueTransferService, this.valueTransferGetterService) ) + dispatcher.registerHandler(new CashAcceptedHandler(this.valueTransferService, this.valueTransferWitnessService)) dispatcher.registerHandler( - new CashRemovedHandler(this.config, this.valueTransferService, this.valueTransferWitnessService) + new CashAcceptedWitnessedHandler(this.valueTransferService, this.valueTransferGiverService) ) + dispatcher.registerHandler(new CashRemovedHandler(this.valueTransferService, this.valueTransferWitnessService)) dispatcher.registerHandler(new GetterReceiptHandler(this.valueTransferGetterService)) dispatcher.registerHandler(new GiverReceiptHandler(this.valueTransferGiverService)) dispatcher.registerHandler(new ProblemReportHandler(this.valueTransferService)) diff --git a/packages/core/src/modules/value-transfer/handlers/CashAcceptedHandler.ts b/packages/core/src/modules/value-transfer/handlers/CashAcceptedHandler.ts index 34737835dd..853dd46b24 100644 --- a/packages/core/src/modules/value-transfer/handlers/CashAcceptedHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/CashAcceptedHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferService } from '../services' @@ -7,18 +6,15 @@ import type { ValueTransferWitnessService } from '../services/ValueTransferWitne import { CashAcceptedMessage, ProblemReportMessage } from '../messages' export class CashAcceptedHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferWitnessService: ValueTransferWitnessService public readonly supportedMessages = [CashAcceptedMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferWitnessService: ValueTransferWitnessService ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferWitnessService = valueTransferWitnessService } diff --git a/packages/core/src/modules/value-transfer/handlers/CashAcceptedWitnessedHandler.ts b/packages/core/src/modules/value-transfer/handlers/CashAcceptedWitnessedHandler.ts index c31018e050..c4f66c6cd4 100644 --- a/packages/core/src/modules/value-transfer/handlers/CashAcceptedWitnessedHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/CashAcceptedWitnessedHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { HandlerInboundMessage, Handler } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferService } from '../services' @@ -7,18 +6,15 @@ import type { ValueTransferGiverService } from '../services/ValueTransferGiverSe import { CashAcceptedWitnessedMessage } from '../messages' export class CashAcceptedWitnessedHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferGiverService: ValueTransferGiverService public readonly supportedMessages = [CashAcceptedWitnessedMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferGiverService: ValueTransferGiverService ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferGiverService = valueTransferGiverService } diff --git a/packages/core/src/modules/value-transfer/handlers/CashRemovedHandler.ts b/packages/core/src/modules/value-transfer/handlers/CashRemovedHandler.ts index 1ac29f4e2b..2c34250788 100644 --- a/packages/core/src/modules/value-transfer/handlers/CashRemovedHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/CashRemovedHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferService } from '../services' @@ -7,18 +6,15 @@ import type { ValueTransferWitnessService } from '../services/ValueTransferWitne import { CashRemovedMessage } from '../messages' export class CashRemovedHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferWitnessService: ValueTransferWitnessService public readonly supportedMessages = [CashRemovedMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferWitnessService: ValueTransferWitnessService ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferWitnessService = valueTransferWitnessService } diff --git a/packages/core/src/modules/value-transfer/handlers/RequestAcceptedHandler.ts b/packages/core/src/modules/value-transfer/handlers/RequestAcceptedHandler.ts index 3054253e36..49860dcdd6 100644 --- a/packages/core/src/modules/value-transfer/handlers/RequestAcceptedHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/RequestAcceptedHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferService } from '../services' @@ -7,18 +6,15 @@ import type { ValueTransferWitnessService } from '../services/ValueTransferWitne import { ProblemReportMessage, RequestAcceptedMessage } from '../messages' export class RequestAcceptedHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferWitnessService: ValueTransferWitnessService public readonly supportedMessages = [RequestAcceptedMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferWitnessService: ValueTransferWitnessService ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferWitnessService = valueTransferWitnessService } diff --git a/packages/core/src/modules/value-transfer/handlers/RequestAcceptedWitnessedHandler.ts b/packages/core/src/modules/value-transfer/handlers/RequestAcceptedWitnessedHandler.ts index b48706dbd0..3ae8a79261 100644 --- a/packages/core/src/modules/value-transfer/handlers/RequestAcceptedWitnessedHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/RequestAcceptedWitnessedHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferService } from '../services' @@ -7,18 +6,15 @@ import type { ValueTransferGetterService } from '../services/ValueTransferGetter import { RequestAcceptedWitnessedMessage } from '../messages' export class RequestAcceptedWitnessedHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferGetterService: ValueTransferGetterService public readonly supportedMessages = [RequestAcceptedWitnessedMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferGetterService: ValueTransferGetterService ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferGetterService = valueTransferGetterService } diff --git a/packages/core/src/modules/value-transfer/handlers/RequestHandler.ts b/packages/core/src/modules/value-transfer/handlers/RequestHandler.ts index ac0a161154..f0c9764486 100644 --- a/packages/core/src/modules/value-transfer/handlers/RequestHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/RequestHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferService } from '../services' @@ -7,18 +6,15 @@ import type { ValueTransferWitnessService } from '../services/ValueTransferWitne import { ProblemReportMessage, RequestMessage } from '../messages' export class RequestHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferWitnessService: ValueTransferWitnessService public readonly supportedMessages = [RequestMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferWitnessService: ValueTransferWitnessService ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferWitnessService = valueTransferWitnessService } diff --git a/packages/core/src/modules/value-transfer/handlers/RequestWitnessedHandler.ts b/packages/core/src/modules/value-transfer/handlers/RequestWitnessedHandler.ts index 24f149368b..de38249df3 100644 --- a/packages/core/src/modules/value-transfer/handlers/RequestWitnessedHandler.ts +++ b/packages/core/src/modules/value-transfer/handlers/RequestWitnessedHandler.ts @@ -1,4 +1,3 @@ -import type { AgentConfig } from '../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../agent/Handler' import type { DIDCommV2Message } from '../../../agent/didcomm' import type { ValueTransferResponseCoordinator } from '../ValueTransferResponseCoordinator' @@ -9,7 +8,6 @@ import { ProblemReportMessage } from '../../problem-reports' import { RequestWitnessedMessage } from '../messages/RequestWitnessedMessage' export class RequestWitnessedHandler implements Handler { - private agentConfig: AgentConfig private valueTransferService: ValueTransferService private valueTransferGiverService: ValueTransferGiverService private valueTransferResponseCoordinator: ValueTransferResponseCoordinator @@ -17,12 +15,10 @@ export class RequestWitnessedHandler implements Handler public readonly supportedMessages = [RequestWitnessedMessage] public constructor( - agentConfig: AgentConfig, valueTransferService: ValueTransferService, valueTransferGiverService: ValueTransferGiverService, valueTransferResponseCoordinator: ValueTransferResponseCoordinator ) { - this.agentConfig = agentConfig this.valueTransferService = valueTransferService this.valueTransferGiverService = valueTransferGiverService this.valueTransferResponseCoordinator = valueTransferResponseCoordinator diff --git a/packages/core/src/modules/value-transfer/repository/ValueTransferStateRecord.ts b/packages/core/src/modules/value-transfer/repository/ValueTransferStateRecord.ts index 7ad552d356..eaf15e3043 100644 --- a/packages/core/src/modules/value-transfer/repository/ValueTransferStateRecord.ts +++ b/packages/core/src/modules/value-transfer/repository/ValueTransferStateRecord.ts @@ -1,40 +1,25 @@ -import type { RecordTags, TagsBase } from '../../../storage/BaseRecord' - -import { Wallet } from '@sicpa-dlab/value-transfer-protocol-ts' +import { PartyState } from '@sicpa-dlab/value-transfer-protocol-ts' import { Type } from 'class-transformer' -import { IsInstance, ValidateNested } from 'class-validator' - +import type { RecordTags, TagsBase } from '../../../storage/BaseRecord' import { BaseRecord } from '../../../storage/BaseRecord' import { uuid } from '../../../utils/uuid' export type CustomValueTransferStateTags = TagsBase export type DefaultValueTransferStateTags = TagsBase - export type ValueTransferStateTags = RecordTags export interface ValueTransferStateProps { id?: string publicDid?: string - previousHash: string - wallet: Wallet - proposedNextWallet?: Wallet + partyState: PartyState } export class ValueTransferStateRecord extends BaseRecord { - public previousHash!: string - - @Type(() => Wallet) - @ValidateNested() - @IsInstance(Wallet) - public wallet!: Wallet - - @Type(() => Wallet) - @ValidateNested() - @IsInstance(Wallet) - public proposedNextWallet?: Wallet - public publicDid?: string + @Type(() => PartyState) + public partyState!: PartyState + public static readonly type = 'ValueTransferState' public readonly type = ValueTransferStateRecord.type @@ -44,9 +29,7 @@ export class ValueTransferStateRecord extends BaseRecord export interface WitnessStateProps { id?: string publicDid: string - stateAccumulator: string + witnessState: WitnessState } export class WitnessStateRecord extends BaseRecord { public publicDid!: string - public stateAccumulator!: string + + @Type(() => WitnessState) + public witnessState!: WitnessState public static readonly type = 'WitnessState' public readonly type = WitnessStateRecord.type @@ -27,7 +29,7 @@ export class WitnessStateRecord extends BaseRecord { - const state = await this.valueTransferStateService.getState() + const state = await this.valueTransferStateService.getPartyState() return state.wallet.amount() } diff --git a/packages/core/src/modules/value-transfer/services/ValueTransferStateService.ts b/packages/core/src/modules/value-transfer/services/ValueTransferStateService.ts index 0f28afadaf..28015ad0a7 100644 --- a/packages/core/src/modules/value-transfer/services/ValueTransferStateService.ts +++ b/packages/core/src/modules/value-transfer/services/ValueTransferStateService.ts @@ -1,48 +1,37 @@ import type { ValueTransferStateRecord } from '../repository/ValueTransferStateRecord' import type { WitnessStateRecord } from '../repository/WitnessStateRecord' -import type { State, StorageInterface, WitnessState } from '@sicpa-dlab/value-transfer-protocol-ts' +import type { PartyState, StorageInterface, WitnessState } from '@sicpa-dlab/value-transfer-protocol-ts' import { Lifecycle, scoped } from 'tsyringe' -import { Buffer } from '../../../utils' -import { ValueTransferRepository } from '../repository' import { ValueTransferStateRepository } from '../repository/ValueTransferStateRepository' import { WitnessStateRepository } from '../repository/WitnessStateRepository' @scoped(Lifecycle.ContainerScoped) export class ValueTransferStateService implements StorageInterface { - private valueTransferRepository: ValueTransferRepository private valueTransferStateRepository: ValueTransferStateRepository private witnessStateRepository: WitnessStateRepository private valueTransferStateRecord?: ValueTransferStateRecord private witnessStateRecord?: WitnessStateRecord public constructor( - valueTransferRepository: ValueTransferRepository, valueTransferStateRepository: ValueTransferStateRepository, witnessStateRepository: WitnessStateRepository ) { - this.valueTransferRepository = valueTransferRepository this.valueTransferStateRepository = valueTransferStateRepository this.witnessStateRepository = witnessStateRepository } - public async getState(): Promise { + public async getPartyState(): Promise { if (!this.valueTransferStateRecord) { this.valueTransferStateRecord = await this.valueTransferStateRepository.getSingleByQuery({}) } - return { - previousHash: Uint8Array.from(Buffer.from(this.valueTransferStateRecord.previousHash, 'hex')), - wallet: this.valueTransferStateRecord.wallet, - proposedNextWallet: this.valueTransferStateRecord.proposedNextWallet, - } + return this.valueTransferStateRecord.partyState } - public async storeState(state: State): Promise { + public async storePartyState(partyState: PartyState): Promise { const record = await this.valueTransferStateRepository.getSingleByQuery({}) - record.previousHash = Buffer.from(state.previousHash).toString('hex') - record.wallet = state.wallet - record.proposedNextWallet = state.proposedNextWallet + record.partyState = partyState await this.valueTransferStateRepository.update(record) this.valueTransferStateRecord = record } @@ -51,14 +40,12 @@ export class ValueTransferStateService implements StorageInterface { if (!this.witnessStateRecord) { this.witnessStateRecord = await this.witnessStateRepository.getSingleByQuery({}) } - return { - stateAccumulator: this.witnessStateRecord.stateAccumulator, - } + return this.witnessStateRecord.witnessState } - public async storeWitnessState(state: WitnessState): Promise { + public async storeWitnessState(witnessState: WitnessState): Promise { const record = await this.witnessStateRepository.getSingleByQuery({}) - record.stateAccumulator = state.stateAccumulator + record.witnessState = witnessState await this.witnessStateRepository.update(record) this.witnessStateRecord = record } diff --git a/packages/core/src/modules/value-transfer/services/ValueTransferWitnessService.ts b/packages/core/src/modules/value-transfer/services/ValueTransferWitnessService.ts index 859e185178..fea1022702 100644 --- a/packages/core/src/modules/value-transfer/services/ValueTransferWitnessService.ts +++ b/packages/core/src/modules/value-transfer/services/ValueTransferWitnessService.ts @@ -4,15 +4,9 @@ import type { RequestMessage, RequestAcceptedMessage, CashAcceptedMessage, CashR import type { Witness } from '@sicpa-dlab/value-transfer-protocol-ts' import { ValueTransfer } from '@sicpa-dlab/value-transfer-protocol-ts' -import { inject, Lifecycle, scoped } from 'tsyringe' +import { Lifecycle, scoped } from 'tsyringe' -import { AgentConfig } from '../../../agent/AgentConfig' import { EventEmitter } from '../../../agent/EventEmitter' -import { InjectionSymbols } from '../../../constants' -import { Wallet } from '../../../wallet' -import { ConnectionService } from '../../connections/services/ConnectionService' -import { DidResolverService } from '../../dids' -import { DidService } from '../../dids/services/DidService' import { ValueTransferEventTypes } from '../ValueTransferEvents' import { ValueTransferRole } from '../ValueTransferRole' import { ValueTransferState } from '../ValueTransferState' @@ -26,7 +20,6 @@ import { } from '../messages' import { ValueTransferBaseMessage } from '../messages/ValueTransferBaseMessage' import { ValueTransferRecord, ValueTransferRepository } from '../repository' -import { ValueTransferStateRepository } from '../repository/ValueTransferStateRepository' import { WitnessStateRepository } from '../repository/WitnessStateRepository' import { ValueTransferCryptoService } from './ValueTransferCryptoService' @@ -35,45 +28,27 @@ import { ValueTransferStateService } from './ValueTransferStateService' @scoped(Lifecycle.ContainerScoped) export class ValueTransferWitnessService { - private wallet: Wallet - private config: AgentConfig private valueTransferRepository: ValueTransferRepository - private valueTransferStateRepository: ValueTransferStateRepository private valueTransferService: ValueTransferService private valueTransferCryptoService: ValueTransferCryptoService private valueTransferStateService: ValueTransferStateService private witnessStateRepository: WitnessStateRepository - private didService: DidService - private didResolverService: DidResolverService - private connectionService: ConnectionService private eventEmitter: EventEmitter private witness: Witness public constructor( - @inject(InjectionSymbols.Wallet) wallet: Wallet, - config: AgentConfig, valueTransferRepository: ValueTransferRepository, - valueTransferStateRepository: ValueTransferStateRepository, valueTransferService: ValueTransferService, valueTransferCryptoService: ValueTransferCryptoService, valueTransferStateService: ValueTransferStateService, witnessStateRepository: WitnessStateRepository, - didService: DidService, - didResolverService: DidResolverService, - connectionService: ConnectionService, eventEmitter: EventEmitter ) { - this.wallet = wallet - this.config = config this.valueTransferRepository = valueTransferRepository - this.valueTransferStateRepository = valueTransferStateRepository this.valueTransferService = valueTransferService this.valueTransferCryptoService = valueTransferCryptoService this.valueTransferStateService = valueTransferStateService this.witnessStateRepository = witnessStateRepository - this.didService = didService - this.didResolverService = didResolverService - this.connectionService = connectionService this.eventEmitter = eventEmitter this.witness = new ValueTransfer( diff --git a/packages/node/package.json b/packages/node/package.json index 9398834561..491793ce39 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -28,7 +28,7 @@ "test": "jest" }, "dependencies": { - "@aries-framework/core": "npm:@sicpa-dlab/aries-framework-core", + "@aries-framework/core": "file:../core", "didcomm-node": "0.3.1", "express": "^4.17.1", "indy-sdk": "^1.16.0-dev-1636", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index fb5dfaddd7..fc9d4f38a5 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -24,7 +24,7 @@ "test": "jest" }, "dependencies": { - "@aries-framework/core": "npm:@sicpa-dlab/aries-framework-core", + "@aries-framework/core": "file:../core", "@azure/core-asynciterator-polyfill": "^1.0.0", "events": "^3.3.0" }, diff --git a/samples/extension-module/package.json b/samples/extension-module/package.json index ae446d5838..417cab3078 100644 --- a/samples/extension-module/package.json +++ b/samples/extension-module/package.json @@ -13,8 +13,8 @@ "responder": "ts-node responder.ts" }, "devDependencies": { - "@aries-framework/core": "^0.1.0", - "@aries-framework/node": "^0.1.0", + "@aries-framework/core": "file:../../packages/core", + "@aries-framework/node": "file:../../packages/node", "ts-node": "^10.4.0" }, "dependencies": {