diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40040e475e..715bf99683 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -197,7 +197,6 @@ jobs: cargo check --features vdrtools --no-default-features cargo check --features modular_libs --no-default-features cargo check --features vdr_proxy_ledger --no-default-features - cargo check --features mixed_breed ########################################################################################## ############################## DOCKER BUILD ########################################## @@ -483,17 +482,6 @@ jobs: with: name: "docker-services-${{ github.job }}" - test-integration-aries-vcx-mixed-breed: - needs: workflow-setup - runs-on: ubuntu-20.04 - steps: - - name: "Git checkout" - uses: actions/checkout@v3 - - name: "Setup rust testing environment" - uses: ./.github/actions/setup-testing-rust - - name: "Run aries-vcx integration tests" - run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -F mixed_breed -- --include-ignored; - test-integration-aries-vcx-migration: needs: workflow-setup runs-on: ubuntu-20.04 diff --git a/Cargo.lock b/Cargo.lock index 7516fad8d2..42d3339fdb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2980,7 +2980,6 @@ dependencies = [ "tokio", "url", "uuid 0.7.4", - "wallet_migrator", ] [[package]] @@ -5326,7 +5325,6 @@ dependencies = [ "napi-build", "napi-derive", "uuid 0.8.2", - "wallet_migrator", ] [[package]] diff --git a/aries_vcx/Cargo.toml b/aries_vcx/Cargo.toml index 535e9dc29e..aaf159363c 100644 --- a/aries_vcx/Cargo.toml +++ b/aries_vcx/Cargo.toml @@ -18,9 +18,6 @@ modular_libs = ["aries_vcx_core/modular_libs"] # TODO: Remove using "vdrtools" feature flag for vdr_proxy_ledger once IndyCredxAnonCreds # is fully implemented vdr_proxy_ledger = ["aries_vcx_core/vdr_proxy_ledger", "vdrtools"] -# Temporary feature used for testing the full credx anoncreds impl -# using vdrtools ledger and wallet. -mixed_breed = ["vdrtools", "modular_libs"] # Used for testing the migrator migration = ["vdrtools", "modular_libs"] diff --git a/aries_vcx/src/common/keys.rs b/aries_vcx/src/common/keys.rs index e0936aa02c..bc65b85159 100644 --- a/aries_vcx/src/common/keys.rs +++ b/aries_vcx/src/common/keys.rs @@ -83,11 +83,7 @@ pub async fn get_verkey_from_ledger(indy_ledger: &Arc, did: mod test { #[tokio::test] #[ignore] - #[cfg(all( - not(feature = "vdr_proxy_ledger"), - not(feature = "modular_libs"), - not(feature = "mixed_breed") - ))] + #[cfg(all(not(feature = "vdr_proxy_ledger"), not(feature = "modular_libs"),))] async fn test_pool_rotate_verkey_fails() { use super::*; diff --git a/aries_vcx/src/core/profile/mixed_breed_profile.rs b/aries_vcx/src/core/profile/mixed_breed_profile.rs deleted file mode 100644 index 2a8100aef5..0000000000 --- a/aries_vcx/src/core/profile/mixed_breed_profile.rs +++ /dev/null @@ -1,82 +0,0 @@ -use std::sync::Arc; - -use crate::errors::error::{AriesVcxError, AriesVcxErrorKind, VcxResult}; -use aries_vcx_core::ledger::base_ledger::{TaaConfigurator, TxnAuthrAgrmtOptions}; -use aries_vcx_core::{ - anoncreds::{base_anoncreds::BaseAnonCreds, credx_anoncreds::IndyCredxAnonCreds}, - ledger::{ - base_ledger::{AnoncredsLedgerRead, AnoncredsLedgerWrite, IndyLedgerRead, IndyLedgerWrite}, - indy_ledger::{IndySdkLedgerRead, IndySdkLedgerWrite}, - }, - wallet::{base_wallet::BaseWallet, indy_wallet::IndySdkWallet}, - PoolHandle, WalletHandle, -}; -use async_trait::async_trait; - -use super::profile::Profile; - -#[derive(Debug)] -pub struct MixedBreedProfile { - wallet: Arc, - anoncreds: Arc, - - // ledger reads - anoncreds_ledger_read: Arc, - indy_ledger_read: Arc, - - // ledger writes - anoncreds_ledger_write: Arc, - indy_ledger_write: Arc, -} - -impl MixedBreedProfile { - pub fn new(indy_wallet_handle: WalletHandle, indy_pool_handle: PoolHandle) -> Self { - let wallet: Arc = Arc::new(IndySdkWallet::new(indy_wallet_handle)); - let anoncreds = Arc::new(IndyCredxAnonCreds::new(Arc::clone(&wallet))); - let ledger_read = Arc::new(IndySdkLedgerRead::new(indy_wallet_handle, indy_pool_handle)); - let ledger_write = Arc::new(IndySdkLedgerWrite::new(indy_wallet_handle, indy_pool_handle)); - - MixedBreedProfile { - wallet, - anoncreds, - anoncreds_ledger_read: ledger_read.clone(), - anoncreds_ledger_write: ledger_write.clone(), - indy_ledger_read: ledger_read, - indy_ledger_write: ledger_write, - } - } -} - -#[async_trait] -impl Profile for MixedBreedProfile { - fn inject_indy_ledger_read(&self) -> Arc { - Arc::clone(&self.indy_ledger_read) - } - - fn inject_indy_ledger_write(&self) -> Arc { - Arc::clone(&self.indy_ledger_write) - } - - fn inject_anoncreds(&self) -> Arc { - Arc::clone(&self.anoncreds) - } - - fn inject_anoncreds_ledger_read(&self) -> Arc { - Arc::clone(&self.anoncreds_ledger_read) - } - - fn inject_anoncreds_ledger_write(&self) -> Arc { - Arc::clone(&self.anoncreds_ledger_write) - } - - fn inject_wallet(&self) -> Arc { - Arc::clone(&self.wallet) - } - - fn update_taa_configuration(&self, _taa_options: TxnAuthrAgrmtOptions) -> VcxResult<()> { - Err(AriesVcxError::from_msg( - AriesVcxErrorKind::ActionNotSupported, - format!("update_taa_configuration no implemented for MixedBreedProfile"), - )) - } -} diff --git a/aries_vcx/src/core/profile/mod.rs b/aries_vcx/src/core/profile/mod.rs index 6473a68336..ed215b697a 100644 --- a/aries_vcx/src/core/profile/mod.rs +++ b/aries_vcx/src/core/profile/mod.rs @@ -1,5 +1,3 @@ -#[cfg(feature = "mixed_breed")] -pub mod mixed_breed_profile; #[cfg(feature = "modular_libs")] pub mod modular_libs_profile; pub mod profile; diff --git a/aries_vcx/src/utils/devsetup.rs b/aries_vcx/src/utils/devsetup.rs index 917acab4d4..1061e7447e 100644 --- a/aries_vcx/src/utils/devsetup.rs +++ b/aries_vcx/src/utils/devsetup.rs @@ -32,8 +32,6 @@ use aries_vcx_core::indy::ledger::pool::{ create_pool_ledger_config, indy_close_pool, indy_delete_pool, indy_open_pool, }; -#[cfg(feature = "mixed_breed")] -use crate::core::profile::mixed_breed_profile::MixedBreedProfile; #[cfg(feature = "modular_libs")] use crate::core::profile::modular_libs_profile::ModularLibsProfile; #[cfg(feature = "modular_libs")] @@ -138,12 +136,6 @@ impl SetupProfile { info!("SetupProfile >> using indy profile"); SetupProfile::build_profile_vdrtools(genesis_file_path).await }; - #[cfg(feature = "mixed_breed")] - return { - info!("SetupProfile >> using mixed breed profile"); - SetupProfile::build_profile_mixed_breed(genesis_file_path).await - }; - #[cfg(feature = "modular_libs")] return { info!("SetupProfile >> using modular profile"); @@ -215,36 +207,6 @@ impl SetupProfile { } } - #[cfg(feature = "mixed_breed")] - async fn build_profile_mixed_breed(genesis_file_path: String) -> SetupProfile { - // todo: can remove? - let pool_name = Uuid::new_v4().to_string(); - create_pool_ledger_config(&pool_name, &genesis_file_path).unwrap(); - let pool_handle = indy_open_pool(&pool_name, None).await.unwrap(); - - let (institution_did, wallet_handle) = setup_issuer_wallet().await; - - let profile: Arc = Arc::new(MixedBreedProfile::new(wallet_handle, pool_handle.clone())); - - Arc::clone(&profile) - .inject_anoncreds() - .prover_create_link_secret(settings::DEFAULT_LINK_SECRET_ALIAS) - .await - .unwrap(); - - async fn indy_teardown(pool_handle: PoolHandle, pool_name: String) { - indy_close_pool(pool_handle.clone()).await.unwrap(); - indy_delete_pool(&pool_name).await.unwrap(); - } - - SetupProfile { - genesis_file_path, - institution_did, - profile, - teardown: Arc::new(move || Box::pin(indy_teardown(pool_handle, pool_name.clone()))), - } - } - #[cfg(feature = "vdr_proxy_ledger")] async fn build_profile_vdr_proxy_ledger(genesis_file_path: String) -> SetupProfile { use std::env; diff --git a/libvcx_core/Cargo.toml b/libvcx_core/Cargo.toml index 9d627fb8a8..7c1f2ce5ae 100644 --- a/libvcx_core/Cargo.toml +++ b/libvcx_core/Cargo.toml @@ -36,7 +36,6 @@ uuid = { version = "0.7.4", default-features = false, features = ["v4"] } agency_client = { path = "../agency_client" } async-trait = "0.1.61" url = "2.3.1" -wallet_migrator = { path = "../wallet_migrator" } [dev-dependencies] tokio = { version = "1.20", features = [ "rt", "macros" ] } diff --git a/libvcx_core/src/api_vcx/api_global/wallet.rs b/libvcx_core/src/api_vcx/api_global/wallet.rs index 01bbf4a057..092008e38c 100644 --- a/libvcx_core/src/api_vcx/api_global/wallet.rs +++ b/libvcx_core/src/api_vcx/api_global/wallet.rs @@ -6,9 +6,6 @@ use aries_vcx::aries_vcx_core::anoncreds::base_anoncreds::BaseAnonCreds; #[cfg(all(feature = "anoncreds_credx"))] use aries_vcx::aries_vcx_core::anoncreds::credx_anoncreds::IndyCredxAnonCreds; use aries_vcx::aries_vcx_core::anoncreds::indy_anoncreds::IndySdkAnonCreds; -use aries_vcx::aries_vcx_core::indy::wallet::close_wallet; -use aries_vcx::aries_vcx_core::indy::wallet::create_and_open_wallet; -use aries_vcx::aries_vcx_core::indy::wallet::delete_wallet; use aries_vcx::aries_vcx_core::indy::wallet::{ close_search_wallet, fetch_next_records_wallet, import, open_search_wallet, IssuerConfig, RestoreWalletConfigs, WalletConfig, @@ -227,26 +224,6 @@ pub async fn wallet_import(config: &RestoreWalletConfigs) -> LibvcxResult<()> { map_ariesvcx_core_result(import(config).await) } -pub async fn wallet_migrate(wallet_config: &WalletConfig) -> LibvcxResult<()> { - let src_wallet_handle = get_main_wallet_handle()?; - let dest_wallet_handle = create_and_open_wallet(wallet_config).await?; - - let migration_res = wallet_migrator::migrate_wallet( - src_wallet_handle, - dest_wallet_handle, - wallet_migrator::vdrtools2credx::migrate_any_record, - ) - .await; - - if let Err(e) = migration_res { - close_wallet(dest_wallet_handle).await.ok(); - delete_wallet(wallet_config).await.ok(); - Err(LibvcxError::from_msg(LibvcxErrorKind::WalletMigrationFailed, e)) - } else { - Ok(()) - } -} - #[allow(clippy::unwrap_used)] pub mod test_utils { use aries_vcx::aries_vcx_core::indy::wallet::WalletConfig; @@ -327,29 +304,6 @@ pub mod tests { }; use crate::errors::error::{LibvcxErrorKind, LibvcxResult}; - #[tokio::test] - async fn test_wallet_migrate() { - let wallet_name = format!("test_create_wallet_{}", uuid::Uuid::new_v4()); - let config: WalletConfig = serde_json::from_value(json!({ - "wallet_name": wallet_name, - "wallet_key": DEFAULT_WALLET_KEY, - "wallet_key_derivation": WALLET_KDF_RAW - })) - .unwrap(); - - create_and_open_as_main_wallet(&config).await.unwrap(); - - let wallet_name = format!("test_migrate_wallet_{}", uuid::Uuid::new_v4()); - let new_config: WalletConfig = serde_json::from_value(json!({ - "wallet_name": wallet_name, - "wallet_key": DEFAULT_WALLET_KEY, - "wallet_key_derivation": WALLET_KDF_RAW - })) - .unwrap(); - - super::wallet_migrate(&new_config).await.unwrap(); - } - #[tokio::test] async fn test_wallet_create() { let _setup = SetupEmpty::init(); diff --git a/libvcx_core/src/errors/error.rs b/libvcx_core/src/errors/error.rs index 2adb604d7b..cac4d84949 100644 --- a/libvcx_core/src/errors/error.rs +++ b/libvcx_core/src/errors/error.rs @@ -138,8 +138,6 @@ pub enum LibvcxErrorKind { DuplicationWallet, #[error("Wallet record not found")] WalletRecordNotFound, - #[error("Wallet migration failed")] - WalletMigrationFailed, #[error("Record already exists in the wallet")] DuplicationWalletRecord, #[error("Wallet not found")] diff --git a/libvdrtools/indy-api-types/src/lib.rs b/libvdrtools/indy-api-types/src/lib.rs index e363ef9688..228ee50bfa 100644 --- a/libvdrtools/indy-api-types/src/lib.rs +++ b/libvdrtools/indy-api-types/src/lib.rs @@ -19,12 +19,6 @@ pub type IndyHandle = i32; pub struct WalletHandle(pub i32); pub const INVALID_WALLET_HANDLE: WalletHandle = WalletHandle(0); -impl From for WalletHandle { - fn from(value: i32) -> Self { - Self(value) - } -} - pub type CallbackHandle = i32; pub type PoolHandle = i32; diff --git a/wrappers/node/src/api/wallet.ts b/wrappers/node/src/api/wallet.ts index 23b9bf0a5b..2f2e3aeaef 100644 --- a/wrappers/node/src/api/wallet.ts +++ b/wrappers/node/src/api/wallet.ts @@ -9,14 +9,6 @@ export async function createWallet(config: object): Promise { } } -export async function migrateWallet(config: object): Promise { - try { - return await ffi.walletMigrate(JSON.stringify(config)); - } catch (err: any) { - throw new VCXInternalError(err); - } -} - export async function configureIssuerWallet(seed: string): Promise { try { return await ffi.configureIssuerWallet(seed); diff --git a/wrappers/vcx-napi-rs/Cargo.toml b/wrappers/vcx-napi-rs/Cargo.toml index a79f342b2d..39b23e4a55 100644 --- a/wrappers/vcx-napi-rs/Cargo.toml +++ b/wrappers/vcx-napi-rs/Cargo.toml @@ -22,7 +22,6 @@ anoncreds_vdrtools = ["libvcx_core/anoncreds_vdrtools"] [dependencies] libvcx_core = { path = "../../libvcx_core" } -wallet_migrator = { path = "../../wallet_migrator" } log = "0.4.16" napi = { version = "2.10.14", default-features = false, features = [ "async" ] } napi-derive = { version = "2.10.1" } diff --git a/wrappers/vcx-napi-rs/index.d.ts b/wrappers/vcx-napi-rs/index.d.ts index 8a987ccca0..00cf25f2d6 100644 --- a/wrappers/vcx-napi-rs/index.d.ts +++ b/wrappers/vcx-napi-rs/index.d.ts @@ -195,7 +195,6 @@ export function unpack(data: Buffer): Promise export function createPairwiseInfo(): Promise export function walletImport(config: string): Promise export function walletExport(path: string, backupKey: string): Promise -export function walletMigrate(walletConfig: string): Promise export function getVerkeyFromWallet(did: string): Promise export function rotateVerkey(did: string): Promise export function rotateVerkeyStart(did: string): Promise diff --git a/wrappers/vcx-napi-rs/index.js b/wrappers/vcx-napi-rs/index.js index 916e1500a1..4e477d135b 100644 --- a/wrappers/vcx-napi-rs/index.js +++ b/wrappers/vcx-napi-rs/index.js @@ -1,9 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ -/* prettier-ignore */ - -/* auto-generated by NAPI-RS */ - const { existsSync, readFileSync } = require('fs') const { join } = require('path') @@ -252,7 +246,7 @@ if (!nativeBinding) { throw new Error(`Failed to load native binding`) } -const { updateWebhookUrl, createAgencyClientForMainWallet, provisionCloudAgent, messagesUpdateStatus, generatePublicInvitation, connectionCreateInviter, connectionCreateInvitee, connectionGetThreadId, connectionGetPairwiseInfo, connectionGetRemoteDid, connectionGetRemoteVk, connectionGetState, connectionGetInvitation, connectionProcessInvite, connectionProcessRequest, connectionProcessResponse, connectionProcessAck, connectionProcessProblemReport, connectionSendResponse, connectionSendRequest, connectionSendAck, connectionSendGenericMessage, connectionSendAriesMessage, 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, issuerCredentialUpdateStateWithMessageNonmediated, issuerCredentialGetState, issuerCredentialGetRevRegId, issuerCredentialCreate, issuerCredentialRevokeLocal, issuerCredentialIsRevokable, issuerCredentialGetRevocationId, issuerCredentialSendCredential, issuerCredentialSendCredentialNonmediated, issuerCredentialSendOfferV2, issuerCredentialSendOfferNonmediated, issuerCredentialMarkOfferMsgSent, issuerCredentialBuildOfferMsgV2, issuerCredentialGetOfferMsg, issuerCredentialRelease, issuerCredentialGetThreadId, getLedgerAuthorAgreement, setActiveTxnAuthorAgreementMeta, createService, createServiceV2, getServiceFromLedger, getAttrFromLedger, clearAttrFromLedger, 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, outOfBandBuildHandshakeReuseAcceptedMsg, outOfBandReceiverCreate, outOfBandReceiverExtractMessage, outOfBandReceiverConnectionExists, outOfBandReceiverNonmediatedConnectionExists, outOfBandReceiverBuildConnection, outOfBandReceiverGetThreadId, outOfBandReceiverSerialize, outOfBandReceiverDeserialize, outOfBandReceiverRelease, outOfBandSenderCreate, outOfBandSenderAppendMessage, outOfBandSenderAppendService, outOfBandSenderAppendServiceDid, outOfBandSenderToMessage, outOfBandSenderGetThreadId, outOfBandSenderSerialize, outOfBandSenderDeserialize, outOfBandSenderRelease, openMainPool, closeMainPool, proofCreate, proofGetPresentationMsg, proofGetPresentationRequestAttachment, proofGetPresentationAttachment, proofRelease, proofSendRequest, proofSendRequestNonmediated, proofGetRequestMsg, proofSerialize, proofDeserialize, v2ProofUpdateState, v2ProofUpdateStateWithMessage, proofUpdateStateWithMessageNonmediated, proofGetState, proofGetVerificationStatus, proofGetThreadId, markPresentationRequestMsgSent, revocationRegistryCreate, revocationRegistryPublish, revocationRegistryPublishRevocations, revocationRegistryGetRevRegId, revocationRegistryGetTailsHash, revocationRegistrySerialize, revocationRegistryDeserialize, revocationRegistryRelease, schemaGetAttributes, schemaPrepareForEndorser, schemaCreate, schemaGetSchemaId, schemaDeserialize, schemaSerialize, schemaRelease, schemaUpdateState, schemaGetState, enableMocks, trustpingBuildResponseMsg, trustpingBuildPing, shutdown, getVersion, walletOpenAsMain, walletCreateMain, walletCloseMain, vcxInitIssuerConfig, configureIssuerWallet, unpack, createPairwiseInfo, walletImport, walletExport, walletMigrate, getVerkeyFromWallet, rotateVerkey, rotateVerkeyStart, rotateVerkeyApply } = nativeBinding +const { updateWebhookUrl, createAgencyClientForMainWallet, provisionCloudAgent, messagesUpdateStatus, generatePublicInvitation, connectionCreateInviter, connectionCreateInvitee, connectionGetThreadId, connectionGetPairwiseInfo, connectionGetRemoteDid, connectionGetRemoteVk, connectionGetState, connectionGetInvitation, connectionProcessInvite, connectionProcessRequest, connectionProcessResponse, connectionProcessAck, connectionProcessProblemReport, connectionSendResponse, connectionSendRequest, connectionSendAck, connectionSendGenericMessage, connectionSendAriesMessage, 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, issuerCredentialUpdateStateWithMessageNonmediated, issuerCredentialGetState, issuerCredentialGetRevRegId, issuerCredentialCreate, issuerCredentialRevokeLocal, issuerCredentialIsRevokable, issuerCredentialGetRevocationId, issuerCredentialSendCredential, issuerCredentialSendCredentialNonmediated, issuerCredentialSendOfferV2, issuerCredentialSendOfferNonmediated, issuerCredentialMarkOfferMsgSent, issuerCredentialBuildOfferMsgV2, issuerCredentialGetOfferMsg, issuerCredentialRelease, issuerCredentialGetThreadId, getLedgerAuthorAgreement, setActiveTxnAuthorAgreementMeta, createService, createServiceV2, getServiceFromLedger, getAttrFromLedger, clearAttrFromLedger, 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, outOfBandBuildHandshakeReuseAcceptedMsg, outOfBandReceiverCreate, outOfBandReceiverExtractMessage, outOfBandReceiverConnectionExists, outOfBandReceiverNonmediatedConnectionExists, outOfBandReceiverBuildConnection, outOfBandReceiverGetThreadId, outOfBandReceiverSerialize, outOfBandReceiverDeserialize, outOfBandReceiverRelease, outOfBandSenderCreate, outOfBandSenderAppendMessage, outOfBandSenderAppendService, outOfBandSenderAppendServiceDid, outOfBandSenderToMessage, outOfBandSenderGetThreadId, outOfBandSenderSerialize, outOfBandSenderDeserialize, outOfBandSenderRelease, openMainPool, closeMainPool, proofCreate, proofGetPresentationMsg, proofGetPresentationRequestAttachment, proofGetPresentationAttachment, proofRelease, proofSendRequest, proofSendRequestNonmediated, proofGetRequestMsg, proofSerialize, proofDeserialize, v2ProofUpdateState, v2ProofUpdateStateWithMessage, proofUpdateStateWithMessageNonmediated, proofGetState, proofGetVerificationStatus, proofGetThreadId, markPresentationRequestMsgSent, revocationRegistryCreate, revocationRegistryPublish, revocationRegistryPublishRevocations, revocationRegistryGetRevRegId, revocationRegistryGetTailsHash, revocationRegistrySerialize, revocationRegistryDeserialize, revocationRegistryRelease, schemaGetAttributes, schemaPrepareForEndorser, schemaCreate, schemaGetSchemaId, schemaDeserialize, schemaSerialize, schemaRelease, schemaUpdateState, schemaGetState, enableMocks, trustpingBuildResponseMsg, trustpingBuildPing, shutdown, getVersion, walletOpenAsMain, walletCreateMain, walletCloseMain, vcxInitIssuerConfig, configureIssuerWallet, unpack, createPairwiseInfo, walletImport, walletExport, getVerkeyFromWallet, rotateVerkey, rotateVerkeyStart, rotateVerkeyApply } = nativeBinding module.exports.updateWebhookUrl = updateWebhookUrl module.exports.createAgencyClientForMainWallet = createAgencyClientForMainWallet @@ -446,7 +440,6 @@ module.exports.unpack = unpack module.exports.createPairwiseInfo = createPairwiseInfo module.exports.walletImport = walletImport module.exports.walletExport = walletExport -module.exports.walletMigrate = walletMigrate module.exports.getVerkeyFromWallet = getVerkeyFromWallet module.exports.rotateVerkey = rotateVerkey module.exports.rotateVerkeyStart = rotateVerkeyStart diff --git a/wrappers/vcx-napi-rs/src/api/wallet.rs b/wrappers/vcx-napi-rs/src/api/wallet.rs index 68a9f139d8..7916caa40a 100644 --- a/wrappers/vcx-napi-rs/src/api/wallet.rs +++ b/wrappers/vcx-napi-rs/src/api/wallet.rs @@ -95,22 +95,6 @@ pub async fn wallet_export(path: String, backup_key: String) -> napi::Result<()> .map_err(to_napi_err) } -#[napi] -pub async fn wallet_migrate(wallet_config: String) -> napi::Result<()> { - let wallet_config = serde_json::from_str(&wallet_config) - .map_err(|err| { - LibvcxError::from_msg( - LibvcxErrorKind::InvalidConfiguration, - format!("Serialization error: {:?}", err), - ) - }) - .map_err(to_napi_err)?; - - wallet::wallet_migrate(&wallet_config) - .await - .map_err(|e| napi::Error::from_reason(e.to_string())) -} - #[napi] pub async fn get_verkey_from_wallet(did: String) -> napi::Result { wallet::key_for_local_did(&did).await.map_err(to_napi_err)