# 카이아 토큰 알림 및 메신저 기능

**URL:** <https://devforum.kaia.io/t/topic/7349>\
**Category:** Kaia\
**Created:** [8월 28, 2024, 6:06오전 UTC](https://devforum.kaia.io/t/topic/7349 "2024-08-28T06:06:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiseok\_CIC](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/kiseok_cic/32/3511_2.png) [@kiseok\_CIC](https://devforum.kaia.io/u/kiseok_CIC)\
**Post date:** [8월 28, 2024, 6:06오전 UTC](https://devforum.kaia.io/t/topic/7349/1 "2024-08-28T06:06:21Z")

</div>

저희 회사에선 자신의 주소로 KAIA 토큰을 받았을 때 알람을 받는 기능을 활용한 서비스를 제공할 수 있는가에 대해 논의하고 있습니다.

> **[Dive into Kaia  | Klaytn Foundation](https://klaytn.foundation/kr/dive-into-kaia/)**
>
> Fincshia 재단과 Klaytn 재단의 통합 메인넷 Kaia 출범이 임박한 가운데, Kaia가 어떤 변화와 차별점으로 블록체인 산업에 새로운 장을 열 지 기대를 모으고 있습니다. 이번 인터뷰에서는 현 Klaytn 재단의 개발 리드 Aidan의 이야기를 담았습니다. Aidan은 201

클레이튼 제단 홈페이지에 관련된 글을 포스팅 해주셨는데 관련기능이 가능하려면 어느정도에 시간이 필요한지  
궁금합니다.

또한 해당 글과 관련하여 참고할 다른 정보가 있으면 공유 부탁드립니다.

---

<div class="post-metadata">

**Author:** ![ollie\_j](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/ollie_j/32/3523_2.png) [@ollie\_j](https://devforum.kaia.io/u/ollie_j)\
**Post date:** [9월 6, 2024, 3:06오전 UTC](https://devforum.kaia.io/t/topic/7349/2 "2024-09-06T03:06:51Z")

</div>

안녕하세요, KAIA 토큰 전송시 알림을 받는 기능은 현재 Tatum사의 Notification 서비스를 통해 구현하실 수 있습니다. [Instant Blockchain Notications - Tatum](https://tatum.io/notification) 클레이튼을 지원하고 있으며 사용자가 지정한 이벤트에 대해 webhook 등을 연동하실 수 있습니다.

아래는 Tatum webhook을 받아서 슬랙 봇에게 전달하는 Node.js 예제입니다. AWS Lambda 등을 활용하시면 서버리스 방식으로도 운영하실수 있습니다.

```js

export const handler = async (event) => {

  console.log("Received", event);
  let msg;
  if (event.body) {
    msg = JSON.parse(event.body);
  } else {
    msg = event;
  }
  /*
  {
  	"currency": "KLAY",
  	"chain": "klaytn-baobab",
  	"txId": "0x...",
  	"blockNumber": 3192029,
  	"subscriptionType": "OUTGOING_NATIVE_TX",
  	"mempool": false,
  	"address": "0x...",
  	"counterAddress": "0x...",
  	"test": true,
  	"amount": "0.000241500000147"
  } 
  */

  const explorerUrl = EXPLORER_URLS[msg.chain].replace(/\/+$/, "");
  const message = `
[${msg.subscriptionType}] ${msg.amount} ${msg.currency}
- From ${explorerUrl}/address/${msg.address}
- To ${explorerUrl}/address/${msg.counterAddress}
- Block ${explorerUrl}/block/${msg.blockNumber}
- Tx ${explorerUrl}/tx/${explorerUrl}`;

  const transformedBody = {
    text: message,
  };

  try {
    const res = await fetch(SLACK_WEBHOOK, {
      method: "post",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(transformedBody),
    })
    return {
      text: message,
      status: res.status
    };
  }
  catch (e) {
    console.error(e);
    return 500;
  }
};

```

그 외에는 eth\_subscribe RPC ([eth\_subscribe](https://docs.alchemy.com/reference/eth-subscribe)) 를 이용해 온체인 이벤트를 웹소켓으로 받아서 직접 필터링하는 방법이 있겠습니다.

링크해주신 블로그 글에서 언급된 플러그인 기능 등은 현재 초기 연구개발 단계에 있음을 알려드립니다.
