✅ Hedera Token Service Associate Transaction

associate()

To use the Hedera Token Service, you need to associate your wallet with the token. This requires going through an association process.

You can perform the association by using the face.hedera.associate function.

YOUR_TOKEN_ID is used in a format like '0.0.435351'.

The implementation is based on the content of Document https://docs.hedera.com/hedera/sdks-and-apis/sdks/token-service/associate-tokens-to-an-account, and for more detailed information about Hedera, please refer to that document.

import { Face, Network } from '@haechi-labs/face-sdk';

const face = new Face({
  network: Network.HEDERA, 
  apiKey: 'YOUR_DAPP_API_KEY'
});
const success = await face.hedera.associate('YOUR_TOKEN_ID');