-
Notifications
You must be signed in to change notification settings - Fork 0
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
🔐 SubmitClaims
on dataverse
#26
Conversation
WalkthroughThe changes introduce enhancements across multiple files, primarily focusing on improving mock generation for testing, refining client interfaces, and updating transaction handling mechanisms. Key modifications include renaming and restructuring client types, implementing new transaction submission functionalities, and updating associated tests to ensure proper functionality. The changes also involve the addition of error handling constants and the encapsulation of key management functionalities. Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Outside diff range and nitpick comments (3)
keys/mnemonic_test.go (1)
11-59
: LGTM! Consider adding more test cases.The test function is well-structured and covers the important scenarios. The use of the
goconvey
library for assertions is effective.To further improve the test coverage, consider adding more test cases to cover edge cases and error scenarios, such as:
- Empty mnemonic
- Mnemonic with invalid checksum
- Mnemonic with invalid word count
Tools
Gitleaks
23-23: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
tx/transaction_test.go (1)
11-75
: Comprehensive test coverage, but consider adding more test cases.The
TestNewTransaction
function provides a comprehensive set of test cases for theNewTransaction
function. The test cases cover various scenarios with different options, and the use of thegoconvey
library makes the assertions readable and expressive.However, consider adding the following test cases to improve the test coverage:
- A test case for the scenario where multiple options are provided together. This will ensure that the function behaves correctly when multiple options are combined.
- A test case for the scenario where an invalid option is provided. This will ensure that the function handles invalid options gracefully and returns an error.
dataverse/tx_test.go (1)
18-75
: LGTM! Consider adding more test cases.The test function is well-structured and follows the Given-When-Then pattern using the
goconvey
library. The mocking of the dependencies is done correctly using thegomock
library, and the assertions in the test case are appropriate and cover the expected behavior.However, consider adding more test cases to cover error scenarios and edge cases to ensure the robustness of the
SubmitClaims
method.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (29)
- Makefile (1 hunks)
- auth/proxy.go (1 hunks)
- auth/proxy_test.go (1 hunks)
- credential/generate.go (3 hunks)
- credential/generate_test.go (2 hunks)
- dataverse/client.go (4 hunks)
- dataverse/client_test.go (1 hunks)
- dataverse/errors.go (1 hunks)
- dataverse/export_test.go (1 hunks)
- dataverse/governance.go (3 hunks)
- dataverse/governance_test.go (3 hunks)
- dataverse/tx.go (1 hunks)
- dataverse/tx_test.go (1 hunks)
- keys/keyring.go (1 hunks)
- keys/mnemonic.go (3 hunks)
- keys/mnemonic_test.go (1 hunks)
- provider/storage/http.go (1 hunks)
- provider/storage/proxy.go (5 hunks)
- testutil/auth_client_mocks.go (1 hunks)
- testutil/dataverse_mocks.go (5 hunks)
- testutil/keyring_mocks.go (1 hunks)
- testutil/signer_mocks.go (0 hunks)
- testutil/transaction_mocks.go (1 hunks)
- testutil/tx_mocks.go (1 hunks)
- testutil/tx_service_mocks.go (1 hunks)
- tx/client.go (1 hunks)
- tx/client_test.go (1 hunks)
- tx/transaction.go (1 hunks)
- tx/transaction_test.go (1 hunks)
Files not reviewed due to no reviewable changes (1)
- testutil/signer_mocks.go
Files skipped from review due to trivial changes (7)
- dataverse/governance.go
- dataverse/governance_test.go
- testutil/auth_client_mocks.go
- testutil/keyring_mocks.go
- testutil/transaction_mocks.go
- testutil/tx_mocks.go
- testutil/tx_service_mocks.go
Additional context used
GitHub Check: codecov/patch
dataverse/tx.go
[warning] 19-19: dataverse/tx.go#L19
Added line #L19 was not covered by tests
[warning] 28-28: dataverse/tx.go#L28
Added line #L28 was not covered by tests
[warning] 44-44: dataverse/tx.go#L44
Added line #L44 was not covered by tests
[warning] 57-57: dataverse/tx.go#L57
Added line #L57 was not covered by tests
[warning] 63-63: dataverse/tx.go#L63
Added line #L63 was not covered by testsprovider/storage/http.go
[warning] 17-17: provider/storage/http.go#L17
Added line #L17 was not covered by testskeys/mnemonic.go
[warning] 59-59: keys/mnemonic.go#L59
Added line #L59 was not covered by testsprovider/storage/proxy.go
[warning] 44-44: provider/storage/proxy.go#L44
Added line #L44 was not covered by tests
[warning] 57-57: provider/storage/proxy.go#L57
Added line #L57 was not covered by tests
[warning] 78-78: provider/storage/proxy.go#L78
Added line #L78 was not covered by tests
[warning] 100-100: provider/storage/proxy.go#L100
Added line #L100 was not covered by tests
[warning] 102-102: provider/storage/proxy.go#L102
Added line #L102 was not covered by teststx/client.go
[warning] 66-66: tx/client.go#L66
Added line #L66 was not covered by tests
[warning] 85-85: tx/client.go#L85
Added line #L85 was not covered by teststx/transaction.go
[warning] 69-71: tx/transaction.go#L69-L71
Added lines #L69 - L71 were not covered by tests
[warning] 78-80: tx/transaction.go#L78-L80
Added lines #L78 - L80 were not covered by tests
[warning] 83-88: tx/transaction.go#L83-L88
Added lines #L83 - L88 were not covered by tests
[warning] 91-97: tx/transaction.go#L91-L97
Added lines #L91 - L97 were not covered by tests
[warning] 100-101: tx/transaction.go#L100-L101
Added lines #L100 - L101 were not covered by tests
[warning] 104-110: tx/transaction.go#L104-L110
Added lines #L104 - L110 were not covered by tests
[warning] 113-115: tx/transaction.go#L113-L115
Added lines #L113 - L115 were not covered by tests
[warning] 118-120: tx/transaction.go#L118-L120
Added lines #L118 - L120 were not covered by tests
[warning] 123-123: tx/transaction.go#L123
Added line #L123 was not covered by tests
[warning] 129-130: tx/transaction.go#L129-L130
Added lines #L129 - L130 were not covered by tests
[warning] 132-133: tx/transaction.go#L132-L133
Added lines #L132 - L133 were not covered by tests
[warning] 135-137: tx/transaction.go#L135-L137
Added lines #L135 - L137 were not covered by testsdataverse/client.go
[warning] 77-77: dataverse/client.go#L77
Added line #L77 was not covered by tests
[warning] 80-80: dataverse/client.go#L80
Added line #L80 was not covered by tests
[warning] 113-116: dataverse/client.go#L113-L116
Added lines #L113 - L116 were not covered by tests
[warning] 118-123: dataverse/client.go#L118-L123
Added lines #L118 - L123 were not covered by tests
Gitleaks
keys/mnemonic_test.go
23-23: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Additional comments not posted (48)
keys/keyring.go (1)
1-18
: LGTM!The
Keyring
interface is well-defined and follows the best practices of Go interfaces. The methods are clearly named and serve specific purposes related to signing messages and retrieving key information. The comments provide clear explanations for each method, making the interface easy to understand and use.The interface provides a solid foundation for implementing a keyring that can sign messages in the Axone SDK. It encapsulates the necessary functionality and allows for flexibility in the implementation.
dataverse/errors.go (1)
11-14
: LGTM!The addition of the new error constants
ErrConvertRDF
,ErrMarshalJSON
, andErrSendTx
improves the error handling capabilities of the module. The error messages are clear, concise, and accurately describe the error scenarios. The constants follow the existing naming convention and are correctly typed asMessageError
.Great job on enhancing the clarity and specificity of error handling within the codebase!
dataverse/export_test.go (2)
11-22
: LGTM!The renaming of
NewDataverseClient
toNewDataverseQueryClient
aligns well with the architectural enhancement to separate query and transaction functionalities. The function implementation looks good.
24-43
: Looks good!The addition of the
NewDataverseTxClient
function nicely complements theNewDataverseQueryClient
function and provides a more comprehensive interface for interacting with the Dataverse. The function implementation looks solid.keys/mnemonic.go (4)
11-12
: LGTM!The declaration that the
Key
struct implements theKeyring
interface is correct and helps in enforcing type safety.
15-17
: Good encapsulation!Renaming the fields of the
Key
struct from public to private is a good practice for data hiding and maintaining a clean API. It enforces the use of getter methods for accessing these values.
39-41
: Bech32 prefix configuration looks good.Setting the Bech32 prefix for accounts using the
sdk.GetConfig().SetBech32PrefixForAccount
method is necessary for proper address encoding and decoding.Regarding the TODO comment, I agree that making the Bech32 prefix configurable in the future is a good idea as it allows flexibility and customization. Let's keep this in mind for future enhancements.
62-71
: Getter methods for encapsulation.Adding getter methods
DID
,DIDKeyID
, andAddr
to provide access to the private fields of theKey
struct is a good practice for encapsulation and maintaining a clean API. The implementations of the getter methods are straightforward and return the corresponding private fields.keys/mnemonic_test.go (1)
23-23
: Ignore the static analysis hint.The static analysis hint about a potential generic API key on line 23 is a false positive. The mnemonic phrase on line 23 is not an API key, but a test input used to generate a key for testing purposes. It is safe to ignore this hint.
Tools
Gitleaks
23-23: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
auth/proxy.go (2)
24-24
: LGTM!The change from
dataverse.Client
todataverse.QueryClient
for thedvClient
field in theauthProxy
struct is a good refinement. It indicates that theauthProxy
is now expected to utilize a more specialized interface for querying operations, which aligns with the PR objective of refining client interfaces. This change is unlikely to have any negative impact on the functionality of theauthProxy
.
31-31
: LGTM!The change from
dataverse.Client
todataverse.QueryClient
for thedvClient
parameter in theNewProxy
function is consistent with the change made to thedvClient
field in theauthProxy
struct. It ensures that theNewProxy
function is expecting the correct type of client when creating a newauthProxy
instance. This change is necessary and appropriate.credential/generate.go (3)
7-7
: LGTM!The import statement for
"github.com/axone-protocol/axone-sdk/keys"
has been correctly added to support the changes made to theWithSigner
function.
32-33
: LGTM!The comment for the
WithSigner
function has been correctly updated to indicate that the signature is optional and a non-signed Verifiable Credential (VC) can still be generated.
53-56
: LGTM!The changes made to the
WithSigner
function are consistent with the updated comment and the addition of the import statement for"github.com/axone-protocol/axone-sdk/keys"
. The modifications reflect a shift in the underlying implementation of the signing mechanism, indicating that it now expects aKeyring
type, which likely encapsulates key management functionalities. The use of theDIDKeyID()
method from thekeys.Keyring
interface suggests a more integrated approach to handling decentralized identifiers (DIDs) within the signing process. There are no apparent issues with the changes made to theWithSigner
function.dataverse/tx_test.go (1)
77-88
: LGTM!The helper function is simple and straightforward. It generates a verifiable credential for testing purposes using the
credential
package and thetemplate.NewGovernance
function. The use of panic for error handling is acceptable for a test helper function.provider/storage/proxy.go (4)
23-23
: LGTM!The change in the type of the
key
field from*keys.Key
tokeys.Keyring
is a significant but necessary modification. It aligns with the overall refactoring aimed at enhancing the flexibility and functionality of theProxy
struct.
25-25
: LGTM!The modification of the
dvClient
type fromdataverse.Client
todataverse.QueryClient
suggests a refinement in the client's functionality or interface. This change aligns with the overall enhancements being made to theProxy
struct.
37-37
: LGTM!The changes in the
NewProxy
function, specifically the modifications to thekey
anddvClient
parameter types, align with the updates made to theProxy
struct. These adjustments ensure consistency in how theProxy
is instantiated and utilized.Also applies to: 39-39
Line range hint
1-114
: Remaining changes look good!The remaining modifications in the file, such as accessing the
DID
through theDID()
method of thekey
field in theRead
andStore
methods, are consistent with the overall refactoring of theProxy
struct and its associated functionality. These changes ensure a cohesive and unified approach to utilizing thekey
and accessing theDID
throughout the codebase.Tools
GitHub Check: codecov/patch
[warning] 44-44: provider/storage/proxy.go#L44
Added line #L44 was not covered by testsauth/proxy_test.go (1)
65-65
: LGTM!The change in the mock client instantiation enhances the specificity of the mock used in the authentication proxy tests. The mock's expectations and return values remain unchanged, focusing on the method
AskGovPermittedActions
.dataverse/client_test.go (1)
33-34
: LGTM!The renaming of the client creation function from
dataverse.NewClient
todataverse.NewQueryClient
is consistent with the provided list of alterations. The change does not introduce any new issues or inconsistencies in the test.tx/client.go (4)
19-21
: LGTM!The
Client
interface definition looks good. It encapsulates the functionality of sending a transaction, which aligns with the PR objectives. The method signature is clear and concise.
23-27
: LGTM!The
client
struct definition looks good. It encapsulates the necessary dependencies to send a transaction. The field names are clear and descriptive.
29-35
: LGTM!The
NewClient
constructor function looks good. It takes the necessary dependencies as parameters and returns a new instance of theclient
struct. The parameter names are clear and descriptive.
37-56
: Verify the implementation of thegetAccountNumberSequence
method and theGetSignedTx
method of theTransaction
interface.The
SendTx
method implementation looks good. It retrieves the account number and sequence, builds a signed transaction, and broadcasts it using the provided dependencies. The error handling is appropriate, returning descriptive errors in case of failures. The method aligns with the PR objectives of sending a transaction.However, the method relies on the
getAccountNumberSequence
method and theGetSignedTx
method of theTransaction
interface, which are not shown in this code segment. Please ensure that these methods are implemented correctly and have appropriate error handling.Run the following script to verify the implementation of the
getAccountNumberSequence
method and theGetSignedTx
method of theTransaction
interface:Verification successful
Both
getAccountNumberSequence
andGetSignedTx
methods are implemented correctly.The
getAccountNumberSequence
method retrieves account details and handles errors appropriately. TheGetSignedTx
method intx/transaction.go
sets up the transaction builder, configures the transaction, and returns the encoded transaction bytes, handling errors as expected. Both methods align with the requirements for theSendTx
method.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of the `getAccountNumberSequence` method and the `GetSignedTx` method of the `Transaction` interface. # Test 1: Search for the implementation of the `getAccountNumberSequence` method. Expect: The method should retrieve the account number and sequence from the `authClient` and return them along with any error. rg --type go -A 10 $'func \(c \*client\) getAccountNumberSequence\(' # Test 2: Search for the implementation of the `GetSignedTx` method of the `Transaction` interface. Expect: The method should build a signed transaction using the provided account number, sequence, and chain ID, and return the encoded transaction bytes along with any error. rg --type go -A 10 $'func \(t \*Transaction\) GetSignedTx\('Length of output: 629
Script:
#!/bin/bash # Description: Search for the `GetSignedTx` method in the codebase, considering it might be part of a different struct or interface. # Search for any implementation of a method named `GetSignedTx` in Go files. rg --type go -A 10 'func \(\w+ \*?\w+\) GetSignedTx\('Length of output: 1953
tx/transaction.go (3)
15-18
: LGTM!The
Transaction
interface definition is clear and concise, with appropriate method signatures for the intended functionality. Good job keeping thesign
method unexported for better encapsulation.
69-80
: Add test coverage for theWithSigner
function andsign
method.The
WithSigner
function andsign
method implementation look good. TheWithSigner
function provides a convenient way to set the signer for a transaction, and thesign
method correctly sets up the necessary structs for signing.However, the static analysis hints indicate missing test coverage for lines 69-71 and 78-80. It's important to add tests to ensure the correctness of the signing functionality.
Do you want me to help write the missing tests for these lines? I can generate test cases that cover the
WithSigner
function andsign
method.Tools
GitHub Check: codecov/patch
[warning] 69-71: tx/transaction.go#L69-L71
Added lines #L69 - L71 were not covered by tests
[warning] 78-80: tx/transaction.go#L78-L80
Added lines #L78 - L80 were not covered by tests
126-144
: Add test coverage for theGetSignedTx
method.The
GetSignedTx
method implementation looks good. It correctly builds the transaction using theTxBuilder
, sets the necessary fields, signs the transaction, and encodes it using theTxEncoder
.However, the static analysis hints indicate missing test coverage for lines 129-130, 132-133, and 135-137. It's important to add tests to ensure the correctness of the transaction building and signing functionality.
Do you want me to help write the missing tests for these lines? I can generate test cases that cover the
GetSignedTx
method, including scenarios for successful and failed transaction building and signing.Tools
GitHub Check: codecov/patch
[warning] 129-130: tx/transaction.go#L129-L130
Added lines #L129 - L130 were not covered by tests
[warning] 132-133: tx/transaction.go#L132-L133
Added lines #L132 - L133 were not covered by tests
[warning] 135-137: tx/transaction.go#L135-L137
Added lines #L135 - L137 were not covered by testsdataverse/client.go (5)
10-14
: LGTM!The new imports are necessary for the functionality being added in this file. The import statements look good.
Line range hint
18-44
: Great job on separating the query and transaction functionality!The renaming of
Client
toQueryClient
and the introduction of theTxClient
interface are excellent design choices. It improves the clarity and separation of concerns in the codebase.The
SubmitClaims
method taking a signed verifiable credential ensures the integrity of the submitted data.
97-105
: ThetxClient
struct is well-designed!The
txClient
struct includes the necessary fields for transaction handling, such astx.Client
,client.TxConfig
, andkeys.Keyring
.Embedding the
queryClient
intxClient
is a good design choice as it allows the transaction client to inherit the query functionality.
107-124
: TheNewTxClient
function is implemented correctly, but test coverage is missing.The
NewTxClient
function is well-structured and sets up the transaction client correctly by callingNewQueryClient
to initialize the query functionality.However, the static analysis hints indicate that the added lines (113-116 and 118-123) are not covered by tests.
Please ensure that adequate test coverage is added for the
NewTxClient
function. You can use the following script to check the test coverage:If you need any help in adding the missing tests for
NewTxClient
, feel free to let me know. I'd be happy to assist you in writing the test cases to improve the code coverage.Tools
GitHub Check: codecov/patch
[warning] 113-116: dataverse/client.go#L113-L116
Added lines #L113 - L116 were not covered by tests
[warning] 118-123: dataverse/client.go#L118-L123
Added lines #L118 - L123 were not covered by tests
Line range hint
48-84
: The changes to thequeryClient
andNewQueryClient
look good, but test coverage is missing.The addition of the
contractAddr
field to thequeryClient
struct and the renaming ofNewClient
toNewQueryClient
are appropriate changes.However, the static analysis hints indicate that some of the added lines (77 and 80) are not covered by tests.
Please ensure that adequate test coverage is added for the modified
NewQueryClient
function. You can use the following script to check the test coverage:Verification successful
Test Coverage for
NewQueryClient
VerifiedThe
NewQueryClient
function is covered by tests in thedataverse/client_test.go
file. The tests verify both successful client creation and error handling, ensuring that the function's behavior is adequately tested.
dataverse/client_test.go
: Contains tests forNewQueryClient
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check test coverage for the `NewQueryClient` function. # Test: Run tests with coverage and generate a coverage report. go test -coverprofile=coverage.out ./dataverse # Test: Check if lines 77 and 80 are covered. Expect: Both lines are covered. go tool cover -func=coverage.out | grep -E 'client.go:(77|80)'Length of output: 253
Script:
#!/bin/bash # Find all Go test files in the repository. fd --extension go --glob '*_test.go' # Search for references to `NewQueryClient` in the test files. rg 'NewQueryClient' --glob '*_test.go' -A 5Length of output: 938
credential/generate_test.go (4)
67-67
: LGTM!The change in the mocking strategy from
MockSigner
toMockKeyring
is appropriate for accommodating the new key management functionality. The change is localized to the test file and does not affect the production code.
70-70
: LGTM!The addition of the expectation for the
DIDKeyID()
method enhances the test's accuracy in reflecting the expected behavior of the credential generation process. The expected DID key ID matches the format used in the assertions later in the test.
76-76
: LGTM!The addition of the
WithSigner
option when creating the credential generator enhances the testability of the credential generation process by allowing the signer to be mocked. This change is consistent with the overall modifications in the test to use a mock keyring for signing credentials.
85-85
: LGTM!The update to the assertion for the
verificationMethod
in the generated credential's proof is consistent with the change in the expected DID key ID format returned by the mock signer. The assertion now accurately verifies that the generated credential's proof contains the correctverificationMethod
based on the DID key ID, enhancing the test's accuracy in validating the generated credential's proof.tx/client_test.go (1)
19-116
: LGTM!The test function is well-structured and covers different scenarios. It uses the
gomock
library to mock the dependencies, thegoconvey
library to write the test assertions, and thetestutil
package to create the mocks. The test function also uses thecontext
package to pass the context to theSendTx
method, thetesting
package to run the test, thefmt
package to create the error messages, and thegithub.com/cosmos/cosmos-sdk
packages to create the test data. Overall, the test function follows the best practices and is a good addition to the codebase.Makefile (5)
80-80
: LGTM!The command for generating mocks for
dataverse/client.go
follows the established pattern and conventions. It specifies the source file, mock name, package, and destination file correctly.
85-85
: LGTM!The command for generating mocks for the
QueryClient
interface from thegithub.com/cosmos/cosmos-sdk/x/auth/types
package follows the established pattern and conventions. It specifies the package, mock name, and destination file correctly.
86-86
: LGTM!The command for generating mocks for the
ServiceClient
interface from thegithub.com/cosmos/cosmos-sdk/types/tx
package follows the established pattern and conventions. It specifies the package, mock name, and destination file correctly.
88-89
: LGTM!The commands for generating mocks for
tx/transaction.go
andtx/client.go
follow the established pattern and conventions. They specify the source files, package, and destination files correctly. The mock name is also specified fortx/client.go
to provide a clear naming convention.
90-90
: LGTM!The command for generating mocks for
keys/keyring.go
follows the established pattern and conventions. It specifies the source file, package, and destination file correctly.testutil/dataverse_mocks.go (5)
6-6
: LGTM!The comment has been updated to reflect the new mock names used in the
mockgen
command.
20-34
: Looks good!The renaming of
MockClient
toMockQueryClient
and the associated types provides better clarity on the purpose of these mocks. The changes are consistent and improve the readability of the code.
Line range hint
39-55
: LGTM!The
EXPECT
method and theRecordCallWithMethodType
call have been correctly updated to use the newMockQueryClient
type.
88-122
: Excellent addition!The new
MockDataverseTxClient
correctly mocks theTxClient
interface and provides a way to simulate theSubmitClaims
method in tests. The implementation is consistent with the existing mocks and follows the expected pattern.
16-16
: Good catch!The import statement for the
verifiable
package is required for theSubmitClaims
method inMockDataverseTxClient
. Thanks for adding it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful! Let's go with this and improve it depending on our needs, this design already cover most of them I guess :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's good! Thanks 👍
🔐 Send
SubmitClaims
TransactionThis PR adds a new feature allowing the sending of the SubmitClaims execute message on the chain. It takes a signed credential, converts it to n-quad RDF, and encodes it in
base64
to be sent to the dataverse smart contract.💳 Transaction Service
To achieve this, a new client has been added to handle sending transactions on the Cosmos blockchain:
tx.Client
. This client includes a transaction builder to simplify the preparation of sending a transaction.While there is room for improvement to make transaction sending easier and more powerful, the current implementation provides a good starting point. Potential improvements include:
TxConfig
in a more appropriate place.🔑 Keyring
This PR also improves key and mnemonic management by using an interface for the
Keys
provided to the proxy or the credential generator. This change facilitates usage in a mocked environment and lays the groundwork for future improvements, such as supporting alternatives to mnemonics.