mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-04-25 10:42:31 +00:00
fix compilation
This commit is contained in:
parent
48c10bcc6c
commit
0e8db7cb20
@ -16,40 +16,6 @@ import {
|
||||
|
||||
// Services
|
||||
|
||||
export interface CustomIdDef {
|
||||
id: (s: string, callParams: CallParams<'s'>) => string | Promise<string>;
|
||||
}
|
||||
export function registerCustomId(service: CustomIdDef): void;
|
||||
export function registerCustomId(serviceId: string, service: CustomIdDef): void;
|
||||
export function registerCustomId(peer: FluencePeer, service: CustomIdDef): void;
|
||||
export function registerCustomId(peer: FluencePeer, serviceId: string, service: CustomIdDef): void;
|
||||
|
||||
|
||||
export function registerCustomId(...args: any) {
|
||||
registerService(
|
||||
args,
|
||||
{
|
||||
"defaultServiceId" : "cid",
|
||||
"functions" : [
|
||||
{
|
||||
"functionName" : "id",
|
||||
"argDefs" : [
|
||||
{
|
||||
"name" : "s",
|
||||
"argType" : {
|
||||
"tag" : "primitive"
|
||||
}
|
||||
}
|
||||
],
|
||||
"returnType" : {
|
||||
"tag" : "primitive"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Functions
|
||||
|
||||
export type ViaArrResult = { air_version: string; external_addresses: string[]; node_version: string; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Fluence } from '@fluencelabs/fluence';
|
||||
import { viaArr, viaOpt, viaStream, registerCustomId } from '../compiled/examples/via';
|
||||
import { viaArr, viaOpt, viaStream } from '../compiled/examples/via';
|
||||
import { config } from '../config';
|
||||
|
||||
const relays = config.relays
|
||||
|
Loading…
x
Reference in New Issue
Block a user