Skip to main content
Create and manage blockchain wallets for profiles and organizations. Wallets are associated with specific blockchain networks.

Methods

createWallet()

Create a new wallet for a profile. Signature:
createWallet(
  request: CreateWalletRequest,
  requestOptions?: RequestOptions
): Promise<CreateWalletResponse>
Parameters:
ParameterTypeRequiredDescription
request.referencestringYesProfile reference
request.network'BTC' | 'tBTC' | 'ETH' | 'tETH'YesBlockchain network
Example:
const wallet = await client.wallets.createWallet({
  reference: 'user-123',
  network: 'ETH'
});

console.log('Wallet ID:', wallet.data.id);
console.log('Network:', wallet.data.network);

getWalletsByProfile()

Get all wallets for a specific profile. Signature:
getWalletsByProfile(
  request: GetWalletsByProfileRequest,
  requestOptions?: RequestOptions
): Promise<WalletsResponse>
Parameters:
ParameterTypeRequiredDescription
request.referencestringYesProfile reference
request.skipnumberNoNumber of records to skip
request.takenumberNoNumber of records to retrieve
Example:
const wallets = await client.wallets.getWalletsByProfile({
  reference: 'user-123',
  skip: 0,
  take: 50
});

console.log('Profile wallets:', wallets.data);

getWalletsForOrganization()

Get all wallets for the organization. Signature:
getWalletsForOrganization(
  request: GetWalletsForOrganizationRequest,
  requestOptions?: RequestOptions
): Promise<WalletsResponse>
Parameters:
ParameterTypeRequiredDescription
request.network'BTC' | 'tBTC' | 'ETH' | 'tETH'NoFilter by network
request.skipnumberNoNumber of records to skip
request.takenumberNoNumber of records to retrieve
Example:
// Get all ETH wallets
const wallets = await client.wallets.getWalletsForOrganization({
  network: 'ETH',
  skip: 0,
  take: 100
});

console.log('Organization wallets:', wallets.data);
Note: When using createAddressV2(), wallets are automatically created if they don’t exist, so you may not need to explicitly create wallets in most cases.

Complete Example

import { OumlaSdkApiClient, OumlaSdkApiEnvironment } from '@oumla/sdk';

const client = new OumlaSdkApiClient({
  environment: OumlaSdkApiEnvironment.Sandbox,
  apiKey: 'your-api-key'
});

async function manageWallets() {
  // Create a wallet
  const wallet = await client.wallets.createWallet({
    reference: 'user-123',
    network: 'ETH'
  });
  
  console.log('Created wallet:', wallet.data.id);
  
  // Get all wallets for a profile
  const profileWallets = await client.wallets.getWalletsByProfile({
    reference: 'user-123'
  });
  
  console.log('Profile has', profileWallets.data.length, 'wallets');
  
  // Get all organization wallets
  const orgWallets = await client.wallets.getWalletsForOrganization({
    network: 'ETH'
  });
  
  console.log('Organization has', orgWallets.data.length, 'ETH wallets');
}