Skip to content
GitHub

Get wallet address information

The Get Wallet Address API lets you get the public information for a wallet address.

A client must verify the validity of a wallet address and get the URL of the wallet’s authorization server before requesting a grant from the server.

The code snippets below let a client verify a wallet address, get the basic information required to construct a new transaction, and discover the auth server’s URL.

We recommend creating a wallet account on the test wallet. Creating an account allows you to test your client against the Open Payments APIs by using an ILP-enabled wallet funded with play money.

Retrieve public information for a wallet address

Section titled “Retrieve public information for a wallet address”
Unauthenticated client allowed
Prerequisites
// Import dependencies
import { createAuthenticatedClient } from '@interledger/open-payments'
// Initialize client
const client = await createAuthenticatedClient({
walletAddressUrl: WALLET_ADDRESS,
privateKey: PRIVATE_KEY_PATH,
keyId: KEY_ID
})
// Get wallet address
const walletAddress = await client.walletAddress.get({
url: WALLET_ADDRESS
})
// Output
console.log('WALLET ADDRESS:', walletAddress)

For TypeScript, run tsx path/to/directory/index.ts. View full TS source

For JavaScript, run node path/to/directory/index.js. View full JS source