0.0.24 • Published 10 months ago

@blockless/gateway-core v0.0.24

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

@blockless/gateway-core

CI

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.24

10 months ago

0.0.21

1 year ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago