genlayer-js 0.18.9 → 0.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -1
- package/.github/workflows/publish.yml +73 -16
- package/.github/workflows/smoke.yml +27 -0
- package/.release-it.json +3 -1
- package/CHANGELOG.md +4 -0
- package/dist/chains/index.cjs +2 -2
- package/dist/chains/index.js +1 -1
- package/dist/{chunk-SC2VXHL3.cjs → chunk-5TKVNHAO.cjs} +1124 -309
- package/dist/{chunk-V3MYVW3P.js → chunk-NOFMB7RP.js} +1124 -309
- package/dist/{index-D9ONjYgl.d.cts → index-DsN7LGHA.d.cts} +1615 -459
- package/dist/{index-ZDqJWXj0.d.ts → index-sw3NAvBf.d.ts} +1615 -459
- package/dist/index.cjs +58 -58
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -28
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +6 -1
- package/src/abi/staking.ts +1111 -297
- package/src/chains/testnetAsimov.ts +6 -4
- package/src/staking/actions.ts +29 -30
- package/src/types/staking.ts +0 -5
- package/tests/smoke.test.ts +291 -0
- package/vitest.config.ts +1 -0
- package/vitest.smoke.config.ts +16 -0
package/.eslintignore
CHANGED
|
@@ -5,10 +5,71 @@ on:
|
|
|
5
5
|
push:
|
|
6
6
|
branches:
|
|
7
7
|
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
8
15
|
|
|
9
16
|
jobs:
|
|
10
17
|
release:
|
|
18
|
+
# runs-on: ubuntu-latest
|
|
19
|
+
# steps:
|
|
20
|
+
# - name: Get CI Bot Token
|
|
21
|
+
# uses: tibdex/github-app-token@v1
|
|
22
|
+
# id: ci_bot_token
|
|
23
|
+
# with:
|
|
24
|
+
# app_id: ${{ secrets.CI_BOT_APP_ID }}
|
|
25
|
+
# private_key: ${{ secrets.CI_BOT_SECRET }}
|
|
26
|
+
|
|
27
|
+
# - name: Checkout source code
|
|
28
|
+
# uses: actions/checkout@v4
|
|
29
|
+
# with:
|
|
30
|
+
# token: ${{ steps.ci_bot_token.outputs.token }}
|
|
31
|
+
# - name: Setup Node.js
|
|
32
|
+
# uses: actions/setup-node@v4
|
|
33
|
+
# with:
|
|
34
|
+
# node-version: "22"
|
|
35
|
+
# registry-url: "https://registry.npmjs.org"
|
|
36
|
+
# - name: Upgrade npm for OIDC trusted publishing
|
|
37
|
+
# run: npm install -g npm@latest
|
|
38
|
+
# - name: Configure OIDC auth
|
|
39
|
+
# run: |
|
|
40
|
+
# sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG"
|
|
41
|
+
# unset NODE_AUTH_TOKEN
|
|
42
|
+
# - name: Install the dependencies
|
|
43
|
+
# run: npm ci
|
|
44
|
+
# - name: Initialize Git User
|
|
45
|
+
# run: |
|
|
46
|
+
# git config --global user.email "github-actions[bot]@genlayer.com"
|
|
47
|
+
# git config --global user.name "github-actions[bot]"
|
|
48
|
+
# - name: Debug OIDC exchange
|
|
49
|
+
# run: |
|
|
50
|
+
# sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG"
|
|
51
|
+
# unset NODE_AUTH_TOKEN
|
|
52
|
+
# echo "=== npm $(npm --version) ==="
|
|
53
|
+
# echo "=== Manual OIDC token exchange ==="
|
|
54
|
+
# OIDC_TOKEN=$(curl -sS -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
|
|
55
|
+
# "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https://registry.npmjs.org" | jq -r '.value')
|
|
56
|
+
# echo "=== OIDC token claims (decoded JWT payload) ==="
|
|
57
|
+
# echo "$OIDC_TOKEN" | cut -d. -f2 | base64 -d 2>/dev/null | jq . || echo "(decode failed)"
|
|
58
|
+
# EXCHANGE=$(curl -sS -w "\nHTTP_CODE:%{http_code}" \
|
|
59
|
+
# -X POST "https://registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/genlayer-js" \
|
|
60
|
+
# -H "Authorization: Bearer $OIDC_TOKEN" \
|
|
61
|
+
# -H "Content-Type: application/json" \
|
|
62
|
+
# -d '{}')
|
|
63
|
+
# echo "Exchange response: $EXCHANGE"
|
|
64
|
+
# - name: Release
|
|
65
|
+
# run: |
|
|
66
|
+
# sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG"
|
|
67
|
+
# unset NODE_AUTH_TOKEN
|
|
68
|
+
# npm run release
|
|
69
|
+
# env:
|
|
70
|
+
# GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }}
|
|
11
71
|
runs-on: ubuntu-latest
|
|
72
|
+
environment: npm
|
|
12
73
|
steps:
|
|
13
74
|
- name: Get CI Bot Token
|
|
14
75
|
uses: tibdex/github-app-token@v1
|
|
@@ -21,21 +82,17 @@ jobs:
|
|
|
21
82
|
uses: actions/checkout@v4
|
|
22
83
|
with:
|
|
23
84
|
token: ${{ steps.ci_bot_token.outputs.token }}
|
|
24
|
-
|
|
25
|
-
|
|
85
|
+
|
|
86
|
+
- uses: actions/setup-node@v4
|
|
26
87
|
with:
|
|
27
|
-
node-version: "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- name:
|
|
35
|
-
run: npm
|
|
36
|
-
env:
|
|
37
|
-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
38
|
-
- run: npm run release
|
|
88
|
+
node-version: "22"
|
|
89
|
+
registry-url: "https://registry.npmjs.org"
|
|
90
|
+
|
|
91
|
+
- run: npm install -g npm@latest
|
|
92
|
+
|
|
93
|
+
- run: npm ci
|
|
94
|
+
|
|
95
|
+
- name: Release
|
|
96
|
+
run: npm run release
|
|
39
97
|
env:
|
|
40
|
-
GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }}
|
|
41
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
98
|
+
GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Smoke Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: '0 8 * * *'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
smoke:
|
|
11
|
+
name: Testnet Smoke Tests
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
timeout-minutes: 5
|
|
14
|
+
continue-on-error: true
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: 22
|
|
22
|
+
cache: npm
|
|
23
|
+
|
|
24
|
+
- run: npm ci
|
|
25
|
+
|
|
26
|
+
- name: Run smoke tests
|
|
27
|
+
run: npm run test:smoke
|
package/.release-it.json
CHANGED
package/CHANGELOG.md
CHANGED
package/dist/chains/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk5TKVNHAOcjs = require('../chunk-5TKVNHAO.cjs');
|
|
6
6
|
require('../chunk-75ZPJI57.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.localnet =
|
|
11
|
+
exports.localnet = _chunk5TKVNHAOcjs.localnet; exports.studionet = _chunk5TKVNHAOcjs.studionet; exports.testnetAsimov = _chunk5TKVNHAOcjs.testnetAsimov;
|