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

feat: Streamline key and alias specifications for AccountCreateTransaction #2210

Conversation

naydenovn
Copy link
Contributor

@naydenovn naydenovn commented Feb 3, 2025

Description:

This PR extends the AccountCreateTransaction with the following APIs:

  • setKeyWithAlias(ECDSAKey) - Sets ECDSA private key, derives and sets it's EVM address in the background.
  • setKeyWithAlias(Key, ECDSAKey) - Allows for setting the account key and a separate ECDSA private key that the EVM address should be derived from. A user must sign the transaction with both keys for this flow to be successful.
  • setKeyWithoutAlias(Key) - Explicitly calls out that the alias is not set.

🚨 Deprecation Notice:

  • setKey(Key) is now deprecated in favor of setKeyWithAlias and setKeyWithoutAlias.

Fixes : #2177

naydenovn and others added 28 commits January 20, 2025 15:15
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Naydenov <[email protected]>
…of-individual-transactions' into 2189-refactor-transaction-flows-to-allow-modifications-of-individual-transactions-fork
…-for-AccountCreateTransaction

# Conflicts:
#	examples/src/main/java/com/hedera/hashgraph/sdk/examples/AccountCreateWithAndWithoutAliasExample.java
#	examples/src/main/java/com/hedera/hashgraph/sdk/examples/CreateAccountWithAliasExample.java
#	sdk/src/test/java/org/hiero/sdk/AccountCreateTransactionTest.snap
#	sdk/src/testIntegration/java/com/hedera/hashgraph/sdk/test/integration/AccountCreateIntegrationTest.java
# Conflicts:
#	sdk/src/testIntegration/java/com/hedera/hashgraph/sdk/test/integration/TokenRejectFlowIntegrationTest.java
@naydenovn naydenovn requested a review from a team as a code owner February 3, 2025 12:28
Signed-off-by: Naydenov <[email protected]>
@0xivanov 0xivanov changed the title 2189 refactor transaction flows to allow modifications of individual transactions fork feat: Streamline key and alias specifications for AccountCreateTransaction Feb 3, 2025
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

Can you replace all calls to setKey with setKeyWithoutAlias?

Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

There is empty file sdk/src/test/java/org/hiero/sdk/AccountCreateTransactionTest.snap - should be removed

Signed-off-by: Naydenov <[email protected]>
…-allow-modifications-of-individual-transactions-fork' into 2189-refactor-transaction-flows-to-allow-modifications-of-individual-transactions-fork
Signed-off-by: Naydenov <[email protected]>
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

LGTM

@0xivanov 0xivanov merged commit 8063dcc into hiero-ledger:main Feb 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streamline key and alias specifications for AccountCreateTransaction
2 participants