genlayer-js 0.18.10 → 0.18.12
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/dist/chains/index.cjs +2 -2
- package/dist/chains/index.js +1 -1
- package/dist/{chunk-PPBY3UXF.cjs → chunk-5TKVNHAO.cjs} +1118 -305
- package/dist/{chunk-WZNF2WK4.js → chunk-NOFMB7RP.js} +1118 -305
- 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 +11 -1
- package/.eslintignore +0 -2
- package/.eslintrc.cjs +0 -59
- package/.github/pull_request_template.md +0 -43
- package/.github/workflows/publish.yml +0 -41
- package/.github/workflows/test.yml +0 -33
- package/.prettierignore +0 -19
- package/.prettierrc +0 -12
- package/.release-it.json +0 -64
- package/CHANGELOG.md +0 -304
- package/CLAUDE.md +0 -66
- package/CONTRIBUTING.md +0 -87
- package/renovate.json +0 -20
- package/src/abi/calldata/consts.ts +0 -14
- package/src/abi/calldata/decoder.ts +0 -86
- package/src/abi/calldata/encoder.ts +0 -178
- package/src/abi/calldata/index.ts +0 -3
- package/src/abi/calldata/string.ts +0 -83
- package/src/abi/index.ts +0 -6
- package/src/abi/staking.ts +0 -687
- package/src/abi/transactions.ts +0 -11
- package/src/accounts/IAccountActions.ts +0 -5
- package/src/accounts/account.ts +0 -9
- package/src/accounts/actions.ts +0 -34
- package/src/chains/actions.ts +0 -40
- package/src/chains/index.ts +0 -4
- package/src/chains/localnet.ts +0 -4016
- package/src/chains/studionet.ts +0 -4017
- package/src/chains/testnetAsimov.ts +0 -4013
- package/src/client/client.ts +0 -139
- package/src/config/snapID.ts +0 -4
- package/src/config/transactions.ts +0 -9
- package/src/contracts/actions.ts +0 -387
- package/src/global.d.ts +0 -9
- package/src/index.ts +0 -12
- package/src/staking/actions.ts +0 -691
- package/src/staking/index.ts +0 -2
- package/src/staking/utils.ts +0 -22
- package/src/transactions/ITransactionActions.ts +0 -15
- package/src/transactions/actions.ts +0 -113
- package/src/transactions/decoders.ts +0 -275
- package/src/types/accounts.ts +0 -1
- package/src/types/calldata.ts +0 -31
- package/src/types/chains.ts +0 -22
- package/src/types/clients.ts +0 -106
- package/src/types/contracts.ts +0 -32
- package/src/types/index.ts +0 -9
- package/src/types/metamaskClientResult.ts +0 -5
- package/src/types/network.ts +0 -1
- package/src/types/snapSource.ts +0 -1
- package/src/types/staking.ts +0 -225
- package/src/types/transactions.ts +0 -312
- package/src/utils/async.ts +0 -3
- package/src/utils/jsonifier.ts +0 -119
- package/src/wallet/actions.ts +0 -10
- package/src/wallet/connect.ts +0 -67
- package/src/wallet/metamaskClient.ts +0 -50
- package/tests/client.test-d.ts +0 -67
- package/tests/client.test.ts +0 -197
- package/tests/smoke.test.ts +0 -59
- package/tests/transactions.test.ts +0 -142
- package/tsconfig.json +0 -119
- package/tsconfig.vitest-temp.json +0 -41
- package/vitest.config.ts +0 -18
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
name: Release & Publish Package to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
release:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Get CI Bot Token
|
|
14
|
-
uses: tibdex/github-app-token@v1
|
|
15
|
-
id: ci_bot_token
|
|
16
|
-
with:
|
|
17
|
-
app_id: ${{ secrets.CI_BOT_APP_ID }}
|
|
18
|
-
private_key: ${{ secrets.CI_BOT_SECRET }}
|
|
19
|
-
|
|
20
|
-
- name: Checkout source code
|
|
21
|
-
uses: actions/checkout@v4
|
|
22
|
-
with:
|
|
23
|
-
token: ${{ steps.ci_bot_token.outputs.token }}
|
|
24
|
-
- name: Setup Node.js
|
|
25
|
-
uses: actions/setup-node@v2
|
|
26
|
-
with:
|
|
27
|
-
node-version: "18"
|
|
28
|
-
- name: Install the dependencies
|
|
29
|
-
run: npm ci
|
|
30
|
-
- name: Initialize Git User
|
|
31
|
-
run: |
|
|
32
|
-
git config --global user.email "github-actions[bot]@genlayer.com"
|
|
33
|
-
git config --global user.name "github-actions[bot]"
|
|
34
|
-
- name: Initialize the NPM configuration
|
|
35
|
-
run: npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
|
|
36
|
-
env:
|
|
37
|
-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
38
|
-
- run: npm run release
|
|
39
|
-
env:
|
|
40
|
-
GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }}
|
|
41
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Run Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
test:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout code
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
|
|
19
|
-
- name: Setup Node.js
|
|
20
|
-
uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: 22
|
|
23
|
-
cache: npm
|
|
24
|
-
|
|
25
|
-
- name: Install dependencies
|
|
26
|
-
run: npm ci
|
|
27
|
-
|
|
28
|
-
- name: Run tests
|
|
29
|
-
run: npm test
|
|
30
|
-
timeout-minutes: 5
|
|
31
|
-
|
|
32
|
-
- name: Run linting
|
|
33
|
-
run: npm run lint
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/.release-it.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"git": {
|
|
3
|
-
"commitMessage": "Release v${version} [skip ci]",
|
|
4
|
-
"tagName": "v${version}",
|
|
5
|
-
"requireCleanWorkingDir": false,
|
|
6
|
-
"requireUpstream": false,
|
|
7
|
-
"requireCommits": false,
|
|
8
|
-
"push": true
|
|
9
|
-
},
|
|
10
|
-
"github": {
|
|
11
|
-
"release": true,
|
|
12
|
-
"tokenRef": "GITHUB_TOKEN"
|
|
13
|
-
},
|
|
14
|
-
"npm": {
|
|
15
|
-
"publish": true
|
|
16
|
-
},
|
|
17
|
-
"plugins": {
|
|
18
|
-
"@release-it/conventional-changelog": {
|
|
19
|
-
"preset": "conventionalcommits",
|
|
20
|
-
"infile": "CHANGELOG.md",
|
|
21
|
-
"types": [
|
|
22
|
-
{
|
|
23
|
-
"type": "feat",
|
|
24
|
-
"section": "Features"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"type": "fix",
|
|
28
|
-
"section": "Bug Fixes"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"type": "chore",
|
|
32
|
-
"section": "Improvement Tasks"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "ci",
|
|
36
|
-
"section": "Continuous Integration"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"type": "docs",
|
|
40
|
-
"section": "Documentation"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"type": "style",
|
|
44
|
-
"section": "Styles"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "refactor",
|
|
48
|
-
"section": "Refactor Tasks"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"type": "perf",
|
|
52
|
-
"section": "Performance Improvements"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"type": "test",
|
|
56
|
-
"section": "Testing"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"hooks": {
|
|
62
|
-
"after:bump": "npm run build"
|
|
63
|
-
}
|
|
64
|
-
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
## 0.18.10 (2026-02-07)
|
|
4
|
-
|
|
5
|
-
## 0.18.9 (2025-12-12)
|
|
6
|
-
|
|
7
|
-
## 0.18.8 (2025-12-05)
|
|
8
|
-
|
|
9
|
-
## 0.18.7 (2025-12-04)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
* Decodes contract error messages ([#127](https://github.com/genlayerlabs/genlayer-js/issues/127)) ([0a82545](https://github.com/genlayerlabs/genlayer-js/commit/0a82545e994144229950ad2d156c20233102a8c4))
|
|
15
|
-
|
|
16
|
-
## 0.18.6 (2025-12-04)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Features
|
|
20
|
-
|
|
21
|
-
* Fetch epoch zero minimum duration ([#126](https://github.com/genlayerlabs/genlayer-js/issues/126)) ([89c2261](https://github.com/genlayerlabs/genlayer-js/commit/89c22611d6bf70e83d02f5922ba3e18d912abb2d))
|
|
22
|
-
|
|
23
|
-
## 0.18.5 (2025-12-03)
|
|
24
|
-
|
|
25
|
-
## 0.18.4 (2025-11-11)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### Bug Fixes
|
|
29
|
-
|
|
30
|
-
* differentiate chains using the studio from testnet ([#122](https://github.com/genlayerlabs/genlayer-js/issues/122)) ([1fa8d4c](https://github.com/genlayerlabs/genlayer-js/commit/1fa8d4cd0856d9eb437902f330feb1de4782d112))
|
|
31
|
-
|
|
32
|
-
## 0.18.3 (2025-11-03)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### Bug Fixes
|
|
36
|
-
|
|
37
|
-
* default to zero address for read operations when account not provided ([#121](https://github.com/genlayerlabs/genlayer-js/issues/121)) ([6a1b47a](https://github.com/genlayerlabs/genlayer-js/commit/6a1b47aeafaeb807d5219abbb88e10041c03030e))
|
|
38
|
-
|
|
39
|
-
## 0.18.2 (2025-09-18)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
* **transactions:** handle all DECIDED states in waitForTransactionReceipt ([#116](https://github.com/genlayerlabs/genlayer-js/issues/116)) ([78433d7](https://github.com/genlayerlabs/genlayer-js/commit/78433d7224298ab418ca16a87de497149b66b5f7))
|
|
45
|
-
|
|
46
|
-
## 0.18.1 (2025-09-11)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Bug Fixes
|
|
50
|
-
|
|
51
|
-
* replace hardcoded gas 21000 ([#115](https://github.com/genlayerlabs/genlayer-js/issues/115)) ([8eacd5d](https://github.com/genlayerlabs/genlayer-js/commit/8eacd5dbba9ae85f0232ec525076582ea8b6b045))
|
|
52
|
-
|
|
53
|
-
## 0.18.0 (2025-09-04)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Features
|
|
57
|
-
|
|
58
|
-
* format in genlayer js to convert to an object ([#107](https://github.com/genlayerlabs/genlayer-js/issues/107)) ([3ca4076](https://github.com/genlayerlabs/genlayer-js/commit/3ca40765bc03e8d7174c8e337e6104ccea455e5a))
|
|
59
|
-
|
|
60
|
-
## 0.17.1 (2025-09-03)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Bug Fixes
|
|
64
|
-
|
|
65
|
-
* returning the whole data when an error occurs ([#111](https://github.com/genlayerlabs/genlayer-js/issues/111)) ([bebb025](https://github.com/genlayerlabs/genlayer-js/commit/bebb025a0f07d4ed05783e1a77abe76979fc4ac0))
|
|
66
|
-
|
|
67
|
-
## 0.17.0 (2025-09-03)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
### Features
|
|
71
|
-
|
|
72
|
-
* allow gen_call write through `simulateWriteContract` ([#112](https://github.com/genlayerlabs/genlayer-js/issues/112)) ([734c0e6](https://github.com/genlayerlabs/genlayer-js/commit/734c0e61d9ddd13678f424ca6bd754ad1f4df3bb))
|
|
73
|
-
|
|
74
|
-
## 0.16.0 (2025-09-03)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### Features
|
|
78
|
-
|
|
79
|
-
* **contracts,types:** add getContractCode via gen_getContractCode RPC ([#109](https://github.com/genlayerlabs/genlayer-js/issues/109)) ([3fcc934](https://github.com/genlayerlabs/genlayer-js/commit/3fcc934a73b312747d53831f63d8c2e903534b3f))
|
|
80
|
-
|
|
81
|
-
## 0.15.1 (2025-09-02)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Bug Fixes
|
|
85
|
-
|
|
86
|
-
* **client:** disable viem transport retries (retryCount=0) to avoid duplicate requests ([#110](https://github.com/genlayerlabs/genlayer-js/issues/110)) ([dc2d623](https://github.com/genlayerlabs/genlayer-js/commit/dc2d623bb0a2bf96416e1590ddbcbf78adf9f9a7))
|
|
87
|
-
|
|
88
|
-
## 0.15.0 (2025-08-18)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
### Features
|
|
92
|
-
|
|
93
|
-
* add custom provider support for wallet framework integration ([#105](https://github.com/genlayerlabs/genlayer-js/issues/105)) ([9fdaf6f](https://github.com/genlayerlabs/genlayer-js/commit/9fdaf6f7b52c58cabe8aee48e31317757be7637b))
|
|
94
|
-
|
|
95
|
-
## 0.14.2 (2025-08-14)
|
|
96
|
-
|
|
97
|
-
## 0.14.1 (2025-08-13)
|
|
98
|
-
|
|
99
|
-
## 0.14.0 (2025-07-30)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
### Features
|
|
103
|
-
|
|
104
|
-
* expose encode and decode methods ([#102](https://github.com/genlayerlabs/genlayer-js/issues/102)) ([c9e0719](https://github.com/genlayerlabs/genlayer-js/commit/c9e07191c52cd4fecc9295172a7087ade896ccd7))
|
|
105
|
-
|
|
106
|
-
## 0.13.0 (2025-07-23)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
### Features
|
|
110
|
-
|
|
111
|
-
* simplify transaction receipt ([#101](https://github.com/genlayerlabs/genlayer-js/issues/101)) ([be78ac6](https://github.com/genlayerlabs/genlayer-js/commit/be78ac6b5871a4d61349bacf87b5fb0da61b1a90))
|
|
112
|
-
|
|
113
|
-
## 0.12.1 (2025-07-21)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Bug Fixes
|
|
117
|
-
|
|
118
|
-
* default transaction hash variant ([#100](https://github.com/genlayerlabs/genlayer-js/issues/100)) ([d8926b1](https://github.com/genlayerlabs/genlayer-js/commit/d8926b16f8983df805da713091297a5d353e9332))
|
|
119
|
-
|
|
120
|
-
## 0.12.0 (2025-07-15)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### Features
|
|
124
|
-
|
|
125
|
-
* add payable to ContractMethod ([#96](https://github.com/genlayerlabs/genlayer-js/issues/96)) ([011a749](https://github.com/genlayerlabs/genlayer-js/commit/011a7498ffce22a34d20d9fb88a72e7c56badaf9))
|
|
126
|
-
|
|
127
|
-
## 0.11.2 (2025-07-10)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
### Bug Fixes
|
|
131
|
-
|
|
132
|
-
* handle new leader receipt and decode eq outputs ([#98](https://github.com/genlayerlabs/genlayer-js/issues/98)) ([fadb53d](https://github.com/genlayerlabs/genlayer-js/commit/fadb53d5f8946074a80047003323a0bd3d4f8108))
|
|
133
|
-
|
|
134
|
-
## 0.11.1 (2025-07-09)
|
|
135
|
-
|
|
136
|
-
## 0.11.0 (2025-05-28)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### Features
|
|
140
|
-
|
|
141
|
-
* also export studionet as genlayer chain ([#87](https://github.com/yeagerai/genlayer-js/issues/87)) ([a686581](https://github.com/yeagerai/genlayer-js/commit/a686581203d5a62db40526b66498f952ed2f7dcd))
|
|
142
|
-
|
|
143
|
-
## 0.10.0 (2025-05-22)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### Features
|
|
147
|
-
|
|
148
|
-
* adjust submitAppeal call to consensus smart contract ([#80](https://github.com/yeagerai/genlayer-js/issues/80)) ([9e4a88e](https://github.com/yeagerai/genlayer-js/commit/9e4a88ed9a094af067302f8c4aa170c7129bf53d))
|
|
149
|
-
|
|
150
|
-
## 0.9.5 (2025-05-21)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### Bug Fixes
|
|
154
|
-
|
|
155
|
-
* update readContract with TransactionHashVariant ([#86](https://github.com/yeagerai/genlayer-js/issues/86)) ([7cbeb04](https://github.com/yeagerai/genlayer-js/commit/7cbeb040b55c4bc3acf173bdae51da51deef7a83))
|
|
156
|
-
|
|
157
|
-
## 0.9.4 (2025-05-20)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
### Bug Fixes
|
|
161
|
-
|
|
162
|
-
* remove DXP-298 code ([#85](https://github.com/yeagerai/genlayer-js/issues/85)) ([3db4cff](https://github.com/yeagerai/genlayer-js/commit/3db4cffedd1a53396d390883dcdee5d26f775d72))
|
|
163
|
-
|
|
164
|
-
## 0.9.3 (2025-05-14)
|
|
165
|
-
|
|
166
|
-
## 0.9.2 (2025-05-14)
|
|
167
|
-
|
|
168
|
-
## 0.9.1 (2025-05-09)
|
|
169
|
-
|
|
170
|
-
## 0.9.0 (2025-03-12)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
### Features
|
|
174
|
-
|
|
175
|
-
* decoding params ([#77](https://github.com/yeagerai/genlayer-js/issues/77)) ([ada41ce](https://github.com/yeagerai/genlayer-js/commit/ada41ce375eaf6a94886bc50c13c3f0df247d7c2))
|
|
176
|
-
|
|
177
|
-
## 0.8.0 (2025-03-12)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
### Features
|
|
181
|
-
|
|
182
|
-
* overwrite defaultConsensusMaxRotations ([#75](https://github.com/yeagerai/genlayer-js/issues/75)) ([8d64b42](https://github.com/yeagerai/genlayer-js/commit/8d64b428d8232394cfe1ac5b56edba7c1837d0e5))
|
|
183
|
-
|
|
184
|
-
## 0.7.0 (2025-03-05)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
### Features
|
|
188
|
-
|
|
189
|
-
* connect ([#58](https://github.com/yeagerai/genlayer-js/issues/58)) ([7e396c7](https://github.com/yeagerai/genlayer-js/commit/7e396c765536ef0ec1a81c259c113587dc6de8ee))
|
|
190
|
-
|
|
191
|
-
## 0.6.4 (2025-02-04)
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
### Bug Fixes
|
|
195
|
-
|
|
196
|
-
* override chain endpoint if extra config provided ([#68](https://github.com/yeagerai/genlayer-js/issues/68)) ([215185a](https://github.com/yeagerai/genlayer-js/commit/215185a4f96d44a60ea1ad4b55c71bd0bdc489f6))
|
|
197
|
-
|
|
198
|
-
## 0.6.3 (2025-01-28)
|
|
199
|
-
|
|
200
|
-
## 0.6.2 (2025-01-20)
|
|
201
|
-
|
|
202
|
-
## 0.6.1 (2025-01-14)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
### Bug Fixes
|
|
206
|
-
|
|
207
|
-
* refactor abi to prevent confusion ([#51](https://github.com/yeagerai/genlayer-js/issues/51)) ([6ccb09e](https://github.com/yeagerai/genlayer-js/commit/6ccb09eba33eaedb147a0dde5112f54d56dd1e09))
|
|
208
|
-
|
|
209
|
-
## 0.6.0 (2025-01-09)
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### Features
|
|
213
|
-
|
|
214
|
-
* add stateStatus in readContract ([#50](https://github.com/yeagerai/genlayer-js/issues/50)) ([a9bcf8d](https://github.com/yeagerai/genlayer-js/commit/a9bcf8d83890448b85282ceb0c33060a19ea4e9a))
|
|
215
|
-
|
|
216
|
-
## 0.5.0 (2025-01-08)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
### Features
|
|
220
|
-
|
|
221
|
-
* add customtransport to use both wallet and local private keys ([#48](https://github.com/yeagerai/genlayer-js/issues/48)) ([905a123](https://github.com/yeagerai/genlayer-js/commit/905a12358c154e6ae865773b809952c8cc9c75b9))
|
|
222
|
-
|
|
223
|
-
## 0.4.8 (2024-12-18)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
### Bug Fixes
|
|
227
|
-
|
|
228
|
-
* added GenVM decoder to readContract method ([#42](https://github.com/yeagerai/genlayer-js/issues/42)) ([096d36d](https://github.com/yeagerai/genlayer-js/commit/096d36de06d3f4d341f6532ddead694c1882651d))
|
|
229
|
-
|
|
230
|
-
## 0.4.7 (2024-12-03)
|
|
231
|
-
|
|
232
|
-
## 0.4.6 (2024-12-02)
|
|
233
|
-
|
|
234
|
-
## 0.4.5 (2024-12-02)
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
### Bug Fixes
|
|
238
|
-
|
|
239
|
-
* set leaderOnly parameter camelCase ([#35](https://github.com/yeagerai/genlayer-js/issues/35)) ([a6a4cae](https://github.com/yeagerai/genlayer-js/commit/a6a4caed8ab2784c2de202e34429c68eeeb0482d))
|
|
240
|
-
|
|
241
|
-
## 0.4.4 (2024-11-28)
|
|
242
|
-
|
|
243
|
-
## 0.4.3 (2024-11-26)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
### Bug Fixes
|
|
247
|
-
|
|
248
|
-
* readContract return type ([#32](https://github.com/yeagerai/genlayer-js/issues/32)) ([8222453](https://github.com/yeagerai/genlayer-js/commit/82224530cf5c28b17b43943fad92cd5782ecf1be))
|
|
249
|
-
|
|
250
|
-
## 0.4.2 (2024-11-22)
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
### Bug Fixes
|
|
254
|
-
|
|
255
|
-
* types ([#29](https://github.com/yeagerai/genlayer-js/issues/29)) ([d8f16fd](https://github.com/yeagerai/genlayer-js/commit/d8f16fdb739e32e6eea52a38e23d96a4433728ad))
|
|
256
|
-
|
|
257
|
-
## 0.4.1 (2024-11-20)
|
|
258
|
-
|
|
259
|
-
## 0.4.0 (2024-11-14)
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
### Features
|
|
263
|
-
|
|
264
|
-
* add contract schema methods ([#26](https://github.com/yeagerai/genlayer-js/issues/26)) ([7dc726f](https://github.com/yeagerai/genlayer-js/commit/7dc726fa4fc8769feaec07a50149956d7c2a2035))
|
|
265
|
-
|
|
266
|
-
## 0.3.4 (2024-11-14)
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
### Bug Fixes
|
|
270
|
-
|
|
271
|
-
* allow accounts to be nullable in `readContract` and add `sim_getTransactionsForAddress` method ([#16](https://github.com/yeagerai/genlayer-js/issues/16)) ([ea4bb6c](https://github.com/yeagerai/genlayer-js/commit/ea4bb6cb53809f6c17a3794ed35aede979bd89e5))
|
|
272
|
-
|
|
273
|
-
## 0.3.3 (2024-11-11)
|
|
274
|
-
|
|
275
|
-
## 0.3.2 (2024-11-06)
|
|
276
|
-
|
|
277
|
-
## 0.3.1 (2024-10-28)
|
|
278
|
-
|
|
279
|
-
## 0.3.0 (2024-10-25)
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
### Features
|
|
283
|
-
|
|
284
|
-
* add deploy contract action ([#17](https://github.com/yeagerai/genlayer-js/issues/17)) ([23d5bc2](https://github.com/yeagerai/genlayer-js/commit/23d5bc28fb58c73d64b1fd629185a0565d84cb91))
|
|
285
|
-
|
|
286
|
-
## 0.2.0 (2024-10-17)
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
### Features
|
|
290
|
-
|
|
291
|
-
* implement genvm calldata ([#14](https://github.com/yeagerai/genlayer-js/issues/14)) ([d9a1abd](https://github.com/yeagerai/genlayer-js/commit/d9a1abdfb5eef13e5c77433db546953369087e04))
|
|
292
|
-
|
|
293
|
-
## 0.1.2 (2024-10-03)
|
|
294
|
-
|
|
295
|
-
## 0.1.1 (2024-10-03)
|
|
296
|
-
|
|
297
|
-
## 0.1.0 (2024-10-01)
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
### Features
|
|
301
|
-
|
|
302
|
-
* expose private key generation and extended account creation from a previous private key ([#10](https://github.com/yeagerai/genlayer-js/issues/10)) ([d43940b](https://github.com/yeagerai/genlayer-js/commit/d43940b7237450a0893823b18b4d0ed2e3e42790))
|
|
303
|
-
|
|
304
|
-
## 0.0.5 (2024-09-30)
|
package/CLAUDE.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Build & Development
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install # Install dependencies
|
|
9
|
-
npm run build # Production build (tsup, outputs ESM+CJS to dist/)
|
|
10
|
-
npm run build:watch # Watch mode for development
|
|
11
|
-
npm run lint # ESLint with auto-fix
|
|
12
|
-
npm link # Link package locally for testing in other projects
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Testing
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm test # Run tests with typecheck (vitest)
|
|
19
|
-
npm run test:watch # Watch mode
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Architecture
|
|
23
|
-
|
|
24
|
-
### Module Structure & Exports
|
|
25
|
-
|
|
26
|
-
The SDK exports three entry points (see `package.json` exports):
|
|
27
|
-
- `genlayer-js` - Main: client, accounts, transaction decoders, staking utils
|
|
28
|
-
- `genlayer-js/chains` - Chain configs: `localnet`, `studionet`, `testnetAsimov`
|
|
29
|
-
- `genlayer-js/types` - TypeScript types for all SDK entities
|
|
30
|
-
|
|
31
|
-
### Client Factory Pattern
|
|
32
|
-
|
|
33
|
-
`createClient()` in `src/client/client.ts` builds a composable client by extending viem's base client with action modules:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
baseClient → publicActions → walletActions → accountActions
|
|
37
|
-
→ transactionActions → chainActions → contractActions
|
|
38
|
-
→ receiptActions → stakingActions
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Each action module (`src/<domain>/actions.ts`) returns an object of methods that get merged into the client. The client auto-initializes the consensus smart contract on creation.
|
|
42
|
-
|
|
43
|
-
### Chain Configurations
|
|
44
|
-
|
|
45
|
-
`GenLayerChain` extends viem's `Chain` with GenLayer-specific properties:
|
|
46
|
-
- `isStudio` - Whether using studio-based localnet
|
|
47
|
-
- `consensusMainContract` / `consensusDataContract` - On-chain consensus contracts
|
|
48
|
-
- `stakingContract` - Staking contract (testnet-asimov only)
|
|
49
|
-
- `defaultNumberOfInitialValidators` / `defaultConsensusMaxRotations`
|
|
50
|
-
|
|
51
|
-
### Calldata Encoding
|
|
52
|
-
|
|
53
|
-
Custom binary encoding for GenLayer transactions in `src/abi/calldata/`:
|
|
54
|
-
- `encoder.ts` - Encodes JS values to GenLayer binary format
|
|
55
|
-
- `decoder.ts` - Decodes binary responses back to JS
|
|
56
|
-
- Uses MessagePack-like format with type tags
|
|
57
|
-
|
|
58
|
-
### Path Aliases
|
|
59
|
-
|
|
60
|
-
- `@/*` → `./src/*`
|
|
61
|
-
- `@@/tests/*` → `./tests/*`
|
|
62
|
-
|
|
63
|
-
### Key Dependencies
|
|
64
|
-
|
|
65
|
-
- `viem` - Ethereum client, used as foundation for all blockchain interactions
|
|
66
|
-
- `typescript-parsec` - Parser combinator for calldata string parsing
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Contributing to GenLayerJS SDK
|
|
2
|
-
|
|
3
|
-
We're thrilled that you're interested in contributing to the GenLayerJS SDK! This document will guide you through the contribution process.
|
|
4
|
-
|
|
5
|
-
## What is the GenLayerJS SDK?
|
|
6
|
-
|
|
7
|
-
The GenLayerJS SDK is a TypeScript library designed for developers building decentralized applications (Dapps) on the GenLayer protocol. It provides a comprehensive set of tools to interact with the GenLayer network, including client creation, transaction handling, event subscriptions, and more, all while leveraging the power of Viem as the underlying blockchain client.
|
|
8
|
-
|
|
9
|
-
## How You Can Contribute?
|
|
10
|
-
|
|
11
|
-
Contributions to the GenLayerJS SDK are welcome in several forms:
|
|
12
|
-
|
|
13
|
-
### Testing the SDK and Providing Feedback
|
|
14
|
-
|
|
15
|
-
Help us make the SDK better by testing and giving feedback:
|
|
16
|
-
|
|
17
|
-
- Start by installing the SDK in your Dapp using the command:
|
|
18
|
-
```sh
|
|
19
|
-
$ npm install genlayer-js
|
|
20
|
-
```
|
|
21
|
-
- Try out the SDK features and tell us what you think through our [feedback form](https://docs.google.com/forms/d/1IVNsZwm936kSNCiXmlAP8bgJnbik7Bqaoc3I6UYhr-o/viewform) or on our [Discord Channel](https://discord.gg/8Jm4v89VAu).
|
|
22
|
-
- If you find any issues, please report them on our [GitHub issues page](https://github.com/yeagerai/genlayer-js/issues).
|
|
23
|
-
|
|
24
|
-
### Sharing New Ideas and Use Cases
|
|
25
|
-
|
|
26
|
-
Have ideas for new features or use cases? We're eager to hear them! But first:
|
|
27
|
-
|
|
28
|
-
- Ensure you have the SDK installed to explore existing use cases.
|
|
29
|
-
- After familiarizing yourself with the SDK, contribute your unique use case and share your ideas in our [Discord channel](https://discord.gg/8Jm4v89VAu).
|
|
30
|
-
|
|
31
|
-
### Bug fixing and Feature development
|
|
32
|
-
|
|
33
|
-
#### 1. Set yourself up to start coding
|
|
34
|
-
|
|
35
|
-
- **1.1. Pick an issue**: Select one from the project GitHub repository [issue list](https://github.com/yeagerai/genlayer-js/issues) and assign it to yourself.
|
|
36
|
-
|
|
37
|
-
- **1.2. Create a branch**: create the branch that you will work on by using the link provided in the issue details page (right panel at the bottom - section "Development")
|
|
38
|
-
|
|
39
|
-
- **1.3. Setup the SDK locally**: clone the repository and install dependencies
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
$ git clone https://github.com/yeagerai/genlayer-js.git
|
|
43
|
-
$ cd genlayer-js
|
|
44
|
-
$ npm install
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- **1.4. Run the SDK in dev mode**: to run the SDK in development mode with hot reload enabled:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
$ npm run build:watch
|
|
51
|
-
```
|
|
52
|
-
- **1.5. Link the package locally**: to link the package locally, use the command:
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
$ npm link
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
This will allow you to use the package in your project without publishing it.
|
|
59
|
-
|
|
60
|
-
- **1.6. Add the package to your project**: to add the package to your project, use the command:
|
|
61
|
-
|
|
62
|
-
```sh
|
|
63
|
-
$ npm link genlayer-js
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### 2. Submit your solution
|
|
67
|
-
|
|
68
|
-
- **2.1. Prettier Formatter on Save File**: Configure IDE extensions to format your code with [Prettier](https://prettier.io/) before submitting it.
|
|
69
|
-
- **2.2. Code solution**: implement the solution in the code.
|
|
70
|
-
- **2.3. Pull Request**: Submit your changes through a pull request (PR). Fill the entire PR template and set the PR title as a valid conventional commit.
|
|
71
|
-
- **2.4. Check PR and issue linking**: if the issue and the PR are not linked, you can do it manually in the right panel of the Pull Request details page.
|
|
72
|
-
- **2.5. Peer Review**: One or more core contributors will review your PR. They may suggest changes or improvements.
|
|
73
|
-
- **2.6. Approval and Merge**: After approval from the reviewers, you can merge your PR with a squash and merge type of action.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Improving Documentation
|
|
77
|
-
|
|
78
|
-
To contribute to our docs, visit our [Documentation Repository](https://github.com/yeagerai/genlayer-docs) to create new issues or contribute to existing issues.
|
|
79
|
-
|
|
80
|
-
## Community
|
|
81
|
-
|
|
82
|
-
Connect with the GenLayer community to discuss, collaborate, and share insights:
|
|
83
|
-
|
|
84
|
-
- **[Discord Channel](https://discord.gg/8Jm4v89VAu)**: Our primary hub for discussions, support, and announcements.
|
|
85
|
-
- **[Telegram Group](https://t.me/genlayer)**: For more informal chats and quick updates.
|
|
86
|
-
|
|
87
|
-
Your continuous feedback drives better product development. Please engage with us regularly to test, discuss, and improve the GenLayerJS SDK.
|
package/renovate.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"extends": ["config:recommended", "group:recommended", "group:allNonMajor", "group:githubArtifactActions"],
|
|
4
|
-
"packageRules": [
|
|
5
|
-
{
|
|
6
|
-
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
|
7
|
-
"automerge": true
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
"vulnerabilityAlerts": {
|
|
11
|
-
"enabled": true
|
|
12
|
-
},
|
|
13
|
-
"osvVulnerabilityAlerts": true,
|
|
14
|
-
"dependencyDashboard": true,
|
|
15
|
-
"npm": {
|
|
16
|
-
"minimumReleaseAge": "3 days"
|
|
17
|
-
},
|
|
18
|
-
"reviewers": ["denishacquin", "epsjunior", "cristiam86"],
|
|
19
|
-
"baseBranches": ["staging"]
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const BITS_IN_TYPE = 3;
|
|
2
|
-
|
|
3
|
-
export const TYPE_SPECIAL = 0;
|
|
4
|
-
export const TYPE_PINT = 1;
|
|
5
|
-
export const TYPE_NINT = 2;
|
|
6
|
-
export const TYPE_BYTES = 3;
|
|
7
|
-
export const TYPE_STR = 4;
|
|
8
|
-
export const TYPE_ARR = 5;
|
|
9
|
-
export const TYPE_MAP = 6;
|
|
10
|
-
|
|
11
|
-
export const SPECIAL_NULL = (0 << BITS_IN_TYPE) | TYPE_SPECIAL;
|
|
12
|
-
export const SPECIAL_FALSE = (1 << BITS_IN_TYPE) | TYPE_SPECIAL;
|
|
13
|
-
export const SPECIAL_TRUE = (2 << BITS_IN_TYPE) | TYPE_SPECIAL;
|
|
14
|
-
export const SPECIAL_ADDR = (3 << BITS_IN_TYPE) | TYPE_SPECIAL;
|