From f6d149352d7f94dc5fc883731d341d7596bd8889 Mon Sep 17 00:00:00 2001 From: D-Stacks Date: Sun, 16 Oct 2022 13:03:06 +0200 Subject: [PATCH] set-up app messages for notifications --- app/appmessage/message.go | 24 +++-- .../rpc_modify_notifying_addresses_txs.go | 47 ++++++++++ ...dify_notifying_txs_confirmation_changed.go | 42 +++++++++ app/appmessage/rpc_notify_addresses_txs.go | 88 +++++++++++++++++++ .../rpc_notify_txs_confirmation_changed.go | 71 ++++++++------- .../rpc_start_notify_addresses_txs.go | 47 ---------- ...c_start_notify_txs_confirmation_changed.go | 47 ---------- .../rpc_stop_notify_addresses_txs.go | 47 ---------- ...pc_stop_notify_txs_confirmation_changed.go | 47 ---------- 9 files changed, 234 insertions(+), 226 deletions(-) delete mode 100644 app/appmessage/rpc_start_notify_addresses_txs.go delete mode 100644 app/appmessage/rpc_start_notify_txs_confirmation_changed.go delete mode 100644 app/appmessage/rpc_stop_notify_addresses_txs.go delete mode 100644 app/appmessage/rpc_stop_notify_txs_confirmation_changed.go diff --git a/app/appmessage/message.go b/app/appmessage/message.go index bad7336ba..1647aa2a5 100644 --- a/app/appmessage/message.go +++ b/app/appmessage/message.go @@ -171,12 +171,14 @@ const ( CmdGetTxsConfirmationsResponseMessage CmdNotifyTxsConfirmationChangedRequestMessage CmdNotifyTxsConfirmationChangedResponseMessage - CmdStartNotifyingTxsConfirmationChangedRequestMessage - CmdStartNotifyingTxsConfirmationChangedResponseMessage - CmdStopNotifyingTxsConfirmationChangedRequestMessage - CmdStopNotifyingTxsConfirmationChangedResponseMessage - CmdModifyNotifyTxsConfirmationChangedParamsRequestMessage - CmdModifyNotifyTxsConfirmationChangedParamsResponseMessage + CmdModifyNotifyingTxsConfirmationChangedRequestMessage + CmdModifyNotifyingTxsConfirmationChangedResponseMessage + CmdTxsConfirmationChangedNotificationMessage + CmdNotifyAddressesTxsRequestMessage + CmdNotifyAddressesTxsResponseMessage + CmdModifyNotifyingAddressesTxsRequestMessage + CmdModifyNotifyingAddressesTxsResponseMessage + CmdAddressesTxsNotificationMessage ) // ProtocolMessageCommandToString maps all MessageCommands to their string representation @@ -320,6 +322,16 @@ var RPCMessageCommandToString = map[MessageCommand]string{ CmdGetTxsResponseMessage: "GetTxsResponse", CmdGetTxsConfirmationsRequestMessage: "GetTxsConfirmationsRequest", CmdGetTxsConfirmationsResponseMessage: "GetTxsConfirmationsResponse", + CmdNotifyTxsConfirmationChangedRequestMessage: "NotifyTxsConfirmationChangedRequest", + CmdNotifyTxsConfirmationChangedResponseMessage: "ModifyNotifyingTxsConfirmationChangedRequest", + CmdModifyNotifyingTxsConfirmationChangedRequestMessage: "ModifyNotifyingTxsConfirmationChangedResponse", + CmdModifyNotifyingTxsConfirmationChangedResponseMessage: "TxsConfirmationChangedNotification", + CmdTxsConfirmationChangedNotificationMessage: "TxsConfirmationChangedNotification", + CmdNotifyAddressesTxsRequestMessage: "NotifyAddressesTxsRequest", + CmdNotifyAddressesTxsResponseMessage: "NotifyAddressesTxsResponse", + CmdModifyNotifyingAddressesTxsRequestMessage: "ModifyNotifyingAddressesTxsRequest", + CmdModifyNotifyingAddressesTxsResponseMessage: "ModifyNotifyingAddressesTxsResponse", + CmdAddressesTxsNotificationMessage: "AddressesTxsNotification", } // Message is an interface that describes a kaspa message. A type that diff --git a/app/appmessage/rpc_modify_notifying_addresses_txs.go b/app/appmessage/rpc_modify_notifying_addresses_txs.go index e69de29bb..b44665585 100644 --- a/app/appmessage/rpc_modify_notifying_addresses_txs.go +++ b/app/appmessage/rpc_modify_notifying_addresses_txs.go @@ -0,0 +1,47 @@ +package appmessage + +type ModifyNotifyingAddressesTxsRequestMessage struct { + baseMessage + AddAddresses []string + RemoveAddresses []string + RequiredConfirmations uint32 + IncludePending bool + IncludeSending bool + IncludeReceiving bool +} + +// Command returns the protocol command string for the message +func (msg *ModifyNotifyingAddressesTxsRequestMessage) Command() MessageCommand { + return CmdModifyNotifyingAddressesTxsRequestMessage +} + +// NewModifyNotifyingAddressesTxsRequestMessage returns a instance of the message +func NewModifyNotifyingAddressesTxsRequestMessage(addAddresses []string, removeAddresses []string, + requiredConfirmations uint32, includePending bool, includeSending bool, + includeReceiving bool) *ModifyNotifyingAddressesTxsRequestMessage { + return &ModifyNotifyingAddressesTxsRequestMessage{ + AddAddresses: addAddresses, + RemoveAddresses: removeAddresses, + RequiredConfirmations: requiredConfirmations, + IncludePending: includePending, + IncludeSending: includeSending, + IncludeReceiving: includeReceiving, + } +} + +// ModifyNotifyingAddressesTxsResponseMessage is an appmessage corresponding to +// its respective RPC message +type ModifyNotifyingAddressesTxsResponseMessage struct { + baseMessage + Error *RPCError +} + +// Command returns the protocol command string for the message +func (msg *ModifyNotifyingAddressesTxsResponseMessage) Command() MessageCommand { + return CmdModifyNotifyingAddressesTxsResponseMessage +} + +// NewModifyNotifyingAddressesTxsesponseMessage returns a instance of the message +func NewModifyNotifyingAddressesTxsResponseMessage() *NotifyAddressesTxsResponseMessage { + return &NotifyAddressesTxsResponseMessage{} +} diff --git a/app/appmessage/rpc_modify_notifying_txs_confirmation_changed.go b/app/appmessage/rpc_modify_notifying_txs_confirmation_changed.go index e69de29bb..489f15182 100644 --- a/app/appmessage/rpc_modify_notifying_txs_confirmation_changed.go +++ b/app/appmessage/rpc_modify_notifying_txs_confirmation_changed.go @@ -0,0 +1,42 @@ +package appmessage + +type ModifyNotifyingTxsConfirmationChangedRequestMessage struct { + baseMessage + AddTxIDs []string + RemoveTxIDs []string + RequiredConfirmations uint32 + IncludePending bool +} + +// Command returns the protocol command string for the message +func (msg *ModifyNotifyingTxsConfirmationChangedRequestMessage) Command() MessageCommand { + return CmdModifyNotifyingTxsConfirmationChangedRequestMessage +} + +// NewModifyNotifyingTxsConfirmationChangedRequestMessage returns a instance of the message +func NewModifyNotifyingTxsConfirmationChangedRequestMessage(addTxIDs []string, removeTxIDs []string, + requiredConfirmations uint32, includePending bool) *ModifyNotifyingTxsConfirmationChangedRequestMessage { + return &ModifyNotifyingTxsConfirmationChangedRequestMessage{ + AddTxIDs: addTxIDs, + RemoveTxIDs: removeTxIDs, + RequiredConfirmations: requiredConfirmations, + IncludePending: includePending, + } +} + +// ModifyNotifyingTxsConfirmationChangedResponseMessage is an appmessage corresponding to +// its respective RPC message +type ModifyNotifyingTxsConfirmationChangedResponseMessage struct { + baseMessage + Error *RPCError +} + +// Command returns the protocol command string for the message +func (msg *ModifyNotifyingTxsConfirmationChangedResponseMessage) Command() MessageCommand { + return CmdModifyNotifyingTxsConfirmationChangedResponseMessage +} + +// NewModifyNotifyingTXChangedResponseMessage returns a instance of the message +func NewModifyNotifyingTxsChangedResponseMessage() *NotifyTxsConfirmationChangedResponseMessage { + return &NotifyTxsConfirmationChangedResponseMessage{} +} diff --git a/app/appmessage/rpc_notify_addresses_txs.go b/app/appmessage/rpc_notify_addresses_txs.go index 8b1378917..c41af3431 100644 --- a/app/appmessage/rpc_notify_addresses_txs.go +++ b/app/appmessage/rpc_notify_addresses_txs.go @@ -1 +1,89 @@ +package appmessage + +// NotifyAddressesTxsRequestMessage is an appmessage corresponding to +// its respective RPC message +type NotifyAddressesTxsRequestMessage struct { + baseMessage + Addresses []string + RequiredConfirmations uint32 + IncludePending bool + IncludeSending bool + IncludeReceiving bool +} + +// Command returns the protocol command string for the message +func (msg *NotifyAddressesTxsRequestMessage) Command() MessageCommand { + return CmdNotifyAddressesTxsRequestMessage +} + +// NewNotifyAddressesTxsRequestMessage returns a instance of the message +func NewNotifyAddressesTxsRequestMessage(addresses []string, requiredConfirmations uint32, + includePending bool, includeSending bool, includeReceiving bool) *NotifyAddressesTxsRequestMessage { + return &NotifyAddressesTxsRequestMessage{ + Addresses: addresses, + RequiredConfirmations: requiredConfirmations, + IncludePending: includePending, + IncludeSending: includeSending, + IncludeReceiving: includeReceiving, + } +} + +// NotifyAddressesTxsResponseMessage is an appmessage corresponding to +// its respective RPC message +type NotifyAddressesTxsResponseMessage struct { + baseMessage + Error *RPCError +} + +// Command returns the protocol command string for the message +func (msg *NotifyAddressesTxsResponseMessage) Command() MessageCommand { + return CmdNotifyAddressesTxsResponseMessage +} + +// NewNotifyTXChangedResponseMessage returns a instance of the message +func NewNotifyAddressesTxsResponseMessage() *NotifyAddressesTxsResponseMessage { + return &NotifyAddressesTxsResponseMessage{} +} + +// AddressesTxsNotificationMessage is an appmessage corresponding to +// its respective RPC message +type AddressesTxsNotificationMessage struct { + baseMessage + RequiredConfirmations uint32 + Pending []*TxEntriesByAddresses + Confirmed []*TxEntriesByAddresses + Unconfirmed []string + +} + +// Command returns the protocol command string for the message +func (msg *AddressesTxsNotificationMessage) Command() MessageCommand { + return CmdAddressesTxsNotificationMessage +} + +// NewAddressesTxsNotificationMessage returns a instance of the message +func NewAddressesTxsNotificationMessage(requiredConfirmations uint32, pending []*TxEntriesByAddresses, + confirmed []*TxEntriesByAddresses, unconfirmed []string) *AddressesTxsNotificationMessage { + return &AddressesTxsNotificationMessage{ + RequiredConfirmations: requiredConfirmations, + Pending: pending, + Confirmed: confirmed, + Unconfirmed: unconfirmed, + } +} + +// TxEntriesByAddresses is an appmessage corresponding to +// its respective RPC message +type TxEntriesByAddresses struct { + Sending []*TxEntryByAddress + Reciving []*TxEntryByAddress +} + +// TxEntryByAddress is an appmessage corresponding to +// its respective RPC message +type TxEntryByAddress struct { + Address string + TxID string + Confirmations uint32 +} \ No newline at end of file diff --git a/app/appmessage/rpc_notify_txs_confirmation_changed.go b/app/appmessage/rpc_notify_txs_confirmation_changed.go index f777fa400..4a0bb6990 100644 --- a/app/appmessage/rpc_notify_txs_confirmation_changed.go +++ b/app/appmessage/rpc_notify_txs_confirmation_changed.go @@ -1,62 +1,69 @@ package appmessage -// NotifyUTXOsChangedRequestMessage is an appmessage corresponding to +// NotifyTxsConfirmationChangedRequestMessage is an appmessage corresponding to // its respective RPC message -type NotifyTxsConfirmationChangedRequstMessage struct { +type NotifyTxsConfirmationChangedRequestMessage struct { baseMessage - Addresses []string + TxIDs []string + RequiredConfirmations uint32 + IncludePending bool } // Command returns the protocol command string for the message -func (msg *NotifyUTXOsChangedRequestMessage) Command() MessageCommand { - return CmdNotifyUTXOsChangedRequestMessage +func (msg *NotifyTxsConfirmationChangedRequestMessage) Command() MessageCommand { + return CmdNotifyTxsConfirmationChangedRequestMessage } -// NewNotifyUTXOsChangedRequestMessage returns a instance of the message -func NewNotifyUTXOsChangedRequestMessage(addresses []string) *NotifyUTXOsChangedRequestMessage { - return &NotifyUTXOsChangedRequestMessage{ - Addresses: addresses, +// NewNotifyTxsConfirmationChangedRequestMessage returns a instance of the message +func NewNotifyTxsConfirmationChangedRequestMessage(TxIDs []string, requiredConfirmations uint32, + includePending bool) *NotifyTxsConfirmationChangedRequestMessage { + return &NotifyTxsConfirmationChangedRequestMessage{ + TxIDs: TxIDs, + RequiredConfirmations: requiredConfirmations, + IncludePending: includePending, } } -// NotifyUTXOsChangedResponseMessage is an appmessage corresponding to +// NotifyTxsConfirmationChangedResponseMessage is an appmessage corresponding to // its respective RPC message -type NotifyUTXOsChangedResponseMessage struct { +type NotifyTxsConfirmationChangedResponseMessage struct { baseMessage Error *RPCError } // Command returns the protocol command string for the message -func (msg *NotifyUTXOsChangedResponseMessage) Command() MessageCommand { - return CmdNotifyUTXOsChangedResponseMessage +func (msg *NotifyTxsConfirmationChangedResponseMessage) Command() MessageCommand { + return CmdNotifyTxsConfirmationChangedResponseMessage } -// NewNotifyUTXOsChangedResponseMessage returns a instance of the message -func NewNotifyTXChangedResponseMessage() *NotifyUTXOsChangedResponseMessage { - return &NotifyUTXOsChangedResponseMessage{} +// NewNotifyTXChangedResponseMessage returns a instance of the message +func NewNotifyTxsChangedResponseMessage() *NotifyTxsConfirmationChangedResponseMessage { + return &NotifyTxsConfirmationChangedResponseMessage{} } -// UTXOsChangedNotificationMessage is an appmessage corresponding to +// TxsConfirmationChangedNotificationMessage is an appmessage corresponding to // its respective RPC message -type UTXOsChangedNotificationMessage struct { +type TxsConfirmationChangedNotificationMessage struct { baseMessage - Added []*UTXOsByAddressesEntry - Removed []*UTXOsByAddressesEntry -} - -// UTXOsByAddressesEntry represents a UTXO of some address -type UTXOsByAddressesEntry struct { - Address string - Outpoint *RPCOutpoint - UTXOEntry *RPCUTXOEntry + RequiredConfirmations uint32 + Pending []*TxIDConfirmationsPair + Confirmed []TxIDConfirmationsPair + Unconfirmed []string + } // Command returns the protocol command string for the message -func (msg *UTXOsChangedNotificationMessage) Command() MessageCommand { - return CmdUTXOsChangedNotificationMessage +func (msg *TxsConfirmationChangedNotificationMessage) Command() MessageCommand { + return CmdTxsConfirmationChangedNotificationMessage } -// NewUTXOsChangedNotificationMessage returns a instance of the message -func NewUTXOsChangedNotificationMessage() *UTXOsChangedNotificationMessage { - return &UTXOsChangedNotificationMessage{} +// NewTxsChangedNotificationMessage returns a instance of the message +func NewTxsChangedNotificationMessage(requiredConfirmations uint32, pending []*TxIDConfirmationsPair, + confirmed []TxIDConfirmationsPair, unconfirmed []string) *TxsConfirmationChangedNotificationMessage { + return &TxsConfirmationChangedNotificationMessage{ + RequiredConfirmations: requiredConfirmations, + Pending: pending, + Confirmed: confirmed, + Unconfirmed: unconfirmed, + } } diff --git a/app/appmessage/rpc_start_notify_addresses_txs.go b/app/appmessage/rpc_start_notify_addresses_txs.go deleted file mode 100644 index b16743bce..000000000 --- a/app/appmessage/rpc_start_notify_addresses_txs.go +++ /dev/null @@ -1,47 +0,0 @@ -package protowire - -import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/pkg/errors" -) - -func (x *KaspadMessage_StartNotifyAddressesTxsRequest) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "KaspadMessage_StartNotifyAddressesTxsRequest is nil") - } - return x.StartNotifyAddressesTxsRequest.toAppMessage() -} - -func (x *KaspadMessage_StartNotifyAddressesTxsRequest) fromAppMessage(message *appmessage.StartNotifyAddressesTxsRequestMessage) error { - x.StartNotifyAddressesTxsRequest = &StartNotifyAddressesTxsRequestMessage{ - Addresses: message.Addresses, - } - return nil -} - -func (x *StartNotifyAddressesTxsRequestMessage) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StartNotifyAddressesTxsRequestMessage is nil") - } - return &appmessage.StartNotifyAddressesTxsRequestMessage{ - Addresses: x.Addresses, - }, nil -} - -func (x *KaspadMessage_StartNotifyAddressesTxsResponse) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StartNotifyAddressesTxsResponseMessage is nil") - } - return x.StartNotifyAddressesTxsResponse.toAppMessage() -} - -func (x *KaspadMessage_StartNotifyAddressesTxsResponse) fromAppMessage(message *appmessage.StartNotifyAddressesTxsResponseMessage) error { - var err *RPCError - if message.Error != nil { - err = &RPCError{Message: message.Error.Message} - } - x.StartNotifyAddressesTxsResponse = &StartNotifytTxsConfirmationChangedResponseMessage{ - Error: err, - } - return nil -} diff --git a/app/appmessage/rpc_start_notify_txs_confirmation_changed.go b/app/appmessage/rpc_start_notify_txs_confirmation_changed.go deleted file mode 100644 index 10a6718ae..000000000 --- a/app/appmessage/rpc_start_notify_txs_confirmation_changed.go +++ /dev/null @@ -1,47 +0,0 @@ -package protowire - -import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/pkg/errors" -) - -func (x *KaspadMessage_StartNotifyTxsConfirmationChangedRequest) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "KaspadMessage_StartNotifyTxsConfirmationChangedRequest is nil") - } - return x.StartNotifyTxsConfirmationChangedRequest.toAppMessage() -} - -func (x *KaspadMessage_StartNotifyTxsConfirmationChangedRequest) fromAppMessage(message *appmessage.StartNotifyTxsConfirmationChangedRequestMessage) error { - x.StartNotifyTxsConfirmationChangedRequest = &StartNotifyTxsConfirmationChangedRequestMessage{ - TxIDs: message.TxIDs, - } - return nil -} - -func (x *StartNotifyTxsConfirmationChangedRequestMessage) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StartNotifyTxsConfirmationChangedRequestMessage is nil") - } - return &appmessage.StartNotifyTxsConfirmationChangedRequestMessage{ - TxIDs: x.TxIDs, - }, nil -} - -func (x *KaspadMessage_StartNotifyTxsConfirmationChangedResponse) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StartNotifyTxsConfirmationChangedResponseMessage is nil") - } - return x.StartNotifyTxsConfirmationChangedResponse.toAppMessage() -} - -func (x *KaspadMessage_StartNotifyTxsConfirmationChangedResponse) fromAppMessage(message *appmessage.StartNotifyTxsConfirmationChangedResponseMessage) error { - var err *RPCError - if message.Error != nil { - err = &RPCError{Message: message.Error.Message} - } - x.StartNotifyTxsConfirmationChangedResponse = &StartNotifytTxsConfirmationChangedResponseMessage{ - Error: err, - } - return nil -} diff --git a/app/appmessage/rpc_stop_notify_addresses_txs.go b/app/appmessage/rpc_stop_notify_addresses_txs.go deleted file mode 100644 index 8e3c1a0d3..000000000 --- a/app/appmessage/rpc_stop_notify_addresses_txs.go +++ /dev/null @@ -1,47 +0,0 @@ -package protowire - -import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/pkg/errors" -) - -func (x *KaspadMessage_StopNotifyAddressesTxsRequest) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "KaspadMessage_StopNotifyAddressesTxsRequest is nil") - } - return x.StopNotifyAddressesTxsRequest.toAppMessage() -} - -func (x *KaspadMessage_StopNotifyAddressesTxsRequest) fromAppMessage(message *appmessage.StopNotifyAddressesTxsRequestMessage) error { - x.StopNotifyAddressesTxsRequest = &StopNotifyAddressesTxsRequestMessage{ - Addresses: message.Addresses, - } - return nil -} - -func (x *StopNotifyAddressesTxsRequestMessage) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StopNotifyAddressesTxsRequestMessage is nil") - } - return &appmessage.StopNotifyAddressesTxsRequestMessage{ - Addresses: x.Addresses, - }, nil -} - -func (x *KaspadMessage_StopNotifyAddressesTxsResponse) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StopNotifyAddressesTxsResponseMessage is nil") - } - return x.StopNotifyAddressesTxsResponse.toAppMessage() -} - -func (x *KaspadMessage_StopNotifyAddressesTxsResponse) fromAppMessage(message *appmessage.StopNotifyAddressesTxsResponseMessage) error { - var err *RPCError - if message.Error != nil { - err = &RPCError{Message: message.Error.Message} - } - x.StopNotifyAddressesTxsResponse = &StopNotifytTxsConfirmationChangedResponseMessage{ - Error: err, - } - return nil -} \ No newline at end of file diff --git a/app/appmessage/rpc_stop_notify_txs_confirmation_changed.go b/app/appmessage/rpc_stop_notify_txs_confirmation_changed.go deleted file mode 100644 index eab04842b..000000000 --- a/app/appmessage/rpc_stop_notify_txs_confirmation_changed.go +++ /dev/null @@ -1,47 +0,0 @@ -package protowire - -import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/pkg/errors" -) - -func (x *KaspadMessage_StopNotifyTxsConfirmationChangedRequest) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "KaspadMessage_StopNotifyTxsConfirmationChangedRequest is nil") - } - return x.StopNotifyTxsConfirmationChangedRequest.toAppMessage() -} - -func (x *KaspadMessage_StopNotifyTxsConfirmationChangedRequest) fromAppMessage(message *appmessage.StopNotifyTxsConfirmationChangedRequestMessage) error { - x.StopNotifyTxsConfirmationChangedRequest = &StopNotifyTxsConfirmationChangedRequestMessage{ - TxIDs: message.TxIDs, - } - return nil -} - -func (x *StopNotifyTxsConfirmationChangedRequestMessage) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StopNotifyTxsConfirmationChangedRequestMessage is nil") - } - return &appmessage.StopNotifyTxsConfirmationChangedRequestMessage{ - TxIDs: x.TxIDs, - }, nil -} - -func (x *KaspadMessage_StopNotifyTxsConfirmationChangedResponse) toAppMessage() (appmessage.Message, error) { - if x == nil { - return nil, errors.Wrapf(errorNil, "StopNotifyTxsConfirmationChangedResponseMessage is nil") - } - return x.StopNotifyTxsConfirmationChangedResponse.toAppMessage() -} - -func (x *KaspadMessage_StopNotifyTxsConfirmationChangedResponse) fromAppMessage(message *appmessage.StopNotifyTxsConfirmationChangedResponseMessage) error { - var err *RPCError - if message.Error != nil { - err = &RPCError{Message: message.Error.Message} - } - x.StopNotifyTxsConfirmationChangedResponse = &StopNotifytTxsConfirmationChangedResponseMessage{ - Error: err, - } - return nil -} \ No newline at end of file