UNPKG

lightningdevkit

Version:
62 lines 2.09 kB
import { CommonBase } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs'; /** * A message which is sent in response to [`DNSSECQuery`] containing a DNSSEC proof. */ export class DNSSECProof extends CommonBase { /* @internal */ constructor(_dummy, ptr) { super(ptr, bindings.DNSSECProof_free); } /** * An [RFC 9102 DNSSEC AuthenticationChain] providing a DNSSEC proof. * * [RFC 9102 DNSSEC AuthenticationChain]: https://www.rfc-editor.org/rfc/rfc9102.html#name-dnssec-authentication-chain * * Returns a copy of the field. */ get_proof() { const ret = bindings.DNSSECProof_get_proof(this.ptr); const ret_conv = bindings.decodeUint8Array(ret); return ret_conv; } /** * An [RFC 9102 DNSSEC AuthenticationChain] providing a DNSSEC proof. * * [RFC 9102 DNSSEC AuthenticationChain]: https://www.rfc-editor.org/rfc/rfc9102.html#name-dnssec-authentication-chain */ set_proof(val) { bindings.DNSSECProof_set_proof(this.ptr, bindings.encodeUint8Array(val)); } clone_ptr() { const ret = bindings.DNSSECProof_clone_ptr(this.ptr); return ret; } /** * Creates a copy of the DNSSECProof */ clone() { const ret = bindings.DNSSECProof_clone(this.ptr); const ret_hu_conv = new DNSSECProof(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * Generates a non-cryptographic 64-bit hash of the DNSSECProof. */ hash() { const ret = bindings.DNSSECProof_hash(this.ptr); return ret; } /** * Checks if two DNSSECProofs contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ eq(b) { const ret = bindings.DNSSECProof_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } } //# sourceMappingURL=DNSSECProof.mjs.map