@zebec-network/exchange-card-sdk
Version:
An sdk for purchasing silver card in zebec
33 lines (32 loc) • 1.11 kB
TypeScript
import { ethers } from "ethers";
import type { BobaChainId } from "../types";
export type TransferBobaParams = {
amount: string | number;
overrides?: Omit<ethers.Overrides, "from" | "value" | "chainId">;
};
export type TransferTokenParams = {
amount: string | number;
tokenAddress: string;
symbol: string;
overrides?: Omit<ethers.Overrides, "from" | "value" | "chainId">;
};
export declare class BobaService {
readonly signer: ethers.Signer;
readonly network: "mainnet" | "testnet";
readonly chainId: BobaChainId;
private readonly apiService;
constructor(signer: ethers.Signer, sdkOptions?: {
sandbox?: boolean;
});
/**
* Fetches the Bitcoin vault address.
*
* @returns {Promise<{ address: string }>} A promise that resolves to the vault address.
*/
fetchVault(symbol: string): Promise<{
address: string;
tag?: string;
}>;
transferBobaEth(params: TransferBobaParams): Promise<ethers.TransactionReceipt | null>;
transferToken(params: TransferTokenParams): Promise<ethers.TransactionReceipt | null>;
}