Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

createAddresses

Creates detailed address information from coin data by enriching coin objects with coin type details.


Usage

import { createAddresses } from '@justaname.id/sdk'

const addresses = createAddresses([
  { id: 60, name: 'ETH', value: '0x1234567890abcdef...' },
  { id: 0, name: 'BTC', value: '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa' }
])

Returns

CoinAndDetails[] - An array of objects containing:

  • id: The coin type identifier (number)

  • name: The original name from the coin object

  • value: The cryptocurrency address

  • coin: The full name of the cryptocurrency

  • symbol: The symbol of the cryptocurrency

  • coinType: The coin type as a string

Parameters

  • coins: Coin[] - Array of coin objects with id, name, and value

Defined in

packages/@justaname.id/sdk/src/lib/utils/sanitizeRecords/index.ts:42

Last updated