-
Notifications
You must be signed in to change notification settings - Fork 62
/
blockchain.ts
47 lines (44 loc) · 1.11 KB
/
blockchain.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
import {
Blockchain,
BlockchainMessage,
PermissionResponseV3,
ResponseInput,
App,
DesktopApp,
ExtensionApp,
WebApp
} from '@airgap/beacon-types'
import { desktopList, extensionList, iOSList, webList } from './ui/alert/wallet-lists'
export class TezosBlockchain implements Blockchain {
public readonly identifier: string = 'xtz'
async validateRequest(input: BlockchainMessage): Promise<void> {
// TODO: Validation
if (input) {
return
}
}
async handleResponse(input: ResponseInput): Promise<void> {
// TODO: Validation
if (input) {
return
}
}
async getWalletLists(): Promise<{
extensionList: ExtensionApp[]
desktopList: DesktopApp[]
webList: WebApp[]
iOSList: App[]
}> {
return {
extensionList: extensionList,
desktopList: desktopList,
webList: webList,
iOSList: iOSList
}
}
async getAccountInfosFromPermissionResponse(
_permissionResponse: PermissionResponseV3<'tezos'>
): Promise<{ accountId: string; address: string; publicKey: string }[]> {
return [{ accountId: '', address: '', publicKey: '' }]
}
}