status-go/signal/events_wallet.go
Sale Djenic b348cca15c feat: added functionality to ask a client to sign a transaction and an endpoint to continue sending using provided signature
This functionality is needed in case the user wants to send a transaction and
signs it using the signature provided by the keycard (or any other compatible way).
2023-10-17 19:42:06 +02:00

19 lines
462 B
Go

package signal
const (
walletEvent = "wallet"
)
type UnsignedTransactions struct {
Type string `json:"type"`
Transactions []string `json:"transactions"`
}
// SendWalletEvent sends event from services/wallet/events.
func SendWalletEvent(event interface{}) {
send(walletEvent, event)
}
func SendTransactionsForSigningEvent(transactions []string) {
send(walletEvent, UnsignedTransactions{Type: "sing-transactions", Transactions: transactions})
}