keyring-chatbot-agent 1.0.2 → 1.0.4
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 +11 -20
- package/dist/chat-widget-wc.es.js +25 -25
- package/dist/chat-widget-wc.umd.js +1 -1
- package/dist/chat-widget.es.js +32 -32
- package/dist/chat-widget.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,9 +23,9 @@ An AI-powered Web3 chatbot SDK. Provides a floating chat widget with on-chain ca
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npm install keyring-chatbot-agent
|
|
26
|
+
npm install keyring-chatbot-agent
|
|
27
27
|
# or
|
|
28
|
-
yarn add keyring-chatbot-agent
|
|
28
|
+
yarn add keyring-chatbot-agent
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
**Peer dependencies** (React 17, 18, or 19):
|
|
@@ -41,11 +41,8 @@ npm install react react-dom
|
|
|
41
41
|
### Basic example
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
|
-
import { ChatWidget } from 'keyring-chatbot-agent
|
|
45
|
-
import type {
|
|
46
|
-
Transaction,
|
|
47
|
-
TransactionResult,
|
|
48
|
-
} from 'keyring-chatbot-agent-sdk-test';
|
|
44
|
+
import { ChatWidget } from 'keyring-chatbot-agent';
|
|
45
|
+
import type { Transaction, TransactionResult } from 'keyring-chatbot-agent';
|
|
49
46
|
|
|
50
47
|
function App() {
|
|
51
48
|
const handleTransaction = async (
|
|
@@ -71,11 +68,8 @@ function App() {
|
|
|
71
68
|
### Full example
|
|
72
69
|
|
|
73
70
|
```tsx
|
|
74
|
-
import { ChatWidget } from 'keyring-chatbot-agent
|
|
75
|
-
import type {
|
|
76
|
-
Transaction,
|
|
77
|
-
TransactionResult,
|
|
78
|
-
} from 'keyring-chatbot-agent-sdk-test';
|
|
71
|
+
import { ChatWidget } from 'keyring-chatbot-agent';
|
|
72
|
+
import type { Transaction, TransactionResult } from 'keyring-chatbot-agent';
|
|
79
73
|
|
|
80
74
|
function App() {
|
|
81
75
|
const handleTransaction = async (
|
|
@@ -122,11 +116,8 @@ function App() {
|
|
|
122
116
|
|
|
123
117
|
```tsx
|
|
124
118
|
import { useSendTransaction, useAccount } from 'wagmi';
|
|
125
|
-
import { ChatWidget } from 'keyring-chatbot-agent
|
|
126
|
-
import type {
|
|
127
|
-
Transaction,
|
|
128
|
-
TransactionResult,
|
|
129
|
-
} from 'keyring-chatbot-agent-sdk-test';
|
|
119
|
+
import { ChatWidget } from 'keyring-chatbot-agent';
|
|
120
|
+
import type { Transaction, TransactionResult } from 'keyring-chatbot-agent';
|
|
130
121
|
|
|
131
122
|
function App() {
|
|
132
123
|
const { address, chainId } = useAccount();
|
|
@@ -214,7 +205,7 @@ Complex objects (`account`, `rpcUrls`, callbacks) are assigned as JavaScript pro
|
|
|
214
205
|
</head>
|
|
215
206
|
<body>
|
|
216
207
|
<!-- 1. Load the bundle -->
|
|
217
|
-
<script src="https://unpkg.com/keyring-chatbot-agent
|
|
208
|
+
<script src="https://unpkg.com/keyring-chatbot-agent/dist/chat-widget-wc.umd.js"></script>
|
|
218
209
|
|
|
219
210
|
<!-- 2. Place the custom element with basic attributes -->
|
|
220
211
|
<chat-widget
|
|
@@ -278,7 +269,7 @@ Complex objects (`account`, `rpcUrls`, callbacks) are assigned as JavaScript pro
|
|
|
278
269
|
></chat-widget>
|
|
279
270
|
|
|
280
271
|
<script type="module">
|
|
281
|
-
import 'https://unpkg.com/keyring-chatbot-agent
|
|
272
|
+
import 'https://unpkg.com/keyring-chatbot-agent/dist/chat-widget-wc.es.js';
|
|
282
273
|
|
|
283
274
|
const widget = document.getElementById('my-chat');
|
|
284
275
|
|
|
@@ -301,7 +292,7 @@ Complex objects (`account`, `rpcUrls`, callbacks) are assigned as JavaScript pro
|
|
|
301
292
|
<meta charset="UTF-8" />
|
|
302
293
|
<title>My dApp</title>
|
|
303
294
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ethers/6.13.0/ethers.umd.min.js"></script>
|
|
304
|
-
<script src="https://unpkg.com/keyring-chatbot-agent
|
|
295
|
+
<script src="https://unpkg.com/keyring-chatbot-agent/dist/chat-widget-wc.umd.js"></script>
|
|
305
296
|
</head>
|
|
306
297
|
<body>
|
|
307
298
|
<button id="connect-btn">Connect Wallet</button>
|