github.com/decred/dcrlnd@v0.7.6/lnrpc/chainrpc/chainnotifier.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.31.0 4 // protoc v3.4.0 5 // source: chainrpc/chainnotifier.proto 6 7 package chainrpc 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 15 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 16 reflect "reflect" 17 sync "sync" 18 ) 19 20 const ( 21 // Verify that this generated code is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 23 // Verify that runtime/protoimpl is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 25 ) 26 27 type ConfRequest struct { 28 state protoimpl.MessageState 29 sizeCache protoimpl.SizeCache 30 unknownFields protoimpl.UnknownFields 31 32 // The transaction hash for which we should request a confirmation notification 33 // for. If set to a hash of all zeros, then the confirmation notification will 34 // be requested for the script instead. 35 Txid []byte `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` 36 // An output script within a transaction with the hash above which will be used 37 // by light clients to match block filters. If the transaction hash is set to a 38 // hash of all zeros, then a confirmation notification will be requested for 39 // this script instead. 40 Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` 41 // The number of desired confirmations the transaction/output script should 42 // reach before dispatching a confirmation notification. 43 NumConfs uint32 `protobuf:"varint,3,opt,name=num_confs,json=numConfs,proto3" json:"num_confs,omitempty"` 44 // The earliest height in the chain for which the transaction/output script 45 // could have been included in a block. This should in most cases be set to the 46 // broadcast height of the transaction/output script. 47 HeightHint uint32 `protobuf:"varint,4,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"` 48 } 49 50 func (x *ConfRequest) Reset() { 51 *x = ConfRequest{} 52 if protoimpl.UnsafeEnabled { 53 mi := &file_chainrpc_chainnotifier_proto_msgTypes[0] 54 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 55 ms.StoreMessageInfo(mi) 56 } 57 } 58 59 func (x *ConfRequest) String() string { 60 return protoimpl.X.MessageStringOf(x) 61 } 62 63 func (*ConfRequest) ProtoMessage() {} 64 65 func (x *ConfRequest) ProtoReflect() protoreflect.Message { 66 mi := &file_chainrpc_chainnotifier_proto_msgTypes[0] 67 if protoimpl.UnsafeEnabled && x != nil { 68 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 69 if ms.LoadMessageInfo() == nil { 70 ms.StoreMessageInfo(mi) 71 } 72 return ms 73 } 74 return mi.MessageOf(x) 75 } 76 77 // Deprecated: Use ConfRequest.ProtoReflect.Descriptor instead. 78 func (*ConfRequest) Descriptor() ([]byte, []int) { 79 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{0} 80 } 81 82 func (x *ConfRequest) GetTxid() []byte { 83 if x != nil { 84 return x.Txid 85 } 86 return nil 87 } 88 89 func (x *ConfRequest) GetScript() []byte { 90 if x != nil { 91 return x.Script 92 } 93 return nil 94 } 95 96 func (x *ConfRequest) GetNumConfs() uint32 { 97 if x != nil { 98 return x.NumConfs 99 } 100 return 0 101 } 102 103 func (x *ConfRequest) GetHeightHint() uint32 { 104 if x != nil { 105 return x.HeightHint 106 } 107 return 0 108 } 109 110 type ConfDetails struct { 111 state protoimpl.MessageState 112 sizeCache protoimpl.SizeCache 113 unknownFields protoimpl.UnknownFields 114 115 // The raw bytes of the confirmed transaction. 116 RawTx []byte `protobuf:"bytes,1,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` 117 // The hash of the block in which the confirmed transaction was included in. 118 BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` 119 // The height of the block in which the confirmed transaction was included 120 // in. 121 BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` 122 // The index of the confirmed transaction within the transaction. 123 TxIndex uint32 `protobuf:"varint,4,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` 124 } 125 126 func (x *ConfDetails) Reset() { 127 *x = ConfDetails{} 128 if protoimpl.UnsafeEnabled { 129 mi := &file_chainrpc_chainnotifier_proto_msgTypes[1] 130 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 131 ms.StoreMessageInfo(mi) 132 } 133 } 134 135 func (x *ConfDetails) String() string { 136 return protoimpl.X.MessageStringOf(x) 137 } 138 139 func (*ConfDetails) ProtoMessage() {} 140 141 func (x *ConfDetails) ProtoReflect() protoreflect.Message { 142 mi := &file_chainrpc_chainnotifier_proto_msgTypes[1] 143 if protoimpl.UnsafeEnabled && x != nil { 144 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 145 if ms.LoadMessageInfo() == nil { 146 ms.StoreMessageInfo(mi) 147 } 148 return ms 149 } 150 return mi.MessageOf(x) 151 } 152 153 // Deprecated: Use ConfDetails.ProtoReflect.Descriptor instead. 154 func (*ConfDetails) Descriptor() ([]byte, []int) { 155 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{1} 156 } 157 158 func (x *ConfDetails) GetRawTx() []byte { 159 if x != nil { 160 return x.RawTx 161 } 162 return nil 163 } 164 165 func (x *ConfDetails) GetBlockHash() []byte { 166 if x != nil { 167 return x.BlockHash 168 } 169 return nil 170 } 171 172 func (x *ConfDetails) GetBlockHeight() uint32 { 173 if x != nil { 174 return x.BlockHeight 175 } 176 return 0 177 } 178 179 func (x *ConfDetails) GetTxIndex() uint32 { 180 if x != nil { 181 return x.TxIndex 182 } 183 return 0 184 } 185 186 type Reorg struct { 187 state protoimpl.MessageState 188 sizeCache protoimpl.SizeCache 189 unknownFields protoimpl.UnknownFields 190 } 191 192 func (x *Reorg) Reset() { 193 *x = Reorg{} 194 if protoimpl.UnsafeEnabled { 195 mi := &file_chainrpc_chainnotifier_proto_msgTypes[2] 196 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 197 ms.StoreMessageInfo(mi) 198 } 199 } 200 201 func (x *Reorg) String() string { 202 return protoimpl.X.MessageStringOf(x) 203 } 204 205 func (*Reorg) ProtoMessage() {} 206 207 func (x *Reorg) ProtoReflect() protoreflect.Message { 208 mi := &file_chainrpc_chainnotifier_proto_msgTypes[2] 209 if protoimpl.UnsafeEnabled && x != nil { 210 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 211 if ms.LoadMessageInfo() == nil { 212 ms.StoreMessageInfo(mi) 213 } 214 return ms 215 } 216 return mi.MessageOf(x) 217 } 218 219 // Deprecated: Use Reorg.ProtoReflect.Descriptor instead. 220 func (*Reorg) Descriptor() ([]byte, []int) { 221 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{2} 222 } 223 224 type ConfEvent struct { 225 state protoimpl.MessageState 226 sizeCache protoimpl.SizeCache 227 unknownFields protoimpl.UnknownFields 228 229 // Types that are assignable to Event: 230 // 231 // *ConfEvent_Conf 232 // *ConfEvent_Reorg 233 Event isConfEvent_Event `protobuf_oneof:"event"` 234 } 235 236 func (x *ConfEvent) Reset() { 237 *x = ConfEvent{} 238 if protoimpl.UnsafeEnabled { 239 mi := &file_chainrpc_chainnotifier_proto_msgTypes[3] 240 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 241 ms.StoreMessageInfo(mi) 242 } 243 } 244 245 func (x *ConfEvent) String() string { 246 return protoimpl.X.MessageStringOf(x) 247 } 248 249 func (*ConfEvent) ProtoMessage() {} 250 251 func (x *ConfEvent) ProtoReflect() protoreflect.Message { 252 mi := &file_chainrpc_chainnotifier_proto_msgTypes[3] 253 if protoimpl.UnsafeEnabled && x != nil { 254 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 255 if ms.LoadMessageInfo() == nil { 256 ms.StoreMessageInfo(mi) 257 } 258 return ms 259 } 260 return mi.MessageOf(x) 261 } 262 263 // Deprecated: Use ConfEvent.ProtoReflect.Descriptor instead. 264 func (*ConfEvent) Descriptor() ([]byte, []int) { 265 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{3} 266 } 267 268 func (m *ConfEvent) GetEvent() isConfEvent_Event { 269 if m != nil { 270 return m.Event 271 } 272 return nil 273 } 274 275 func (x *ConfEvent) GetConf() *ConfDetails { 276 if x, ok := x.GetEvent().(*ConfEvent_Conf); ok { 277 return x.Conf 278 } 279 return nil 280 } 281 282 func (x *ConfEvent) GetReorg() *Reorg { 283 if x, ok := x.GetEvent().(*ConfEvent_Reorg); ok { 284 return x.Reorg 285 } 286 return nil 287 } 288 289 type isConfEvent_Event interface { 290 isConfEvent_Event() 291 } 292 293 type ConfEvent_Conf struct { 294 // An event that includes the confirmation details of the request 295 // (txid/ouput script). 296 Conf *ConfDetails `protobuf:"bytes,1,opt,name=conf,proto3,oneof"` 297 } 298 299 type ConfEvent_Reorg struct { 300 // An event send when the transaction of the request is reorged out of the 301 // chain. 302 Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"` 303 } 304 305 func (*ConfEvent_Conf) isConfEvent_Event() {} 306 307 func (*ConfEvent_Reorg) isConfEvent_Event() {} 308 309 type Outpoint struct { 310 state protoimpl.MessageState 311 sizeCache protoimpl.SizeCache 312 unknownFields protoimpl.UnknownFields 313 314 // The hash of the transaction. 315 Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` 316 // The index of the output within the transaction. 317 Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` 318 } 319 320 func (x *Outpoint) Reset() { 321 *x = Outpoint{} 322 if protoimpl.UnsafeEnabled { 323 mi := &file_chainrpc_chainnotifier_proto_msgTypes[4] 324 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 325 ms.StoreMessageInfo(mi) 326 } 327 } 328 329 func (x *Outpoint) String() string { 330 return protoimpl.X.MessageStringOf(x) 331 } 332 333 func (*Outpoint) ProtoMessage() {} 334 335 func (x *Outpoint) ProtoReflect() protoreflect.Message { 336 mi := &file_chainrpc_chainnotifier_proto_msgTypes[4] 337 if protoimpl.UnsafeEnabled && x != nil { 338 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 339 if ms.LoadMessageInfo() == nil { 340 ms.StoreMessageInfo(mi) 341 } 342 return ms 343 } 344 return mi.MessageOf(x) 345 } 346 347 // Deprecated: Use Outpoint.ProtoReflect.Descriptor instead. 348 func (*Outpoint) Descriptor() ([]byte, []int) { 349 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{4} 350 } 351 352 func (x *Outpoint) GetHash() []byte { 353 if x != nil { 354 return x.Hash 355 } 356 return nil 357 } 358 359 func (x *Outpoint) GetIndex() uint32 { 360 if x != nil { 361 return x.Index 362 } 363 return 0 364 } 365 366 type SpendRequest struct { 367 state protoimpl.MessageState 368 sizeCache protoimpl.SizeCache 369 unknownFields protoimpl.UnknownFields 370 371 // The outpoint for which we should request a spend notification for. If set to 372 // a zero outpoint, then the spend notification will be requested for the 373 // script instead. 374 Outpoint *Outpoint `protobuf:"bytes,1,opt,name=outpoint,proto3" json:"outpoint,omitempty"` 375 // The output script for the outpoint above. This will be used by light clients 376 // to match block filters. If the outpoint is set to a zero outpoint, then a 377 // spend notification will be requested for this script instead. 378 Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` 379 // The earliest height in the chain for which the outpoint/output script could 380 // have been spent. This should in most cases be set to the broadcast height of 381 // the outpoint/output script. 382 HeightHint uint32 `protobuf:"varint,3,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"` 383 } 384 385 func (x *SpendRequest) Reset() { 386 *x = SpendRequest{} 387 if protoimpl.UnsafeEnabled { 388 mi := &file_chainrpc_chainnotifier_proto_msgTypes[5] 389 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 390 ms.StoreMessageInfo(mi) 391 } 392 } 393 394 func (x *SpendRequest) String() string { 395 return protoimpl.X.MessageStringOf(x) 396 } 397 398 func (*SpendRequest) ProtoMessage() {} 399 400 func (x *SpendRequest) ProtoReflect() protoreflect.Message { 401 mi := &file_chainrpc_chainnotifier_proto_msgTypes[5] 402 if protoimpl.UnsafeEnabled && x != nil { 403 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 404 if ms.LoadMessageInfo() == nil { 405 ms.StoreMessageInfo(mi) 406 } 407 return ms 408 } 409 return mi.MessageOf(x) 410 } 411 412 // Deprecated: Use SpendRequest.ProtoReflect.Descriptor instead. 413 func (*SpendRequest) Descriptor() ([]byte, []int) { 414 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{5} 415 } 416 417 func (x *SpendRequest) GetOutpoint() *Outpoint { 418 if x != nil { 419 return x.Outpoint 420 } 421 return nil 422 } 423 424 func (x *SpendRequest) GetScript() []byte { 425 if x != nil { 426 return x.Script 427 } 428 return nil 429 } 430 431 func (x *SpendRequest) GetHeightHint() uint32 { 432 if x != nil { 433 return x.HeightHint 434 } 435 return 0 436 } 437 438 type SpendDetails struct { 439 state protoimpl.MessageState 440 sizeCache protoimpl.SizeCache 441 unknownFields protoimpl.UnknownFields 442 443 // The outpoint was that spent. 444 SpendingOutpoint *Outpoint `protobuf:"bytes,1,opt,name=spending_outpoint,json=spendingOutpoint,proto3" json:"spending_outpoint,omitempty"` 445 // The raw bytes of the spending transaction. 446 RawSpendingTx []byte `protobuf:"bytes,2,opt,name=raw_spending_tx,json=rawSpendingTx,proto3" json:"raw_spending_tx,omitempty"` 447 // The hash of the spending transaction. 448 SpendingTxHash []byte `protobuf:"bytes,3,opt,name=spending_tx_hash,json=spendingTxHash,proto3" json:"spending_tx_hash,omitempty"` 449 // The input of the spending transaction that fulfilled the spend request. 450 SpendingInputIndex uint32 `protobuf:"varint,4,opt,name=spending_input_index,json=spendingInputIndex,proto3" json:"spending_input_index,omitempty"` 451 // The height at which the spending transaction was included in a block. 452 SpendingHeight uint32 `protobuf:"varint,5,opt,name=spending_height,json=spendingHeight,proto3" json:"spending_height,omitempty"` 453 } 454 455 func (x *SpendDetails) Reset() { 456 *x = SpendDetails{} 457 if protoimpl.UnsafeEnabled { 458 mi := &file_chainrpc_chainnotifier_proto_msgTypes[6] 459 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 460 ms.StoreMessageInfo(mi) 461 } 462 } 463 464 func (x *SpendDetails) String() string { 465 return protoimpl.X.MessageStringOf(x) 466 } 467 468 func (*SpendDetails) ProtoMessage() {} 469 470 func (x *SpendDetails) ProtoReflect() protoreflect.Message { 471 mi := &file_chainrpc_chainnotifier_proto_msgTypes[6] 472 if protoimpl.UnsafeEnabled && x != nil { 473 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 474 if ms.LoadMessageInfo() == nil { 475 ms.StoreMessageInfo(mi) 476 } 477 return ms 478 } 479 return mi.MessageOf(x) 480 } 481 482 // Deprecated: Use SpendDetails.ProtoReflect.Descriptor instead. 483 func (*SpendDetails) Descriptor() ([]byte, []int) { 484 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{6} 485 } 486 487 func (x *SpendDetails) GetSpendingOutpoint() *Outpoint { 488 if x != nil { 489 return x.SpendingOutpoint 490 } 491 return nil 492 } 493 494 func (x *SpendDetails) GetRawSpendingTx() []byte { 495 if x != nil { 496 return x.RawSpendingTx 497 } 498 return nil 499 } 500 501 func (x *SpendDetails) GetSpendingTxHash() []byte { 502 if x != nil { 503 return x.SpendingTxHash 504 } 505 return nil 506 } 507 508 func (x *SpendDetails) GetSpendingInputIndex() uint32 { 509 if x != nil { 510 return x.SpendingInputIndex 511 } 512 return 0 513 } 514 515 func (x *SpendDetails) GetSpendingHeight() uint32 { 516 if x != nil { 517 return x.SpendingHeight 518 } 519 return 0 520 } 521 522 type SpendEvent struct { 523 state protoimpl.MessageState 524 sizeCache protoimpl.SizeCache 525 unknownFields protoimpl.UnknownFields 526 527 // Types that are assignable to Event: 528 // 529 // *SpendEvent_Spend 530 // *SpendEvent_Reorg 531 Event isSpendEvent_Event `protobuf_oneof:"event"` 532 } 533 534 func (x *SpendEvent) Reset() { 535 *x = SpendEvent{} 536 if protoimpl.UnsafeEnabled { 537 mi := &file_chainrpc_chainnotifier_proto_msgTypes[7] 538 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 539 ms.StoreMessageInfo(mi) 540 } 541 } 542 543 func (x *SpendEvent) String() string { 544 return protoimpl.X.MessageStringOf(x) 545 } 546 547 func (*SpendEvent) ProtoMessage() {} 548 549 func (x *SpendEvent) ProtoReflect() protoreflect.Message { 550 mi := &file_chainrpc_chainnotifier_proto_msgTypes[7] 551 if protoimpl.UnsafeEnabled && x != nil { 552 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 553 if ms.LoadMessageInfo() == nil { 554 ms.StoreMessageInfo(mi) 555 } 556 return ms 557 } 558 return mi.MessageOf(x) 559 } 560 561 // Deprecated: Use SpendEvent.ProtoReflect.Descriptor instead. 562 func (*SpendEvent) Descriptor() ([]byte, []int) { 563 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{7} 564 } 565 566 func (m *SpendEvent) GetEvent() isSpendEvent_Event { 567 if m != nil { 568 return m.Event 569 } 570 return nil 571 } 572 573 func (x *SpendEvent) GetSpend() *SpendDetails { 574 if x, ok := x.GetEvent().(*SpendEvent_Spend); ok { 575 return x.Spend 576 } 577 return nil 578 } 579 580 func (x *SpendEvent) GetReorg() *Reorg { 581 if x, ok := x.GetEvent().(*SpendEvent_Reorg); ok { 582 return x.Reorg 583 } 584 return nil 585 } 586 587 type isSpendEvent_Event interface { 588 isSpendEvent_Event() 589 } 590 591 type SpendEvent_Spend struct { 592 // An event that includes the details of the spending transaction of the 593 // request (outpoint/output script). 594 Spend *SpendDetails `protobuf:"bytes,1,opt,name=spend,proto3,oneof"` 595 } 596 597 type SpendEvent_Reorg struct { 598 // An event sent when the spending transaction of the request was 599 // reorged out of the chain. 600 Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"` 601 } 602 603 func (*SpendEvent_Spend) isSpendEvent_Event() {} 604 605 func (*SpendEvent_Reorg) isSpendEvent_Event() {} 606 607 type BlockEpoch struct { 608 state protoimpl.MessageState 609 sizeCache protoimpl.SizeCache 610 unknownFields protoimpl.UnknownFields 611 612 // The hash of the block. 613 Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` 614 // The height of the block. 615 Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` 616 } 617 618 func (x *BlockEpoch) Reset() { 619 *x = BlockEpoch{} 620 if protoimpl.UnsafeEnabled { 621 mi := &file_chainrpc_chainnotifier_proto_msgTypes[8] 622 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 623 ms.StoreMessageInfo(mi) 624 } 625 } 626 627 func (x *BlockEpoch) String() string { 628 return protoimpl.X.MessageStringOf(x) 629 } 630 631 func (*BlockEpoch) ProtoMessage() {} 632 633 func (x *BlockEpoch) ProtoReflect() protoreflect.Message { 634 mi := &file_chainrpc_chainnotifier_proto_msgTypes[8] 635 if protoimpl.UnsafeEnabled && x != nil { 636 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 637 if ms.LoadMessageInfo() == nil { 638 ms.StoreMessageInfo(mi) 639 } 640 return ms 641 } 642 return mi.MessageOf(x) 643 } 644 645 // Deprecated: Use BlockEpoch.ProtoReflect.Descriptor instead. 646 func (*BlockEpoch) Descriptor() ([]byte, []int) { 647 return file_chainrpc_chainnotifier_proto_rawDescGZIP(), []int{8} 648 } 649 650 func (x *BlockEpoch) GetHash() []byte { 651 if x != nil { 652 return x.Hash 653 } 654 return nil 655 } 656 657 func (x *BlockEpoch) GetHeight() uint32 { 658 if x != nil { 659 return x.Height 660 } 661 return 0 662 } 663 664 var File_chainrpc_chainnotifier_proto protoreflect.FileDescriptor 665 666 var file_chainrpc_chainnotifier_proto_rawDesc = []byte{ 667 0x0a, 0x1c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 668 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 669 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x22, 0x77, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 670 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 671 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 672 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x63, 0x72, 673 0x69, 0x70, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 674 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x73, 675 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 676 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x48, 0x69, 0x6e, 677 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 678 0x73, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 679 0x0c, 0x52, 0x05, 0x72, 0x61, 0x77, 0x54, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 680 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 681 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 682 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x62, 683 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 684 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x78, 685 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x07, 0x0a, 0x05, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x22, 0x6a, 686 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x63, 687 0x6f, 0x6e, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x69, 688 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 689 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x65, 0x6f, 0x72, 690 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 691 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x6f, 0x72, 692 0x67, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x08, 0x4f, 0x75, 693 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 694 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 695 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 696 0x22, 0x77, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 697 0x12, 0x2e, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 698 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 699 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 700 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 701 0x52, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x69, 0x67, 702 0x68, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68, 703 0x65, 0x69, 0x67, 0x68, 0x74, 0x48, 0x69, 0x6e, 0x74, 0x22, 0xfc, 0x01, 0x0a, 0x0c, 0x53, 0x70, 704 0x65, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x11, 0x73, 0x70, 705 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 706 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 707 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 708 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x72, 709 0x61, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x78, 0x18, 0x02, 710 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x61, 0x77, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 711 0x67, 0x54, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 712 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, 713 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 714 0x14, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 715 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x73, 0x70, 0x65, 716 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 717 0x27, 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 718 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 719 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6e, 0x0a, 0x0a, 0x53, 0x70, 0x65, 0x6e, 720 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 721 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 722 0x2e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x00, 0x52, 723 0x05, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x65, 0x6f, 0x72, 0x67, 0x18, 724 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 725 0x2e, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x6f, 0x72, 0x67, 0x42, 726 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 727 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 728 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 729 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 730 0x68, 0x74, 0x32, 0xe7, 0x01, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 731 0x66, 0x69, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 732 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4e, 0x74, 0x66, 733 0x6e, 0x12, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 734 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 735 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 736 0x43, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x6e, 0x64, 737 0x4e, 0x74, 0x66, 0x6e, 0x12, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 738 0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 739 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65, 740 0x6e, 0x74, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 741 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x74, 0x66, 0x6e, 0x12, 0x14, 742 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 743 0x70, 0x6f, 0x63, 0x68, 0x1a, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x2e, 744 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x30, 0x01, 0x42, 0x29, 0x5a, 0x27, 745 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x63, 0x72, 0x65, 746 0x64, 0x2f, 0x64, 0x63, 0x72, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x63, 747 0x68, 0x61, 0x69, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 748 } 749 750 var ( 751 file_chainrpc_chainnotifier_proto_rawDescOnce sync.Once 752 file_chainrpc_chainnotifier_proto_rawDescData = file_chainrpc_chainnotifier_proto_rawDesc 753 ) 754 755 func file_chainrpc_chainnotifier_proto_rawDescGZIP() []byte { 756 file_chainrpc_chainnotifier_proto_rawDescOnce.Do(func() { 757 file_chainrpc_chainnotifier_proto_rawDescData = protoimpl.X.CompressGZIP(file_chainrpc_chainnotifier_proto_rawDescData) 758 }) 759 return file_chainrpc_chainnotifier_proto_rawDescData 760 } 761 762 var file_chainrpc_chainnotifier_proto_msgTypes = make([]protoimpl.MessageInfo, 9) 763 var file_chainrpc_chainnotifier_proto_goTypes = []interface{}{ 764 (*ConfRequest)(nil), // 0: chainrpc.ConfRequest 765 (*ConfDetails)(nil), // 1: chainrpc.ConfDetails 766 (*Reorg)(nil), // 2: chainrpc.Reorg 767 (*ConfEvent)(nil), // 3: chainrpc.ConfEvent 768 (*Outpoint)(nil), // 4: chainrpc.Outpoint 769 (*SpendRequest)(nil), // 5: chainrpc.SpendRequest 770 (*SpendDetails)(nil), // 6: chainrpc.SpendDetails 771 (*SpendEvent)(nil), // 7: chainrpc.SpendEvent 772 (*BlockEpoch)(nil), // 8: chainrpc.BlockEpoch 773 } 774 var file_chainrpc_chainnotifier_proto_depIdxs = []int32{ 775 1, // 0: chainrpc.ConfEvent.conf:type_name -> chainrpc.ConfDetails 776 2, // 1: chainrpc.ConfEvent.reorg:type_name -> chainrpc.Reorg 777 4, // 2: chainrpc.SpendRequest.outpoint:type_name -> chainrpc.Outpoint 778 4, // 3: chainrpc.SpendDetails.spending_outpoint:type_name -> chainrpc.Outpoint 779 6, // 4: chainrpc.SpendEvent.spend:type_name -> chainrpc.SpendDetails 780 2, // 5: chainrpc.SpendEvent.reorg:type_name -> chainrpc.Reorg 781 0, // 6: chainrpc.ChainNotifier.RegisterConfirmationsNtfn:input_type -> chainrpc.ConfRequest 782 5, // 7: chainrpc.ChainNotifier.RegisterSpendNtfn:input_type -> chainrpc.SpendRequest 783 8, // 8: chainrpc.ChainNotifier.RegisterBlockEpochNtfn:input_type -> chainrpc.BlockEpoch 784 3, // 9: chainrpc.ChainNotifier.RegisterConfirmationsNtfn:output_type -> chainrpc.ConfEvent 785 7, // 10: chainrpc.ChainNotifier.RegisterSpendNtfn:output_type -> chainrpc.SpendEvent 786 8, // 11: chainrpc.ChainNotifier.RegisterBlockEpochNtfn:output_type -> chainrpc.BlockEpoch 787 9, // [9:12] is the sub-list for method output_type 788 6, // [6:9] is the sub-list for method input_type 789 6, // [6:6] is the sub-list for extension type_name 790 6, // [6:6] is the sub-list for extension extendee 791 0, // [0:6] is the sub-list for field type_name 792 } 793 794 func init() { file_chainrpc_chainnotifier_proto_init() } 795 func file_chainrpc_chainnotifier_proto_init() { 796 if File_chainrpc_chainnotifier_proto != nil { 797 return 798 } 799 if !protoimpl.UnsafeEnabled { 800 file_chainrpc_chainnotifier_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 801 switch v := v.(*ConfRequest); i { 802 case 0: 803 return &v.state 804 case 1: 805 return &v.sizeCache 806 case 2: 807 return &v.unknownFields 808 default: 809 return nil 810 } 811 } 812 file_chainrpc_chainnotifier_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 813 switch v := v.(*ConfDetails); i { 814 case 0: 815 return &v.state 816 case 1: 817 return &v.sizeCache 818 case 2: 819 return &v.unknownFields 820 default: 821 return nil 822 } 823 } 824 file_chainrpc_chainnotifier_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 825 switch v := v.(*Reorg); i { 826 case 0: 827 return &v.state 828 case 1: 829 return &v.sizeCache 830 case 2: 831 return &v.unknownFields 832 default: 833 return nil 834 } 835 } 836 file_chainrpc_chainnotifier_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 837 switch v := v.(*ConfEvent); i { 838 case 0: 839 return &v.state 840 case 1: 841 return &v.sizeCache 842 case 2: 843 return &v.unknownFields 844 default: 845 return nil 846 } 847 } 848 file_chainrpc_chainnotifier_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 849 switch v := v.(*Outpoint); i { 850 case 0: 851 return &v.state 852 case 1: 853 return &v.sizeCache 854 case 2: 855 return &v.unknownFields 856 default: 857 return nil 858 } 859 } 860 file_chainrpc_chainnotifier_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 861 switch v := v.(*SpendRequest); i { 862 case 0: 863 return &v.state 864 case 1: 865 return &v.sizeCache 866 case 2: 867 return &v.unknownFields 868 default: 869 return nil 870 } 871 } 872 file_chainrpc_chainnotifier_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { 873 switch v := v.(*SpendDetails); i { 874 case 0: 875 return &v.state 876 case 1: 877 return &v.sizeCache 878 case 2: 879 return &v.unknownFields 880 default: 881 return nil 882 } 883 } 884 file_chainrpc_chainnotifier_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { 885 switch v := v.(*SpendEvent); i { 886 case 0: 887 return &v.state 888 case 1: 889 return &v.sizeCache 890 case 2: 891 return &v.unknownFields 892 default: 893 return nil 894 } 895 } 896 file_chainrpc_chainnotifier_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { 897 switch v := v.(*BlockEpoch); i { 898 case 0: 899 return &v.state 900 case 1: 901 return &v.sizeCache 902 case 2: 903 return &v.unknownFields 904 default: 905 return nil 906 } 907 } 908 } 909 file_chainrpc_chainnotifier_proto_msgTypes[3].OneofWrappers = []interface{}{ 910 (*ConfEvent_Conf)(nil), 911 (*ConfEvent_Reorg)(nil), 912 } 913 file_chainrpc_chainnotifier_proto_msgTypes[7].OneofWrappers = []interface{}{ 914 (*SpendEvent_Spend)(nil), 915 (*SpendEvent_Reorg)(nil), 916 } 917 type x struct{} 918 out := protoimpl.TypeBuilder{ 919 File: protoimpl.DescBuilder{ 920 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 921 RawDescriptor: file_chainrpc_chainnotifier_proto_rawDesc, 922 NumEnums: 0, 923 NumMessages: 9, 924 NumExtensions: 0, 925 NumServices: 1, 926 }, 927 GoTypes: file_chainrpc_chainnotifier_proto_goTypes, 928 DependencyIndexes: file_chainrpc_chainnotifier_proto_depIdxs, 929 MessageInfos: file_chainrpc_chainnotifier_proto_msgTypes, 930 }.Build() 931 File_chainrpc_chainnotifier_proto = out.File 932 file_chainrpc_chainnotifier_proto_rawDesc = nil 933 file_chainrpc_chainnotifier_proto_goTypes = nil 934 file_chainrpc_chainnotifier_proto_depIdxs = nil 935 } 936 937 // Reference imports to suppress errors if they are not otherwise used. 938 var _ context.Context 939 var _ grpc.ClientConnInterface 940 941 // This is a compile-time assertion to ensure that this generated file 942 // is compatible with the grpc package it is being compiled against. 943 const _ = grpc.SupportPackageIsVersion6 944 945 // ChainNotifierClient is the client API for ChainNotifier service. 946 // 947 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 948 type ChainNotifierClient interface { 949 // RegisterConfirmationsNtfn is a synchronous response-streaming RPC that 950 // registers an intent for a client to be notified once a confirmation request 951 // has reached its required number of confirmations on-chain. 952 // 953 // A client can specify whether the confirmation request should be for a 954 // particular transaction by its hash or for an output script by specifying a 955 // zero hash. 956 RegisterConfirmationsNtfn(ctx context.Context, in *ConfRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterConfirmationsNtfnClient, error) 957 // RegisterSpendNtfn is a synchronous response-streaming RPC that registers an 958 // intent for a client to be notification once a spend request has been spent 959 // by a transaction that has confirmed on-chain. 960 // 961 // A client can specify whether the spend request should be for a particular 962 // outpoint or for an output script by specifying a zero outpoint. 963 RegisterSpendNtfn(ctx context.Context, in *SpendRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterSpendNtfnClient, error) 964 // RegisterBlockEpochNtfn is a synchronous response-streaming RPC that 965 // registers an intent for a client to be notified of blocks in the chain. The 966 // stream will return a hash and height tuple of a block for each new/stale 967 // block in the chain. It is the client's responsibility to determine whether 968 // the tuple returned is for a new or stale block in the chain. 969 // 970 // A client can also request a historical backlog of blocks from a particular 971 // point. This allows clients to be idempotent by ensuring that they do not 972 // missing processing a single block within the chain. 973 RegisterBlockEpochNtfn(ctx context.Context, in *BlockEpoch, opts ...grpc.CallOption) (ChainNotifier_RegisterBlockEpochNtfnClient, error) 974 } 975 976 type chainNotifierClient struct { 977 cc grpc.ClientConnInterface 978 } 979 980 func NewChainNotifierClient(cc grpc.ClientConnInterface) ChainNotifierClient { 981 return &chainNotifierClient{cc} 982 } 983 984 func (c *chainNotifierClient) RegisterConfirmationsNtfn(ctx context.Context, in *ConfRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterConfirmationsNtfnClient, error) { 985 stream, err := c.cc.NewStream(ctx, &_ChainNotifier_serviceDesc.Streams[0], "/chainrpc.ChainNotifier/RegisterConfirmationsNtfn", opts...) 986 if err != nil { 987 return nil, err 988 } 989 x := &chainNotifierRegisterConfirmationsNtfnClient{stream} 990 if err := x.ClientStream.SendMsg(in); err != nil { 991 return nil, err 992 } 993 if err := x.ClientStream.CloseSend(); err != nil { 994 return nil, err 995 } 996 return x, nil 997 } 998 999 type ChainNotifier_RegisterConfirmationsNtfnClient interface { 1000 Recv() (*ConfEvent, error) 1001 grpc.ClientStream 1002 } 1003 1004 type chainNotifierRegisterConfirmationsNtfnClient struct { 1005 grpc.ClientStream 1006 } 1007 1008 func (x *chainNotifierRegisterConfirmationsNtfnClient) Recv() (*ConfEvent, error) { 1009 m := new(ConfEvent) 1010 if err := x.ClientStream.RecvMsg(m); err != nil { 1011 return nil, err 1012 } 1013 return m, nil 1014 } 1015 1016 func (c *chainNotifierClient) RegisterSpendNtfn(ctx context.Context, in *SpendRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterSpendNtfnClient, error) { 1017 stream, err := c.cc.NewStream(ctx, &_ChainNotifier_serviceDesc.Streams[1], "/chainrpc.ChainNotifier/RegisterSpendNtfn", opts...) 1018 if err != nil { 1019 return nil, err 1020 } 1021 x := &chainNotifierRegisterSpendNtfnClient{stream} 1022 if err := x.ClientStream.SendMsg(in); err != nil { 1023 return nil, err 1024 } 1025 if err := x.ClientStream.CloseSend(); err != nil { 1026 return nil, err 1027 } 1028 return x, nil 1029 } 1030 1031 type ChainNotifier_RegisterSpendNtfnClient interface { 1032 Recv() (*SpendEvent, error) 1033 grpc.ClientStream 1034 } 1035 1036 type chainNotifierRegisterSpendNtfnClient struct { 1037 grpc.ClientStream 1038 } 1039 1040 func (x *chainNotifierRegisterSpendNtfnClient) Recv() (*SpendEvent, error) { 1041 m := new(SpendEvent) 1042 if err := x.ClientStream.RecvMsg(m); err != nil { 1043 return nil, err 1044 } 1045 return m, nil 1046 } 1047 1048 func (c *chainNotifierClient) RegisterBlockEpochNtfn(ctx context.Context, in *BlockEpoch, opts ...grpc.CallOption) (ChainNotifier_RegisterBlockEpochNtfnClient, error) { 1049 stream, err := c.cc.NewStream(ctx, &_ChainNotifier_serviceDesc.Streams[2], "/chainrpc.ChainNotifier/RegisterBlockEpochNtfn", opts...) 1050 if err != nil { 1051 return nil, err 1052 } 1053 x := &chainNotifierRegisterBlockEpochNtfnClient{stream} 1054 if err := x.ClientStream.SendMsg(in); err != nil { 1055 return nil, err 1056 } 1057 if err := x.ClientStream.CloseSend(); err != nil { 1058 return nil, err 1059 } 1060 return x, nil 1061 } 1062 1063 type ChainNotifier_RegisterBlockEpochNtfnClient interface { 1064 Recv() (*BlockEpoch, error) 1065 grpc.ClientStream 1066 } 1067 1068 type chainNotifierRegisterBlockEpochNtfnClient struct { 1069 grpc.ClientStream 1070 } 1071 1072 func (x *chainNotifierRegisterBlockEpochNtfnClient) Recv() (*BlockEpoch, error) { 1073 m := new(BlockEpoch) 1074 if err := x.ClientStream.RecvMsg(m); err != nil { 1075 return nil, err 1076 } 1077 return m, nil 1078 } 1079 1080 // ChainNotifierServer is the server API for ChainNotifier service. 1081 type ChainNotifierServer interface { 1082 // RegisterConfirmationsNtfn is a synchronous response-streaming RPC that 1083 // registers an intent for a client to be notified once a confirmation request 1084 // has reached its required number of confirmations on-chain. 1085 // 1086 // A client can specify whether the confirmation request should be for a 1087 // particular transaction by its hash or for an output script by specifying a 1088 // zero hash. 1089 RegisterConfirmationsNtfn(*ConfRequest, ChainNotifier_RegisterConfirmationsNtfnServer) error 1090 // RegisterSpendNtfn is a synchronous response-streaming RPC that registers an 1091 // intent for a client to be notification once a spend request has been spent 1092 // by a transaction that has confirmed on-chain. 1093 // 1094 // A client can specify whether the spend request should be for a particular 1095 // outpoint or for an output script by specifying a zero outpoint. 1096 RegisterSpendNtfn(*SpendRequest, ChainNotifier_RegisterSpendNtfnServer) error 1097 // RegisterBlockEpochNtfn is a synchronous response-streaming RPC that 1098 // registers an intent for a client to be notified of blocks in the chain. The 1099 // stream will return a hash and height tuple of a block for each new/stale 1100 // block in the chain. It is the client's responsibility to determine whether 1101 // the tuple returned is for a new or stale block in the chain. 1102 // 1103 // A client can also request a historical backlog of blocks from a particular 1104 // point. This allows clients to be idempotent by ensuring that they do not 1105 // missing processing a single block within the chain. 1106 RegisterBlockEpochNtfn(*BlockEpoch, ChainNotifier_RegisterBlockEpochNtfnServer) error 1107 } 1108 1109 // UnimplementedChainNotifierServer can be embedded to have forward compatible implementations. 1110 type UnimplementedChainNotifierServer struct { 1111 } 1112 1113 func (*UnimplementedChainNotifierServer) RegisterConfirmationsNtfn(*ConfRequest, ChainNotifier_RegisterConfirmationsNtfnServer) error { 1114 return status.Errorf(codes.Unimplemented, "method RegisterConfirmationsNtfn not implemented") 1115 } 1116 func (*UnimplementedChainNotifierServer) RegisterSpendNtfn(*SpendRequest, ChainNotifier_RegisterSpendNtfnServer) error { 1117 return status.Errorf(codes.Unimplemented, "method RegisterSpendNtfn not implemented") 1118 } 1119 func (*UnimplementedChainNotifierServer) RegisterBlockEpochNtfn(*BlockEpoch, ChainNotifier_RegisterBlockEpochNtfnServer) error { 1120 return status.Errorf(codes.Unimplemented, "method RegisterBlockEpochNtfn not implemented") 1121 } 1122 1123 func RegisterChainNotifierServer(s *grpc.Server, srv ChainNotifierServer) { 1124 s.RegisterService(&_ChainNotifier_serviceDesc, srv) 1125 } 1126 1127 func _ChainNotifier_RegisterConfirmationsNtfn_Handler(srv interface{}, stream grpc.ServerStream) error { 1128 m := new(ConfRequest) 1129 if err := stream.RecvMsg(m); err != nil { 1130 return err 1131 } 1132 return srv.(ChainNotifierServer).RegisterConfirmationsNtfn(m, &chainNotifierRegisterConfirmationsNtfnServer{stream}) 1133 } 1134 1135 type ChainNotifier_RegisterConfirmationsNtfnServer interface { 1136 Send(*ConfEvent) error 1137 grpc.ServerStream 1138 } 1139 1140 type chainNotifierRegisterConfirmationsNtfnServer struct { 1141 grpc.ServerStream 1142 } 1143 1144 func (x *chainNotifierRegisterConfirmationsNtfnServer) Send(m *ConfEvent) error { 1145 return x.ServerStream.SendMsg(m) 1146 } 1147 1148 func _ChainNotifier_RegisterSpendNtfn_Handler(srv interface{}, stream grpc.ServerStream) error { 1149 m := new(SpendRequest) 1150 if err := stream.RecvMsg(m); err != nil { 1151 return err 1152 } 1153 return srv.(ChainNotifierServer).RegisterSpendNtfn(m, &chainNotifierRegisterSpendNtfnServer{stream}) 1154 } 1155 1156 type ChainNotifier_RegisterSpendNtfnServer interface { 1157 Send(*SpendEvent) error 1158 grpc.ServerStream 1159 } 1160 1161 type chainNotifierRegisterSpendNtfnServer struct { 1162 grpc.ServerStream 1163 } 1164 1165 func (x *chainNotifierRegisterSpendNtfnServer) Send(m *SpendEvent) error { 1166 return x.ServerStream.SendMsg(m) 1167 } 1168 1169 func _ChainNotifier_RegisterBlockEpochNtfn_Handler(srv interface{}, stream grpc.ServerStream) error { 1170 m := new(BlockEpoch) 1171 if err := stream.RecvMsg(m); err != nil { 1172 return err 1173 } 1174 return srv.(ChainNotifierServer).RegisterBlockEpochNtfn(m, &chainNotifierRegisterBlockEpochNtfnServer{stream}) 1175 } 1176 1177 type ChainNotifier_RegisterBlockEpochNtfnServer interface { 1178 Send(*BlockEpoch) error 1179 grpc.ServerStream 1180 } 1181 1182 type chainNotifierRegisterBlockEpochNtfnServer struct { 1183 grpc.ServerStream 1184 } 1185 1186 func (x *chainNotifierRegisterBlockEpochNtfnServer) Send(m *BlockEpoch) error { 1187 return x.ServerStream.SendMsg(m) 1188 } 1189 1190 var _ChainNotifier_serviceDesc = grpc.ServiceDesc{ 1191 ServiceName: "chainrpc.ChainNotifier", 1192 HandlerType: (*ChainNotifierServer)(nil), 1193 Methods: []grpc.MethodDesc{}, 1194 Streams: []grpc.StreamDesc{ 1195 { 1196 StreamName: "RegisterConfirmationsNtfn", 1197 Handler: _ChainNotifier_RegisterConfirmationsNtfn_Handler, 1198 ServerStreams: true, 1199 }, 1200 { 1201 StreamName: "RegisterSpendNtfn", 1202 Handler: _ChainNotifier_RegisterSpendNtfn_Handler, 1203 ServerStreams: true, 1204 }, 1205 { 1206 StreamName: "RegisterBlockEpochNtfn", 1207 Handler: _ChainNotifier_RegisterBlockEpochNtfn_Handler, 1208 ServerStreams: true, 1209 }, 1210 }, 1211 Metadata: "chainrpc/chainnotifier.proto", 1212 }