aboutsummaryrefslogtreecommitdiff
path: root/src/webex/wxApi.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/webex/wxApi.ts')
-rw-r--r--src/webex/wxApi.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts
index 7afc116ba..e362fc34a 100644
--- a/src/webex/wxApi.ts
+++ b/src/webex/wxApi.ts
@@ -37,6 +37,9 @@ import {
ReserveCreationInfo,
ReserveRecord,
SenderWireInfos,
+ TipResponse,
+ TipPlanchetDetail,
+ TipStatus,
WalletBalance,
} from "../types";
@@ -358,3 +361,23 @@ export function getPurchase(contractTermsHash: string): Promise<PurchaseRecord>
export function getFullRefundFees(args: { refundPermissions: RefundPermission[] }): Promise<AmountJson> {
return callBackend("get-full-refund-fees", { refundPermissions: args.refundPermissions });
}
+
+
+/**
+ * Get or generate planchets to give the merchant that wants to tip us.
+ */
+export function getTipPlanchets(merchantDomain: string, tipId: string, amount: AmountJson, deadline: number, exchangeUrl: string): Promise<TipPlanchetDetail[]> {
+ return callBackend("get-tip-planchets", { merchantDomain, tipId, amount, deadline, exchangeUrl });
+}
+
+export function getTipStatus(merchantDomain: string, tipId: string): Promise<TipStatus> {
+ return callBackend("get-tip-status", { merchantDomain, tipId });
+}
+
+export function acceptTip(merchantDomain: string, tipId: string): Promise<TipStatus> {
+ return callBackend("accept-tip", { merchantDomain, tipId });
+}
+
+export function processTipResponse(merchantDomain: string, tipId: string, tipResponse: TipResponse): Promise<void> {
+ return callBackend("process-tip-response", { merchantDomain, tipId, tipResponse });
+}