import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.webhooks.create({
eventType: "address_activity",
url: "https://sophisticated-exterior.org/",
chainId: "<id>",
metadata: {
eventSignatures: [
"0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64",
],
addresses: [
"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
],
},
});
console.log(result);
}
run();{
"id": "<string>",
"url": "<string>",
"chainId": "<string>",
"status": "active",
"createdAt": 123,
"name": "<string>",
"description": "<string>",
"eventType": "address_activity",
"metadata": {
"addresses": [
"<string>"
],
"eventSignatures": [
"<string>"
]
},
"includeInternalTxs": true,
"includeLogs": true
}Create a new webhook.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.webhooks.create({
eventType: "address_activity",
url: "https://sophisticated-exterior.org/",
chainId: "<id>",
metadata: {
eventSignatures: [
"0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64",
],
addresses: [
"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
],
},
});
console.log(result);
}
run();{
"id": "<string>",
"url": "<string>",
"chainId": "<string>",
"status": "active",
"createdAt": 123,
"name": "<string>",
"description": "<string>",
"eventType": "address_activity",
"metadata": {
"addresses": [
"<string>"
],
"eventSignatures": [
"<string>"
]
},
"includeInternalTxs": true,
"includeLogs": true
}Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
address_activity Show child attributes
Whether to include traces in the webhook payload. Traces are only available for C-Chain on chainId 43113 and 43114.
Whether to include logs in the webhook payload.
Successful response
active, inactive address_activity Show child attributes
Whether to include traces in the webhook payload.
Whether to include logs in the webhook payload.
Was this page helpful?