- NodeJS
- NodeJS (server-auth)
- Java
- REST API
- Rust
To get a wallet by ID, use the
get method on the wallets() interface of the Privy client.Usage
Report incorrect code
Copy
Ask AI
const wallet = await privy.wallets().get(walletId);
Parameters and Returns
Check out the API reference for more details.The
@privy-io/server-auth library is deprecated. We recommend integrating @privy-io/node for
the latest features and support.getWallet method.Report incorrect code
Copy
Ask AI
getWallet: ({id}: {id: string}) => Promise<WalletApiWalletResponseType>
Usage
Report incorrect code
Copy
Ask AI
const wallet = await client.walletApi.getWallet({id: walletId});
Parameters
The ID of the wallet to get
Returns
Hide child attributes
Hide child attributes
Unique ID of the wallet
Address of the wallet
Chain type of the wallet
List of policy IDs associated with the wallet
The key quorum ID of the owner of the wallet.
The key quorum IDs of the additional signers for the wallet.
The creation date of the wallet
To get a wallet by ID, use the
retrieve method.Report incorrect code
Copy
Ask AI
try {
WalletRetrieveResponse response = privyClient.wallets().retrieve(walletId);
if (response.wallet().isPresent()) {
Wallet wallet = response.wallet().get();
}
} catch (APIException e) {
String errorBody = e.bodyAsString();
System.err.println(errorBody);
} catch (Exception e) {
System.err.println(e.getMessage());
}
Parameters
The ID of the wallet to retrieve
Returns
TheWalletRetrieveResponse object contains an optional wallet() field, present if the
wallet was retrieved successfully.The retrieved
Wallet object.Hide child attributes
Hide child attributes
Unique ID of the created wallet. This will be the primary identifier when using the wallet in the future.
Address of the created wallet.
Chain type of the created wallet.
List of policy IDs for policies that are enforced on the wallet.
The key quorum ID of the owner of the wallet.
The key quorum IDs of the additional signers for the wallet.
The creation date of the wallet, in milliseconds since midnight, January 1, 1970 UTC.
To get a wallet by ID, make a
GET request to:Report incorrect code
Copy
Ask AI
https://api.privy.io/v1/wallets/[wallet-id]
Response
The wallet object
Hide child attributes
Hide child attributes
Unique ID of the wallet
Address of the wallet
Chain type of the wallet
List of policy IDs associated with the wallet
The key quorum ID of the owner of the wallet.
The key quorum IDs of the additional signers for the wallet.
The creation date of the wallet, in milliseconds since midnight, January 1, 1970 UTC.
To get a wallet by ID, use the
get method on the wallets() interface of the Privy client.Usage
Report incorrect code
Copy
Ask AI
use privy_rs::PrivyClient;
let client = PrivyClient::new(app_id, app_secret)?;
let wallet = client.wallets().get("wallet-id").await?;
println!("Retrieved wallet {} with address {}", wallet.id, wallet.address);

