# Configuration

This package does not have constructor options or runtime configuration. This page shows how to install `@tetherto/wdk-utils`, import the helpers you need, and understand the published runtime surface.

## Install the package

You can install `@tetherto/wdk-utils` from npm:

{% code title="Install @tetherto/wdk-utils" lineNumbers="true" %}

```bash
npm install @tetherto/wdk-utils
```

{% endcode %}

## Import address validation helpers

You can import only the validators your flow needs from the package entrypoint:

{% code title="Import Address Validators" lineNumbers="true" %}

```javascript
import {
  validateBitcoinAddress,
  validateEVMAddress,
  validateLightningInvoice,
  decodeLightningInvoice,
  validateLnurl,
  decodeLnurl,
  validateLightningAddress,
  validateSparkAddress,
  validateTronAddress,
  validateUmaAddress,
  resolveUmaUsername
} from '@tetherto/wdk-utils'
```

{% endcode %}

## Import EIP-681 helpers

You can detect and parse token transfer requests using the EIP-681 helpers:

{% code title="Import EIP-681 Helpers" lineNumbers="true" %}

```javascript
import {
  isEip681Request,
  parseEip681Request
} from '@tetherto/wdk-utils'
```

{% endcode %}

## Runtime notes

* `@tetherto/wdk-utils` exports plain functions. There is no client object to initialize.
* The package publishes a default module entrypoint through `index.js` and a bare runtime entrypoint through `bare.js`.
* `decodeLightningInvoice()` returns decoded BOLT11 invoice data, and `decodeLnurl()` returns the decoded URL string when parsing succeeds.
* `parseEip681Request()` currently supports transfer requests for the schemes implemented in the published runtime: `ethereum`, `pol`, `matic`, `polygon`, `arbitrum`, and `plasma`.
* `parseEip681Request()` accepts both `uint256` and `value` query parameters for the amount field and normalizes the parsed amount into `amountSmallest`.

## Examples

You can validate common wallet inputs before handing them to a module:

{% code title="Validate Common Inputs" lineNumbers="true" %}

```javascript
import {
  validateBitcoinAddress,
  validateLightningAddress,
  validateTronAddress,
  validateUmaAddress
} from '@tetherto/wdk-utils'

const btc = validateBitcoinAddress('bc1qu9yqnhc6wjj6s62s9x0shnl5l2r7gq5cudm94r7mvwv0uw4s7acq0hn9g6')
const lightning = validateLightningAddress('sprycomfort92@waletofsatoshi.com')
const tron = validateTronAddress('TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH')
const uma = validateUmaAddress('$you@uma.money')
```

{% endcode %}

You can parse a request-shaped EIP-681 transfer string into structured data:

{% code title="Parse An EIP-681 Transfer Request" lineNumbers="true" %}

```javascript
import { parseEip681Request } from '@tetherto/wdk-utils'

const request = parseEip681Request(
  'pol:0xc2132D05D31c914a87C6611C10748AEb04B58e8F@137/transfer?address=0xA9e338082A061d657014c08e652D96B38639F22a&uint256=0.175309000e6'
)
```

{% endcode %}

***

## Need Help?

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-discord">:discord:</i></td><td><strong>Discord Community</strong></td><td>Connect with developers, ask questions, share your projects</td><td><a href="https://discord.gg/arYXDhHB2w" class="button primary">Join Community</a></td><td><a href="https://discord.gg/arYXDhHB2w">https://discord.gg/arYXDhHB2w</a></td></tr><tr><td><i class="fa-github">:github:</i></td><td><strong>GitHub Issues</strong></td><td>Report bugs, request features, and get technical help</td><td><a href="https://github.com/tetherto/wdk-core" class="button secondary">Open an Issue</a></td><td><a href="https://github.com/tetherto/wdk-core">https://github.com/tetherto/wdk-core</a></td></tr><tr><td><i class="fa-envelope">:envelope:</i></td><td><strong>Email Contact</strong></td><td>For sensitive or private matters, contact our team directly</td><td><a href="mailto:wallet-info.tether.io" class="button secondary">Send an email</a></td><td><a href="mailto:wallet-info.tether.io">mailto:wallet-info.tether.io</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wdk.tether.io/tools/wdk-utils/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
