Skip to content

add stellar client #15

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

Merged
merged 76 commits into from
Aug 21, 2024
Merged

add stellar client #15

merged 76 commits into from
Aug 21, 2024

Conversation

AlaaElattar
Copy link
Contributor

No description provided.

Copy link
Contributor

@AhmedHanafy725 AhmedHanafy725 left a comment

Choose a reason for hiding this comment

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

The current implementation combines a service and a client. Part of it asks for the keypair to use for sending a transaction and the other part uses the loaded one. I believe we should load the account on the constructor, then we can use the loaded account to activate the account, send transactions, get balance, list transactions, ... and so on.
For creating an account, it can be a factory constructor that generates a keypair and returns a client instance.

  // create new account
  factory Client.create(network) {
    final keyPair = KeyPair.random();
    return Client(network, keyPair.secretSeed);
  }

@AlaaElattar AlaaElattar marked this pull request as draft August 19, 2024 09:05
@AlaaElattar AlaaElattar marked this pull request as ready for review August 20, 2024 06:04
@AlaaElattar AlaaElattar marked this pull request as draft August 20, 2024 06:04
@AlaaElattar AlaaElattar marked this pull request as ready for review August 20, 2024 07:34
Copy link
Contributor

@AhmedHanafy725 AhmedHanafy725 left a comment

Choose a reason for hiding this comment

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

please make sure that the helper methods are private

return transaction;
}

Future<void> submitFundedTransaction(Transaction fundedTransaction) async {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it sending a funded transaction or funding the transaction and sending it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Funds and signs a TFT transaction.


Create new testnet account:

- If no mnemonic provided, it will be created by the client.
Copy link
Contributor

Choose a reason for hiding this comment

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

it depends on which method is called

@AlaaElattar AlaaElattar merged commit 078fae5 into main Aug 21, 2024
2 checks passed
@AlaaElattar AlaaElattar deleted the main_stellar_wallet branch August 21, 2024 12:41
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.

2 participants