Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/kiln.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}`;
Expand Down Expand Up @@ -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 });
}
}
6 changes: 3 additions & 3 deletions src/services/babylon.ts → src/services/bbn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand All @@ -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<BitcoinTx> {
const { data } = await api.post<BitcoinTx>('/v1/babylon/transaction/stake', {
const { data } = await api.post<BitcoinTx>('/v1/bbn/transaction/stake', {
account_id: accountId,
public_key: publicKey,
amount_satoshi: amountSatoshi,
Expand Down Expand Up @@ -59,7 +59,7 @@ export class BabylonService extends Service {
* @param signedTx the transaction to broadcast
*/
async broadcast(signedTx: BitcoinSignedTx): Promise<BitcoinTxHash> {
const { data } = await api.post<BitcoinTxHash>('/v1/babylon/transaction/broadcast', {
const { data } = await api.post<BitcoinTxHash>('/v1/bbn/transaction/broadcast', {
tx_serialized: signedTx.data.signed_tx_serialized,
});
return data;
Expand Down