0.0.21 • Published 4 months ago
@blockless/gateway-core v0.0.21
@blockless/gateway-core
Gateway to communicate with the Blockless Network.
Install
npm i @blockless/gateway-core
Basic Usage
List functions
import Gateway from '@blockless/gateway-core'
const gateway = new Gateway({
mongoUri: process.env.MONGO_DB_URI!,
headNodeUri: process.env.HEAD_NODE_HOST!
})
const functions = await gateway.functions.list()
console.log(functions)
// [{ name: 'Hello World Fn', functionId: 'bafybefgibuxruy...' }]
Invoke a function
import Gateway from '@blockless/gateway-core'
const gateway = new Gateway({
mongoUri: process.env.MONGO_DB_URI!,
headNodeUri: process.env.HEAD_NODE_HOST!
})
const domain = 'hello-world-fn.bls.xyz'
const response = await gateway.functions.invoke('domain', domain)
console.log(response)
// { code: 200, headers: [], type: 'text/html', body: 'Hello World' }
Documentation
For the latest documentation, visit Blockless Docs
Contributing
Refer to the CONTRIBUTING.md guide for details.
0.0.21
4 months ago
0.0.20
6 months ago
0.0.19
6 months ago
0.0.18
7 months ago
0.0.17
8 months ago
0.0.16
8 months ago
0.0.15
8 months ago
0.0.14
9 months ago
0.0.13
9 months ago
0.0.11
10 months ago
0.0.10
10 months ago
0.0.9
10 months ago
0.0.8
10 months ago
0.0.7
10 months ago
0.0.6
10 months ago
0.0.5
10 months ago
0.0.4
10 months ago