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

# Utilities

> Helper functions for proving key management and testing

## Proving Key Management

### prebuild\_proving\_key

Build and cache the Orchard proving key. Call at app startup to avoid delays during transaction construction.

```typescript theme={null}
if (!t2z.is_proving_key_ready()) {
  console.log('Building proving key...');
  t2z.prebuild_proving_key();
}
```

### is\_proving\_key\_ready

Check if the proving key is cached.

```typescript theme={null}
const ready = t2z.is_proving_key_ready();
// true if key is built, false otherwise
```

## Testing Utilities

### generate\_test\_address

Generate a random Orchard address for testing.

```typescript theme={null}
const address = t2z.generate_test_address('testnet');
// "utest1abc..."
```

<Warning>
  For testing only. Do not use for real funds.
</Warning>

### generate\_test\_keypair

Generate a random keypair for testing.

```typescript theme={null}
const keypair = t2z.generate_test_keypair('testnet');

// Returns:
// {
//   transparent_address: "tmAbc...",
//   pubkey: "03abc...",
//   privkey: "deadbeef...",
//   orchard_address: "utest1...",
//   orchard_fvk: "uviewtest1..."
// }
```

<Warning>
  For testing only. Do not use for real funds.
</Warning>

## Version

Get the library version.

```typescript theme={null}
const version = t2z.version();
// "0.1.0"
```

## Initialization (TypeScript/WASM only)

Initialize the WASM module for better error messages.

```typescript theme={null}
t2z.init();
```
