mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
chore: specify params related to bignumber (#36813)
This commit is contained in:
parent
1bcedc50f2
commit
014198710d
40
types/libra-core/index.d.ts
vendored
40
types/libra-core/index.d.ts
vendored
@ -4,6 +4,8 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
export type Signature = Uint8Array;
|
||||
|
||||
export class KeyPair {
|
||||
@ -24,10 +26,10 @@ export type AccountStates = AccountState[];
|
||||
|
||||
export class AccountState {
|
||||
readonly authenticationKey: Uint8Array;
|
||||
readonly balance: any;
|
||||
readonly receivedEventsCount: any;
|
||||
readonly sentEventsCount: any;
|
||||
readonly sequenceNumber: any;
|
||||
readonly balance: BigNumber;
|
||||
readonly receivedEventsCount: BigNumber;
|
||||
readonly sentEventsCount: BigNumber;
|
||||
readonly sequenceNumber: BigNumber;
|
||||
|
||||
static default(address: string): AccountState;
|
||||
|
||||
@ -113,19 +115,19 @@ export class LibraClient {
|
||||
|
||||
getAccountTransaction(
|
||||
address: AccountAddressLike,
|
||||
sequenceNumber: any,
|
||||
fetchEvents?: boolean,
|
||||
sequenceNumber: BigNumber | string | number,
|
||||
fetchEvents?: boolean
|
||||
): Promise<LibraSignedTransactionWithProof | null>;
|
||||
|
||||
mintWithFaucetService(
|
||||
receiver: AccountAddress | string,
|
||||
numCoins: any,
|
||||
waitForConfirmation?: boolean,
|
||||
numCoins: BigNumber | string | number,
|
||||
waitForConfirmation?: boolean
|
||||
): Promise<string>;
|
||||
|
||||
waitForConfirmation(
|
||||
accountAddress: AccountAddress | string,
|
||||
transactionSequenceNumber: any,
|
||||
transactionSequenceNumber: number | string | BigNumber
|
||||
): Promise<void>;
|
||||
|
||||
signTransaction(transaction: LibraTransaction, keyPair: KeyPair): Promise<LibraSignedTransaction>;
|
||||
@ -133,7 +135,7 @@ export class LibraClient {
|
||||
transferCoins(
|
||||
sender: Account,
|
||||
recipientAddress: string,
|
||||
numCoins: any,
|
||||
numCoins: number | string | BigNumber
|
||||
): Promise<LibraTransactionResponse>;
|
||||
|
||||
execute(transaction: LibraTransaction, sender: Account): Promise<LibraTransactionResponse>;
|
||||
@ -338,28 +340,28 @@ export enum LibraProgramArgumentType {
|
||||
}
|
||||
|
||||
export interface LibraGasConstraint {
|
||||
maxGasAmount: any;
|
||||
gasUnitPrice: any;
|
||||
maxGasAmount: BigNumber;
|
||||
gasUnitPrice: BigNumber;
|
||||
}
|
||||
|
||||
export interface LibraTransaction {
|
||||
program: LibraProgram;
|
||||
gasConstraint: LibraGasConstraint;
|
||||
expirationTime: any;
|
||||
expirationTime: BigNumber;
|
||||
sendersAddress: Uint8Array;
|
||||
sequenceNumber: any;
|
||||
sequenceNumber: BigNumber;
|
||||
}
|
||||
|
||||
export function LibraTransaction(
|
||||
program: LibraProgram,
|
||||
gasConstraint: LibraGasConstraint,
|
||||
expirationTime: any,
|
||||
expirationTime: BigNumber,
|
||||
sendersAddress: Uint8Array,
|
||||
sequenceNumber: any,
|
||||
sequenceNumber: BigNumber,
|
||||
): void;
|
||||
|
||||
export namespace LibraTransaction {
|
||||
function createTransfer(recipientAddress: string, numAccount: any): LibraTransaction;
|
||||
function createTransfer(recipientAddress: string, numAccount: BigNumber): LibraTransaction;
|
||||
}
|
||||
|
||||
export interface LibraTransactionResponse {
|
||||
@ -407,7 +409,7 @@ export function LibraSignedTransaction(transaction: LibraTransaction, publicKey:
|
||||
|
||||
export interface LibraTransactionEvent {
|
||||
data: Uint8Array;
|
||||
sequenceNumber: any;
|
||||
sequenceNumber: BigNumber;
|
||||
address?: AccountAddress;
|
||||
path?: Uint8Array;
|
||||
}
|
||||
@ -420,7 +422,7 @@ export interface LibraSignedTransactionWithProof {
|
||||
|
||||
export function LibraSignedTransactionWithProof(signedTransaction: LibraSignedTransaction, proof?: object, events?: LibraTransactionEvent[]): void;
|
||||
|
||||
export function LibraTransactionEvent(data: Uint8Array, sequenceNumber: any, address?: AccountAddress, path?: Uint8Array): void;
|
||||
export function LibraTransactionEvent(data: Uint8Array, sequenceNumber: BigNumber, address?: AccountAddress, path?: Uint8Array): void;
|
||||
|
||||
export interface WalletConfig {
|
||||
mnemonic?: string;
|
||||
|
||||
6
types/libra-core/package.json
Normal file
6
types/libra-core/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"bignumber.js": "9.0.0"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user