@@ -40,16 +40,23 @@ export class TariL1Signer {
4040 return sendSignerCall ( req , id )
4141 }
4242
43+ /**
44+ * @description check if Tari Signer is connected with the Tari Universe
45+ * @returns true or false
46+ */
4347 public async isConnected ( ) : Promise < boolean > {
4448 return this . sendRequest ( {
4549 methodName : 'isConnected' ,
4650 args : [ ] ,
4751 } )
4852 }
4953
50- // TODO what do we need as response?
54+ /**
55+ * @description get Tari Account details
56+ * @returns account data
57+ */
5158 public async getAccount ( ) : Promise < AccountData > {
52- // TODO implement in TU
59+ // TODO what do we need as response?
5360 const resp = await this . sendRequest ( {
5461 methodName : 'getAccount' ,
5562 args : [ ] ,
@@ -62,23 +69,34 @@ export class TariL1Signer {
6269 }
6370
6471 /**
65- *
6672 * @description send XTM via one-sided transaction
6773 * @param amount XTM amount (uT or T)
6874 * @param address Tari Address one-sided
6975 * @param message (optional) payment-id
70- * @returns
76+ * @returns true if tx success; otherwise false
7177 */
7278 public async sendOneSided ( {
7379 amount,
7480 address,
7581 message,
76- } : SendOneSidedRequest ) : Promise < void > {
82+ } : SendOneSidedRequest ) : Promise < boolean > {
7783 return this . sendRequest ( {
7884 methodName : 'sendOneSided' ,
7985 args : [ { amount, address, message } ] ,
8086 } )
8187 }
88+
89+ /**
90+ * @description get Tari Account balance
91+ * @returns XTM amount
92+ */
93+ public async getTariBalance ( ) : Promise < string > {
94+ //TODO implement on TU side
95+ return this . sendRequest ( {
96+ methodName : 'getTariBalance' ,
97+ args : [ ] ,
98+ } )
99+ }
82100}
83101
84102function sendSignerCall < MethodName extends SignerMethodNames > (
0 commit comments