Skip to content

Create API Client Method to Request Trustline XDR #397

Description

@codeZe-us

Before a user can receive or save USDC, a sponsored USDC trustline transaction must be requested from the backend. The client needs an API method to call this endpoint and retrieve the unsigned trustline activation XDR.

Implementation guidelines:

  • Add a repository method requestTrustlineXdr(String accountId) inside SavingsRepository.
  • Send a POST request to /api/savings/trustline with the account public key.
  • Return the unsigned transaction envelope XDR string to the caller for signing.

Files location: savings_repository.dart

Expected result: The repository retrieves the unsigned trustline transaction XDR from the server API, enabling the wallet UI to initiate local signing.

Join the contributor Telegram group and ask any questions: https://t.me/+8mSQnieRmIM1Yjc0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions