-
Notifications
You must be signed in to change notification settings - Fork 35
/
interfaces.ts
80 lines (60 loc) · 1.82 KB
/
interfaces.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { Authenticator } from './Authenticator'
export interface AuthenticatorResponse {
/** List of authenticators */
availableAuthenticators: Authenticator[]
/** The Authenticator to use for auto login, if supported and available */
autoLoginAuthenticator: Authenticator | null
}
/** The fields that an Authenticator can style on their button */
export interface ButtonStyle {
/** Whatever is provided here will be set as the `src` attribute */
icon: string
text: string
textColor: string
/** CSS string */
background: string
}
/** Defines a supported chain */
export interface Chain {
/** The chainId for the chain */
chainId: string
/** One or more rpcEndpoints associated with that chainId */
rpcEndpoints: RpcEndpoint[]
}
export interface RpcEndpoint {
protocol: string
host: string
port: number
path?: string
}
/** Optional arguments to signTransaction */
export interface SignTransactionConfig {
/** If the transaction should also be broadcast */
broadcast?: boolean
/** Number of blocks behind (for use with eosjs) */
blocksBehind?: number
/** Number of seconds before expiration (for use with eosjs) */
expireSeconds?: number
}
/** The object returned from signTransaction */
export interface SignTransactionResponse {
/** Was the transaction broadcast */
wasBroadcast: boolean
/** The transcation id (optional) */
transactionId?: string
/** The status of the transaction as returned by the RPC API (optional) */
status?: string
/** Set if there was an error */
error?: {
/** The error code */
code: string,
/** The error message */
message: string,
/** The error name */
name: string
}
/** The raw transaction object */
transaction: any
}
export const UALLoggedInAuthType = 'UALLoggedInAuthType'
export const UALAccountName = 'UALAccountName'