|
1 | | -/* tslint:disable */ |
2 | | -/* eslint-disable */ |
3 | | - |
4 | 1 | /* auto-generated by NAPI-RS */ |
| 2 | +/* eslint-disable */ |
| 3 | +export declare class WeRustHandler { |
| 4 | + /** Connect to lair keystore */ |
| 5 | + static connect(keystoreUrl: string, passphrase: string): Promise<WeRustHandler> |
| 6 | + /** Sign a zome call */ |
| 7 | + signZomeCall(payload: Array<number>, pubKey: Array<number>): Promise<Array<number>> |
| 8 | +} |
5 | 9 |
|
6 | | -export function overwriteConfig(adminPort: number, configPath: string, keystoreConnectionUrl: string, bootstrapServerUrl: string, signalingServerUrl: string, allowedOrigin: string, signalAllowPlainText: boolean, iceServerUrls?: Array<string> | undefined | null, keystoreInProcEnvironmentDir?: string | undefined | null): string |
7 | | -export function defaultConductorConfig(adminPort: number, conductorEnvironmentPath: string, keystoreConnectionUrl: string, bootstrapServerUrl: string, signalingServerUrl: string, allowedOrigin: string, signalAllowPlainText: boolean, iceServerUrls?: Array<string> | undefined | null, keystoreInProcEnvironmentDir?: string | undefined | null): string |
8 | 10 | export interface HappAndUiHashes { |
9 | 11 | happSha256: string |
10 | 12 | webhappSha256?: string |
11 | 13 | uiSha256?: string |
12 | 14 | } |
| 15 | + |
| 16 | +export declare function happBytesWithCustomProperties(happPath: string, properties: Record<string, string | undefined | null>): Promise<Array<number>> |
| 17 | + |
| 18 | +/** |
| 19 | + * Saves a happ or a webhapp file. If a uis_dir is specified and it is a webhapp, |
| 20 | + * then the UI will be stored in [uis_dir]/[sha 256 of UI]/assets. If no uis_dir |
| 21 | + * is specified, only the happ file will be stored. |
| 22 | + */ |
| 23 | +export declare function saveHappOrWebhapp(happOrWebHappPath: string, happsDir: string, uisDir?: string | undefined | null): Promise<StoredHappPathAndHashes> |
| 24 | + |
13 | 25 | export interface StoredHappPathAndHashes { |
14 | 26 | happPath: string |
15 | 27 | happSha256: string |
16 | 28 | webhappSha256?: string |
17 | 29 | uiSha256?: string |
18 | 30 | } |
19 | | -export function happBytesWithCustomProperties(happPath: string, properties: Record<string, string | undefined | null>): Promise<Array<number>> |
20 | | -/** |
21 | | - * Saves a happ or a webhapp file. If a uis_dir is specified and it is a webhapp, |
22 | | - * then the UI will be stored in [uis_dir]/[sha 256 of UI]/assets. If no uis_dir |
23 | | - * is specified, only the happ file will be stored. |
24 | | - */ |
25 | | -export function saveHappOrWebhapp(happOrWebHappPath: string, happsDir: string, uisDir?: string | undefined | null): Promise<StoredHappPathAndHashes> |
| 31 | + |
26 | 32 | /** |
27 | 33 | * Checks that the happ or webhapp is of the correct format |
28 | 34 | * WARNING: The decoding and encoding of the happ bytes seems to affect happ's sha256 hash. |
29 | 35 | */ |
30 | | -export function validateHappOrWebhapp(happOrWebhappBytes: Array<number>): Promise<HappAndUiHashes> |
31 | | -export type JsWeRustHandler = WeRustHandler |
32 | | -export class WeRustHandler { |
33 | | - constructor() |
34 | | - static connect(keystoreUrl: string, passphrase: string): Promise<WeRustHandler> |
35 | | - signZomeCall(payload: Array<number>, pubKey: Array<number>): Promise<Array<number>> |
36 | | -} |
37 | | -export type JsZomeCallSigner = ZomeCallSigner |
38 | | -export class ZomeCallSigner { |
39 | | - constructor() |
40 | | - static connect(connectionUrl: string, passphrase: string): Promise<ZomeCallSigner> |
41 | | - signZomeCall(payload: Array<number>, pubKey: Array<number>): Promise<Array<number>> |
42 | | -} |
| 36 | +export declare function validateHappOrWebhapp(happOrWebhappBytes: Array<number>): Promise<HappAndUiHashes> |
0 commit comments