Last active
February 28, 2022 12:56
-
-
Save evanVtatum/185531bda16cc1da740acd3ef73b45a4 to your computer and use it in GitHub Desktop.
Create subscription to Solana address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createNewSubscription, CreateSubscription, SubscriptionType } from '@tatumio/tatum' | |
export const createAddressNotificationTransactionSubscription = async () => { | |
const data: CreateSubscription = { | |
"type": SubscriptionType.ADDRESS_TRANSACTION, | |
"attr": { | |
"address": "FykfMwA9WNShzPJbbb9DNXsfgDgS3XZzWiFgrVXfWoPJ", | |
"chain": "SOL", | |
"url": "https://webhook.site/d7eb36b5-a6ed-458a-b3be-836a6b7f0918" | |
} | |
} | |
return await createNewSubscription(data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment