@vechain/vechain-kit 1.3.0 → 1.4.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 CHANGED
@@ -40,23 +40,16 @@ 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
-
44
- import VeChainKitProvider from '@vechain/vechain-kit'
45
-
43
+ import VeChainKitProvider from '@vechain/vechain-kit';
46
44
  export function VeChainKitProviderWrapper({ children }: Props) {
47
45
  return (
48
- <VechainKitProvider
49
- // Mandatory
46
+ <VechainKitProvider
50
47
  feeDelegation={{
51
- delegatorUrl: process.env.NEXT_PUBLIC_DELEGATOR_URL!
48
+ delegatorUrl: process.env.NEXT_PUBLIC_DELEGATOR_URL!,
52
49
  }}
53
50
  dappKit={{
54
51
  allowedWallets: ['veworld', 'sync2'],
55
52
  }}
56
- privyEcosystemApps=[] // remove for using default ones
57
- loginModalUI={{
58
- variant: 'vechain-wallet-ecosystem',
59
- }}
60
53
  darkMode={true}
61
54
  language="en"
62
55
  network={{
@@ -84,6 +77,50 @@ interface Props {
84
77
  }
85
78
  ```
86
79
 
80
+ ### Available Login Methods
81
+
82
+ The modal supports several authentication methods:
83
+
84
+ - Social Login - Email and Google authentication through Privy (only available for self hosted Privy)
85
+ - VeChain Login - Direct VeChain wallet authentication
86
+ - Passkey - Biometric/device-based authentication (only available for self hosted Privy)
87
+ - DappKit - Connection through VeWorld or other VeChain wallets
88
+ - Ecosystem - Cross-app authentication within the VeChain ecosystem
89
+ - More Options - Additional Privy-supported login methods (only available for self hosted Privy)
90
+
91
+ #### Configuration
92
+
93
+ The modal implements a dynamic grid layout system that can be customized through the `loginMethods` configuration.
94
+
95
+ The modal can be configured through the `VeChainKitProvider` props.
96
+
97
+ ```typescript
98
+ <VeChainKitProvider
99
+ loginModalUI={{
100
+ logo: '/your-logo.png',
101
+ description: 'Custom login description',
102
+ }}
103
+ loginMethods={[
104
+ { method: 'vechain', gridColumn: 4 },
105
+ { method: 'email', gridColumn: 2 },
106
+ { method: 'passkey', gridColumn: 2 },
107
+ ]}
108
+ >
109
+ {children}
110
+ </VeChainKitProvider>
111
+ ```
112
+
113
+ #### Ecosystem button
114
+
115
+ The ways to show the ecosystem login button are:
116
+
117
+ 1. You define "ecosystem" in the loginMethods in the config
118
+ 2. You do not define the loginMethods in the config, so we default to showing the ecosystem login button
119
+
120
+ To not show the ecosystem login button, you must explicitly define the loginMethods array in the config and not include ecosystem in the options.
121
+
122
+ By default we have a list of default apps that will be shown as ecosystem login options. If you want to customize this list you can pass the `allowedApps` array prop. You can find the app ids in the [Ecosystem](https://dashboard.privy.io/) tab in the Privy dashboard.
123
+
87
124
  ### Setup Fee Delegation (mandatory)
88
125
 
89
126
  Fee delegation is mandatory in order to use this kit. Learn how to setup fee delegation in the following guide:
@@ -2,6 +2,7 @@ type Wallet = {
2
2
  address: string;
3
3
  domain?: string;
4
4
  image: string;
5
+ isLoadingAvatar?: boolean;
5
6
  } | null;
6
7
  type SmartAccount = Wallet & {
7
8
  isDeployed: boolean;
@@ -2,6 +2,7 @@ type Wallet = {
2
2
  address: string;
3
3
  domain?: string;
4
4
  image: string;
5
+ isLoadingAvatar?: boolean;
5
6
  } | null;
6
7
  type SmartAccount = Wallet & {
7
8
  isDeployed: boolean;