<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoTokenKit",
  "identifier" : "/documentation/CryptoTokenKit/TKTokenWatcher",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CryptoTokenKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TKTokenWatcher"
  },
  "title" : "TKTokenWatcher"
}
-->

# TKTokenWatcher

An object that tracks the tokens available in the system.

```
class TKTokenWatcher
```

## Overview

Create a token watcher and register an insertion handler to be notified when tokens are added to the system. You can also add removal handlers for specific tokens to be notified when those tokens are removed from the system.

## Topics

### Creating Token Watchers

[`-  init`](/documentation/CryptoTokenKit/TKTokenWatcher/init())

Initializes a token watcher.

[`-  initWithInsertionHandler:`](/documentation/CryptoTokenKit/TKTokenWatcher/init(insertionHandler:))

Initializes a token watcher with the specified insertion handler.

### Accessing Token Identifiers

[`tokenIDs`](/documentation/CryptoTokenKit/TKTokenWatcher/tokenIDs)

The token IDs currently available in the system.

### Configuring Handlers

[`-  addRemovalHandler:forTokenID:`](/documentation/CryptoTokenKit/TKTokenWatcher/addRemovalHandler(_:forTokenID:))

Adds a removal handler for the specified token ID.

[`-  setInsertionHandler:`](/documentation/CryptoTokenKit/TKTokenWatcher/setInsertionHandler(_:))

Sets an insertion handler closure to be called when a new token is inserted into the system.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)