Skip to content

Commit

Permalink
Merge pull request #252 from arda-org/username
Browse files Browse the repository at this point in the history
Add getAccountUsername
  • Loading branch information
lcswillems authored Feb 22, 2025
2 parents c6dfd6b + 19833dd commit a6b869e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xsuite/src/proxy/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,13 @@ export class Proxy {
return BigInt(res.balance);
}

async getAccountUsername(address: AddressLike) {
const res = await this.fetch(
`/address/${addressLikeToBech(address)}/username`,
);
return res.username as string;
}

async getAccountValue(address: AddressLike, key: BytesLike): Promise<string> {
const res = await this.fetch(
`/address/${addressLikeToBech(address)}/key/${bytesLikeToHex(key)}`,
Expand Down

0 comments on commit a6b869e

Please sign in to comment.