---
title: "init(insertionHandler:)"
framework: cryptotokenkit
role: symbol
role_heading: Initializer
path: "cryptotokenkit/tktokenwatcher/init(insertionhandler:)"
---

# init(insertionHandler:)

Initializes a token watcher with the specified insertion handler.

## Declaration

```swift
init(insertionHandler: @escaping (String) -> Void)
```

## Parameters

- `insertionHandler`: A block to be called each time a token is added. This block takes a single argument:

## Return Value

Return Value A new token watcher object.

## Discussion

Discussion This is the designated initializer.

## See Also

### Creating Token Watchers

- [init()](cryptotokenkit/tktokenwatcher/init().md)
