@appliedblockchain/silentdatarollup-viem 1.0.8 → 1.0.9
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/LICENSE +21 -0
- package/README.md +2 -2
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +9 -11
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Applied Blockchain Ltd.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Viem custom transport for Silent Data.
|
|
|
19
19
|
## Prerequisites
|
|
20
20
|
|
|
21
21
|
- Node.js (version 18 or higher)
|
|
22
|
-
-
|
|
22
|
+
- pnpm
|
|
23
23
|
- Basic knowledge of Ethereum and smart contracts
|
|
24
24
|
- Viem
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ Viem custom transport for Silent Data.
|
|
|
30
30
|
#### Installing Basic Usage Dependencies
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
|
|
33
|
+
pnpm add @appliedblockchain/silentdatarollup-viem
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
#### Basic Usage Example
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,11 @@ function sdTransport(providerConfig) {
|
|
|
37
37
|
if (!gasLimit) {
|
|
38
38
|
gasLimit = await provider.estimateGas(tx);
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
const txResponse = await provider.signer.sendTransaction({
|
|
41
|
+
...tx,
|
|
42
|
+
gasLimit
|
|
43
|
+
});
|
|
44
|
+
return txResponse.hash;
|
|
41
45
|
}
|
|
42
46
|
return await provider.send(method, params || []);
|
|
43
47
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,11 @@ function sdTransport(providerConfig) {
|
|
|
13
13
|
if (!gasLimit) {
|
|
14
14
|
gasLimit = await provider.estimateGas(tx);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
const txResponse = await provider.signer.sendTransaction({
|
|
17
|
+
...tx,
|
|
18
|
+
gasLimit
|
|
19
|
+
});
|
|
20
|
+
return txResponse.hash;
|
|
17
21
|
}
|
|
18
22
|
return await provider.send(method, params || []);
|
|
19
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appliedblockchain/silentdatarollup-viem",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Viem package for Silent Data",
|
|
5
5
|
"author": "Applied Blockchain",
|
|
6
6
|
"homepage": "https://github.com/appliedblockchain/silent-data-rollup-providers#readme",
|
|
@@ -26,22 +26,20 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"scripts": {
|
|
30
|
-
"build": "tsc --noEmit && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
31
|
-
"check-exports": "attw --pack . --profile node16",
|
|
32
|
-
"prepack": "npm run build",
|
|
33
|
-
"test": "jest"
|
|
34
|
-
},
|
|
35
29
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
30
|
+
"viem": "2.31.4",
|
|
31
|
+
"@appliedblockchain/silentdatarollup-ethers-provider": "1.0.9"
|
|
38
32
|
},
|
|
39
33
|
"devDependencies": {
|
|
40
|
-
"@types/node": "
|
|
34
|
+
"@types/node": "24.10.1",
|
|
41
35
|
"ts-node": "10.9.2",
|
|
42
36
|
"typescript": "5.6.2"
|
|
43
37
|
},
|
|
44
38
|
"engines": {
|
|
45
39
|
"node": ">=18.0.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc --noEmit && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
43
|
+
"check-exports": "attw --pack . --profile node16"
|
|
46
44
|
}
|
|
47
|
-
}
|
|
45
|
+
}
|