UNPKG

lightningdevkit

Version:
53 lines (52 loc) 2.03 kB
import { Result_DNSResolverContextDecodeErrorZ } from '../structs/Result_DNSResolverContextDecodeErrorZ.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * Contains a simple nonce for use in a blinded path's context. * * Such a context is required when receiving a [`DNSSECProof`] message. * * [`DNSSECProof`]: crate::onion_message::dns_resolution::DNSSECProof */ export declare class DNSResolverContext extends CommonBase { /** * A nonce which uniquely describes a DNS resolution. * * When we receive a DNSSEC proof message, we should check that it was sent over the blinded * path we included in the request by comparing a stored nonce with this one. */ get_nonce(): Uint8Array; /** * A nonce which uniquely describes a DNS resolution. * * When we receive a DNSSEC proof message, we should check that it was sent over the blinded * path we included in the request by comparing a stored nonce with this one. */ set_nonce(val: Uint8Array): void; /** * Constructs a new DNSResolverContext given each field */ static constructor_new(nonce_arg: Uint8Array): DNSResolverContext; clone_ptr(): bigint; /** * Creates a copy of the DNSResolverContext */ clone(): DNSResolverContext; /** * Generates a non-cryptographic 64-bit hash of the DNSResolverContext. */ hash(): bigint; /** * Checks if two DNSResolverContexts 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: DNSResolverContext): boolean; /** * Serialize the DNSResolverContext object into a byte array which can be read by DNSResolverContext_read */ write(): Uint8Array; /** * Read a DNSResolverContext from a byte array, created by DNSResolverContext_write */ static constructor_read(ser: Uint8Array): Result_DNSResolverContextDecodeErrorZ; }