X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=ts%2Fstructs%2FQueryShortChannelIds.mts;h=b7ec2286337e412564bdb4a3af13c501fab4d925;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hp=45c165708034f6b5862f08a7301ad21907d24586;hpb=64bcaa6a2a2f05653c14b9cb8bb97ab2480eaaa5;p=ldk-java diff --git a/ts/structs/QueryShortChannelIds.mts b/ts/structs/QueryShortChannelIds.mts index 45c16570..b7ec2286 100644 --- a/ts/structs/QueryShortChannelIds.mts +++ b/ts/structs/QueryShortChannelIds.mts @@ -281,26 +281,48 @@ import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' +/** + * A query_short_channel_ids message is used to query a peer for + * routing gossip messages related to one or more short_channel_ids. + * The query recipient will reply with the latest, if available, + * channel_announcement, channel_update and node_announcement messages + * it maintains for the requested short_channel_ids followed by a + * reply_short_channel_ids_end message. The short_channel_ids sent in + * this query are encoded. We only support encoding_type=0 uncompressed + * serialization and do not support encoding_type=1 zlib serialization. + */ export class QueryShortChannelIds extends CommonBase { /* @internal */ public constructor(_dummy: object, ptr: number) { super(ptr, bindings.QueryShortChannelIds_free); } + /** + * The genesis hash of the blockchain being queried + */ public get_chain_hash(): Uint8Array { const ret: number = bindings.QueryShortChannelIds_get_chain_hash(this.ptr); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } + /** + * The genesis hash of the blockchain being queried + */ public set_chain_hash(val: Uint8Array): void { bindings.QueryShortChannelIds_set_chain_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32))); } + /** + * The short_channel_ids that are being queried + */ public set_short_channel_ids(val: bigint[]): void { bindings.QueryShortChannelIds_set_short_channel_ids(this.ptr, bindings.encodeUint64Array(val)); } + /** + * Constructs a new QueryShortChannelIds given each field + */ public static constructor_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: bigint[]): QueryShortChannelIds { const ret: number = bindings.QueryShortChannelIds_new(bindings.encodeUint8Array(bindings.check_arr_len(chain_hash_arg, 32)), bindings.encodeUint64Array(short_channel_ids_arg)); const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret); @@ -313,6 +335,9 @@ export class QueryShortChannelIds extends CommonBase { return ret; } + /** + * Creates a copy of the QueryShortChannelIds + */ public clone(): QueryShortChannelIds { const ret: number = bindings.QueryShortChannelIds_clone(this.ptr); const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret); @@ -320,12 +345,18 @@ export class QueryShortChannelIds extends CommonBase { return ret_hu_conv; } + /** + * Read a QueryShortChannelIds from a byte array, created by QueryShortChannelIds_write + */ public static constructor_read(ser: Uint8Array): Result_QueryShortChannelIdsDecodeErrorZ { const ret: number = bindings.QueryShortChannelIds_read(bindings.encodeUint8Array(ser)); const ret_hu_conv: Result_QueryShortChannelIdsDecodeErrorZ = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } + /** + * Serialize the QueryShortChannelIds object into a byte array which can be read by QueryShortChannelIds_read + */ public write(): Uint8Array { const ret: number = bindings.QueryShortChannelIds_write(this.ptr); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);