mirror of https://github.com/bumi/lnrpc
54 lines
2.4 KiB
Ruby
54 lines
2.4 KiB
Ruby
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
# Source: chainrpc/chainnotifier.proto for package 'chainrpc'
|
|
|
|
require 'grpc'
|
|
require 'chainrpc/chainnotifier_pb'
|
|
|
|
module Chainrpc
|
|
module ChainNotifier
|
|
# ChainNotifier is a service that can be used to get information about the
|
|
# chain backend by registering notifiers for chain events.
|
|
class Service
|
|
|
|
include ::GRPC::GenericService
|
|
|
|
self.marshal_class_method = :encode
|
|
self.unmarshal_class_method = :decode
|
|
self.service_name = 'chainrpc.ChainNotifier'
|
|
|
|
#
|
|
# 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.
|
|
rpc :RegisterConfirmationsNtfn, ::Chainrpc::ConfRequest, stream(::Chainrpc::ConfEvent)
|
|
#
|
|
# 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.
|
|
rpc :RegisterSpendNtfn, ::Chainrpc::SpendRequest, stream(::Chainrpc::SpendEvent)
|
|
#
|
|
# 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.
|
|
rpc :RegisterBlockEpochNtfn, ::Chainrpc::BlockEpoch, stream(::Chainrpc::BlockEpoch)
|
|
end
|
|
|
|
Stub = Service.rpc_stub_class
|
|
end
|
|
end
|