> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# parse

> Parse ERC-681 transaction URL

## `parse(url: string): ParsedTransactionUrl`

Parses ERC-681 formatted transaction URL into structured components.

**Parameters:**

* `url: string` - ERC-681 formatted URL

**Returns:** `ParsedTransactionUrl` - Parsed URL components

**Throws:**

* `InvalidTransactionUrlError` - If URL is malformed

**Example:**

```typescript theme={null}
import { parse } from '@tevm/voltaire/TransactionUrl';

// ETH transfer
const parsed1 = parse('ethereum:0x1234@1?value=1000000000000000000');
console.log(parsed1);
// {
//   target: AddressType,
//   chainId: 1n,
//   value: 1000000000000000000n
// }

// Contract call
const parsed2 = parse('ethereum:0xToken@1/transfer?address=0x5678&uint256=100');
console.log(parsed2);
// {
//   target: AddressType,
//   chainId: 1n,
//   functionName: 'transfer',
//   functionParams: { address: '0x5678', uint256: '100' }
// }
```

**Defined in:** [src/primitives/TransactionUrl/parse.js](https://github.com/evmts/voltaire/blob/main/src/primitives/TransactionUrl/parse.js)

## See Also

* [format](/primitives/transactionurl/format)
* [ERC-681 Specification](https://eips.ethereum.org/EIPS/eip-681)
