// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" // @generated from file chainrpc/chainnotifier.proto (package chainrpc, syntax proto3) /* eslint-disable */ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file chainrpc/chainnotifier.proto. */ export const file_chainrpc_chainnotifier: GenFile = /*@__PURE__*/ fileDesc("ChxjaGFpbnJwYy9jaGFpbm5vdGlmaWVyLnByb3RvEghjaGFpbnJwYyJqCgtDb25mUmVxdWVzdBIMCgR0eGlkGAEgASgMEg4KBnNjcmlwdBgCIAEoDBIRCgludW1fY29uZnMYAyABKA0SEwoLaGVpZ2h0X2hpbnQYBCABKA0SFQoNaW5jbHVkZV9ibG9jaxgFIAEoCCJsCgtDb25mRGV0YWlscxIOCgZyYXdfdHgYASABKAwSEgoKYmxvY2tfaGFzaBgCIAEoDBIUCgxibG9ja19oZWlnaHQYAyABKA0SEAoIdHhfaW5kZXgYBCABKA0SEQoJcmF3X2Jsb2NrGAUgASgMIgcKBVJlb3JnIl0KCUNvbmZFdmVudBIlCgRjb25mGAEgASgLMhUuY2hhaW5ycGMuQ29uZkRldGFpbHNIABIgCgVyZW9yZxgCIAEoCzIPLmNoYWlucnBjLlJlb3JnSABCBwoFZXZlbnQiJwoIT3V0cG9pbnQSDAoEaGFzaBgBIAEoDBINCgVpbmRleBgCIAEoDSJZCgxTcGVuZFJlcXVlc3QSJAoIb3V0cG9pbnQYASABKAsyEi5jaGFpbnJwYy5PdXRwb2ludBIOCgZzY3JpcHQYAiABKAwSEwoLaGVpZ2h0X2hpbnQYAyABKA0ipwEKDFNwZW5kRGV0YWlscxItChFzcGVuZGluZ19vdXRwb2ludBgBIAEoCzISLmNoYWlucnBjLk91dHBvaW50EhcKD3Jhd19zcGVuZGluZ190eBgCIAEoDBIYChBzcGVuZGluZ190eF9oYXNoGAMgASgMEhwKFHNwZW5kaW5nX2lucHV0X2luZGV4GAQgASgNEhcKD3NwZW5kaW5nX2hlaWdodBgFIAEoDSJgCgpTcGVuZEV2ZW50EicKBXNwZW5kGAEgASgLMhYuY2hhaW5ycGMuU3BlbmREZXRhaWxzSAASIAoFcmVvcmcYAiABKAsyDy5jaGFpbnJwYy5SZW9yZ0gAQgcKBWV2ZW50IioKCkJsb2NrRXBvY2gSDAoEaGFzaBgBIAEoDBIOCgZoZWlnaHQYAiABKA0y5wEKDUNoYWluTm90aWZpZXISSQoZUmVnaXN0ZXJDb25maXJtYXRpb25zTnRmbhIVLmNoYWlucnBjLkNvbmZSZXF1ZXN0GhMuY2hhaW5ycGMuQ29uZkV2ZW50MAESQwoRUmVnaXN0ZXJTcGVuZE50Zm4SFi5jaGFpbnJwYy5TcGVuZFJlcXVlc3QaFC5jaGFpbnJwYy5TcGVuZEV2ZW50MAESRgoWUmVnaXN0ZXJCbG9ja0Vwb2NoTnRmbhIULmNoYWlucnBjLkJsb2NrRXBvY2gaFC5jaGFpbnJwYy5CbG9ja0Vwb2NoMAFCMFouZ2l0aHViLmNvbS9saWdodG5pbmduZXR3b3JrL2xuZC9sbnJwYy9jaGFpbnJwY2IGcHJvdG8z"); /** * @generated from message chainrpc.ConfRequest */ export type ConfRequest = Message<"chainrpc.ConfRequest"> & { /** * * The transaction hash for which we should request a confirmation notification * for. If set to a hash of all zeros, then the confirmation notification will * be requested for the script instead. * * @generated from field: bytes txid = 1; */ txid: Uint8Array; /** * * An output script within a transaction with the hash above which will be used * by light clients to match block filters. If the transaction hash is set to a * hash of all zeros, then a confirmation notification will be requested for * this script instead. * * @generated from field: bytes script = 2; */ script: Uint8Array; /** * * The number of desired confirmations the transaction/output script should * reach before dispatching a confirmation notification. * * @generated from field: uint32 num_confs = 3; */ numConfs: number; /** * * The earliest height in the chain for which the transaction/output script * could have been included in a block. This should in most cases be set to the * broadcast height of the transaction/output script. * * @generated from field: uint32 height_hint = 4; */ heightHint: number; /** * * If true, then the block that mines the specified txid/script will be * included in eventual the notification event. * * @generated from field: bool include_block = 5; */ includeBlock: boolean; }; /** * Describes the message chainrpc.ConfRequest. * Use `create(ConfRequestSchema)` to create a new message. */ export const ConfRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 0); /** * @generated from message chainrpc.ConfDetails */ export type ConfDetails = Message<"chainrpc.ConfDetails"> & { /** * The raw bytes of the confirmed transaction. * * @generated from field: bytes raw_tx = 1; */ rawTx: Uint8Array; /** * The hash of the block in which the confirmed transaction was included in. * * @generated from field: bytes block_hash = 2; */ blockHash: Uint8Array; /** * The height of the block in which the confirmed transaction was included * in. * * @generated from field: uint32 block_height = 3; */ blockHeight: number; /** * The index of the confirmed transaction within the block. * * @generated from field: uint32 tx_index = 4; */ txIndex: number; /** * * The raw bytes of the block that mined the transaction. Only included if * include_block was set in the request. * * @generated from field: bytes raw_block = 5; */ rawBlock: Uint8Array; }; /** * Describes the message chainrpc.ConfDetails. * Use `create(ConfDetailsSchema)` to create a new message. */ export const ConfDetailsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 1); /** * TODO(wilmer): need to know how the client will use this first. * * @generated from message chainrpc.Reorg */ export type Reorg = Message<"chainrpc.Reorg"> & { }; /** * Describes the message chainrpc.Reorg. * Use `create(ReorgSchema)` to create a new message. */ export const ReorgSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 2); /** * @generated from message chainrpc.ConfEvent */ export type ConfEvent = Message<"chainrpc.ConfEvent"> & { /** * @generated from oneof chainrpc.ConfEvent.event */ event: { /** * * An event that includes the confirmation details of the request * (txid/ouput script). * * @generated from field: chainrpc.ConfDetails conf = 1; */ value: ConfDetails; case: "conf"; } | { /** * * An event send when the transaction of the request is reorged out of the * chain. * * @generated from field: chainrpc.Reorg reorg = 2; */ value: Reorg; case: "reorg"; } | { case: undefined; value?: undefined }; }; /** * Describes the message chainrpc.ConfEvent. * Use `create(ConfEventSchema)` to create a new message. */ export const ConfEventSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 3); /** * @generated from message chainrpc.Outpoint */ export type Outpoint = Message<"chainrpc.Outpoint"> & { /** * The hash of the transaction. * * @generated from field: bytes hash = 1; */ hash: Uint8Array; /** * The index of the output within the transaction. * * @generated from field: uint32 index = 2; */ index: number; }; /** * Describes the message chainrpc.Outpoint. * Use `create(OutpointSchema)` to create a new message. */ export const OutpointSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 4); /** * @generated from message chainrpc.SpendRequest */ export type SpendRequest = Message<"chainrpc.SpendRequest"> & { /** * * The outpoint for which we should request a spend notification for. If set to * a zero outpoint, then the spend notification will be requested for the * script instead. A zero or nil outpoint is not supported for Taproot spends * because the output script cannot reliably be computed from the witness alone * and the spent output script is not always available in the rescan context. * So an outpoint must _always_ be specified when registering a spend * notification for a Taproot output. * * @generated from field: chainrpc.Outpoint outpoint = 1; */ outpoint?: Outpoint; /** * * The output script for the outpoint above. This will be used by light clients * to match block filters. If the outpoint is set to a zero outpoint, then a * spend notification will be requested for this script instead. * * @generated from field: bytes script = 2; */ script: Uint8Array; /** * * The earliest height in the chain for which the outpoint/output script could * have been spent. This should in most cases be set to the broadcast height of * the outpoint/output script. * * @generated from field: uint32 height_hint = 3; */ heightHint: number; }; /** * Describes the message chainrpc.SpendRequest. * Use `create(SpendRequestSchema)` to create a new message. */ export const SpendRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 5); /** * @generated from message chainrpc.SpendDetails */ export type SpendDetails = Message<"chainrpc.SpendDetails"> & { /** * The outpoint was that spent. * * @generated from field: chainrpc.Outpoint spending_outpoint = 1; */ spendingOutpoint?: Outpoint; /** * The raw bytes of the spending transaction. * * @generated from field: bytes raw_spending_tx = 2; */ rawSpendingTx: Uint8Array; /** * The hash of the spending transaction. * * @generated from field: bytes spending_tx_hash = 3; */ spendingTxHash: Uint8Array; /** * The input of the spending transaction that fulfilled the spend request. * * @generated from field: uint32 spending_input_index = 4; */ spendingInputIndex: number; /** * The height at which the spending transaction was included in a block. * * @generated from field: uint32 spending_height = 5; */ spendingHeight: number; }; /** * Describes the message chainrpc.SpendDetails. * Use `create(SpendDetailsSchema)` to create a new message. */ export const SpendDetailsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 6); /** * @generated from message chainrpc.SpendEvent */ export type SpendEvent = Message<"chainrpc.SpendEvent"> & { /** * @generated from oneof chainrpc.SpendEvent.event */ event: { /** * * An event that includes the details of the spending transaction of the * request (outpoint/output script). * * @generated from field: chainrpc.SpendDetails spend = 1; */ value: SpendDetails; case: "spend"; } | { /** * * An event sent when the spending transaction of the request was * reorged out of the chain. * * @generated from field: chainrpc.Reorg reorg = 2; */ value: Reorg; case: "reorg"; } | { case: undefined; value?: undefined }; }; /** * Describes the message chainrpc.SpendEvent. * Use `create(SpendEventSchema)` to create a new message. */ export const SpendEventSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 7); /** * @generated from message chainrpc.BlockEpoch */ export type BlockEpoch = Message<"chainrpc.BlockEpoch"> & { /** * The hash of the block. * * @generated from field: bytes hash = 1; */ hash: Uint8Array; /** * The height of the block. * * @generated from field: uint32 height = 2; */ height: number; }; /** * Describes the message chainrpc.BlockEpoch. * Use `create(BlockEpochSchema)` to create a new message. */ export const BlockEpochSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainnotifier, 8); /** * ChainNotifier is a service that can be used to get information about the * chain backend by registering notifiers for chain events. * * @generated from service chainrpc.ChainNotifier */ export const ChainNotifier: GenService<{ /** * * RegisterConfirmationsNtfn is a synchronous response-streaming RPC that * registers an intent for a client to be notified once a confirmation request * has reached its required number of confirmations on-chain. * * A confirmation request must have a valid output script. It is also possible * to give a transaction ID. If the transaction ID is not set, a notification * is sent once the output script confirms. If the transaction ID is also set, * a notification is sent once the output script confirms in the given * transaction. * * @generated from rpc chainrpc.ChainNotifier.RegisterConfirmationsNtfn */ registerConfirmationsNtfn: { methodKind: "server_streaming"; input: typeof ConfRequestSchema; output: typeof ConfEventSchema; }, /** * * RegisterSpendNtfn is a synchronous response-streaming RPC that registers an * intent for a client to be notification once a spend request has been spent * by a transaction that has confirmed on-chain. * * A client can specify whether the spend request should be for a particular * outpoint or for an output script by specifying a zero outpoint. * * @generated from rpc chainrpc.ChainNotifier.RegisterSpendNtfn */ registerSpendNtfn: { methodKind: "server_streaming"; input: typeof SpendRequestSchema; output: typeof SpendEventSchema; }, /** * * RegisterBlockEpochNtfn is a synchronous response-streaming RPC that * registers an intent for a client to be notified of blocks in the chain. The * stream will return a hash and height tuple of a block for each new/stale * block in the chain. It is the client's responsibility to determine whether * the tuple returned is for a new or stale block in the chain. * * A client can also request a historical backlog of blocks from a particular * point. This allows clients to be idempotent by ensuring that they do not * missing processing a single block within the chain. * * @generated from rpc chainrpc.ChainNotifier.RegisterBlockEpochNtfn */ registerBlockEpochNtfn: { methodKind: "server_streaming"; input: typeof BlockEpochSchema; output: typeof BlockEpochSchema; }, }> = /*@__PURE__*/ serviceDesc(file_chainrpc_chainnotifier, 0); // Merged from chainkit_pb.ts export const file_chainrpc_chainkit: GenFile = /*@__PURE__*/ fileDesc("ChdjaGFpbnJwYy9jaGFpbmtpdC5wcm90bxIIY2hhaW5ycGMiJQoPR2V0QmxvY2tSZXF1ZXN0EhIKCmJsb2NrX2hhc2gYASABKAwiJQoQR2V0QmxvY2tSZXNwb25zZRIRCglyYXdfYmxvY2sYASABKAwiKwoVR2V0QmxvY2tIZWFkZXJSZXF1ZXN0EhIKCmJsb2NrX2hhc2gYASABKAwiMgoWR2V0QmxvY2tIZWFkZXJSZXNwb25zZRIYChByYXdfYmxvY2tfaGVhZGVyGAEgASgMIhUKE0dldEJlc3RCbG9ja1JlcXVlc3QiQAoUR2V0QmVzdEJsb2NrUmVzcG9uc2USEgoKYmxvY2tfaGFzaBgBIAEoDBIUCgxibG9ja19oZWlnaHQYAiABKAUiKwoTR2V0QmxvY2tIYXNoUmVxdWVzdBIUCgxibG9ja19oZWlnaHQYASABKAMiKgoUR2V0QmxvY2tIYXNoUmVzcG9uc2USEgoKYmxvY2tfaGFzaBgBIAEoDDLAAgoIQ2hhaW5LaXQSQQoIR2V0QmxvY2sSGS5jaGFpbnJwYy5HZXRCbG9ja1JlcXVlc3QaGi5jaGFpbnJwYy5HZXRCbG9ja1Jlc3BvbnNlElMKDkdldEJsb2NrSGVhZGVyEh8uY2hhaW5ycGMuR2V0QmxvY2tIZWFkZXJSZXF1ZXN0GiAuY2hhaW5ycGMuR2V0QmxvY2tIZWFkZXJSZXNwb25zZRJNCgxHZXRCZXN0QmxvY2sSHS5jaGFpbnJwYy5HZXRCZXN0QmxvY2tSZXF1ZXN0Gh4uY2hhaW5ycGMuR2V0QmVzdEJsb2NrUmVzcG9uc2USTQoMR2V0QmxvY2tIYXNoEh0uY2hhaW5ycGMuR2V0QmxvY2tIYXNoUmVxdWVzdBoeLmNoYWlucnBjLkdldEJsb2NrSGFzaFJlc3BvbnNlQjBaLmdpdGh1Yi5jb20vbGlnaHRuaW5nbmV0d29yay9sbmQvbG5ycGMvY2hhaW5ycGNiBnByb3RvMw"); /** * @generated from message chainrpc.GetBlockRequest */ export type GetBlockRequest = Message<"chainrpc.GetBlockRequest"> & { /** * The hash of the requested block. * * @generated from field: bytes block_hash = 1; */ blockHash: Uint8Array; }; /** * Describes the message chainrpc.GetBlockRequest. * Use `create(GetBlockRequestSchema)` to create a new message. */ export const GetBlockRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 0); /** * TODO(ffranr): The neutrino GetBlock response includes many * additional helpful fields. Consider adding them here also. * * @generated from message chainrpc.GetBlockResponse */ export type GetBlockResponse = Message<"chainrpc.GetBlockResponse"> & { /** * The raw bytes of the requested block. * * @generated from field: bytes raw_block = 1; */ rawBlock: Uint8Array; }; /** * Describes the message chainrpc.GetBlockResponse. * Use `create(GetBlockResponseSchema)` to create a new message. */ export const GetBlockResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 1); /** * @generated from message chainrpc.GetBlockHeaderRequest */ export type GetBlockHeaderRequest = Message<"chainrpc.GetBlockHeaderRequest"> & { /** * The hash of the block with the requested header. * * @generated from field: bytes block_hash = 1; */ blockHash: Uint8Array; }; /** * Describes the message chainrpc.GetBlockHeaderRequest. * Use `create(GetBlockHeaderRequestSchema)` to create a new message. */ export const GetBlockHeaderRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 2); /** * @generated from message chainrpc.GetBlockHeaderResponse */ export type GetBlockHeaderResponse = Message<"chainrpc.GetBlockHeaderResponse"> & { /** * The header of the block with the requested hash. * * @generated from field: bytes raw_block_header = 1; */ rawBlockHeader: Uint8Array; }; /** * Describes the message chainrpc.GetBlockHeaderResponse. * Use `create(GetBlockHeaderResponseSchema)` to create a new message. */ export const GetBlockHeaderResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 3); /** * @generated from message chainrpc.GetBestBlockRequest */ export type GetBestBlockRequest = Message<"chainrpc.GetBestBlockRequest"> & { }; /** * Describes the message chainrpc.GetBestBlockRequest. * Use `create(GetBestBlockRequestSchema)` to create a new message. */ export const GetBestBlockRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 4); /** * @generated from message chainrpc.GetBestBlockResponse */ export type GetBestBlockResponse = Message<"chainrpc.GetBestBlockResponse"> & { /** * The hash of the best block. * * @generated from field: bytes block_hash = 1; */ blockHash: Uint8Array; /** * The height of the best block. * * @generated from field: int32 block_height = 2; */ blockHeight: number; }; /** * Describes the message chainrpc.GetBestBlockResponse. * Use `create(GetBestBlockResponseSchema)` to create a new message. */ export const GetBestBlockResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 5); /** * @generated from message chainrpc.GetBlockHashRequest */ export type GetBlockHashRequest = Message<"chainrpc.GetBlockHashRequest"> & { /** * Block height of the target best chain block. * * @generated from field: int64 block_height = 1; */ blockHeight: bigint; }; /** * Describes the message chainrpc.GetBlockHashRequest. * Use `create(GetBlockHashRequestSchema)` to create a new message. */ export const GetBlockHashRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 6); /** * @generated from message chainrpc.GetBlockHashResponse */ export type GetBlockHashResponse = Message<"chainrpc.GetBlockHashResponse"> & { /** * The hash of the best block at the specified height. * * @generated from field: bytes block_hash = 1; */ blockHash: Uint8Array; }; /** * Describes the message chainrpc.GetBlockHashResponse. * Use `create(GetBlockHashResponseSchema)` to create a new message. */ export const GetBlockHashResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_chainrpc_chainkit, 7); /** * ChainKit is a service that can be used to get information from the * chain backend. * * @generated from service chainrpc.ChainKit */ export const ChainKit: GenService<{ /** * lncli: `chain getblock` * GetBlock returns a block given the corresponding block hash. * * @generated from rpc chainrpc.ChainKit.GetBlock */ getBlock: { methodKind: "unary"; input: typeof GetBlockRequestSchema; output: typeof GetBlockResponseSchema; }, /** * lncli: `chain getblockheader` * GetBlockHeader returns a block header with a particular block hash. * * @generated from rpc chainrpc.ChainKit.GetBlockHeader */ getBlockHeader: { methodKind: "unary"; input: typeof GetBlockHeaderRequestSchema; output: typeof GetBlockHeaderResponseSchema; }, /** * lncli: `chain getbestblock` * GetBestBlock returns the block hash and current height from the valid * most-work chain. * * @generated from rpc chainrpc.ChainKit.GetBestBlock */ getBestBlock: { methodKind: "unary"; input: typeof GetBestBlockRequestSchema; output: typeof GetBestBlockResponseSchema; }, /** * lncli: `chain getblockhash` * GetBlockHash returns the hash of the block in the best blockchain * at the given height. * * @generated from rpc chainrpc.ChainKit.GetBlockHash */ getBlockHash: { methodKind: "unary"; input: typeof GetBlockHashRequestSchema; output: typeof GetBlockHashResponseSchema; }, }> = /*@__PURE__*/ serviceDesc(file_chainrpc_chainkit, 0);