Skip to content

Instantly share code, notes, and snippets.

@evanVtatum
Last active February 28, 2022 12:56
Show Gist options
  • Save evanVtatum/185531bda16cc1da740acd3ef73b45a4 to your computer and use it in GitHub Desktop.
Save evanVtatum/185531bda16cc1da740acd3ef73b45a4 to your computer and use it in GitHub Desktop.
Create subscription to Solana address
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