UNPKG

@wasserstoff/tribes-sdk

Version:

SDK for integrating with Tribes by Astrix platform on any EVM compatible chain

39 lines (38 loc) 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPostCreatedEvent = isPostCreatedEvent; exports.isBatchPostsCreatedEvent = isBatchPostsCreatedEvent; exports.isEncryptedPostCreatedEvent = isEncryptedPostCreatedEvent; exports.isSignatureGatedPostCreatedEvent = isSignatureGatedPostCreatedEvent; exports.isPostInteractionEvent = isPostInteractionEvent; const ethers_1 = require("ethers"); /** * Type guard for checking post created events */ function isPostCreatedEvent(log) { return log instanceof ethers_1.ethers.EventLog && log.eventName === "PostCreated"; } /** * Type guard for checking batch posts created events */ function isBatchPostsCreatedEvent(log) { return log instanceof ethers_1.ethers.EventLog && log.eventName === "BatchPostsCreated"; } /** * Type guard for checking encrypted post created events */ function isEncryptedPostCreatedEvent(log) { return log instanceof ethers_1.ethers.EventLog && log.eventName === "EncryptedPostCreated"; } /** * Type guard for checking signature gated post created events */ function isSignatureGatedPostCreatedEvent(log) { return log instanceof ethers_1.ethers.EventLog && log.eventName === "SignatureGatedPostCreated"; } /** * Type guard for checking post interaction events */ function isPostInteractionEvent(log) { return log instanceof ethers_1.ethers.EventLog && log.eventName === "PostInteraction"; }