From 8bb2ada92ff70e2f69b610accc2d31b92ee2841a Mon Sep 17 00:00:00 2001 From: Martin Saldinger <51637671+LeTamanoir@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:15:39 +0100 Subject: [PATCH] rename babylon to bbn (#167) --- src/kiln.ts | 6 +++--- src/services/{babylon.ts => bbn.ts} | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/services/{babylon.ts => bbn.ts} (90%) diff --git a/src/kiln.ts b/src/kiln.ts index 8fd4589..9456f06 100644 --- a/src/kiln.ts +++ b/src/kiln.ts @@ -21,7 +21,7 @@ import { ZetaService } from "./services/zeta"; import { KILN_VALIDATORS as v } from "./validators"; import { KavaService } from "./services/kava"; import { PolService } from "./services/pol"; -import { BabylonService } from "./services/babylon"; +import { BbnService } from "./services/bbn"; type Config = { apiToken: string; @@ -53,7 +53,7 @@ export class Kiln { zeta: ZetaService; kava: KavaService; pol: PolService; - babylon: BabylonService; + bbn: BbnService; constructor({ testnet, apiToken, baseUrl }: Config) { api.defaults.headers.common.Authorization = `Bearer ${apiToken}`; @@ -81,6 +81,6 @@ export class Kiln { this.zeta = new ZetaService({ testnet }); this.kava = new KavaService({ testnet }); this.pol = new PolService({ testnet }); - this.babylon = new BabylonService({ testnet }); + this.bbn = new BbnService({ testnet }); } } diff --git a/src/services/babylon.ts b/src/services/bbn.ts similarity index 90% rename from src/services/babylon.ts rename to src/services/bbn.ts index b915f9f..5c3b207 100644 --- a/src/services/babylon.ts +++ b/src/services/bbn.ts @@ -6,7 +6,7 @@ import type { ServiceProps } from "../types/service"; import type { Integration } from "../types/integrations"; import { FireblocksSigner as FireblocksPsbtSigner } from "@fireblocks/psbt-sdk"; -export class BabylonService extends Service { +export class BbnService extends Service { constructor({ testnet }: ServiceProps) { super({ testnet }); } @@ -15,7 +15,7 @@ export class BabylonService extends Service { * Craft a babylon stake transaction */ async craftStakeTx(accountId: string, publicKey: string, amountSatoshi: number, timeLock: number, feeRate: number): Promise { - const { data } = await api.post('/v1/babylon/transaction/stake', { + const { data } = await api.post('/v1/bbn/transaction/stake', { account_id: accountId, public_key: publicKey, amount_satoshi: amountSatoshi, @@ -59,7 +59,7 @@ export class BabylonService extends Service { * @param signedTx the transaction to broadcast */ async broadcast(signedTx: BitcoinSignedTx): Promise { - const { data } = await api.post('/v1/babylon/transaction/broadcast', { + const { data } = await api.post('/v1/bbn/transaction/broadcast', { tx_serialized: signedTx.data.signed_tx_serialized, }); return data;