Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new initialization methods #223

Merged
merged 27 commits into from
Jan 15, 2021
Merged

Add new initialization methods #223

merged 27 commits into from
Jan 15, 2021

Conversation

mirgee
Copy link
Contributor

@mirgee mirgee commented Dec 3, 2020

Added methods:

  • vcx_init_threadpool - Initializes tokio threadpool
  • vcx_create_wallet - creates a new wallet and master secret using provided config (wallet name, key, key der. meth.), but keeps wallet closed
  • vcx_create_agency_client_for_main_wallet - creates a new agency client from config (agency and agent did, verkey, url, etc.)
  • vcx_open_main_pool - opens the pool
  • vcx_open_main_wallet - opens the created wallet
  • vcx_close_main_wallet - closes the created wallet
  • vcx_configure_issuer_wallet - creates and stores did and keypair for credential issuance
  • vcx_init_issuer_config - stores provided config used by issuer in the memory (inst. did, name and verkey)

Implements #210 .

Deprecated methods:

  • vcx_open_pool
  • vcx_agent_update_info
  • vcx_init_core
  • vcx_open_wallet

Signed-off-by: Miroslav Kovar miroslavkovar@protonmail.com

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

# Conflicts:
#	libvcx/src/api/vcx.rs
#	libvcx/src/aries/handlers/connection/agent_info.rs
#	libvcx/src/libindy/utils/wallet.rs
#	libvcx/src/settings.rs
#	libvcx/src/utils/devsetup.rs
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@codecov-io
Copy link

codecov-io commented Dec 3, 2020

Codecov Report

Merging #223 (07b7dca) into master (c872f0e) will increase coverage by 0.26%.
The diff coverage is 12.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
+ Coverage   57.38%   57.65%   +0.26%     
==========================================
  Files         149      149              
  Lines       19995    19800     -195     
  Branches     4497     4451      -46     
==========================================
- Hits        11474    11415      -59     
+ Misses       5174     5053     -121     
+ Partials     3347     3332      -15     
Flag Coverage Δ
integration 26.42% <12.59%> (+0.45%) ⬆️
unittests 51.88% <12.59%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
libvcx/src/api/utils.rs 31.18% <ø> (ø)
libvcx/src/api/vcx.rs 61.98% <0.00%> (-7.37%) ⬇️
libvcx/src/api/wallet.rs 47.44% <0.00%> (ø)
libvcx/src/libindy/utils/wallet.rs 70.20% <ø> (+1.04%) ⬆️
libvcx/src/settings.rs 66.42% <ø> (+2.81%) ⬆️
libvcx/src/init.rs 30.48% <4.65%> (-21.90%) ⬇️
libvcx/src/utils/threadpool.rs 74.19% <66.66%> (-4.07%) ⬇️
libvcx/src/utils/devsetup.rs 48.22% <100.00%> (ø)
libvcx/src/aries/messages/connection/service.rs 70.27% <0.00%> (-8.11%) ⬇️
...essages/proof_presentation/presentation_request.rs 75.00% <0.00%> (-4.17%) ⬇️
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c872f0e...07b7dca. Read the comment docs.

@mirgee mirgee added the enhancement New feature or request label Dec 4, 2020
Copy link
Contributor

@Patrik-Stas Patrik-Stas left a comment

Choose a reason for hiding this comment

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

Could you also add this to NodeJS wrapper and write a test using new APIs for initialization? Perhaps migrate alice/faber demo?

libvcx/src/api/vcx.rs Outdated Show resolved Hide resolved
libvcx/src/api/vcx.rs Outdated Show resolved Hide resolved
libvcx/src/api/vcx.rs Outdated Show resolved Hide resolved
libvcx/src/api/vcx.rs Show resolved Hide resolved
libvcx/src/api/vcx.rs Show resolved Hide resolved
Base automatically changed from refactor/replace-agency-settings to master December 4, 2020 11:57
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

# Conflicts:
#	agency_client/src/agent_utils.rs
#	agency_client/src/error.rs
#	agency_client/src/httpclient.rs
#	agency_client/src/utils/error_utils.rs
#	libvcx/src/api/vcx.rs
#	libvcx/src/init.rs
#	libvcx/src/libindy/utils/wallet.rs
#	libvcx/src/settings.rs
#	libvcx/src/utils/devsetup.rs
#	libvcx/src/utils/provision.rs
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@hyperledger hyperledger deleted a comment from lgtm-com bot Dec 4, 2020
@hyperledger hyperledger deleted a comment from lgtm-com bot Dec 4, 2020
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
libvcx/src/api/vcx.rs Outdated Show resolved Hide resolved
@Patrik-Stas
Copy link
Contributor

Please list also deprecated functions in PR description

@mirgee mirgee requested a review from a team as a code owner January 4, 2021 13:56
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

# Conflicts:
#	wrappers/node/src/api/utils.ts
#	wrappers/node/src/rustlib.ts
@lgtm-com
Copy link

lgtm-com bot commented Jan 4, 2021

This pull request introduces 1 alert when merging 7f75a34 into c872f0e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

libvcx/src/api/vcx.rs Outdated Show resolved Hide resolved
vcx_open_main_pool: (commandId: number, config: string, cb: any) => number,

vcx_create_agency_client_for_main_wallet: (commandId: number, config: string, cb: any) => number,
vcx_provision_cloud_agent: (commandId: number, config: string, cb: any) => number,
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like there no C function like this defined in rust?

Copy link
Contributor Author

@mirgee mirgee Jan 5, 2021

Choose a reason for hiding this comment

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

It is, see libvcx/src/api/utils.rs:139

Copy link
Contributor

@Patrik-Stas Patrik-Stas left a comment

Choose a reason for hiding this comment

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

I left few comments and updated list of added functions in PR description. Could you please also add there short 1-liner description for each new function

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@lgtm-com
Copy link

lgtm-com bot commented Jan 5, 2021

This pull request introduces 1 alert when merging a92ccea into c872f0e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@lgtm-com
Copy link

lgtm-com bot commented Jan 5, 2021

This pull request introduces 2 alerts when merging e9cfeac into c872f0e - view on LGTM.com

new alerts:

  • 1 for Superfluous trailing arguments
  • 1 for Unused variable, import, function or class

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Patrik-Stas
Patrik-Stas previously approved these changes Jan 5, 2021
* Add to java wrapper

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

Add to iOS wrapper

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

* Add to iOS wrapper

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@Patrik-Stas Patrik-Stas merged commit c36c0f7 into master Jan 15, 2021
@Patrik-Stas Patrik-Stas deleted the feature/new-init-api branch January 15, 2021 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants