File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,21 @@ export class FetService extends Service {
117117 return data ;
118118 }
119119
120+ /**
121+ * Craft fetch.ai send transaction
122+ * @param pubkey wallet pubkey, this is different from the wallet address
123+ * @param to recipient address
124+ * @param amountFet how many tokens to send in FET
125+ */
126+ async craftSendTx ( pubkey : string , to : string , amountFet : number ) : Promise < CosmosTx > {
127+ const { data } = await api . post < CosmosTx > ( `/v1/fet/transaction/send` , {
128+ pubkey : pubkey ,
129+ amount_afet : this . fetToAfet ( amountFet . toString ( ) ) ,
130+ to : to ,
131+ } ) ;
132+ return data ;
133+ }
134+
120135 /**
121136 * Sign transaction with given integration
122137 * @param integration custody solution to sign with
Original file line number Diff line number Diff line change @@ -117,6 +117,21 @@ export class ZetaService extends Service {
117117 return data ;
118118 }
119119
120+ /**
121+ * Craft zeta send transaction
122+ * @param pubkey wallet pubkey, this is different from the wallet address
123+ * @param to recipient address
124+ * @param amountZeta how many tokens to send in ZETA
125+ */
126+ async craftSendTx ( pubkey : string , to : string , amountZeta : number ) : Promise < CosmosTx > {
127+ const { data } = await api . post < CosmosTx > ( `/v1/zeta/transaction/send` , {
128+ pubkey : pubkey ,
129+ amount_azeta : this . zetaToAZeta ( amountZeta . toString ( ) ) ,
130+ to : to ,
131+ } ) ;
132+ return data ;
133+ }
134+
120135 /**
121136 * Sign transaction with given integration
122137 * @param integration custody solution to sign with
You can’t perform that action at this time.
0 commit comments