status-lib/status/statusgo_backend/chatCommands.nim

21 lines
1.2 KiB
Nim
Raw Normal View History

2021-09-08 18:05:39 +00:00
import json, chronicles
import core, ../utils
proc acceptRequestAddressForTransaction*(messageId: string, address: string): string =
result = callPrivateRPC("acceptRequestAddressForTransaction".prefix, %* [messageId, address])
proc declineRequestAddressForTransaction*(messageId: string): string =
result = callPrivateRPC("declineRequestAddressForTransaction".prefix, %* [messageId])
proc declineRequestTransaction*(messageId: string): string =
result = callPrivateRPC("declineRequestTransaction".prefix, %* [messageId])
proc requestAddressForTransaction*(chatId: string, fromAddress: string, amount: string, tokenAddress: string): string =
result = callPrivateRPC("requestAddressForTransaction".prefix, %* [chatId, fromAddress, amount, tokenAddress])
proc requestTransaction*(chatId: string, fromAddress: string, amount: string, tokenAddress: string): string =
result = callPrivateRPC("requestTransaction".prefix, %* [chatId, amount, tokenAddress, fromAddress])
proc acceptRequestTransaction*(transactionHash: string, messageId: string, signature: string): string =
result = callPrivateRPC("acceptRequestTransaction".prefix, %* [transactionHash, messageId, signature])