forked from SoulSwapFinance/soul-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
soul-env.d.ts
54 lines (46 loc) · 1.38 KB
/
soul-env.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { BigNumber, BigNumberish } from '@ethersproject/bignumber'
import Fraction from './src/entities/bignumber/Fraction'
declare module 'fortmatic'
declare global {
interface String {
toBigNumber(decimals: number): BigNumber
}
interface Window {
walletLinkExtension?: any
ethereum?: {
isCoinbaseWallet?: true
isMetaMask?: true
on?: (...args: any[]) => void
removeListener?: (...args: any[]) => void
removeAllListeners?: (...args: any[]) => void
autoRefreshOnNetworkChange?: boolean
}
web3?: Record<string, unknown>
}
}
declare module 'content-hash' {
declare function decode(x: string): string
declare function getCodec(x: string): string
}
declare module 'multihashes' {
declare function decode(buff: Uint8Array): {
code: number
name: string
length: number
digest: Uint8Array
}
declare function toB58String(hash: Uint8Array): string
}
declare module 'jazzicon' {
export default function (diameter: number, seed: number): HTMLElement
}
declare module 'formatic'
declare module '@ethersproject/bignumber' {
interface BigNumber {
mulDiv(multiplier: BigNumberish, divisor: BigNumberish): BigNumber
toFixed(decimals: BigNumberish): string
toFraction(decimals: BigNumberish, base: BigNumberish): Fraction
min(...values: BigNumberish[]): BigNumber
max(...values: BigNumberish[]): BigNumber
}
}