diff --git a/src/services/fet.ts b/src/services/fet.ts index 19d306e..fb15363 100644 --- a/src/services/fet.ts +++ b/src/services/fet.ts @@ -117,6 +117,21 @@ export class FetService extends Service { return data; } + /** + * Craft fetch.ai send transaction + * @param pubkey wallet pubkey, this is different from the wallet address + * @param to recipient address + * @param amountFet how many tokens to send in FET + */ + async craftSendTx(pubkey: string, to: string, amountFet: number): Promise { + const { data } = await api.post(`/v1/fet/transaction/send`, { + pubkey: pubkey, + amount_afet: this.fetToAfet(amountFet.toString()), + to: to, + }); + return data; + } + /** * Sign transaction with given integration * @param integration custody solution to sign with diff --git a/src/services/zeta.ts b/src/services/zeta.ts index 8e827e3..b4f62fa 100644 --- a/src/services/zeta.ts +++ b/src/services/zeta.ts @@ -117,6 +117,21 @@ export class ZetaService extends Service { return data; } + /** + * Craft zeta send transaction + * @param pubkey wallet pubkey, this is different from the wallet address + * @param to recipient address + * @param amountZeta how many tokens to send in ZETA + */ + async craftSendTx(pubkey: string, to: string, amountZeta: number): Promise { + const { data } = await api.post(`/v1/zeta/transaction/send`, { + pubkey: pubkey, + amount_azeta: this.zetaToAZeta(amountZeta.toString()), + to: to, + }); + return data; + } + /** * Sign transaction with given integration * @param integration custody solution to sign with