-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
96 lines (88 loc) · 2.08 KB
/
types.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { HexString, Bytes32, EthAddress, StellarAddress } from './runtimeTypes'
export type ProxyVote = {
// these should be `bytes32` hexstrings
proxyReq: [string, string, string, string, string]
// this is a `bytes` hexstring
extra: string
}
export type WindowWeb3Init = {
detected: boolean
loaded: boolean
web3?: any
networkStatus?: {
id: number
type: string
hasIndex: boolean
}
}
export type EthNetConf = {
indexEnsName: string
auxContract: string
httpProvider: string
webSocketsProvider: string
delegationEnsName: string
ensResolver: string
ens: string
etherscanLink: string
name: string
archiveUrl: string
archivePushUrl: string
lookupAddress: string
unsafeEd25519DelegationAddr: string
svApiUrl: string
}
export type SvNetwork = {
netConf: EthNetConf
web3: any
resolver: any
index: any
backend: any
aux: any
payments: any,
events: {
getBlockPeriodic: any
}
}
export type BallotSpecV2 = {
ballotVersion: number
ballotInner: {
ballotTitle: string
shortDesc: string
longDesc: string
discussionLink?: string
encyptionPK?: string
subGroup?: any
}
optionsVersion: number
optionsInner?: {
options?: any
aux?: any
}
subgroupVersion: number
subgroupInner?: {
tokenId: string
networkId: [number, number]
delegationSc: string
signature: string
proposerPk: string
sigType: string
}
}
export type GlobalBallot = {
data: BallotSpecV2
rawBallotSpecString: string
ballotId: string
ballotOwner: string
bbFarmAddress: string
deprecated: boolean
startTime: string
endTime: string
extraData: string
hasVoted: boolean
nVotesCast: string
secKey: string
specHash: string
submissionBits: string
}
export type EthTx = { to: string; value: number; gas: number | HexString; data: string }
export type Ed25519DelegationResp = {to: EthAddress, from: StellarAddress, txid: Bytes32}