@vechain/vechain-kit 2.0.0-rc.9 → 2.0.0
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/README.md +22 -5
- package/dist/assets/index.cjs +1 -104
- package/dist/assets/index.d.cts +2 -1158
- package/dist/assets/index.d.mts +2 -0
- package/dist/assets/index.mjs +1 -0
- package/dist/assets-DXVXPy3w.cjs +47 -0
- package/dist/assets-DXVXPy3w.cjs.map +1 -0
- package/dist/assets-aAdDxPJu.mjs +38 -0
- package/dist/assets-aAdDxPJu.mjs.map +1 -0
- package/dist/index-Bqx1gXNe.d.mts +3961 -0
- package/dist/index-Bqx1gXNe.d.mts.map +1 -0
- package/dist/index-Bs6t5GxR.d.mts +136 -0
- package/dist/index-Bs6t5GxR.d.mts.map +1 -0
- package/dist/index-DSMUkHcK.d.cts +136 -0
- package/dist/index-DSMUkHcK.d.cts.map +1 -0
- package/dist/index-V7NUPb1d.d.cts +3961 -0
- package/dist/index-V7NUPb1d.d.cts.map +1 -0
- package/dist/index.cjs +171 -20660
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2224
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +186 -0
- package/dist/index.mjs.map +1 -0
- package/dist/utils/index.cjs +1 -265
- package/dist/utils/index.d.cts +3 -261
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils-Bl-JeVTg.cjs +2 -0
- package/dist/utils-Bl-JeVTg.cjs.map +1 -0
- package/dist/utils-DAs6kMGs.mjs +2 -0
- package/dist/utils-DAs6kMGs.mjs.map +1 -0
- package/package.json +155 -104
- package/dist/assets/index.cjs.map +0 -1
- package/dist/assets/index.d.ts +0 -1158
- package/dist/assets/index.js +0 -3
- package/dist/assets/index.js.map +0 -1
- package/dist/chunk-BCEQ6QWT.js +0 -863
- package/dist/chunk-BCEQ6QWT.js.map +0 -1
- package/dist/chunk-EESC6JDT.cjs +0 -1897
- package/dist/chunk-EESC6JDT.cjs.map +0 -1
- package/dist/chunk-M6WTSZ5C.cjs +0 -939
- package/dist/chunk-M6WTSZ5C.cjs.map +0 -1
- package/dist/chunk-Z4FE6MMP.js +0 -1872
- package/dist/chunk-Z4FE6MMP.js.map +0 -1
- package/dist/index.d.ts +0 -2224
- package/dist/index.js +0 -20322
- package/dist/index.js.map +0 -1
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/thorUtils-IptLtkeL.d.cts +0 -230
- package/dist/thorUtils-IptLtkeL.d.ts +0 -230
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.ts +0 -261
- package/dist/utils/index.js +0 -4
- package/dist/utils/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ It offers:
|
|
|
30
30
|
# Installation
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
yarn add @tanstack/react-query@"^5.64.2" @chakra-ui/react@"^2.8.2" @vechain/dapp-kit-react@"
|
|
33
|
+
yarn add @tanstack/react-query@"^5.64.2" @chakra-ui/react@"^2.8.2" @vechain/dapp-kit-react@"2.0.4" @vechain/vechain-kit
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
# Quick Start
|
|
@@ -40,15 +40,13 @@ yarn add @tanstack/react-query@"^5.64.2" @chakra-ui/react@"^2.8.2" @vechain/dapp
|
|
|
40
40
|
```typescript
|
|
41
41
|
'use client';
|
|
42
42
|
|
|
43
|
-
import VeChainKitProvider from '@vechain/vechain-kit';
|
|
43
|
+
import { VeChainKitProvider } from '@vechain/vechain-kit';
|
|
44
44
|
|
|
45
45
|
export function VeChainKitProviderWrapper({ children }: Props) {
|
|
46
46
|
return (
|
|
47
47
|
<VechainKitProvider
|
|
48
48
|
feeDelegation={{
|
|
49
49
|
delegatorUrl: process.env.NEXT_PUBLIC_DELEGATOR_URL!,
|
|
50
|
-
// set to false if you want to delegate ONLY social login transactions
|
|
51
|
-
delegateAllTransactions: true,
|
|
52
50
|
}}
|
|
53
51
|
loginMethods={[
|
|
54
52
|
{ method: 'vechain', gridColumn: 4 },
|
|
@@ -288,7 +286,26 @@ export function TransactionExamples() {
|
|
|
288
286
|
|
|
289
287
|
The kit provides hooks for developers to interact with smart contracts like VeBetterDAO, VePassport, veDelegate, and price oracles. These hooks work with react-query, improving query capabilities by caching responses and offering real-time states like isLoading and isError. This helps developers manage and update user interfaces effectively, ensuring a responsive experience.
|
|
290
288
|
|
|
291
|
-
|
|
289
|
+
|
|
290
|
+
### Contract Getters Package
|
|
291
|
+
|
|
292
|
+
VeChain Kit now makes use of and maintains two external packages:
|
|
293
|
+
|
|
294
|
+
* [`contract-getters`](https://www.npmjs.com/package/@vechain/contract-getters) — standardized methods for fetching blockchain data
|
|
295
|
+
* [`contracts-types`](https://www.npmjs.com/package/@vechain/vechain-contract-types) — TypeScript contract interfaces and type definitions
|
|
296
|
+
|
|
297
|
+
The `contract-getters` package provides efficient methods for:
|
|
298
|
+
|
|
299
|
+
* **Avatar Management**: Retrieve user avatars and profile information
|
|
300
|
+
* **Token Balances**: Fetch B3TR and VOT3 balances
|
|
301
|
+
* **Domain Services**: Resolve domain addresses or get user-owned domains
|
|
302
|
+
* **Smart Contract Data**: Access information from core VeChain ecosystem contracts
|
|
303
|
+
|
|
304
|
+
Together, these packages ensure consistent data-fetching patterns across the ecosystem and deliver optimized queries for better performance.
|
|
305
|
+
|
|
306
|
+
### Usage Example
|
|
307
|
+
|
|
308
|
+
For example you can use `useGetB3trBalance` to get the balance of the user's wallet which is using `getB3trbalance` from `contract-getters`:
|
|
292
309
|
|
|
293
310
|
```typescript
|
|
294
311
|
import { useGetB3trBalance } from '@vechain/vechain-kit';
|
package/dist/assets/index.cjs
CHANGED
|
@@ -1,104 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var chunkEESC6JDT_cjs = require('../chunk-EESC6JDT.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "GoogleLogo", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunkEESC6JDT_cjs.GoogleLogo; }
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "PrivyLogo", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkEESC6JDT_cjs.PrivyLogo; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "SimpleAccountABI", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkEESC6JDT_cjs.SimpleAccountABI; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "SimpleAccountFactoryABI", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunkEESC6JDT_cjs.SimpleAccountFactoryABI; }
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports, "TwitterLogo", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return chunkEESC6JDT_cjs.TwitterLogo; }
|
|
26
|
-
});
|
|
27
|
-
Object.defineProperty(exports, "VETLogo", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () { return chunkEESC6JDT_cjs.VETLogo; }
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "VTHOLogo", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return chunkEESC6JDT_cjs.VTHOLogo; }
|
|
34
|
-
});
|
|
35
|
-
Object.defineProperty(exports, "VeBetterIcon", {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
get: function () { return chunkEESC6JDT_cjs.VeBetterIcon; }
|
|
38
|
-
});
|
|
39
|
-
Object.defineProperty(exports, "VeBetterIconDark", {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () { return chunkEESC6JDT_cjs.VeBetterIconDark; }
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "VeBetterIconLight", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () { return chunkEESC6JDT_cjs.VeBetterIconLight; }
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(exports, "VeBetterLogo", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () { return chunkEESC6JDT_cjs.VeBetterLogo; }
|
|
50
|
-
});
|
|
51
|
-
Object.defineProperty(exports, "VeBetterLogoDark", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () { return chunkEESC6JDT_cjs.VeBetterLogoDark; }
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(exports, "VeBetterLogoLight", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function () { return chunkEESC6JDT_cjs.VeBetterLogoLight; }
|
|
58
|
-
});
|
|
59
|
-
Object.defineProperty(exports, "VeWorldLogoDark", {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: function () { return chunkEESC6JDT_cjs.VeWorldLogoDark; }
|
|
62
|
-
});
|
|
63
|
-
Object.defineProperty(exports, "VeWorldLogoLight", {
|
|
64
|
-
enumerable: true,
|
|
65
|
-
get: function () { return chunkEESC6JDT_cjs.VeWorldLogoLight; }
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "VechainEnergy", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function () { return chunkEESC6JDT_cjs.VechainEnergy; }
|
|
70
|
-
});
|
|
71
|
-
Object.defineProperty(exports, "VechainIcon", {
|
|
72
|
-
enumerable: true,
|
|
73
|
-
get: function () { return chunkEESC6JDT_cjs.VechainIcon; }
|
|
74
|
-
});
|
|
75
|
-
Object.defineProperty(exports, "VechainIconDark", {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
get: function () { return chunkEESC6JDT_cjs.VechainIconDark; }
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(exports, "VechainIconLight", {
|
|
80
|
-
enumerable: true,
|
|
81
|
-
get: function () { return chunkEESC6JDT_cjs.VechainIconLight; }
|
|
82
|
-
});
|
|
83
|
-
Object.defineProperty(exports, "VechainLogo", {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
get: function () { return chunkEESC6JDT_cjs.VechainLogo; }
|
|
86
|
-
});
|
|
87
|
-
Object.defineProperty(exports, "VechainLogoDark", {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () { return chunkEESC6JDT_cjs.VechainLogoDark; }
|
|
90
|
-
});
|
|
91
|
-
Object.defineProperty(exports, "VechainLogoHorizontalDark", {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
get: function () { return chunkEESC6JDT_cjs.VechainLogoHorizontalDark; }
|
|
94
|
-
});
|
|
95
|
-
Object.defineProperty(exports, "VechainLogoHorizontalLight", {
|
|
96
|
-
enumerable: true,
|
|
97
|
-
get: function () { return chunkEESC6JDT_cjs.VechainLogoHorizontalLight; }
|
|
98
|
-
});
|
|
99
|
-
Object.defineProperty(exports, "VechainLogoLight", {
|
|
100
|
-
enumerable: true,
|
|
101
|
-
get: function () { return chunkEESC6JDT_cjs.VechainLogoLight; }
|
|
102
|
-
});
|
|
103
|
-
//# sourceMappingURL=index.cjs.map
|
|
104
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
const e=require(`../assets-DXVXPy3w.cjs`);exports.BetterSwapLogo=e.n,exports.GitHubLogo=e.w,exports.GoogleLogo=e.T,exports.PrivyLogo=e.i,exports.TwitterLogo=e.C,exports.VETLogo=e.c,exports.VTHOLogo=e.s,exports.VeBetterIcon=e.l,exports.VeBetterIconDark=e.u,exports.VeBetterIconLight=e.d,exports.VeBetterLogo=e.f,exports.VeBetterLogoDark=e.p,exports.VeBetterLogoLight=e.m,exports.VeTradeLogo=e.t,exports.VeWorldLogoDark=e.a,exports.VeWorldLogoLight=e.o,exports.VechainEnergy=e.r,exports.VechainIcon=e.h,exports.VechainIconDark=e.g,exports.VechainIconLight=e._,exports.VechainLogo=e.S,exports.VechainLogoDark=e.x,exports.VechainLogoHorizontalDark=e.y,exports.VechainLogoHorizontalLight=e.v,exports.VechainLogoLight=e.b;
|