UNPKG

opnet

Version:

The perfect library for building Bitcoin-based applications.

17 lines (16 loc) 401 B
import { NetEvent } from '@btc-vision/transaction'; export class OPNetEvent extends NetEvent { type; data; properties = {}; values = []; constructor(type, data) { super(type, data); this.type = type; this.data = data; } setDecoded(decoded) { this.properties = Object.freeze(decoded.obj); this.values.push(...decoded.values); } }