/**
 * An Invoice is used to know whether a transaction or a tx succeeded or
 * failed.
 */ export class Invoice { param data returns public static fromJSON ( data ) { const { success , error } = data ; return new Invoice ( success , error ) ; } public readonly success : boolean ; public readonly error ? : { type : string ; content ? : any ; } ; param success param error . type param error . content constructor ( success , error ? ) { this . success = ! ! success ; this . error = error ; } returns public toJSON ( ) { const { success , error } = this ; return { success , error } ; } }