From 66ee076fb4abd479dd6bbd05eb42270bdca1643b Mon Sep 17 00:00:00 2001 From: Miroslav Kovar Date: Wed, 25 Jan 2023 09:23:08 +0100 Subject: [PATCH] Expose nonmediated connection in node wrapper (#738) * Expose nonmediated connection in node wrapper Signed-off-by: Miroslav Kovar --- agents/node/vcxagent-core/package.json | 7 +- agents/node/vcxagent-core/src/agent.js | 26 +- .../src/services/service-connections.js | 15 +- .../service-nonmediated-connections.js | 87 + .../src/services/service-out-of-band.js | 1 + .../src/storage/storage-service.js | 19 + .../test/nonmediated-connection.spec.js | 266 ++ agents/node/vcxagent-core/test/utils/alice.js | 66 +- agents/node/vcxagent-core/test/utils/faber.js | 62 +- agents/node/vcxagent-core/test/utils/utils.js | 6 +- .../src/services/connection.rs | 5 +- aries_vcx/Cargo.toml | 6 +- .../src/handlers/connection/connection.rs | 33 +- libvcx/src/api_vcx/api_handle/connection.rs | 60 +- libvcx/src/api_vcx/api_handle/out_of_band.rs | 1 + wrappers/node/package.json | 3 +- wrappers/node/src/api/connection.ts | 174 + wrappers/node/src/index.ts | 1 + .../test/suite1/ariesvcx-connection.test.ts | 37 + wrappers/vcx-napi-rs/Cargo.lock | 4145 +++++++++++++++++ wrappers/vcx-napi-rs/index.d.ts | 19 + wrappers/vcx-napi-rs/index.js | 33 +- wrappers/vcx-napi-rs/src/api/connection.rs | 159 + wrappers/vcx-napi-rs/src/api/mod.rs | 1 + 24 files changed, 5158 insertions(+), 74 deletions(-) create mode 100644 agents/node/vcxagent-core/src/services/service-nonmediated-connections.js create mode 100644 agents/node/vcxagent-core/test/nonmediated-connection.spec.js create mode 100644 wrappers/node/src/api/connection.ts create mode 100644 wrappers/node/test/suite1/ariesvcx-connection.test.ts create mode 100644 wrappers/vcx-napi-rs/Cargo.lock create mode 100644 wrappers/vcx-napi-rs/src/api/connection.rs diff --git a/agents/node/vcxagent-core/package.json b/agents/node/vcxagent-core/package.json index e817de00d7..bd76834fe3 100644 --- a/agents/node/vcxagent-core/package.json +++ b/agents/node/vcxagent-core/package.json @@ -35,7 +35,7 @@ "demo:faber:mysql": "node demo/faber.js --mysql", "demo:alice:sign": "node demo/alice-signature.js", "demo:faber:verify": "node demo/faber-verify-signature.js", - "test:integration": "npm run test:integration:issue-verify && npm run test:integration:signing && npm run test:integration:messaging && npm run test:integration:tails && npm run test:integration:trustping && npm run test:integration:feature-discovery && npm run test:integration:public-invite && npm run test:integration:out-of-band && npm run test:integration:nonmediation", + "test:integration": "npm run test:integration:issue-verify && npm run test:integration:signing && npm run test:integration:messaging && npm run test:integration:tails && npm run test:integration:trustping && npm run test:integration:feature-discovery && npm run test:integration:public-invite && npm run test:integration:out-of-band && npm run test:integration:nonmediated-endpoint && npm run test:integration:nonmediated-connection", "test:integration:issue-verify": "jest --forceExit --env=node --runInBand test/issue-verify.spec.js", "test:integration:signing": "jest --forceExit --env=node --runInBand test/sign-verify.spec.js", "test:integration:messaging": "jest --forceExit --env=node --runInBand test/messaging.spec.js", @@ -44,8 +44,9 @@ "test:integration:feature-discovery": "jest --forceExit --env=node --runInBand test/feature-discovery.spec.js", "test:integration:public-invite": "jest --forceExit --env=node --runInBand test/public-invite.spec.js", "test:integration:out-of-band": "jest --forceExit --env=node --runInBand test/out-of-band.spec.js", - "test:integration:nonmediation": "jest --forceExit --env=node --runInBand test/nonmediated-endpoint.spec.js" - }, + "test:integration:nonmediated-endpoint": "jest --forceExit --env=node --runInBand test/nonmediated-endpoint.spec.js", + "test:integration:nonmediated-connection": "jest --forceExit --env=node --runInBand test/nonmediated-connection.spec.js" + }, "dependencies": { "axios": "^0.27.2", "ffi-napi": "^4.0.3", diff --git a/agents/node/vcxagent-core/src/agent.js b/agents/node/vcxagent-core/src/agent.js index 7fe762fecc..f705339aa3 100644 --- a/agents/node/vcxagent-core/src/agent.js +++ b/agents/node/vcxagent-core/src/agent.js @@ -1,4 +1,4 @@ -const { getLedgerAuthorAgreement, setActiveTxnAuthorAgreementMeta } = require('@hyperledger/node-vcx-wrapper') +const { getLedgerAuthorAgreement, setActiveTxnAuthorAgreementMeta, defaultLogger } = require('@hyperledger/node-vcx-wrapper') const { createServiceLedgerCredDef } = require('./services/service-ledger-creddef') const { createServiceLedgerSchema } = require('./services/service-ledger-schema') const { createServiceVerifier } = require('./services/service-verifier') @@ -6,6 +6,7 @@ const { createServiceProver } = require('./services/service-prover') const { createServiceCredHolder } = require('./services/service-cred-holder') const { createServiceCredIssuer } = require('./services/service-cred-issuer') const { createServiceConnections } = require('./services/service-connections') +const { createServiceNonmediatedConnections } = require('./services/service-nonmediated-connections') const { createServiceOutOfBand } = require('./services/service-out-of-band') const { createServiceLedgerRevocationRegistry } = require('./services/service-revocation-registry') const { provisionAgentInAgency } = require('./utils/vcx-workflows') @@ -20,7 +21,7 @@ const { const { createStorageService } = require('./storage/storage-service') const { waitUntilAgencyIsReady, getAgencyConfig } = require('./common') -async function createVcxAgent ({ agentName, genesisPath, agencyUrl, seed, walletExtraConfigs, logger }) { +async function createVcxAgent({ agentName, genesisPath, agencyUrl, seed, walletExtraConfigs, endpointInfo, logger }) { genesisPath = genesisPath || `${__dirname}/../resources/docker.txn` await waitUntilAgencyIsReady(agencyUrl, logger) @@ -34,8 +35,9 @@ async function createVcxAgent ({ agentName, genesisPath, agencyUrl, seed, wallet const agentProvision = await storageService.loadAgentProvision() const issuerDid = agentProvision.issuerConfig.institution_did - async function agentInitVcx () { + async function agentInitVcx() { logger.info(`Initializing ${agentName} vcx session.`) + logger.silly(`Using following agent provision to initialize VCX settings ${JSON.stringify(agentProvision, null, 2)}`) logger.silly('Initializing issuer config') await initIssuerConfig(agentProvision.issuerConfig) @@ -47,17 +49,17 @@ async function createVcxAgent ({ agentName, genesisPath, agencyUrl, seed, wallet await openMainPool({ genesis_path: genesisPath }) } - async function agentShutdownVcx () { + async function agentShutdownVcx() { logger.debug(`Shutting down ${agentName} vcx session.`) shutdownVcx() } - async function updateWebhookUrl (webhookUrl) { + async function updateWebhookUrl(webhookUrl) { logger.info(`Updating webhook url to ${webhookUrl}`) await vcxUpdateWebhookUrl({ webhookUrl }) } - async function acceptTaa () { + async function acceptTaa() { const taa = await getLedgerAuthorAgreement() const taaJson = JSON.parse(taa) const utime = Math.floor(new Date() / 1000) @@ -66,7 +68,7 @@ async function createVcxAgent ({ agentName, genesisPath, agencyUrl, seed, wallet await setActiveTxnAuthorAgreementMeta(taaJson.text, taaJson.version, null, acceptanceMechanism, utime) } - function getInstitutionDid () { + function getInstitutionDid() { return issuerDid } @@ -74,9 +76,16 @@ async function createVcxAgent ({ agentName, genesisPath, agencyUrl, seed, wallet logger, saveConnection: storageService.saveConnection, loadConnection: storageService.loadConnection, - loadAgent: storageService.loadAgent, listConnectionIds: storageService.listConnectionKeys }) + + const serviceNonmediatedConnections = createServiceNonmediatedConnections({ + logger, + saveNonmediatedConnection: storageService.saveNonmediatedConnection, + loadNonmediatedConnection: storageService.loadNonmediatedConnection, + endpointInfo + }) + const serviceLedgerSchema = createServiceLedgerSchema({ logger, saveSchema: storageService.saveSchema, @@ -147,6 +156,7 @@ async function createVcxAgent ({ agentName, genesisPath, agencyUrl, seed, wallet // connections serviceConnections, + serviceNonmediatedConnections, // credex serviceCredIssuer, diff --git a/agents/node/vcxagent-core/src/services/service-connections.js b/agents/node/vcxagent-core/src/services/service-connections.js index 5e76949fcd..806f0ecbb5 100644 --- a/agents/node/vcxagent-core/src/services/service-connections.js +++ b/agents/node/vcxagent-core/src/services/service-connections.js @@ -6,7 +6,7 @@ const { } = require('@hyperledger/node-vcx-wrapper') const { pollFunction } = require('../common') -module.exports.createServiceConnections = function createServiceConnections ({ logger, saveConnection, loadConnection, loadAgent, listConnectionIds }) { +module.exports.createServiceConnections = function createServiceConnections ({ logger, saveConnection, loadConnection, listConnectionIds }) { async function inviterConnectionCreate (connectionId, cbInvitation) { logger.info(`InviterConnectionSM creating connection ${connectionId}`) const connection = await Connection.create({ id: connectionId }) @@ -22,18 +22,6 @@ module.exports.createServiceConnections = function createServiceConnections ({ l return invite } - async function inviterConnectionCreateFromRequest (connectionId, agentId, request) { - logger.info(`InviterConnectionSM creating connection ${connectionId} from received request ${request} and agent id ${agentId}`) - const agent = await loadAgent(agentId) - const connection = await Connection.createWithConnectionRequest({ - id: connectionId, - agent, - request - }) - await saveConnection(connectionId, connection) - return connection - } - async function inviterConnectionCreateFromRequestV2 (connectionId, pwInfo, request) { logger.info(`InviterConnectionSM creating connection ${connectionId} from received request ${request} and pw info ${pwInfo}`) const connection = await Connection.createWithConnectionRequestV2({ @@ -195,7 +183,6 @@ module.exports.createServiceConnections = function createServiceConnections ({ l return { // inviter inviterConnectionCreate, - inviterConnectionCreateFromRequest, inviterConnectionCreateFromRequestV2, inviterConnectionCreateAndAccept, diff --git a/agents/node/vcxagent-core/src/services/service-nonmediated-connections.js b/agents/node/vcxagent-core/src/services/service-nonmediated-connections.js new file mode 100644 index 0000000000..f7e38dfe02 --- /dev/null +++ b/agents/node/vcxagent-core/src/services/service-nonmediated-connections.js @@ -0,0 +1,87 @@ +const { NonmediatedConnection } = require('@hyperledger/node-vcx-wrapper') + +module.exports.createServiceNonmediatedConnections = function createServiceNonmediatedConnections ({ logger, saveNonmediatedConnection, loadNonmediatedConnection, endpointInfo }) { + + async function inviterConnectionCreatePwInvite (connectionId) { + logger.info(`inviterConnectionCreatePwInvite >> connectionId=${connectionId}`) + const connection = await NonmediatedConnection.createInviter() + logger.debug(`InviterConnectionSM after created connection:\n${JSON.stringify(connection.serialize())}`) + await connection.createInvite(endpointInfo) + logger.debug(`InviterConnectionSM after invitation was generated:\n${JSON.stringify(connection.serialize())}`) + await saveNonmediatedConnection(connectionId, connection) + const invite = connection.getInvitation() + logger.debug(`InviterConnectionSM created invitation ${invite}`) + return invite + } + + async function inviterConnectionCreateFromRequest (connectionId, request, pwInfo) { + logger.info(`inviterConnectionCreateFromRequest >> connectionId=${connectionId}, request: ${request}, pwInfo: ${pwInfo}`) + const connection = await NonmediatedConnection.createInviter(pwInfo) + logger.debug(`InviterConnectionSM after created connection:\n${JSON.stringify(connection.serialize())}`) + await connection.processRequest(request, endpointInfo) + logger.debug(`InviterConnectionSM after processing request:\n${JSON.stringify(connection.serialize())}`) + await connection.sendResponse() + logger.debug(`InviterConnectionSM after sending response:\n${JSON.stringify(connection.serialize())}`) + await saveNonmediatedConnection(connectionId, connection) + } + + async function inviterConnectionProcessRequest (connectionId, request) { + logger.info(`inviterConnectionProcessRequest >> connectionId=${connectionId}, request: ${request}`) + const connection = await loadNonmediatedConnection(connectionId) + await connection.processRequest(request, endpointInfo) + logger.info(`InviterConnectionSM after processing request:\n${JSON.stringify(connection.serialize())}`) + await connection.sendResponse() + logger.info(`InviterConnectionSM after sending response:\n${JSON.stringify(connection.serialize())}`) + await saveNonmediatedConnection(connectionId, connection) + } + + async function inviterConnectionProcessAck (connectionId, ack) { + logger.info(`inviterConnectionProcessAck >> connectionId=${connectionId}, ack: ${ack}`) + const connection = await loadNonmediatedConnection(connectionId) + await connection.processAck(ack) + logger.debug(`InviterConnectionSM after processing ack: ${JSON.stringify(connection.serialize())}`) + await saveNonmediatedConnection(connectionId, connection) + } + + async function inviteeConnectionCreateFromInvite (connectionId, invite) { + logger.info(`inviteeConnectionCreateFromInvite >> connectionId=${connectionId}, invite: ${invite}`) + const connection = await NonmediatedConnection.createInvitee(invite) + logger.debug(`InviteeConnectionSM after created from invitation:\n${JSON.stringify(connection.serialize())}`) + connection.processInvite(invite) + await connection.sendRequest(endpointInfo) + logger.debug(`InviteeConnectionSM after sending request:\n${JSON.stringify(connection.serialize())}`) + await saveNonmediatedConnection(connectionId, connection) + } + + async function inviteeConnectionProcessResponse (connectionId, response) { + logger.info(`inviteeConnectionProcessResponse >> connectionId=${connectionId}, response: ${response}`) + const connection = await loadNonmediatedConnection(connectionId) + await connection.processResponse(response) + logger.debug(`InviteeConnectionSM after processing response:\n${JSON.stringify(connection.serialize())}`) + await connection.sendAck() + logger.debug(`InviteeConnectionSM connection after sending ack:\n${JSON.stringify(connection.serialize())}`) + await saveNonmediatedConnection(connectionId, connection) + } + + async function sendMessage (connectionId, content) { + logger.info(`nonmediatedConnectionSendMessage >> connectionId=${connectionId}, content: ${content}`) + const connection = await loadNonmediatedConnection(connectionId) + await connection.sendMessage(content) + } + + async function getState (connectionId) { + const connection = await loadNonmediatedConnection(connectionId) + return connection.getState() + } + + return { + inviterConnectionCreatePwInvite, + inviterConnectionCreateFromRequest, + inviterConnectionProcessRequest, + inviterConnectionProcessAck, + inviteeConnectionCreateFromInvite, + inviteeConnectionProcessResponse, + sendMessage, + getState, + } +} diff --git a/agents/node/vcxagent-core/src/services/service-out-of-band.js b/agents/node/vcxagent-core/src/services/service-out-of-band.js index 95a7a14f9e..2ab61a5590 100644 --- a/agents/node/vcxagent-core/src/services/service-out-of-band.js +++ b/agents/node/vcxagent-core/src/services/service-out-of-band.js @@ -1,4 +1,5 @@ const { OutOfBandSender, OutOfBandReceiver } = require('@hyperledger/node-vcx-wrapper') +const assert = require('assert') module.exports.createServiceOutOfBand = function createServiceOutOfBand ({ logger, saveConnection, loadConnection }) { function _createOobSender (message, label) { diff --git a/agents/node/vcxagent-core/src/storage/storage-service.js b/agents/node/vcxagent-core/src/storage/storage-service.js index d9b8b44eec..22aedbe380 100644 --- a/agents/node/vcxagent-core/src/storage/storage-service.js +++ b/agents/node/vcxagent-core/src/storage/storage-service.js @@ -2,6 +2,7 @@ const { createFileStorage } = require('./storage-file') const mkdirp = require('mkdirp') const { Connection, + NonmediatedConnection, Credential, IssuerCredential, CredentialDef, @@ -14,12 +15,14 @@ const { async function createStorageService (agentName) { mkdirp.sync('storage-agentProvisions/') mkdirp.sync('storage-connections/') + mkdirp.sync('storage-nonmediated-connections/') mkdirp.sync('storage-credentialDefinitions/') mkdirp.sync('storage-revocationRegistries/') mkdirp.sync('storage-schemas/') const storageAgentProvisions = await createFileStorage(`storage-agentProvisions/${agentName}`) const storageConnections = await createFileStorage(`storage-connections/${agentName}`) + const storageNonmediatedConnections = await createFileStorage(`storage-connections/${agentName}`) const storageCredIssuer = await createFileStorage(`storage-credsIssuer/${agentName}`) const storageCredHolder = await createFileStorage(`storage-credsHolder/${agentName}`) const storageProof = await createFileStorage(`storage-proofs/${agentName}`) @@ -53,6 +56,19 @@ async function createStorageService (agentName) { return Connection.deserialize(serialized) } + async function saveNonmediatedConnection (name, connection) { + const serialized = await connection.serialize() + await storageNonmediatedConnections.set(`${name}`, serialized) + } + + async function loadNonmediatedConnection (name) { + const serialized = await storageNonmediatedConnections.get(`${name}`) + if (!serialized) { + throw Error(`Nonmediated connection ${name} was not found.`) + } + return NonmediatedConnection.deserialize(serialized) + } + async function saveSchema (name, schema) { const serialized = await schema.serialize() await storageSchemas.set(name, serialized) @@ -184,6 +200,9 @@ async function createStorageService (agentName) { saveConnection, loadConnection, + saveNonmediatedConnection, + loadNonmediatedConnection, + saveSchema, loadSchema, diff --git a/agents/node/vcxagent-core/test/nonmediated-connection.spec.js b/agents/node/vcxagent-core/test/nonmediated-connection.spec.js new file mode 100644 index 0000000000..866d78f689 --- /dev/null +++ b/agents/node/vcxagent-core/test/nonmediated-connection.spec.js @@ -0,0 +1,266 @@ +/* eslint-env jest */ +require('jest') +const { ConnectionStateType } = require('@hyperledger/node-vcx-wrapper') +const bodyParser = require('body-parser') +const sleep = require('sleep-promise') +const express = require('express') +const { createAliceAndFaber } = require('./utils/utils') +const { initRustLogger } = require('../src') + +beforeAll(async () => { + jest.setTimeout(1000 * 60 * 4) + initRustLogger(process.env.RUST_LOG || 'vcx=error') +}) + +describe('test establishing and exchanging messages via nonmediated connections', () => { + it('Establish nonmediated connection via public endpoint using public invite, exchange messages', async () => { + let faberServer + try { + const path = '/msg' + const faberPort = 5400 + const faberEndpoint = `http://127.0.0.1:${faberPort}${path}` + + let faberEncryptedMsg + const faberApp = express() + faberApp.use(bodyParser.raw({ type: '*/*' })) + faberApp.post(path, (req, res) => { + faberEncryptedMsg = req.body + res.status(200).send() + }) + faberServer = faberApp.listen(faberPort) + + const alicePort = 5401 + const aliceEndpoint = `http://127.0.0.1:${alicePort}${path}` + + let aliceEncryptedMsg + const aliceApp = express() + aliceApp.use(bodyParser.raw({ type: '*/*' })) + aliceApp.post(path, (req, res) => { + aliceEncryptedMsg = req.body + res.status(200).send() + }) + aliceServer = aliceApp.listen(alicePort) + + const { alice, faber } = await createAliceAndFaber({ aliceEndpoint, faberEndpoint }) + const invite = await faber.createPublicInvite() + const pwInfo = await faber.publishService(faberEndpoint) + const service = await faber.readServiceFromLedger() + expect(service.recipientKeys[0]).toBe(pwInfo.pw_vk) + + await alice.createNonmediatedConnectionFromInvite(invite) + + const { message: request } = await faber.unpackMsg(faberEncryptedMsg) + await faber.createNonmediatedConnectionFromRequest(request, pwInfo) + + const { message: response } = await alice.unpackMsg(aliceEncryptedMsg) + await alice.nonmediatedConnectionProcessResponse(response) + + const { message: ack } = await faber.unpackMsg(faberEncryptedMsg) + await faber.nonmediatedConnectionProcessAck(ack) + + await alice.nonmediatedConnectionSendMessage('Hello Faber') + const { message: msgFaber } = await faber.unpackMsg(faberEncryptedMsg) + expect(JSON.parse(msgFaber).content).toBe('Hello Faber') + + await faber.nonmediatedConnectionSendMessage('Hello Alice') + const { message: msgAlice } = await alice.unpackMsg(aliceEncryptedMsg) + expect(JSON.parse(msgAlice).content).toBe('Hello Alice') + + } catch (err) { + console.error(`err = ${err.message} stack = ${err.stack}`) + throw Error(err) + } finally { + if (faberServer) { + faberServer.close() + } + if (aliceServer) { + aliceServer.close() + } + await sleep(2000) + } + }) + + it('Establish nonmediated connection via public endpoint using pairwise invite, exchange messages', async () => { + let faberServer + try { + const path = '/msg' + const faberPort = 5402 + const faberEndpoint = `http://127.0.0.1:${faberPort}${path}` + + let faberEncryptedMsg + const faberApp = express() + faberApp.use(bodyParser.raw({ type: '*/*' })) + faberApp.post(path, (req, res) => { + faberEncryptedMsg = req.body + res.status(200).send() + }) + faberServer = faberApp.listen(faberPort) + + const alicePort = 5403 + const aliceEndpoint = `http://127.0.0.1:${alicePort}${path}` + + let aliceEncryptedMsg + const aliceApp = express() + aliceApp.use(bodyParser.raw({ type: '*/*' })) + aliceApp.post(path, (req, res) => { + aliceEncryptedMsg = req.body + res.status(200).send() + }) + aliceServer = aliceApp.listen(alicePort) + + const { alice, faber } = await createAliceAndFaber({ aliceEndpoint, faberEndpoint }) + + const invite = await faber.createNonmediatedConnectionWithInvite() + await alice.createNonmediatedConnectionFromInvite(invite) + + const { message: request } = await faber.unpackMsg(faberEncryptedMsg) + await faber.nonmediatedConnectionProcessRequest(request) + + const { message: response } = await alice.unpackMsg(aliceEncryptedMsg) + await alice.nonmediatedConnectionProcessResponse(response) + + const { message: ack } = await faber.unpackMsg(faberEncryptedMsg) + await faber.nonmediatedConnectionProcessAck(ack) + + await alice.nonmediatedConnectionSendMessage('Hello Faber') + const { message: msgFaber } = await faber.unpackMsg(faberEncryptedMsg) + expect(JSON.parse(msgFaber).content).toBe('Hello Faber') + + await faber.nonmediatedConnectionSendMessage('Hello Alice') + const { message: msgAlice } = await alice.unpackMsg(aliceEncryptedMsg) + expect(JSON.parse(msgAlice).content).toBe('Hello Alice') + + } catch (err) { + console.error(`err = ${err.message} stack = ${err.stack}`) + throw Error(err) + } finally { + if (faberServer) { + faberServer.close() + } + if (aliceServer) { + aliceServer.close() + } + await sleep(2000) + } + }) + + it('Establish nonmediated connection via public endpoint using OOB invite, exchange messages', async () => { + let faberServer + try { + const path = '/msg' + const faberPort = 5404 + const faberEndpoint = `http://127.0.0.1:${faberPort}${path}` + + let faberEncryptedMsg + const faberApp = express() + faberApp.use(bodyParser.raw({ type: '*/*' })) + faberApp.post(path, (req, res) => { + faberEncryptedMsg = req.body + res.status(200).send() + }) + faberServer = faberApp.listen(faberPort) + + const alicePort = 5405 + const aliceEndpoint = `http://127.0.0.1:${alicePort}${path}` + + let aliceEncryptedMsg + const aliceApp = express() + aliceApp.use(bodyParser.raw({ type: '*/*' })) + aliceApp.post(path, (req, res) => { + aliceEncryptedMsg = req.body + res.status(200).send() + }) + aliceServer = aliceApp.listen(alicePort) + + const { alice, faber } = await createAliceAndFaber({ aliceEndpoint, faberEndpoint }) + + const pwInfo = await faber.publishService(faberEndpoint) + const msg = await faber.createOobMessageWithDid() + await alice.createNonmediatedConnectionFromInvite(msg) + + const { message: request } = await faber.unpackMsg(faberEncryptedMsg) + await faber.createNonmediatedConnectionFromRequest(request, pwInfo) + + const { message: response } = await alice.unpackMsg(aliceEncryptedMsg) + await alice.nonmediatedConnectionProcessResponse(response) + + const { message: ack } = await faber.unpackMsg(faberEncryptedMsg) + await faber.nonmediatedConnectionProcessAck(ack) + + await alice.nonmediatedConnectionSendMessage('Hello Faber') + const { message: msgFaber } = await faber.unpackMsg(faberEncryptedMsg) + expect(JSON.parse(msgFaber).content).toBe('Hello Faber') + + await faber.nonmediatedConnectionSendMessage('Hello Alice') + const { message: msgAlice } = await alice.unpackMsg(aliceEncryptedMsg) + expect(JSON.parse(msgAlice).content).toBe('Hello Alice') + + } catch (err) { + console.error(`err = ${err.message} stack = ${err.stack}`) + throw Error(err) + } finally { + if (faberServer) { + faberServer.close() + } + if (aliceServer) { + aliceServer.close() + } + await sleep(2000) + } + }) + + it('Establish a nonmediated with mediated connection, exchange messages', async () => { + let faberServer + try { + const path = '/msg' + const faberPort = 5406 + const faberEndpoint = `http://127.0.0.1:${faberPort}${path}` + + let faberEncryptedMsg + const faberApp = express() + faberApp.use(bodyParser.raw({ type: '*/*' })) + faberApp.post(path, (req, res) => { + faberEncryptedMsg = req.body + res.status(200).send() + }) + faberServer = faberApp.listen(faberPort) + + const { alice, faber } = await createAliceAndFaber({ faberEndpoint }) + + const pwInfo = await faber.publishService(faberEndpoint) + const msg = await faber.createOobMessageWithDid() + await alice.createConnectionUsingOobMessage(msg) + + const { message: request } = await faber.unpackMsg(faberEncryptedMsg) + await faber.createNonmediatedConnectionFromRequest(request, pwInfo) + + await alice.updateConnection(ConnectionStateType.Finished) + + const { message: ack } = await faber.unpackMsg(faberEncryptedMsg) + await faber.nonmediatedConnectionProcessAck(ack) + + await alice.sendMessage('Hello Faber') + const { message: msgFaber } = await faber.unpackMsg(faberEncryptedMsg) + expect(JSON.parse(msgFaber).content).toBe('Hello Faber') + + await faber.nonmediatedConnectionSendMessage('Hello Alice') + const msgsAlice = await alice.downloadReceivedMessagesV2() + expect(msgsAlice.length).toBe(1) + expect(msgsAlice[0].uid).toBeDefined() + expect(msgsAlice[0].statusCode).toBe('MS-103') + const payloadAlice = JSON.parse(msgsAlice[0].decryptedMsg) + expect(payloadAlice['@id']).toBeDefined() + expect(payloadAlice['@type']).toBeDefined() + expect(payloadAlice.content).toBe('Hello Alice') + + } catch (err) { + console.error(`err = ${err.message} stack = ${err.stack}`) + throw Error(err) + } finally { + if (faberServer) { + faberServer.close() + } + await sleep(2000) + } + }) +}) diff --git a/agents/node/vcxagent-core/test/utils/alice.js b/agents/node/vcxagent-core/test/utils/alice.js index 8dea71171f..8a1126b897 100644 --- a/agents/node/vcxagent-core/test/utils/alice.js +++ b/agents/node/vcxagent-core/test/utils/alice.js @@ -1,8 +1,8 @@ /* eslint-env jest */ const { createVcxAgent } = require('../../src/index') -const { ConnectionStateType, ProverStateType, OutOfBandReceiver, HolderStateType } = require('@hyperledger/node-vcx-wrapper') +const { ConnectionStateType, ProverStateType, OutOfBandReceiver, HolderStateType, unpack } = require('@hyperledger/node-vcx-wrapper') -module.exports.createAlice = async function createAlice () { +module.exports.createAlice = async function createAlice (serviceEndpoint = 'http://localhost:5401') { const agentName = `alice-${Math.floor(new Date() / 1000)}` const connectionId = 'connection-alice-to-faber' const holderCredentialId = 'credential-of-alice' @@ -14,6 +14,10 @@ module.exports.createAlice = async function createAlice () { agencyUrl: 'http://localhost:8080', seed: '000000000000000000000000Alice000', webhookUrl: `http://localhost:7209/notifications/${agentName}`, + endpointInfo: { + serviceEndpoint, + routingKeys: [] + }, logger } const vcxAgent = await createVcxAgent(aliceAgentConfig) @@ -29,6 +33,26 @@ module.exports.createAlice = async function createAlice () { await vcxAgent.agentShutdownVcx() } + async function createNonmediatedConnectionFromInvite (invite) { + logger.info(`Alice establishing connection with Faber using invite ${invite}`) + await vcxAgent.agentInitVcx() + + await vcxAgent.serviceNonmediatedConnections.inviteeConnectionCreateFromInvite(connectionId, invite) + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Requested) + + await vcxAgent.agentShutdownVcx() + } + + async function nonmediatedConnectionProcessResponse (response) { + logger.info(`Alice processing response ${response}`) + await vcxAgent.agentInitVcx() + + await vcxAgent.serviceNonmediatedConnections.inviteeConnectionProcessResponse(connectionId, response) + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Finished) + + await vcxAgent.agentShutdownVcx() + } + async function createConnectionUsingOobMessage (oobMsg) { logger.info('createConnectionUsingOobMessage >> Alice going to create connection using oob message') logger.debug(`createConnectionUsingOobMessage >> oobMsg = ${oobMsg}`) @@ -39,6 +63,16 @@ module.exports.createAlice = async function createAlice () { await vcxAgent.agentShutdownVcx() } + async function createNonmediatedConnectionUsingOobMessage (oobMsg) { + logger.info('createNonmediatedConnectionUsingOobMessage >> Alice going to create connection using oob message') + logger.debug(`createNonmediatedConnectionUsingOobMessage >> oobMsg = ${oobMsg}`) + await vcxAgent.agentInitVcx() + + await vcxAgent.serviceOutOfBand.createNonmediatedConnectionFromOobMsg(connectionId, oobMsg) + + await vcxAgent.agentShutdownVcx() + } + async function createOrReuseConnectionUsingOobMsg (oobMsg) { logger.info('createOrReuseConnectionUsingOobMsg >> Alice going to create or reuse connection using oob message') logger.debug(`createOrReuseConnectionUsingOobMsg >> oobMsg = ${oobMsg}`) @@ -150,6 +184,15 @@ module.exports.createAlice = async function createAlice () { await vcxAgent.agentShutdownVcx() } + async function nonmediatedConnectionSendMessage (message) { + logger.info('Alice is going to send message') + await vcxAgent.agentInitVcx() + + await vcxAgent.serviceNonmediatedConnections.sendMessage(connectionId, message) + + await vcxAgent.agentShutdownVcx() + } + async function getTailsLocation () { logger.info('Alice is going to get tails location') await vcxAgent.agentInitVcx() @@ -202,11 +245,27 @@ module.exports.createAlice = async function createAlice () { await vcxAgent.agentShutdownVcx() } + async function unpackMsg (encryptedMsg) { + logger.info(`Alice is going to unpack message of length ${encryptedMsg.length}`) + await vcxAgent.agentInitVcx() + + const { message, sender_verkey: senderVerkey } = await unpack(encryptedMsg) + + logger.info(`Decrypted msg has length ${message.length}, sender verkey: ${senderVerkey}`) + await vcxAgent.agentShutdownVcx() + + return { message, senderVerkey } + } + return { sendMessage, + nonmediatedConnectionSendMessage, signData, acceptInvite, + createNonmediatedConnectionFromInvite, + nonmediatedConnectionProcessResponse, createConnectionUsingOobMessage, + createNonmediatedConnectionUsingOobMessage, createOrReuseConnectionUsingOobMsg, acceptOobCredentialOffer, updateConnection, @@ -219,6 +278,7 @@ module.exports.createAlice = async function createAlice () { getTailsHash, downloadReceivedMessagesV2, sendPing, - discoverTheirFeatures + discoverTheirFeatures, + unpackMsg } } diff --git a/agents/node/vcxagent-core/test/utils/faber.js b/agents/node/vcxagent-core/test/utils/faber.js index 3ec6e201c1..f839d8d7c1 100644 --- a/agents/node/vcxagent-core/test/utils/faber.js +++ b/agents/node/vcxagent-core/test/utils/faber.js @@ -7,11 +7,10 @@ const { getAliceSchemaAttrs, getFaberCredDefName, getFaberProofData } = require( const sleep = require('sleep-promise') const assert = require('assert') -module.exports.createFaber = async function createFaber () { +module.exports.createFaber = async function createFaber (serviceEndpoint = 'http://localhost:5400') { const agentName = `faber-${Math.floor(new Date() / 1000)}` const connectionId = 'connection-faber-to-alice' const issuerCredId = 'credential-for-alice' - const agentId = 'faber-public-agent' let credDefId, revRegId const proofId = 'proof-from-alice' const logger = require('../../demo/logger')('Faber') @@ -22,6 +21,10 @@ module.exports.createFaber = async function createFaber () { agencyUrl: 'http://localhost:8080', seed: '000000000000000000000000Trustee1', webhookUrl: `http://localhost:7209/notifications/${agentName}`, + endpointInfo: { + serviceEndpoint, + routingKeys: [] + }, logger } @@ -270,12 +273,44 @@ module.exports.createFaber = async function createFaber () { return agencyMessages } - async function createConnectionFromReceivedRequest (request) { - logger.info('Faber is going to download connection requests') + async function createNonmediatedConnectionWithInvite () { + logger.info(`Faber is going to create a connection with invite`) + await vcxAgent.agentInitVcx() + const invite = await vcxAgent.serviceNonmediatedConnections.inviterConnectionCreatePwInvite(connectionId) + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Invited) - await vcxAgent.serviceConnections.inviterConnectionCreateFromRequest(connectionId, agentId, JSON.stringify(request)) - expect(await vcxAgent.serviceConnections.connectionUpdate(connectionId)).toBe(ConnectionStateType.Responded) + await vcxAgent.agentShutdownVcx() + return invite + } + + async function nonmediatedConnectionProcessRequest (request) { + logger.info(`Faber is going to process a connection request`) + + await vcxAgent.agentInitVcx() + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Invited) + await vcxAgent.serviceNonmediatedConnections.inviterConnectionProcessRequest(connectionId, request) + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Responded) + + await vcxAgent.agentShutdownVcx() + } + + async function createNonmediatedConnectionFromRequest (request, pwInfo) { + logger.info(`Faber is going to create a connection from a request: ${request}`) + + await vcxAgent.agentInitVcx() + await vcxAgent.serviceNonmediatedConnections.inviterConnectionCreateFromRequest(connectionId, request, pwInfo) + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Responded) + + await vcxAgent.agentShutdownVcx() + } + + async function nonmediatedConnectionProcessAck (ack) { + logger.info(`Faber is processing ack: ${ack}`) + + await vcxAgent.agentInitVcx() + await vcxAgent.serviceNonmediatedConnections.inviterConnectionProcessAck(connectionId, ack) + expect(await vcxAgent.serviceNonmediatedConnections.getState(connectionId)).toBe(ConnectionStateType.Finished) await vcxAgent.agentShutdownVcx() } @@ -344,18 +379,31 @@ module.exports.createFaber = async function createFaber () { await vcxAgent.agentShutdownVcx() } + async function nonmediatedConnectionSendMessage (message) { + logger.info('Faber is going to send message') + await vcxAgent.agentInitVcx() + + await vcxAgent.serviceNonmediatedConnections.sendMessage(connectionId, message) + + await vcxAgent.agentShutdownVcx() + } + return { buildLedgerPrimitives, rotateRevReg, downloadReceivedMessages, downloadReceivedMessagesV2, sendMessage, + nonmediatedConnectionSendMessage, verifySignature, createInvite, createPublicInvite, createOobMessageWithDid, createOobProofRequest, - createConnectionFromReceivedRequest, + createNonmediatedConnectionWithInvite, + nonmediatedConnectionProcessRequest, + createNonmediatedConnectionFromRequest, + nonmediatedConnectionProcessAck, createConnectionFromReceivedRequestV2, updateConnection, handleMessage, diff --git a/agents/node/vcxagent-core/test/utils/utils.js b/agents/node/vcxagent-core/test/utils/utils.js index b644690593..cf7e5436f0 100644 --- a/agents/node/vcxagent-core/test/utils/utils.js +++ b/agents/node/vcxagent-core/test/utils/utils.js @@ -6,9 +6,9 @@ const { createAlice } = require('./alice') const { ConnectionStateType } = require('@hyperledger/node-vcx-wrapper') const assert = require('assert') -module.exports.createAliceAndFaber = async function createAliceAndFaber () { - const alice = await createAlice() - const faber = await createFaber() +module.exports.createAliceAndFaber = async function createAliceAndFaber ({ aliceEndpoint, faberEndpoint } = {}) { + const alice = await createAlice(aliceEndpoint) + const faber = await createFaber(faberEndpoint) return { alice, faber } } diff --git a/agents/rust/aries-vcx-agent/src/services/connection.rs b/agents/rust/aries-vcx-agent/src/services/connection.rs index 62e7b178a9..89cc50fce7 100644 --- a/agents/rust/aries-vcx-agent/src/services/connection.rs +++ b/agents/rust/aries-vcx-agent/src/services/connection.rs @@ -11,6 +11,7 @@ use aries_vcx::messages::concepts::ack::Ack; use aries_vcx::messages::protocols::connection::invite::Invitation; use aries_vcx::messages::protocols::connection::request::Request; use aries_vcx::messages::protocols::connection::response::SignedResponse; +use aries_vcx::protocols::connection::pairwise_info::PairwiseInfo; pub type ServiceEndpoint = String; @@ -29,8 +30,8 @@ impl ServiceConnections { } } - pub async fn create_invitation(&self) -> AgentResult { - let inviter = Connection::create_inviter(&self.profile) + pub async fn create_invitation(&self, pw_info: Option) -> AgentResult { + let inviter = Connection::create_inviter(&self.profile, pw_info) .await? .create_invite(self.service_endpoint.clone(), vec![]) .await?; diff --git a/aries_vcx/Cargo.toml b/aries_vcx/Cargo.toml index 8020f81749..1bf6203d07 100644 --- a/aries_vcx/Cargo.toml +++ b/aries_vcx/Cargo.toml @@ -13,8 +13,8 @@ doctest = false [features] test_utils = [ "messages/test_utils" ] pool_tests = [ "test_utils" ] -agency_pool_tests = ["test_utils" ] -general_test = ["test_utils", "messages/general_test" ] +agency_pool_tests = [ "test_utils" ] +general_test = [ "test_utils", "messages/general_test" ] fatal_warnings = [] warnlog_fetched_messages = [] mysql_test = ["test_utils" ] @@ -54,7 +54,7 @@ indy-credx = { git = "https://github.com/anonyome/indy-shared-rs.git", rev = "73 # ---------------------- futures = { version = "0.3", default-features = false } libloading = "0.5.0" -uuid = { version = "0.8", default-features = false, features = ["v4"]} +uuid = { version = "0.8", default-features = false, features = ["v4"] } strum = "0.16.0" strum_macros = "0.16.0" agency_client = { path = "../agency_client" } diff --git a/aries_vcx/src/handlers/connection/connection.rs b/aries_vcx/src/handlers/connection/connection.rs index 00af602d3f..be6e580b62 100644 --- a/aries_vcx/src/handlers/connection/connection.rs +++ b/aries_vcx/src/handlers/connection/connection.rs @@ -2,6 +2,7 @@ use std::clone::Clone; use std::sync::Arc; use messages::a2a::A2AMessage; +use messages::protocols::basic_message::message::BasicMessage; use messages::protocols::connection::response::SignedResponse; use serde::{Deserialize, Serialize}; @@ -41,11 +42,11 @@ pub enum ConnectionState { impl Connection { // ----------------------------- CONSTRUCTORS ------------------------------------ - pub async fn create_inviter(profile: &Arc) -> VcxResult { - trace!("Connection::create >>>"); - let pairwise_info = PairwiseInfo::create(&profile.inject_wallet()).await?; + pub async fn create_inviter(profile: &Arc, pw_info: Option) -> VcxResult { + let pw_info = pw_info.unwrap_or(PairwiseInfo::create(&profile.inject_wallet()).await?); + trace!("Connection::create_inviter >>>"); Ok(Self { - connection_sm: SmConnection::Inviter(SmConnectionInviter::new("", pairwise_info)), + connection_sm: SmConnection::Inviter(SmConnectionInviter::new("", pw_info)), }) } @@ -264,7 +265,7 @@ impl Connection { profile: &Arc, send_message: Option, ) -> VcxResult { - trace!("Connection::send_request"); + trace!("Connection::send_ack"); let connection_sm = match &self.connection_sm { SmConnection::Inviter(_) => { return Err(AriesVcxError::from_msg( @@ -298,6 +299,22 @@ impl Connection { Ok(Self { connection_sm }) } + pub async fn send_generic_message( + &self, + profile: &Arc, + send_message: Option, + content: String, + ) -> VcxResult<()> { + trace!("Connection::send_generic_message >>>"); + let message = BasicMessage::create() + .set_content(content) + .set_time() + .set_out_time() + .to_a2a_message(); + let send_message = self.send_message_closure(profile, send_message).await?; + send_message(message).await + } + pub async fn send_message_closure( &self, profile: &Arc, @@ -460,7 +477,7 @@ mod unit_tests { async fn test_create_with_request() { let _setup = SetupMocks::init(); - let connection = Connection::create_inviter(&mock_profile()) + let connection = Connection::create_inviter(&mock_profile(), None) .await .unwrap() .process_request(&mock_profile(), _request(), _service_endpoint(), _routing_keys(), None) @@ -476,7 +493,7 @@ mod unit_tests { #[tokio::test] async fn test_inviter_deserialize_serialized() { let _setup = SetupMocks::init(); - let connection = Connection::create_inviter(&mock_profile()) + let connection = Connection::create_inviter(&mock_profile(), None) .await .unwrap() .process_request(&mock_profile(), _request(), _service_endpoint(), _routing_keys(), None) @@ -536,7 +553,7 @@ mod unit_tests { let (sender, receiver) = bounded(1); // Inviter creates connection and sends invite - let inviter = Connection::create_inviter(&profile) + let inviter = Connection::create_inviter(&profile, None) .await .unwrap() .create_invite(_service_endpoint(), _routing_keys()) diff --git a/libvcx/src/api_vcx/api_handle/connection.rs b/libvcx/src/api_vcx/api_handle/connection.rs index bf4c47be45..b7ec33a8d5 100644 --- a/libvcx/src/api_vcx/api_handle/connection.rs +++ b/libvcx/src/api_vcx/api_handle/connection.rs @@ -1,4 +1,7 @@ -use aries_vcx::{common::ledger::transactions::into_did_doc, handlers::connection::connection::Connection}; +use aries_vcx::{ + common::ledger::transactions::into_did_doc, handlers::connection::connection::Connection, + protocols::connection::pairwise_info::PairwiseInfo, +}; use crate::{ api_vcx::{api_global::profile::get_main_profile, api_handle::object_cache::ObjectCache}, @@ -6,7 +9,7 @@ use crate::{ }; lazy_static! { - pub static ref CONNECTION_MAP: ObjectCache = + static ref CONNECTION_MAP: ObjectCache = ObjectCache::::new("nonmediated-connections-cache"); } @@ -37,9 +40,9 @@ where } // ----------------------------- CONSTRUCTORS ------------------------------------ -pub async fn create_inviter() -> LibvcxResult { +pub async fn create_inviter(pw_info: Option) -> LibvcxResult { trace!("create_inviter >>>"); - store_connection(Connection::create_inviter(&get_main_profile()?).await?) + store_connection(Connection::create_inviter(&get_main_profile()?, pw_info).await?) } pub async fn create_invitee(invitation: &str) -> LibvcxResult { @@ -87,9 +90,10 @@ pub fn get_invitation(handle: u32) -> LibvcxResult { } // ----------------------------- MSG PROCESSING ------------------------------------ -pub fn process_invite(handle: u32, invitation: &str) -> LibvcxResult { +pub fn process_invite(handle: u32, invitation: &str) -> LibvcxResult<()> { trace!("process_invite >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .process_invite(deserialize(invitation)?)?, @@ -101,9 +105,10 @@ pub async fn process_request( request: &str, service_endpoint: String, routing_keys: Vec, -) -> LibvcxResult { +) -> LibvcxResult<()> { trace!("process_request >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .process_request( @@ -117,9 +122,10 @@ pub async fn process_request( ) } -pub async fn process_response(handle: u32, response: &str) -> LibvcxResult { +pub async fn process_response(handle: u32, response: &str) -> LibvcxResult<()> { trace!("process_response >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .process_response(&get_main_profile()?, deserialize(response)?, None) @@ -127,9 +133,10 @@ pub async fn process_response(handle: u32, response: &str) -> LibvcxResult ) } -pub async fn process_ack(handle: u32, message: &str) -> LibvcxResult { +pub async fn process_ack(handle: u32, message: &str) -> LibvcxResult<()> { trace!("process_ack >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .process_ack(deserialize(message)?) @@ -137,9 +144,10 @@ pub async fn process_ack(handle: u32, message: &str) -> LibvcxResult { ) } -pub async fn send_response(handle: u32) -> LibvcxResult { +pub async fn send_response(handle: u32) -> LibvcxResult<()> { trace!("send_response >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .send_response(&get_main_profile()?, None) @@ -147,9 +155,10 @@ pub async fn send_response(handle: u32) -> LibvcxResult { ) } -pub async fn send_request(handle: u32, service_endpoint: String, routing_keys: Vec) -> LibvcxResult { +pub async fn send_request(handle: u32, service_endpoint: String, routing_keys: Vec) -> LibvcxResult<()> { trace!("send_request >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .send_request(&get_main_profile()?, service_endpoint, routing_keys, None) @@ -157,9 +166,10 @@ pub async fn send_request(handle: u32, service_endpoint: String, routing_keys: V ) } -pub async fn send_ack(handle: u32) -> LibvcxResult { +pub async fn send_ack(handle: u32) -> LibvcxResult<()> { trace!("send_ack >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .send_ack(&get_main_profile()?, None) @@ -167,9 +177,19 @@ pub async fn send_ack(handle: u32) -> LibvcxResult { ) } -pub async fn create_invite(handle: u32, service_endpoint: String, routing_keys: Vec) -> LibvcxResult { +pub async fn send_generic_message(handle: u32, content: String) -> LibvcxResult<()> { + trace!("send_generic_message >>>"); + CONNECTION_MAP + .get_cloned(handle)? + .send_generic_message(&get_main_profile()?, None, content) + .await + .map_err(|e| e.into()) +} + +pub async fn create_invite(handle: u32, service_endpoint: String, routing_keys: Vec) -> LibvcxResult<()> { trace!("create_invite >>>"); - store_connection( + CONNECTION_MAP.insert( + handle, CONNECTION_MAP .get_cloned(handle)? .create_invite(service_endpoint, routing_keys) diff --git a/libvcx/src/api_vcx/api_handle/out_of_band.rs b/libvcx/src/api_vcx/api_handle/out_of_band.rs index 2bf9b3e9d9..f9ea7f6031 100644 --- a/libvcx/src/api_vcx/api_handle/out_of_band.rs +++ b/libvcx/src/api_vcx/api_handle/out_of_band.rs @@ -176,6 +176,7 @@ pub async fn connection_exists(handle: u32, conn_handles: &Vec) -> LibvcxRe } pub async fn build_connection(handle: u32) -> LibvcxResult { + trace!("build_connection >>> handle: {}", handle); let oob = OUT_OF_BAND_RECEIVER_MAP.get_cloned(handle)?; let invitation = Invitation::OutOfBand(oob.oob.clone()); let profile = get_main_profile()?; diff --git a/wrappers/node/package.json b/wrappers/node/package.json index a69c690711..182f15e928 100644 --- a/wrappers/node/package.json +++ b/wrappers/node/package.json @@ -67,7 +67,8 @@ "lint": "eslint '*/**/*.{js,ts,tsx}'", "lint-fix": "npm run lint -- --fix", "jslint:fix": "standard --fix", - "test": "npm run test:connection && npm run test:credentialDef && npm run test:credential && npm run test:disclosedProof && npm run test:issuerCredential && npm run test:proof && npm run test:oob && npm run test:schema && npm run test:utils && npm run test:wallet", + "test": "npm run test:connection && npm run test:nonmediatedConnection && npm run test:credentialDef && npm run test:credential && npm run test:disclosedProof && npm run test:issuerCredential && npm run test:proof && npm run test:oob && npm run test:schema && npm run test:utils && npm run test:wallet", + "test:nonmediatedConnection": " TS_NODE_PROJECT=./test/tsconfig.json NODE_ENV=test RUST_BACKTRACE=full mocha --timeout 5000 --v8-use-strict --exit --require ts-node/register test/suite1/ariesvcx-connection.test.ts", "test:connection": " TS_NODE_PROJECT=./test/tsconfig.json NODE_ENV=test RUST_BACKTRACE=full mocha --timeout 5000 --v8-use-strict --exit --require ts-node/register test/suite1/ariesvcx-mediated-connection.test.ts", "test:credentialDef": " TS_NODE_PROJECT=./test/tsconfig.json NODE_ENV=test RUST_BACKTRACE=full mocha --timeout 5000 --v8-use-strict --exit --require ts-node/register ./test/suite1/ariesvcx-credential-def.test.ts", "test:credential": " TS_NODE_PROJECT=./test/tsconfig.json NODE_ENV=test RUST_BACKTRACE=full mocha --timeout 5000 --v8-use-strict --exit --require ts-node/register ./test/suite1/ariesvcx-credential.test.ts", diff --git a/wrappers/node/src/api/connection.ts b/wrappers/node/src/api/connection.ts new file mode 100644 index 0000000000..c19d6da333 --- /dev/null +++ b/wrappers/node/src/api/connection.ts @@ -0,0 +1,174 @@ +import * as ffiNapi from '@hyperledger/vcx-napi-rs'; +import { VCXInternalError } from '../errors'; +import { ISerializedData, ConnectionStateType } from './common'; +import { VcxBaseWithState } from './vcx-base-with-state'; +import { IPwInfo } from './utils'; + +export type INonmediatedConnectionInvite = string; + +export type INonmeditatedConnectionData = string; + +export interface IEndpointInfo { + serviceEndpoint: string, + routingKeys: string[], +} + +export class NonmediatedConnection extends VcxBaseWithState { + public static async createInviter(pwInfo?: IPwInfo): Promise { + try { + const connection = new NonmediatedConnection(""); + connection._setHandle(await ffiNapi.connectionCreateInviter(pwInfo ? JSON.stringify(pwInfo) : null)); + return connection; + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public static async createInvitee(invite: string): Promise { + try { + const connection = new NonmediatedConnection(""); + connection._setHandle(await ffiNapi.connectionCreateInvitee(invite)); + return connection; + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public getThreadId(): string { + try { + return ffiNapi.connectionGetThreadId(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public getPairwiseInfo(): string { + try { + return ffiNapi.connectionGetPairwiseInfo(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public getRemoteDid(): string { + try { + return ffiNapi.connectionGetRemoteDid(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public processInvite(invite: string): void { + try { + ffiNapi.connectionProcessInvite(this.handle, invite); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async processRequest(request: string, endpointInfo: IEndpointInfo): Promise { + try { + const { serviceEndpoint, routingKeys } = endpointInfo; + await ffiNapi.connectionProcessRequest(this.handle, request, serviceEndpoint, routingKeys); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async processResponse(response: string): Promise { + try { + await ffiNapi.connectionProcessResponse(this.handle, response); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async processAck(message: string): Promise { + try { + await ffiNapi.connectionProcessAck(this.handle, message); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async sendResponse(): Promise { + try { + await ffiNapi.connectionSendResponse(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async sendRequest(endpointInfo: IEndpointInfo): Promise { + try { + const { serviceEndpoint, routingKeys } = endpointInfo; + await ffiNapi.connectionSendRequest(this.handle, serviceEndpoint, routingKeys); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async sendAck(): Promise { + try { + await ffiNapi.connectionSendAck(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async sendMessage(content: string): Promise { + try { + return await ffiNapi.connectionSendGenericMessage(this.handle, content); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public async createInvite(endpointInfo: IEndpointInfo): Promise { + try { + const { serviceEndpoint, routingKeys } = endpointInfo; + await ffiNapi.connectionCreateInvite(this.handle, serviceEndpoint, routingKeys); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public getInvitation(): INonmediatedConnectionInvite { + try { + return ffiNapi.connectionGetInvitation(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public getState(): ConnectionStateType { + try { + return ffiNapi.connectionGetState(this.handle); + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + public static deserialize(connectionData: ISerializedData): NonmediatedConnection { + try { + const connection = new NonmediatedConnection(""); + connection._setHandle(ffiNapi.connectionDeserialize(connectionData.data)); + return connection; + } catch (err: any) { + throw new VCXInternalError(err); + } + } + + protected _releaseFn = ffiNapi.connectionRelease; + protected _updateStFn = ffiNapi.mediatedConnectionUpdateState; + protected _updateStFnV2 = async (_handle: number, _connHandle: number): Promise => { + throw new Error('_updateStFnV2 cannot be called for a Connection object'); + }; + protected _getStFn = ffiNapi.connectionGetState; + protected _serializeFn = (handle: number): string => { + const data = ffiNapi.connectionSerialize(handle); + return JSON.stringify({ data, source_id: this.sourceId, version: '1.0' }); + } + protected _deserializeFn = ffiNapi.connectionDeserialize; + protected _inviteDetailFn = ffiNapi.connectionGetInvitation; +} diff --git a/wrappers/node/src/index.ts b/wrappers/node/src/index.ts index 8f854063f9..58d1b03a5a 100644 --- a/wrappers/node/src/index.ts +++ b/wrappers/node/src/index.ts @@ -2,6 +2,7 @@ export * from './api/init'; export * from './api/credential-def'; export * from './api/revocation-registry'; export * from './api/common'; +export * from './api/connection'; export * from './api/mediated-connection'; export * from './api/vcx-mock'; export * from './api/issuer-credential'; diff --git a/wrappers/node/test/suite1/ariesvcx-connection.test.ts b/wrappers/node/test/suite1/ariesvcx-connection.test.ts new file mode 100644 index 0000000000..bfb4e289ed --- /dev/null +++ b/wrappers/node/test/suite1/ariesvcx-connection.test.ts @@ -0,0 +1,37 @@ +import '../module-resolver-helper'; + +import { assert, expect } from 'chai'; +import { initVcxTestMode } from 'helpers/utils'; +import { ConnectionStateType } from 'src'; +import { NonmediatedConnection } from 'src'; + +describe('Nonmediated connection:', () => { + before(() => initVcxTestMode()); + + describe('create invitation:', () => { + it('success', async () => { + const serviceEndpoint = 'http://localhost:8080'; + const routingKeys = [ 'routingKey' ]; + const connection = await NonmediatedConnection.createInviter(); + assert.equal(connection.getState(), ConnectionStateType.Initial); + + await connection.createInvite({ serviceEndpoint, routingKeys }); + assert.equal(connection.getState(), ConnectionStateType.Invited); + + const invite = JSON.parse(connection.getInvitation()); + expect(invite.routingKeys).deep.equal(routingKeys); + assert.equal(invite.serviceEndpoint, serviceEndpoint); + }); + }); + + describe('serialize / deserialize:', () => { + it('success', async () => { + const connection = await NonmediatedConnection.createInviter(); + assert.equal(connection.getState(), ConnectionStateType.Initial); + + const serialized = connection.serialize() + const deserialized = NonmediatedConnection.deserialize(serialized); + expect(deserialized.serialize()).deep.equal(serialized); + }); + }); +}) diff --git a/wrappers/vcx-napi-rs/Cargo.lock b/wrappers/vcx-napi-rs/Cargo.lock new file mode 100644 index 0000000000..945f1db97f --- /dev/null +++ b/wrappers/vcx-napi-rs/Cargo.lock @@ -0,0 +1,4145 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +dependencies = [ + "generic-array 0.14.6", +] + +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if 1.0.0", + "cipher 0.3.0", + "cpufeatures", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aes-gcm" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" +dependencies = [ + "aead", + "aes 0.6.0", + "cipher 0.2.5", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "agency_client" +version = "0.51.1" +dependencies = [ + "android_logger", + "async-trait", + "env_logger 0.9.3", + "lazy_static", + "log", + "regex", + "reqwest", + "serde", + "serde_derive", + "serde_json", + "shared_vcx", + "thiserror", + "url", + "uuid 0.8.2", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.8", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "amcl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cca1ddc8b9dceb55b7f1272a9d1e643d73006f350a20ab4926d24e33f0f0d" + +[[package]] +name = "amcl_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c7c7627444413f6a488bf9e6d352aea6fcfa281123cd92ecac0b3c9ef5ef2" +dependencies = [ + "byteorder", + "lazy_static", + "miracl_core", + "rand 0.7.3", + "rayon", + "serde", + "serde_bytes", + "serde_json", + "sha3 0.8.2", + "subtle-encoding", + "zeroize", +] + +[[package]] +name = "android_log-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" + +[[package]] +name = "android_logger" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86983875e7c3a202e31471cc6d60fcc18f30e194f1729cfff3bfb43d646ffced" +dependencies = [ + "android_log-sys", + "lazy_static", + "log", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "aries-vcx" +version = "0.51.1" +dependencies = [ + "agency_client", + "android_logger", + "async-trait", + "base64 0.10.1", + "bs58 0.4.0", + "chrono", + "derive_builder", + "env_logger 0.9.3", + "futures", + "indy-credx", + "indy-vdr", + "lazy_static", + "libloading 0.5.2", + "libvdrtools", + "log", + "messages", + "openssl", + "rand 0.7.3", + "regex", + "serde", + "serde_derive", + "serde_json", + "strum", + "strum_macros", + "thiserror", + "time", + "tokio", + "uuid 0.8.2", + "zmq", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "async-channel" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +dependencies = [ + "async-channel", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + +[[package]] +name = "async-io" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +dependencies = [ + "async-lock", + "autocfg 1.1.0", + "concurrent-queue", + "futures-lite", + "libc", + "log", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "windows-sys", +] + +[[package]] +name = "async-lock" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +dependencies = [ + "event-listener", + "futures-lite", +] + +[[package]] +name = "async-std" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +dependencies = [ + "async-channel", + "async-global-executor", + "async-io", + "async-lock", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-task" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" + +[[package]] +name = "async-trait" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atoi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.1.0", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +dependencies = [ + "byteorder", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "blake2" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding 0.1.5", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding 0.2.1", + "generic-array 0.14.6", +] + +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array 0.14.6", +] + +[[package]] +name = "block-modes" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +dependencies = [ + "block-padding 0.2.1", + "cipher 0.2.5", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "blocking" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bumpalo" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" + +[[package]] +name = "c2-chacha" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217192c943108d8b13bac38a1d51df9ce8a407a3f5a71ab633980665e68fbd9a" +dependencies = [ + "ppv-lite86", +] + +[[package]] +name = "cc" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chacha20" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed8738f14471a99f0e316c327e68fc82a3611cc2895fcb604b89eedaf8f39d95" +dependencies = [ + "cipher 0.2.5", + "zeroize", +] + +[[package]] +name = "chacha20poly1305" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e" +dependencies = [ + "aead", + "chacha20", + "cipher 0.2.5", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "time", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.6", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array 0.14.6", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "concurrent-queue" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b" + +[[package]] +name = "convert_case" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1f025f441cdfb75831bec89b9d6a6ed02e5e763f78fc5e1ff30d4870fefaec" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "cpuid-bool" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" + +[[package]] +name = "crc" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +dependencies = [ + "autocfg 1.1.0", + "cfg-if 1.0.0", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crypto-bigint" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83bd3bb4314701c568e340cd8cf78c975aa0ca79e03d3f6d1677d5b0c9c0c03" +dependencies = [ + "generic-array 0.14.6", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.6", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.6", + "subtle", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array 0.14.6", + "subtle", +] + +[[package]] +name = "ctor" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "ctr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" +dependencies = [ + "cipher 0.2.5", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "cxx" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core 0.10.2", + "darling_macro 0.10.2", +] + +[[package]] +name = "darling" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" +dependencies = [ + "darling_core 0.12.4", + "darling_macro 0.12.4", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_core" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" +dependencies = [ + "darling_core 0.12.4", + "quote", + "syn", +] + +[[package]] +name = "der" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b71cca7d95d7681a4b3b9cdf63c8dbc3730d0584c2c74e31416d64a90493f4" +dependencies = [ + "const-oid", +] + +[[package]] +name = "derive_builder" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d13202debe11181040ae9063d739fa32cfcaaebe2275fe387703460ae2365b30" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5" +dependencies = [ + "darling 0.12.4", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73" +dependencies = [ + "derive_builder_core", + "syn", +] + +[[package]] +name = "diddoc" +version = "0.51.1" +dependencies = [ + "serde", + "serde_derive", + "serde_json", + "shared_vcx", + "thiserror", + "url", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.6", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer 0.10.3", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" +dependencies = [ + "cfg-if 0.1.10", + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "ecdsa" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43ee23aa5b4f68c7a092b5c3beb25f50c406adc75e2363634f242f28ab255372" +dependencies = [ + "der", + "elliptic-curve", + "hmac", + "signature", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + +[[package]] +name = "elastic-array-plus" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562cc8504a01eb20c10fb154abd7c4baeb9beba2329cf85838ee2bd48a468b18" + +[[package]] +name = "elliptic-curve" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beca177dcb8eb540133e7680baff45e7cc4d93bf22002676cec549f82343721b" +dependencies = [ + "crypto-bigint", + "ff", + "generic-array 0.14.6", + "group", + "pkcs8", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime 1.3.0", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime 2.1.0", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "error-chain" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" + +[[package]] +name = "etcommon-hexutil" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b4d1933bf88b806ba2d9189880b1b4ef205e42df9573b65716f2a50818024c" + +[[package]] +name = "etcommon-rlp" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c978ef454cd97da44a3a15d55cc312313be04b9692e39fa4cd3c00401f39bcb" +dependencies = [ + "byteorder", + "elastic-array-plus", + "etcommon-hexutil", + "lazy_static", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[package]] +name = "ff" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "ffi-support" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27838c6815cfe9de2d3aeb145ffd19e565f577414b33f3bdbf42fe040e9e0ff6" +dependencies = [ + "lazy_static", + "log", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "futures" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-lite" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-macro" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "ghash" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" +dependencies = [ + "opaque-debug 0.3.0", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + +[[package]] +name = "gloo-timers" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c4a8d6391675c6b2ee1a6c8d06e8e2d03605c44cec1270675985a4c2a5500b" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "group" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashlink" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" +dependencies = [ + "hashbrown 0.11.2", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b" +dependencies = [ + "digest 0.9.0", + "hmac", +] + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.1", + "digest 0.9.0", +] + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa 1.0.5", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 1.0.5", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg 1.1.0", + "hashbrown 0.12.3", +] + +[[package]] +name = "indy-api-types" +version = "0.1.0" +dependencies = [ + "aes 0.7.5", + "bs58 0.4.0", + "failure", + "futures", + "libc", + "log", + "openssl", + "serde", + "serde_derive", + "serde_json", + "sqlx", + "ursa", + "zeroize", + "zmq", +] + +[[package]] +name = "indy-credx" +version = "0.3.1" +source = "git+https://github.com/anonyome/indy-shared-rs.git?rev=7342bc624d23ece8845d1a701cd2cdc9cd401bb0#7342bc624d23ece8845d1a701cd2cdc9cd401bb0" +dependencies = [ + "env_logger 0.7.1", + "ffi-support", + "indy-data-types 0.5.1 (git+https://github.com/anonyome/indy-shared-rs.git?rev=7342bc624d23ece8845d1a701cd2cdc9cd401bb0)", + "indy-utils 0.5.1", + "log", + "once_cell", + "rand 0.7.3", + "regex", + "serde", + "serde_json", + "sha2 0.9.9", + "tempfile", + "thiserror", + "zeroize", +] + +[[package]] +name = "indy-data-types" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2373f35df82d027bc4f6649dc44a6f64b0da6618feb339235b9da18bff56808" +dependencies = [ + "hex", + "indy-utils 0.5.0", + "once_cell", + "regex", + "serde", + "serde_json", + "zeroize", +] + +[[package]] +name = "indy-data-types" +version = "0.5.1" +source = "git+https://github.com/anonyome/indy-shared-rs.git?rev=7342bc624d23ece8845d1a701cd2cdc9cd401bb0#7342bc624d23ece8845d1a701cd2cdc9cd401bb0" +dependencies = [ + "hex", + "indy-utils 0.5.1", + "once_cell", + "regex", + "serde", + "serde_json", + "ursa", + "zeroize", +] + +[[package]] +name = "indy-utils" +version = "0.1.0" +dependencies = [ + "base64 0.10.1", + "dirs", + "failure", + "indy-api-types", + "lazy_static", + "libc", + "log", + "openssl", + "serde", + "serde_derive", + "serde_json", + "sodiumoxide", + "zeroize", +] + +[[package]] +name = "indy-utils" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8b70159ca50b21dcfd8af14e8ecd0b8db7ac3b40309e1aa337343a872920931" +dependencies = [ + "base64 0.12.3", + "bs58 0.3.1", + "curve25519-dalek", + "ed25519-dalek", + "hex", + "indy-wql 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell", + "rand 0.8.5", + "regex", + "serde", + "serde_json", + "sha2 0.9.9", + "thiserror", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "indy-utils" +version = "0.5.1" +source = "git+https://github.com/anonyome/indy-shared-rs.git?rev=7342bc624d23ece8845d1a701cd2cdc9cd401bb0#7342bc624d23ece8845d1a701cd2cdc9cd401bb0" +dependencies = [ + "bs58 0.4.0", + "indy-wql 0.4.0 (git+https://github.com/anonyome/indy-shared-rs.git?rev=7342bc624d23ece8845d1a701cd2cdc9cd401bb0)", + "once_cell", + "regex", + "serde", + "serde_json", + "sha2 0.10.6", + "thiserror", + "zeroize", +] + +[[package]] +name = "indy-vdr" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e5501eacc2f096ec3853e5855e8c7d30dceb869e94bbe688b9e297205f8043" +dependencies = [ + "env_logger 0.7.1", + "etcommon-rlp", + "ffi-support", + "futures-channel", + "futures-executor", + "futures-util", + "hex", + "indy-data-types 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "indy-utils 0.5.0", + "log", + "once_cell", + "pin-utils", + "rand 0.8.5", + "regex", + "rmp-serde", + "serde", + "serde_json", + "sha3 0.10.6", + "thiserror", + "ursa", + "zmq", +] + +[[package]] +name = "indy-wallet" +version = "0.1.0" +dependencies = [ + "async-trait", + "bs58 0.4.0", + "byteorder", + "futures", + "indy-api-types", + "indy-utils 0.1.0", + "libc", + "log", + "lru", + "rmp-serde", + "serde", + "serde_derive", + "serde_json", + "sqlx", + "zeroize", +] + +[[package]] +name = "indy-wql" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aa37c6fbc387666de081f7e549e20aad2e165d545e7ba2cdb3c9a5a637c25a" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "indy-wql" +version = "0.4.0" +source = "git+https://github.com/anonyome/indy-shared-rs.git?rev=7342bc624d23ece8845d1a701cd2cdc9cd401bb0#7342bc624d23ece8845d1a701cd2cdc9cd401bb0" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "int_traits" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b33c9a5c599d67d051c4dc25eb1b6b4ef715d1763c20c85c688717a1734f204e" + +[[package]] +name = "ipnet" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903ae2481bcdfdb7b68e0a9baa4b7c9aff600b9ae2e8e5bb5833b8c91ab851ea" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "sha2 0.9.9", +] + +[[package]] +name = "keccak" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "libloading" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +dependencies = [ + "cc", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" + +[[package]] +name = "libsodium-sys" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbd1beeed8d44caa8a669ebaa697c313976e242c03cc9fb23d88bf1656f5542" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libvcx" +version = "0.51.1" +dependencies = [ + "android_logger", + "aries-vcx", + "cfg-if 1.0.0", + "chrono", + "env_logger 0.9.3", + "futures", + "lazy_static", + "libc", + "log", + "num-traits", + "once_cell", + "rand 0.7.3", + "serde", + "serde_derive", + "serde_json", + "thiserror", + "time", + "tokio", + "uuid 0.7.4", +] + +[[package]] +name = "libvdrtools" +version = "0.8.6" +dependencies = [ + "android_logger", + "async-std", + "async-trait", + "bs58 0.4.0", + "byteorder", + "cfg-if 1.0.0", + "convert_case 0.3.2", + "etcommon-rlp", + "failure", + "futures", + "hex", + "indy-api-types", + "indy-utils 0.1.0", + "indy-wallet", + "lazy_static", + "libc", + "log", + "log-derive", + "log-panics", + "num-derive", + "num-traits", + "rand 0.8.5", + "regex", + "rmp-serde", + "serde", + "serde_derive", + "serde_json", + "sha2 0.9.9", + "sha3 0.9.1", + "time", + "ursa", + "uuid 0.8.2", + "variant_count", + "zeroize", + "zmq", +] + +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg 1.1.0", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if 1.0.0", + "value-bag", +] + +[[package]] +name = "log-derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7f436d3b5b51857b145075009f3a0d88dd37d2e93f42bb227045f4562a131e" +dependencies = [ + "darling 0.10.2", + "log", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "log-panics" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f9dd8546191c1850ecf67d22f5ff00a935b890d0e84713159a55495cc2ac5f" +dependencies = [ + "log", +] + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg 1.1.0", +] + +[[package]] +name = "messages" +version = "0.51.1" +dependencies = [ + "base64 0.10.1", + "chrono", + "diddoc", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "strum", + "strum_macros", + "thiserror", + "time", + "url", + "uuid 0.8.2", +] + +[[package]] +name = "metadeps" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b122901b3a675fac8cecf68dcb2f0d3036193bc861d1ac0e1c337f7d5254c2" +dependencies = [ + "error-chain", + "pkg-config", + "toml", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "miracl_core" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4330eca86d39f2b52d0481aa1e90fe21bfa61f11b0bf9b48ab95595013cefe48" + +[[package]] +name = "napi" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fece4c26c5132f8559080145fde9ba88700c0f1aa30a1ab3e057ab105814d" +dependencies = [ + "bitflags", + "ctor", + "napi-sys", + "once_cell", + "thread_local", + "tokio", +] + +[[package]] +name = "napi-build" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e" + +[[package]] +name = "napi-derive" +version = "2.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af4e44e34e70aa61be9036ae652e27c20db5bca80e006be0f482419f6601352a" +dependencies = [ + "convert_case 0.6.0", + "napi-derive-backend", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "napi-derive-backend" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b412301aeebee17724fff6d73536e9ecb8387f10bbbf317a9f7a006cc1c5b" +dependencies = [ + "convert_case 0.6.0", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn", +] + +[[package]] +name = "napi-sys" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "166b5ef52a3ab5575047a9fe8d4a030cdd0f63c96f071cd6907674453b07bae3" +dependencies = [ + "libloading 0.7.4", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg 1.1.0", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg 1.1.0", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4547ee5541c18742396ae2c895d0717d0f886d8823b8399cdaf7b07d63ad0480" +dependencies = [ + "autocfg 0.1.8", + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg 1.1.0", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg 1.1.0", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg 1.1.0", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi 0.2.6", + "libc", +] + +[[package]] +name = "object" +version = "0.30.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8c786513eb403643f2a88c244c2aaa270ef2153f55094587d0c48a3cf22a83" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +dependencies = [ + "autocfg 1.1.0", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + +[[package]] +name = "paste" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" + +[[package]] +name = "pem" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" +dependencies = [ + "base64 0.13.1", + "once_cell", + "regex", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3ef9b64d26bad0536099c816c6734379e45bbd5f14798def6809e5cc350447" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "polling" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +dependencies = [ + "autocfg 1.1.0", + "cfg-if 1.0.0", + "libc", + "log", + "wepoll-ffi", + "windows-sys", +] + +[[package]] +name = "poly1305" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8" +dependencies = [ + "cpuid-bool", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" +dependencies = [ + "cpuid-bool", + "opaque-debug 0.3.0", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.8", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.1", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" +dependencies = [ + "c2-chacha", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.8", +] + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rayon" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom 0.2.8", + "redox_syscall", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "reqwest" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +dependencies = [ + "base64 0.21.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rmp" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "011e1d58446e9fa3af7cdc1fb91295b10621d3ac4cb3a85cc86385ee9ca50cd3" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rsa" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0aeddcca1082112a6eeb43bf25fd7820b066aaf6eaef776e19d0a1febe38fe" +dependencies = [ + "byteorder", + "digest 0.9.0", + "lazy_static", + "num-bigint-dig", + "num-integer", + "num-iter", + "num-traits", + "pem", + "rand 0.8.5", + "simple_asn1", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "ryu" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" + +[[package]] +name = "schannel" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secp256k1" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6179428c22c73ac0fbb7b5579a56353ce78ba29759b3b8575183336ea74cdfb" +dependencies = [ + "rand 0.6.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11553d210db090930f4432bea123b31f70bbf693ace14504ea2a35e796c28dd2" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645926f31b250a2dca3c232496c2d898d91036e45ca0e97e0e2390c54e11be36" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718dc5fff5b36f99093fc49b280cfc96ce6fc824317783bff5a1fed0c7a64819" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +dependencies = [ + "itoa 1.0.5", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.5", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.6", +] + +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer 0.7.3", + "byte-tools", + "digest 0.8.1", + "keccak", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha3" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +dependencies = [ + "digest 0.10.6", + "keccak", +] + +[[package]] +name = "shared_vcx" +version = "0.51.1" +dependencies = [ + "bs58 0.4.0", + "lazy_static", + "regex", + "thiserror", +] + +[[package]] +name = "signature" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" +dependencies = [ + "digest 0.9.0", + "rand_core 0.6.4", +] + +[[package]] +name = "simple_asn1" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb4ea60fb301dc81dfc113df680571045d375ab7345d171c5dc7d7e13107a80" +dependencies = [ + "chrono", + "num-bigint 0.4.3", + "num-traits", + "thiserror", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg 1.1.0", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "sodiumoxide" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5cb2f14f9a51352ad65e59257a0a9459d5a36a3615f3d53a974c82fdaaa00a" +dependencies = [ + "libc", + "libsodium-sys", + "serde", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c01a0c15da1b0b0e1494112e7af814a678fec9bd157881b49beac661e9b6f32" +dependencies = [ + "der", +] + +[[package]] +name = "sqlformat" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" +dependencies = [ + "itertools", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.5.8" +source = "git+https://github.com/jovfer/sqlx?branch=feature/json_no_preserve_order_v5#7b9b4b371071e7d29d3b10da5a205460b3fc2de4" +dependencies = [ + "sqlx-core", + "sqlx-macros", +] + +[[package]] +name = "sqlx-core" +version = "0.5.8" +source = "git+https://github.com/jovfer/sqlx?branch=feature/json_no_preserve_order_v5#7b9b4b371071e7d29d3b10da5a205460b3fc2de4" +dependencies = [ + "ahash", + "atoi", + "base64 0.13.1", + "bitflags", + "byteorder", + "bytes", + "crc", + "crossbeam-channel", + "crossbeam-queue", + "crossbeam-utils", + "digest 0.9.0", + "either", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-util", + "generic-array 0.14.6", + "hashlink", + "hex", + "indexmap", + "itoa 0.4.8", + "libc", + "libsqlite3-sys", + "log", + "memchr", + "num-bigint 0.3.3", + "once_cell", + "parking_lot", + "percent-encoding", + "rand 0.8.5", + "rsa", + "rustls", + "serde", + "serde_json", + "sha-1", + "sha2 0.9.9", + "smallvec", + "sqlformat", + "sqlx-rt", + "stringprep", + "thiserror", + "tokio-stream", + "url", + "webpki", + "webpki-roots", + "whoami", +] + +[[package]] +name = "sqlx-macros" +version = "0.5.8" +source = "git+https://github.com/jovfer/sqlx?branch=feature/json_no_preserve_order_v5#7b9b4b371071e7d29d3b10da5a205460b3fc2de4" +dependencies = [ + "dotenv", + "either", + "heck", + "once_cell", + "proc-macro2", + "quote", + "serde_json", + "sha2 0.9.9", + "sqlx-core", + "sqlx-rt", + "syn", + "url", +] + +[[package]] +name = "sqlx-rt" +version = "0.5.8" +source = "git+https://github.com/jovfer/sqlx?branch=feature/json_no_preserve_order_v5#7b9b4b371071e7d29d3b10da5a205460b3fc2de4" +dependencies = [ + "once_cell", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "stringprep" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" + +[[package]] +name = "strum_macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +dependencies = [ + "once_cell", +] + +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +dependencies = [ + "autocfg 1.1.0", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "windows-sys", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0046be40136ef78dc325e0edefccf84ccddacd0afcc1ca54103fa3c61bbdab1d" + +[[package]] +name = "unicode-ident" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array 0.14.6", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "ursa" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8760a62e18e4d3e3f599e15c09a9f9567fd9d4a90594d45166162be8d232e63b" +dependencies = [ + "aead", + "aes 0.6.0", + "aes-gcm", + "amcl", + "amcl_wrapper", + "arrayref", + "blake2", + "block-modes", + "block-padding 0.2.1", + "chacha20poly1305", + "curve25519-dalek", + "ed25519-dalek", + "failure", + "hex", + "hkdf", + "hmac", + "int_traits", + "k256", + "lazy_static", + "log", + "openssl", + "rand 0.7.3", + "rand_chacha 0.2.1", + "secp256k1", + "serde", + "sha2 0.9.9", + "sha3 0.9.1", + "subtle", + "time", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "uuid" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" +dependencies = [ + "rand 0.6.5", +] + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.8", +] + +[[package]] +name = "value-bag" +version = "1.0.0-alpha.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" +dependencies = [ + "ctor", + "version_check", +] + +[[package]] +name = "variant_count" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae2faf80ac463422992abf4de234731279c058aaf33171ca70277c98406b124" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vcx-napi-rs" +version = "1.0.0" +dependencies = [ + "libvcx", + "log", + "napi", + "napi-build", + "napi-derive", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki", +] + +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + +[[package]] +name = "whoami" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "x25519-dalek" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" +dependencies = [ + "curve25519-dalek", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zmq" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aad98a7a617d608cd9e1127147f630d24af07c7cd95ba1533246d96cbdd76c66" +dependencies = [ + "bitflags", + "libc", + "log", + "zmq-sys", +] + +[[package]] +name = "zmq-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d33a2c51dde24d5b451a2ed4b488266df221a5eaee2ee519933dc46b9a9b3648" +dependencies = [ + "libc", + "metadeps", +] diff --git a/wrappers/vcx-napi-rs/index.d.ts b/wrappers/vcx-napi-rs/index.d.ts index 8498b307e6..3ffcdff69e 100644 --- a/wrappers/vcx-napi-rs/index.d.ts +++ b/wrappers/vcx-napi-rs/index.d.ts @@ -8,6 +8,25 @@ export function createAgencyClientForMainWallet(config: string): void export function provisionCloudAgent(config: string): Promise export function messagesUpdateStatus(statusCode: string, uidsByConns: string): Promise export function generatePublicInvitation(publicDid: string, label: string): string +export function connectionCreateInviter(pwInfo?: string | undefined | null): Promise +export function connectionCreateInvitee(invitation: string): Promise +export function connectionGetThreadId(handle: number): string +export function connectionGetPairwiseInfo(handle: number): string +export function connectionGetRemoteDid(handle: number): string +export function connectionGetState(handle: number): number +export function connectionGetInvitation(handle: number): string +export function connectionProcessInvite(handle: number, invitation: string): void +export function connectionProcessRequest(handle: number, request: string, serviceEndpoint: string, routingKeys: Array): Promise +export function connectionProcessResponse(handle: number, response: string): Promise +export function connectionProcessAck(handle: number, message: string): Promise +export function connectionSendResponse(handle: number): Promise +export function connectionSendRequest(handle: number, serviceEndpoint: string, routingKeys: Array): Promise +export function connectionSendAck(handle: number): Promise +export function connectionSendGenericMessage(handle: number, content: string): Promise +export function connectionCreateInvite(handle: number, serviceEndpoint: string, routingKeys: Array): Promise +export function connectionSerialize(handle: number): string +export function connectionDeserialize(connectionData: string): number +export function connectionRelease(handle: number): void export function credentialCreateWithOffer(sourceId: string, offer: string): number export function credentialRelease(handle: number): void export function credentialSendRequest(handle: number, handleConnection: number): Promise diff --git a/wrappers/vcx-napi-rs/index.js b/wrappers/vcx-napi-rs/index.js index 6aefa19850..90913bc1e7 100644 --- a/wrappers/vcx-napi-rs/index.js +++ b/wrappers/vcx-napi-rs/index.js @@ -11,7 +11,8 @@ function isMusl() { // For Node 10 if (!process.report || typeof process.report.getReport !== 'function') { try { - return readFileSync('/usr/bin/ldd', 'utf8').includes('musl') + const lddPath = require('child_process').execSync('which ldd').toString().trim(); + return readFileSync(lddPath, 'utf8').includes('musl') } catch (e) { return true } @@ -101,6 +102,15 @@ switch (platform) { } break case 'darwin': + localFileExisted = existsSync(join(__dirname, 'vcx-napi-rs.darwin-universal.node')) + try { + if (localFileExisted) { + nativeBinding = require('./vcx-napi-rs.darwin-universal.node') + } else { + nativeBinding = require('@hyperledger/vcx-napi-rs-darwin-universal') + } + break + } catch {} switch (arch) { case 'x64': localFileExisted = existsSync(join(__dirname, 'vcx-napi-rs.darwin-x64.node')) @@ -236,13 +246,32 @@ if (!nativeBinding) { throw new Error(`Failed to load native binding`) } -const { updateWebhookUrl, createAgencyClientForMainWallet, provisionCloudAgent, messagesUpdateStatus, generatePublicInvitation, credentialCreateWithOffer, credentialRelease, credentialSendRequest, credentialDeclineOffer, credentialSerialize, credentialDeserialize, v2CredentialUpdateStateWithMessage, v2CredentialUpdateState, credentialGetState, credentialGetOffers, credentialGetAttributes, credentialGetAttachment, credentialGetTailsLocation, credentialGetTailsHash, credentialGetRevRegId, credentialGetThreadId, credentialdefCreateV2, credentialdefPublish, credentialdefDeserialize, credentialdefRelease, credentialdefSerialize, credentialdefGetCredDefId, credentialdefUpdateState, credentialdefGetState, disclosedProofCreateWithRequest, disclosedProofRelease, disclosedProofSendProof, disclosedProofRejectProof, disclosedProofGetProofMsg, disclosedProofSerialize, disclosedProofDeserialize, v2DisclosedProofUpdateState, v2DisclosedProofUpdateStateWithMessage, disclosedProofGetState, disclosedProofGetRequests, disclosedProofRetrieveCredentials, disclosedProofGetProofRequestAttachment, disclosedProofGenerateProof, disclosedProofDeclinePresentationRequest, disclosedProofGetThreadId, issuerCredentialDeserialize, issuerCredentialSerialize, issuerCredentialUpdateStateV2, issuerCredentialUpdateStateWithMessageV2, issuerCredentialGetState, issuerCredentialGetRevRegId, issuerCredentialCreate, issuerCredentialRevokeLocal, issuerCredentialIsRevokable, issuerCredentialSendCredential, issuerCredentialSendOfferV2, issuerCredentialMarkOfferMsgSent, issuerCredentialBuildOfferMsgV2, issuerCredentialGetOfferMsg, issuerCredentialRelease, issuerCredentialGetThreadId, getLedgerAuthorAgreement, setActiveTxnAuthorAgreementMeta, createService, getServiceFromLedger, getVerkeyFromLedger, getLedgerTxn, initDefaultLogger, mediatedConnectionGeneratePublicInvite, mediatedConnectionGetPwDid, mediatedConnectionGetTheirPwDid, mediatedConnectionGetThreadId, mediatedConnectionGetState, mediatedConnectionGetSourceId, mediatedConnectionCreate, mediatedConnectionCreateWithInvite, mediatedConnectionSendMessage, mediatedConnectionCreateWithConnectionRequestV2, mediatedConnectionSendHandshakeReuse, mediatedConnectionUpdateStateWithMessage, mediatedConnectionHandleMessage, mediatedConnectionUpdateState, mediatedConnectionDeleteConnection, mediatedConnectionConnect, mediatedConnectionSerialize, mediatedConnectionDeserialize, mediatedConnectionRelease, mediatedConnectionInviteDetails, mediatedConnectionSendPing, mediatedConnectionSendDiscoveryFeatures, mediatedConnectionInfo, mediatedConnectionMessagesDownload, mediatedConnectionSignData, mediatedConnectionVerifySignature, outOfBandReceiverCreate, outOfBandReceiverExtractMessage, outOfBandReceiverConnectionExists, outOfBandReceiverBuildConnection, outOfBandReceiverGetThreadId, outOfBandReceiverSerialize, outOfBandReceiverDeserialize, outOfBandReceiverRelease, outOfBandSenderCreate, outOfBandSenderAppendMessage, outOfBandSenderAppendService, outOfBandSenderAppendServiceDid, outOfBandSenderToMessage, outOfBandSenderGetThreadId, outOfBandSenderSerialize, outOfBandSenderDeserialize, outOfBandSenderRelease, openMainPool, closeMainPool, proofCreate, proofGetProofMsg, proofRelease, proofSendRequest, proofGetRequestMsg, proofSerialize, proofDeserialize, v2ProofUpdateState, v2ProofUpdateStateWithMessage, proofGetState, proofGetProofState, proofGetThreadId, markPresentationRequestMsgSent, revocationRegistryCreate, revocationRegistryPublish, revocationRegistryPublishRevocations, revocationRegistryGetRevRegId, revocationRegistryGetTailsHash, revocationRegistrySerialize, revocationRegistryDeserialize, revocationRegistryRelease, schemaGetAttributes, schemaPrepareForEndorser, schemaCreate, schemaGetSchemaId, schemaDeserialize, schemaSerialize, schemaRelease, schemaUpdateState, schemaGetState, enableMocks, shutdown, getVersion, walletOpenAsMain, walletCreateMain, walletCloseMain, vcxInitIssuerConfig, configureIssuerWallet, unpack, createPairwiseInfo, walletImport, walletExport, getVerkeyFromWallet, rotateVerkey, rotateVerkeyStart, rotateVerkeyApply } = nativeBinding +const { updateWebhookUrl, createAgencyClientForMainWallet, provisionCloudAgent, messagesUpdateStatus, generatePublicInvitation, connectionCreateInviter, connectionCreateInvitee, connectionGetThreadId, connectionGetPairwiseInfo, connectionGetRemoteDid, connectionGetState, connectionGetInvitation, connectionProcessInvite, connectionProcessRequest, connectionProcessResponse, connectionProcessAck, connectionSendResponse, connectionSendRequest, connectionSendAck, connectionSendGenericMessage, connectionCreateInvite, connectionSerialize, connectionDeserialize, connectionRelease, credentialCreateWithOffer, credentialRelease, credentialSendRequest, credentialDeclineOffer, credentialSerialize, credentialDeserialize, v2CredentialUpdateStateWithMessage, v2CredentialUpdateState, credentialGetState, credentialGetOffers, credentialGetAttributes, credentialGetAttachment, credentialGetTailsLocation, credentialGetTailsHash, credentialGetRevRegId, credentialGetThreadId, credentialdefCreateV2, credentialdefPublish, credentialdefDeserialize, credentialdefRelease, credentialdefSerialize, credentialdefGetCredDefId, credentialdefUpdateState, credentialdefGetState, disclosedProofCreateWithRequest, disclosedProofRelease, disclosedProofSendProof, disclosedProofRejectProof, disclosedProofGetProofMsg, disclosedProofSerialize, disclosedProofDeserialize, v2DisclosedProofUpdateState, v2DisclosedProofUpdateStateWithMessage, disclosedProofGetState, disclosedProofGetRequests, disclosedProofRetrieveCredentials, disclosedProofGetProofRequestAttachment, disclosedProofGenerateProof, disclosedProofDeclinePresentationRequest, disclosedProofGetThreadId, issuerCredentialDeserialize, issuerCredentialSerialize, issuerCredentialUpdateStateV2, issuerCredentialUpdateStateWithMessageV2, issuerCredentialGetState, issuerCredentialGetRevRegId, issuerCredentialCreate, issuerCredentialRevokeLocal, issuerCredentialIsRevokable, issuerCredentialSendCredential, issuerCredentialSendOfferV2, issuerCredentialMarkOfferMsgSent, issuerCredentialBuildOfferMsgV2, issuerCredentialGetOfferMsg, issuerCredentialRelease, issuerCredentialGetThreadId, getLedgerAuthorAgreement, setActiveTxnAuthorAgreementMeta, createService, getServiceFromLedger, getVerkeyFromLedger, getLedgerTxn, initDefaultLogger, mediatedConnectionGeneratePublicInvite, mediatedConnectionGetPwDid, mediatedConnectionGetTheirPwDid, mediatedConnectionGetThreadId, mediatedConnectionGetState, mediatedConnectionGetSourceId, mediatedConnectionCreate, mediatedConnectionCreateWithInvite, mediatedConnectionSendMessage, mediatedConnectionCreateWithConnectionRequestV2, mediatedConnectionSendHandshakeReuse, mediatedConnectionUpdateStateWithMessage, mediatedConnectionHandleMessage, mediatedConnectionUpdateState, mediatedConnectionDeleteConnection, mediatedConnectionConnect, mediatedConnectionSerialize, mediatedConnectionDeserialize, mediatedConnectionRelease, mediatedConnectionInviteDetails, mediatedConnectionSendPing, mediatedConnectionSendDiscoveryFeatures, mediatedConnectionInfo, mediatedConnectionMessagesDownload, mediatedConnectionSignData, mediatedConnectionVerifySignature, outOfBandReceiverCreate, outOfBandReceiverExtractMessage, outOfBandReceiverConnectionExists, outOfBandReceiverBuildConnection, outOfBandReceiverGetThreadId, outOfBandReceiverSerialize, outOfBandReceiverDeserialize, outOfBandReceiverRelease, outOfBandSenderCreate, outOfBandSenderAppendMessage, outOfBandSenderAppendService, outOfBandSenderAppendServiceDid, outOfBandSenderToMessage, outOfBandSenderGetThreadId, outOfBandSenderSerialize, outOfBandSenderDeserialize, outOfBandSenderRelease, openMainPool, closeMainPool, proofCreate, proofGetProofMsg, proofRelease, proofSendRequest, proofGetRequestMsg, proofSerialize, proofDeserialize, v2ProofUpdateState, v2ProofUpdateStateWithMessage, proofGetState, proofGetProofState, proofGetThreadId, markPresentationRequestMsgSent, revocationRegistryCreate, revocationRegistryPublish, revocationRegistryPublishRevocations, revocationRegistryGetRevRegId, revocationRegistryGetTailsHash, revocationRegistrySerialize, revocationRegistryDeserialize, revocationRegistryRelease, schemaGetAttributes, schemaPrepareForEndorser, schemaCreate, schemaGetSchemaId, schemaDeserialize, schemaSerialize, schemaRelease, schemaUpdateState, schemaGetState, enableMocks, shutdown, getVersion, walletOpenAsMain, walletCreateMain, walletCloseMain, vcxInitIssuerConfig, configureIssuerWallet, unpack, createPairwiseInfo, walletImport, walletExport, getVerkeyFromWallet, rotateVerkey, rotateVerkeyStart, rotateVerkeyApply } = nativeBinding module.exports.updateWebhookUrl = updateWebhookUrl module.exports.createAgencyClientForMainWallet = createAgencyClientForMainWallet module.exports.provisionCloudAgent = provisionCloudAgent module.exports.messagesUpdateStatus = messagesUpdateStatus module.exports.generatePublicInvitation = generatePublicInvitation +module.exports.connectionCreateInviter = connectionCreateInviter +module.exports.connectionCreateInvitee = connectionCreateInvitee +module.exports.connectionGetThreadId = connectionGetThreadId +module.exports.connectionGetPairwiseInfo = connectionGetPairwiseInfo +module.exports.connectionGetRemoteDid = connectionGetRemoteDid +module.exports.connectionGetState = connectionGetState +module.exports.connectionGetInvitation = connectionGetInvitation +module.exports.connectionProcessInvite = connectionProcessInvite +module.exports.connectionProcessRequest = connectionProcessRequest +module.exports.connectionProcessResponse = connectionProcessResponse +module.exports.connectionProcessAck = connectionProcessAck +module.exports.connectionSendResponse = connectionSendResponse +module.exports.connectionSendRequest = connectionSendRequest +module.exports.connectionSendAck = connectionSendAck +module.exports.connectionSendGenericMessage = connectionSendGenericMessage +module.exports.connectionCreateInvite = connectionCreateInvite +module.exports.connectionSerialize = connectionSerialize +module.exports.connectionDeserialize = connectionDeserialize +module.exports.connectionRelease = connectionRelease module.exports.credentialCreateWithOffer = credentialCreateWithOffer module.exports.credentialRelease = credentialRelease module.exports.credentialSendRequest = credentialSendRequest diff --git a/wrappers/vcx-napi-rs/src/api/connection.rs b/wrappers/vcx-napi-rs/src/api/connection.rs new file mode 100644 index 0000000000..a6b098b777 --- /dev/null +++ b/wrappers/vcx-napi-rs/src/api/connection.rs @@ -0,0 +1,159 @@ +use napi_derive::napi; + +use vcx::api_vcx::api_handle::connection; +use vcx::aries_vcx::protocols::connection::pairwise_info::PairwiseInfo; +use vcx::errors::error::{LibvcxError, LibvcxErrorKind}; +use vcx::serde_json; + +use crate::error::to_napi_err; + +#[napi] +pub async fn connection_create_inviter(pw_info: Option) -> napi::Result { + trace!("connection_create_inviter >>>"); + let pw_info = if let Some(pw_info) = pw_info { + Some( + serde_json::from_str::(&pw_info) + .map_err(|err| { + LibvcxError::from_msg( + LibvcxErrorKind::InvalidJson, + format!("Cannot deserialize pw info: {:?}", err), + ) + }) + .map_err(to_napi_err)?, + ) + } else { + None + }; + connection::create_inviter(pw_info).await.map_err(to_napi_err) +} + +#[napi] +pub async fn connection_create_invitee(invitation: String) -> napi::Result { + trace!("connection_create_invitee >>> invitation: {:?}", invitation); + connection::create_invitee(&invitation).await.map_err(to_napi_err) +} + +#[napi] +pub fn connection_get_thread_id(handle: u32) -> napi::Result { + trace!("connection_get_thread_id >>> handle: {:?}", handle); + connection::get_thread_id(handle).map_err(to_napi_err) +} + +#[napi] +pub fn connection_get_pairwise_info(handle: u32) -> napi::Result { + trace!("connection_get_pairwise_info >>> handle: {:?}", handle); + connection::get_pairwise_info(handle).map_err(to_napi_err) +} + +#[napi] +pub fn connection_get_remote_did(handle: u32) -> napi::Result { + trace!("connection_get_remote_did >>> handle: {:?}", handle); + connection::get_remote_did(handle).map_err(to_napi_err) +} + +#[napi] +pub fn connection_get_state(handle: u32) -> napi::Result { + trace!("connection_get_state >>> handle: {:?}", handle); + connection::get_state(handle).map_err(to_napi_err) +} + +#[napi] +pub fn connection_get_invitation(handle: u32) -> napi::Result { + trace!("connection_get_invitation >>> handle: {:?}", handle); + connection::get_invitation(handle).map_err(to_napi_err) +} + +#[napi] +pub fn connection_process_invite(handle: u32, invitation: String) -> napi::Result<()> { + trace!("connection_process_invite >>> handle: {:?}", handle); + connection::process_invite(handle, &invitation).map_err(to_napi_err) +} + +#[napi] +pub async fn connection_process_request( + handle: u32, + request: String, + service_endpoint: String, + routing_keys: Vec, +) -> napi::Result<()> { + trace!("connection_process_request >>> handle: {:?}", handle); + connection::process_request(handle, &request, service_endpoint, routing_keys) + .await + .map_err(to_napi_err) +} + +#[napi] +pub async fn connection_process_response(handle: u32, response: String) -> napi::Result<()> { + trace!("connection_process_response >>> handle: {:?}", handle); + connection::process_response(handle, &response) + .await + .map_err(to_napi_err) +} + +#[napi] +pub async fn connection_process_ack(handle: u32, message: String) -> napi::Result<()> { + trace!("connection_process_ack >>> handle: {:?}", handle); + connection::process_ack(handle, &message).await.map_err(to_napi_err) +} + +#[napi] +pub async fn connection_send_response(handle: u32) -> napi::Result<()> { + trace!("connection_send_response >>> handle: {:?}", handle); + connection::send_response(handle).await.map_err(to_napi_err) +} + +#[napi] +pub async fn connection_send_request( + handle: u32, + service_endpoint: String, + routing_keys: Vec, +) -> napi::Result<()> { + trace!("connection_send_request >>> handle: {:?}", handle); + connection::send_request(handle, service_endpoint, routing_keys) + .await + .map_err(to_napi_err) +} + +#[napi] +pub async fn connection_send_ack(handle: u32) -> napi::Result<()> { + trace!("connection_send_ack >>> handle: {:?}", handle); + connection::send_ack(handle).await.map_err(to_napi_err) +} + +#[napi] +pub async fn connection_send_generic_message(handle: u32, content: String) -> napi::Result<()> { + trace!("connection_send_generic_message >>> handle: {:?}", handle); + connection::send_generic_message(handle, content) + .await + .map_err(to_napi_err) +} + +#[napi] +pub async fn connection_create_invite( + handle: u32, + service_endpoint: String, + routing_keys: Vec, +) -> napi::Result<()> { + trace!("connection_create_invite >>> handle: {:?}", handle); + connection::create_invite(handle, service_endpoint, routing_keys) + .await + .map_err(to_napi_err) +} + +#[napi] +pub fn connection_serialize(handle: u32) -> napi::Result { + trace!("connection_serialize >>> handle: {:?}", handle); + connection::to_string(handle).map_err(to_napi_err) +} + +#[napi] +pub fn connection_deserialize(connection_data: String) -> napi::Result { + trace!("connection_deserialize >>>"); + connection::from_string(&connection_data).map_err(to_napi_err) +} + +#[napi] +pub fn connection_release(handle: u32) -> napi::Result<()> { + trace!("connection_release >>> handle: {:?}", handle); + connection::release(handle).map_err(to_napi_err) +} diff --git a/wrappers/vcx-napi-rs/src/api/mod.rs b/wrappers/vcx-napi-rs/src/api/mod.rs index aab8af88a6..0d62c57be6 100644 --- a/wrappers/vcx-napi-rs/src/api/mod.rs +++ b/wrappers/vcx-napi-rs/src/api/mod.rs @@ -1,5 +1,6 @@ pub mod agency_client; pub mod agent; +pub mod connection; pub mod credential; pub mod credential_definition; pub mod disclosed_proof;