forked from wanderwallet/Wander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshim.d.ts
66 lines (59 loc) · 1.58 KB
/
shim.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
55
56
57
58
59
60
61
62
63
64
65
66
import type { ProtocolWithReturn } from "@arconnect/webext-bridge";
import type { DisplayTheme } from "@arconnect/components";
import type { Chunk } from "~api/modules/sign/chunks";
import type { InjectedEvents } from "~utils/events";
import "styled-components";
declare module "@arconnect/webext-bridge" {
export interface ProtocolMap {
api_call: ProtocolWithReturn<ApiCall, ApiResponse>;
auth_result: AuthResult;
switch_wallet_event: string | null;
copy_address: string;
chunk: ProtocolWithReturn<ApiCall<Chunk>, ApiResponse<number>>;
event: Event;
auth_listening: number;
auth_chunk: Chunk;
ar_protocol: ProtocolWithReturn<{ url: string }, { url: sting }>;
}
}
interface ApiCall<DataType = any> extends JsonValue {
type: string;
data?: DataType;
callID: number | string;
}
interface ApiResponse<DataType = any> extends ApiCall<DataType> {
error?: boolean;
}
interface AuthResult<DataType = any> {
type: string;
authID: string;
error?: boolean;
data?: DataType;
}
interface Event {
name: keyof InjectedEvents;
value: unknown;
}
declare module "styled-components" {
export interface DefaultTheme {
displayTheme: DisplayTheme;
theme: string;
primaryText: string;
secondaryText: string;
secondaryTextv2: string;
background: string;
backgroundSecondary: string;
inputField: string;
primary: string;
cardBorder: string;
fail: string;
cardBackground: string;
primaryBtnHover: string;
primaryTextv2: string;
}
}
declare namespace NodeJS {
interface ProcessEnv {
BETA_VERSION?: string;
}
}