@@ -24,6 +24,14 @@ import {
2424 BuildTransferalTransactionResponse ,
2525 SubmitTransferalTransactionRequest ,
2626 SubmitTransferalTransactionResponse ,
27+ BuildTransferalRequestTransactionRequest ,
28+ BuildTransferalRequestTransactionResponse ,
29+ SubmitTransferalRequestTransactionRequest ,
30+ SubmitTransferalRequestTransactionResponse ,
31+ GetTransferalRecordsResponse ,
32+ GetTransferalRecordsRequest ,
33+ GetTransferalRecordByTxHashRequest ,
34+ GetTransferalRecordByTxHashResponse ,
2735} from '../../types' ;
2836import { Api } from '../api' ;
2937
@@ -116,6 +124,30 @@ export class Accounts extends Api {
116124 return this . resolveAxiosData ( res ) ;
117125 }
118126
127+ /**
128+ * Retrieves transferal records.
129+ * @param data - The transferal records request parameters.
130+ * @returns A promise that resolves to the transferal records response.
131+ */
132+ public getTransferalRecords (
133+ data : GetTransferalRecordsRequest ,
134+ ) : Promise < GetTransferalRecordsResponse > {
135+ const res = this . axiosInstance . get ( `/accounts/transferal-records` , { params : data } ) ;
136+ return this . resolveAxiosData ( res ) ;
137+ }
138+
139+ /**
140+ * Retrieves a single transferal record by transaction hash.
141+ * @param txHash - The transaction hash of the transferal record to retrieve.
142+ * @returns A promise that resolves to the transferal record response.
143+ */
144+ public getTransferalRecordByTxHash (
145+ data : GetTransferalRecordByTxHashRequest ,
146+ ) : Promise < GetTransferalRecordByTxHashResponse > {
147+ const res = this . axiosInstance . get ( `/accounts/transferal-records/${ data . tx_hash } ` ) ;
148+ return this . resolveAxiosData ( res ) ;
149+ }
150+
119151 /**
120152 * Retrieves account balance.
121153 * @returns A promise that resolves to the account balance response.
@@ -184,6 +216,18 @@ export class Accounts extends Api {
184216 return this . resolveAxiosData ( res ) ;
185217 }
186218
219+ /**
220+ * Builds a transferal request transaction.
221+ * @param data - The build transferal transaction request data.
222+ * @returns A promise that resolves to the build transferal transaction response.
223+ */
224+ public buildTransferalRequestTransaction (
225+ data : BuildTransferalRequestTransactionRequest ,
226+ ) : Promise < BuildTransferalRequestTransactionResponse > {
227+ const res = this . axiosInstance . post ( '/accounts/request-transferal/build' , data ) ;
228+ return this . resolveAxiosData ( res ) ;
229+ }
230+
187231 /**
188232 * Submits a deposit transaction.
189233 * @param data - The submit deposit transaction request data.
@@ -213,10 +257,22 @@ export class Accounts extends Api {
213257 * @param data - The submit transferal transaction request data.
214258 * @returns A promise that resolves to the submit transferal transaction response.
215259 */
216- public submittransferalTransaction (
260+ public submitTransferalTransaction (
217261 data : SubmitTransferalTransactionRequest ,
218262 ) : Promise < SubmitTransferalTransactionResponse > {
219263 const res = this . axiosInstance . post ( '/accounts/transferal/submit' , data ) ;
220264 return this . resolveAxiosData ( res ) ;
221265 }
266+
267+ /**
268+ * Submits a transferal requesttransaction.
269+ * @param data - The submit transferal transaction request data.
270+ * @returns A promise that resolves to the submit transferal transaction response.
271+ */
272+ public submitTransferalRequestTransaction (
273+ data : SubmitTransferalRequestTransactionRequest ,
274+ ) : Promise < SubmitTransferalRequestTransactionResponse > {
275+ const res = this . axiosInstance . post ( '/accounts/request-transferal/submit' , data ) ;
276+ return this . resolveAxiosData ( res ) ;
277+ }
222278}
0 commit comments