starknet-devnet
Version:
Starknet Devnet provider
40 lines (39 loc) • 1.16 kB
TypeScript
import { AxiosError } from "axios";
export type BigNumberish = string | number | bigint;
export type BalanceUnit = "WEI" | "FRI";
export interface PredeployedAccount {
balance: {
[key: string]: {
amount: string;
unit: BalanceUnit;
};
};
initial_balance: string;
private_key: string;
public_key: string;
address: string;
}
export declare class DevnetProviderError extends Error {
constructor(msg: string);
static fromAxiosError(err: AxiosError): DevnetProviderError;
}
export declare class DevnetError extends Error {
constructor(msg: string);
}
export declare class GithubError extends Error {
constructor(msg: string);
}
export type BlockTag = "latest" | "pending";
/**
* If string of value "latest" or "pending", interpreted as block tag.
* If number, interpreted as block number.
* If hex string, interpreted as block hash.
*/
export type BlockId = BlockTag | number | string;
export declare function toRpcBlockId(blockId: BlockId): "latest" | "pending" | {
block_number: number;
block_hash?: undefined;
} | {
block_hash: string;
block_number?: undefined;
};