Skip to content

Commit ad5cb88

Browse files
authored
docs: update doc for Blocklet Meta Spec (#148)
1 parent 162ea2f commit ad5cb88

6 files changed

Lines changed: 48 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.5 (August 04, 2022)
2+
3+
- docs: update doc for Blocklet Meta Spec
4+
15
## 0.6.4 (July 29, 2022)
26

37
- docs: update doc for Blocklet Meta Spec

blocklet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: '@arcblock/abtnode-docs'
2-
version: 0.6.4
2+
version: 0.6.5
33
description: >-
44
Blocklet Server Documentation, a help documentation for quickly get started
55
with Blocklet Server.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arcblock/abtnode-docs",
3-
"version": "0.6.4",
3+
"version": "0.6.5",
44
"description": "Blocklet Server Documentation, a help documentation for quickly get started with Blocklet Server.",
55
"main": "index.js",
66
"publishConfig": {

src/developer/blocklet-spec/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,23 @@ children:
217217
- <primary url>
218218
- <redundant url>
219219
```
220+
221+
## Configure required resources and operating environment restrictions
222+
223+
#### Specify the minimum Blocklet Server version
224+
225+
````
226+
requirements:
227+
server: '>=1.8.0' # server version must be greater than or equal to 1.8.0
228+
````
229+
230+
#### Specify the fuel needed before starting (token)
231+
232+
````
233+
requirements:
234+
fuels:
235+
endpoint: xxx # The endpoint of the chain
236+
address: xxx # token address
237+
value: xxx # price
238+
reason: xxx # The reason for the need (for example, because the NFT Factory needs to be created before the first boot)
239+
````

src/developer/blocklet-spec/index.zh.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,24 @@ Blocklet Server 提供了 hook 功能用来在执行生命周期的过程中做
237237

238238
比如,某个 Blocklet 对于运行的机器有硬件要求:内存不能低于 1G,可用磁盘容量不能低于 500 MB。这个时候就可以利用 pre-install hook 来检测目标机器是否已满足需求,如果满足,正常安装,否则抛出错误消息,并终止安装。
239239

240-
hook 其实是一些 Shell 脚本,而这些脚本可能会引用 Blocklet 中的文件,而在打包 Blocklet 的过程中,Blocklet Server 打包工具(Blocklet Server CLI)会将 hook 用到的文件单独打包,所以,开发者需要在 `hookFiles` 中声明哪些文件被 hooks 引用了。
240+
hook 其实是一些 Shell 脚本,而这些脚本可能会引用 Blocklet 中的文件,而在打包 Blocklet 的过程中,Blocklet Server 打包工具(Blocklet Server CLI)会将 hook 用到的文件单独打包,所以,开发者需要在 `hookFiles` 中声明哪些文件被 hooks 引用了。
241+
242+
## 配置所需资源和运行环境限制
243+
244+
#### 指定最低的 Blocklet Server 版本号
245+
246+
```
247+
requirements:
248+
server: '>=1.8.0' # server 版本必须大于等于 1.8.0
249+
```
250+
251+
#### 指定启动前所需燃料 (token)
252+
253+
```
254+
requirements:
255+
fuels:
256+
endpoint: xxx # 链的地址
257+
adress: xxx # token address
258+
value: xxx # 价格
259+
reason: xxx # 需要的原因 ( 比如因为首次启动前需要创建 NFT Factory )
260+
```

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6.4
1+
0.6.5

0 commit comments

Comments
 (0)