mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-06-23 22:51:51 +00:00
move examples, use index.ts as playground, update aqua-cli version
This commit is contained in:
13
src/examples/dataAliasCall.ts
Normal file
13
src/examples/dataAliasCall.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import {FluenceClient, registerServiceFunction} from "@fluencelabs/fluence";
|
||||
import {getAliasedData} from "../compiled/dataAlias";
|
||||
|
||||
export async function dataAliasCall(client: FluenceClient) {
|
||||
registerServiceFunction(client, "somesrv", "get", (args: any[], _) => {
|
||||
return {
|
||||
peerId: "peer id str",
|
||||
name: "name str"
|
||||
}
|
||||
})
|
||||
|
||||
return await getAliasedData(client)
|
||||
}
|
Reference in New Issue
Block a user