-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
63 lines (61 loc) · 2.67 KB
/
index.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
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export function overwriteConfig(adminPort: number, configPath: string, keystoreConnectionUrl: string, bootstrapServerUrl: string, signalingServerUrl: string, allowedOrigin: string, useDpki: boolean, iceServerUrls?: Array<string> | undefined | null, keystoreInProcEnvironmentDir?: string | undefined | null): string
export function defaultConductorConfig(adminPort: number, conductorEnvironmentPath: string, keystoreConnectionUrl: string, bootstrapServerUrl: string, signalingServerUrl: string, allowedOrigin: string, useDpki: boolean, iceServerUrls?: Array<string> | undefined | null, keystoreInProcEnvironmentDir?: string | undefined | null): string
export interface HappAndUiHashes {
happSha256: string
webhappSha256?: string
uiSha256?: string
}
export interface StoredHappPathAndHashes {
happPath: string
happSha256: string
webhappSha256?: string
uiSha256?: string
}
export function happBytesWithCustomProperties(happPath: string, properties: Record<string, string | undefined | null>): Promise<Array<number>>
/**
* Saves a happ or a webhapp file. If a uis_dir is specified and it is a webhapp,
* then the UI will be stored in [uis_dir]/[sha 256 of UI]/assets. If no uis_dir
* is specified, only the happ file will be stored.
*/
export function saveHappOrWebhapp(happOrWebHappPath: string, happsDir: string, uisDir?: string | undefined | null): Promise<StoredHappPathAndHashes>
/**
* Checks that the happ or webhapp is of the correct format
* WARNING: The decoding and encoding of the happ bytes seems to affect happ's sha256 hash.
*/
export function validateHappOrWebhapp(happOrWebhappBytes: Array<number>): Promise<HappAndUiHashes>
export interface ZomeCallUnsignedNapi {
cellId: Array<Array<number>>
zomeName: string
fnName: string
payload: Array<number>
capSecret?: Array<number>
provenance: Array<number>
nonce: Array<number>
expiresAt: number
}
export interface ZomeCallNapi {
cellId: Array<Array<number>>
zomeName: string
fnName: string
payload: Array<number>
capSecret?: Array<number>
provenance: Array<number>
nonce: Array<number>
expiresAt: number
signature: Array<number>
}
export type JsWeRustHandler = WeRustHandler
export class WeRustHandler {
constructor()
static connect(keystoreUrl: string, passphrase: string): Promise<WeRustHandler>
signZomeCall(zomeCallUnsignedJs: ZomeCallUnsignedNapi): Promise<ZomeCallNapi>
}
export type JsZomeCallSigner = ZomeCallSigner
export class ZomeCallSigner {
constructor()
static connect(connectionUrl: string, passphrase: string): Promise<ZomeCallSigner>
signZomeCall(zomeCallUnsignedJs: ZomeCallUnsignedNapi): Promise<ZomeCallNapi>
}