@n1xyz/wallet-widget 0.0.24 → 0.0.26
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 +24 -24
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -109,15 +109,15 @@ function SigningExample() {
|
|
|
109
109
|
|
|
110
110
|
### N1WalletProvider Props
|
|
111
111
|
|
|
112
|
-
| Prop
|
|
113
|
-
|
|
114
|
-
| children
|
|
115
|
-
| providedSessionMode | N1SessionMode
|
|
116
|
-
| appId
|
|
117
|
-
| darkMode
|
|
118
|
-
| onError
|
|
119
|
-
| faucetUrl
|
|
120
|
-
| nord
|
|
112
|
+
| Prop | Type | Required | Default | Description |
|
|
113
|
+
|---------------------|------------------------------|----------|---------|----------------------------------------|
|
|
114
|
+
| children | React.ReactNode | Yes | - | Child components |
|
|
115
|
+
| providedSessionMode | N1SessionMode | Yes | - | Session mode (Nord or NTS) |
|
|
116
|
+
| appId | string | Yes | - | Your application ID |
|
|
117
|
+
| darkMode | boolean | No | true | Enable dark mode UI |
|
|
118
|
+
| onError | (error: WalletError) => void | No | - | Error handler callback |
|
|
119
|
+
| faucetUrl | string | No | - | URL for faucet service |
|
|
120
|
+
| nord | Nord | No | - | Nord instance (required for Nord mode) |
|
|
121
121
|
|
|
122
122
|
### N1SessionMode
|
|
123
123
|
|
|
@@ -132,22 +132,22 @@ enum N1SessionMode {
|
|
|
132
132
|
|
|
133
133
|
The context provides the following values:
|
|
134
134
|
|
|
135
|
-
| Property
|
|
136
|
-
|
|
137
|
-
| address
|
|
138
|
-
| appId
|
|
139
|
-
| balances
|
|
140
|
-
| chain
|
|
141
|
-
| isConnected
|
|
142
|
-
| sessionMode
|
|
143
|
-
| sessionPubKey
|
|
144
|
-
| setShowLogin
|
|
145
|
-
| showLogin
|
|
146
|
-
| signMessageWithSessionKey
|
|
147
|
-
| signMessageWithWalletKey
|
|
135
|
+
| Property | Type | Description |
|
|
136
|
+
|------------------------------|------------------------------------|----------------------------------|
|
|
137
|
+
| address | string | User's wallet address |
|
|
138
|
+
| appId | string | Application ID |
|
|
139
|
+
| balances | Balance[] | User's token balances |
|
|
140
|
+
| chain | string | Current blockchain |
|
|
141
|
+
| isConnected | boolean | Connection status |
|
|
142
|
+
| sessionMode | N1SessionMode | Current session mode |
|
|
143
|
+
| sessionPubKey | Uint8Array | Session public key |
|
|
144
|
+
| setShowLogin | (show: boolean) => void | Show/hide login modal |
|
|
145
|
+
| showLogin | boolean | Login modal visibility state |
|
|
146
|
+
| signMessageWithSessionKey | (message: any) => Promise<any> | Sign message with session key |
|
|
147
|
+
| signMessageWithWalletKey | (message: any) => Promise<any> | Sign message with wallet key |
|
|
148
148
|
| signTransactionWithWalletKey | (transaction: any) => Promise<any> | Sign transaction with wallet key |
|
|
149
|
-
| username
|
|
150
|
-
| walletPubKey
|
|
149
|
+
| username | string | User's username |
|
|
150
|
+
| walletPubKey | Uint8Array | Wallet public key |
|
|
151
151
|
|
|
152
152
|
## Error Handling
|
|
153
153
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n1xyz/wallet-widget",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "React wallet widget component for N1 applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"pino-pretty": "^13.0.0",
|
|
28
28
|
"postcss": "^8.4.31",
|
|
29
29
|
"tailwindcss": "^3.3.5",
|
|
30
|
-
"typescript": "^5.0.0"
|
|
30
|
+
"typescript": "^5.0.0",
|
|
31
|
+
"nodemon": "^3.1"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"@dynamic-labs/ethereum": "3.5.0",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"@dynamic-labs/solana": "3.5.0",
|
|
36
37
|
"@n1xyz/nts-sdk": "0.0.38",
|
|
37
38
|
"@solana/web3.js": "^1.98.1",
|
|
38
|
-
"@n1xyz/nord-ts": "0.
|
|
39
|
+
"@n1xyz/nord-ts": "0.1.1",
|
|
39
40
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
40
41
|
"blockies-react-svg": "^0.0.13",
|
|
41
42
|
"lucide-react": "^0.344.0",
|