@@ -8,10 +8,10 @@ import {
88 WalletBalance ,
99} from '../types/tapplet'
1010
11- export type SendOneSidedRequest = {
11+ export interface SendOneSidedRequest {
1212 amount : string
1313 address : string
14- message ? : string
14+ paymentId : string
1515}
1616
1717export class TariL1Signer {
@@ -72,17 +72,17 @@ export class TariL1Signer {
7272 * @description send XTM via one-sided transaction
7373 * @param amount XTM amount (uT or T)
7474 * @param address Tari Address one-sided
75- * @param message (optional) payment-id
75+ * @param paymentId (optional) payment-id
7676 * @returns true if tx success; otherwise false
7777 */
7878 public async sendOneSided ( {
7979 amount,
8080 address,
81- message ,
81+ paymentId ,
8282 } : SendOneSidedRequest ) : Promise < boolean > {
8383 return this . sendRequest ( {
8484 methodName : 'sendOneSided' ,
85- args : [ { amount, address, message } ] ,
85+ args : [ { amount, address, paymentId } ] ,
8686 } )
8787 }
8888
@@ -96,6 +96,28 @@ export class TariL1Signer {
9696 args : [ ] ,
9797 } )
9898 }
99+
100+ /**
101+ * @description check if there is any processing transaction
102+ * @returns true or false
103+ */
104+ public async isPendingTappletTx ( ) : Promise < SendOneSidedRequest | undefined > {
105+ return this . sendRequest ( {
106+ methodName : 'isPendingTappletTx' ,
107+ args : [ ] ,
108+ } )
109+ }
110+
111+ /**
112+ * @description check if there is any processing transaction
113+ * @returns true or false
114+ */
115+ public async removePendingTappletTx ( paymentId : string ) : Promise < boolean > {
116+ return this . sendRequest ( {
117+ methodName : 'removePendingTappletTx' ,
118+ args : [ paymentId ] ,
119+ } )
120+ }
99121}
100122
101123function sendSignerCall < MethodName extends SignerMethodNames > (
0 commit comments