Skip to content

Instantly share code, notes, and snippets.

View KaffinPX's full-sized avatar

KaffinPX KaffinPX

  • World
View GitHub Profile
@KaffinPX
KaffinPX / listen.js
Created July 21, 2022 14:35
Kaspa transaction listener implementation in JS
const knownBlocks = new Map()
const knownTransactionsByBlock = {}
const waitingTransactions = {}
class extendedTransaction {
constructor(transaction) {
this.transaction = transaction
this.confirmations = 0
this.acceptingBlockHash = null