@chipi-stack/nextjs 10.0.0 → 11.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 +24 -140
- package/dist/cjs/app-router/server/ChipiProvider.js +1 -1
- package/dist/cjs/app-router/server/ChipiProvider.js.map +1 -1
- package/dist/cjs/hooks.d.ts +1 -1
- package/dist/cjs/hooks.js +0 -2
- package/dist/cjs/hooks.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/esm/app-router/server/ChipiProvider.js +1 -1
- package/dist/esm/app-router/server/ChipiProvider.js.map +1 -1
- package/dist/esm/hooks.js +0 -2
- package/dist/esm/hooks.js.map +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,159 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Chipi SDK
|
|
2
2
|
|
|
3
|
-
Next.js
|
|
3
|
+
Chipi SDK is the easiest way to integrate USDC staking and withdrawal functionality into your React/Next.js application. Add secure wallet management, token staking, and withdrawals to your application in minutes. All transactions are sponsored thanks to Avnu's paymaster.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @chipi-stack/nextjs
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
5
|
+
## Prerequisites
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import { ChipiProvider } from '@chipi-stack/nextjs';
|
|
19
|
-
|
|
20
|
-
export default function RootLayout({
|
|
21
|
-
children,
|
|
22
|
-
}: {
|
|
23
|
-
children: React.ReactNode;
|
|
24
|
-
}) {
|
|
25
|
-
return (
|
|
26
|
-
<html lang="en">
|
|
27
|
-
<body>
|
|
28
|
-
<ChipiProvider>
|
|
29
|
-
{children}
|
|
30
|
-
</ChipiProvider>
|
|
31
|
-
</body>
|
|
32
|
-
</html>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
```
|
|
7
|
+
- React 18 or later
|
|
8
|
+
- Node.js >=18.17.0 or later
|
|
9
|
+
- A Chipi account. [Create your account for free](https://dashboard.chipipay.com)
|
|
36
10
|
|
|
37
|
-
|
|
11
|
+
## Installation
|
|
38
12
|
|
|
39
|
-
|
|
13
|
+
The fastest way to get started with Chipi SDK is by following our [Quickstart Guide](https://docs.chipipay.com/gasless/quickstart).
|
|
40
14
|
|
|
41
15
|
```bash
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# Required: Secret key (server-side only, never exposed to client)
|
|
46
|
-
CHIPI_SECRET_KEY=your_secret_key
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 3. Client-side Usage (Components and Hooks)
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
'use client';
|
|
53
|
-
|
|
54
|
-
import { useCreateWallet, useWallets } from '@chipi-stack/nextjs';
|
|
55
|
-
|
|
56
|
-
export function WalletManager() {
|
|
57
|
-
const { createWallet, isLoading } = useCreateWallet();
|
|
58
|
-
const { data: wallets } = useWallets();
|
|
59
|
-
|
|
60
|
-
const handleCreateWallet = () => {
|
|
61
|
-
createWallet({
|
|
62
|
-
encryptKey: 'your-encrypt-key',
|
|
63
|
-
bearerToken: 'your-bearer-token'
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<div>
|
|
69
|
-
<button onClick={handleCreateWallet} disabled={isLoading}>
|
|
70
|
-
Create Wallet
|
|
71
|
-
</button>
|
|
72
|
-
|
|
73
|
-
{wallets?.map(wallet => (
|
|
74
|
-
<div key={wallet.id}>{wallet.address}</div>
|
|
75
|
-
))}
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 4. Server-side Usage (API Routes, Server Components)
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
// In API routes or Server Components
|
|
85
|
-
import { getChipiServer } from '@chipi-stack/nextjs/server';
|
|
86
|
-
|
|
87
|
-
export async function GET() {
|
|
88
|
-
const chipiServer = getChipiServer();
|
|
89
|
-
|
|
90
|
-
try {
|
|
91
|
-
const wallets = await chipiServer.getWallets();
|
|
92
|
-
return Response.json({ wallets });
|
|
93
|
-
} catch (error) {
|
|
94
|
-
return Response.json({ error: 'Failed to fetch wallets' }, { status: 500 });
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Key Features
|
|
100
|
-
|
|
101
|
-
- **Automatic Environment Variable Configuration**: Reads from `NEXT_PUBLIC_CHIPI_API_KEY` and `CHIPI_SECRET_KEY`
|
|
102
|
-
- **Server/Client Separation**: Server utilities from `/server`, client hooks from main package
|
|
103
|
-
- **App Router Support**: Optimized for Next.js 13+ App Router
|
|
104
|
-
- **Type Safety**: Full TypeScript support with proper types
|
|
105
|
-
- **React Query Integration**: Built-in caching and state management
|
|
106
|
-
|
|
107
|
-
## Import Patterns
|
|
108
|
-
|
|
109
|
-
```tsx
|
|
110
|
-
// ✅ Client-side (components, hooks)
|
|
111
|
-
import { ChipiProvider, useCreateWallet, useWallets } from '@chipi-stack/nextjs';
|
|
112
|
-
|
|
113
|
-
// ✅ Server-side (API routes, Server Components)
|
|
114
|
-
import { getChipiServer, createChipiServer } from '@chipi-stack/nextjs/server';
|
|
115
|
-
|
|
116
|
-
// ✅ Types
|
|
117
|
-
import type { ChipiServerConfig } from '@chipi-stack/nextjs/server';
|
|
16
|
+
npm install @chipi-stack/nextjs
|
|
17
|
+
# or
|
|
18
|
+
yarn add @chipi-stack/nextjs
|
|
118
19
|
```
|
|
119
20
|
|
|
120
|
-
##
|
|
21
|
+
## Usage
|
|
121
22
|
|
|
122
|
-
|
|
23
|
+
For detailed information, guides, and examples visit our [documentation](https://docs.chipipay.com).
|
|
123
24
|
|
|
124
|
-
|
|
125
|
-
- Missing `CHIPI_SECRET_KEY`: Throws error on server-side initialization
|
|
25
|
+
## Support
|
|
126
26
|
|
|
127
|
-
|
|
27
|
+
You can get in touch with us in any of the following ways:
|
|
128
28
|
|
|
129
|
-
|
|
29
|
+
- Join our [Telegram community](https://t.me/chipi_pay)
|
|
30
|
+
- Visit our [YouTube channel](https://www.youtube.com/@chipipay) for tutorials
|
|
31
|
+
- Email us at support@chipi.com
|
|
130
32
|
|
|
131
|
-
|
|
132
|
-
'use client';
|
|
33
|
+
## Contributing
|
|
133
34
|
|
|
134
|
-
|
|
35
|
+
We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines and code of conduct.
|
|
135
36
|
|
|
136
|
-
|
|
137
|
-
return (
|
|
138
|
-
<ChipiClientProvider
|
|
139
|
-
apiPublicKey="custom-key"
|
|
140
|
-
environment="production"
|
|
141
|
-
>
|
|
142
|
-
{children}
|
|
143
|
-
</ChipiClientProvider>
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
```
|
|
37
|
+
## Security
|
|
147
38
|
|
|
148
|
-
|
|
39
|
+
@chipi-stack/nextjs follows best practices for security, but 100% security cannot be assured.
|
|
149
40
|
|
|
150
|
-
|
|
151
|
-
import { createChipiServer } from '@chipi-stack/nextjs/server';
|
|
41
|
+
@chipi-stack/nextjs is provided "as is" without any warranty. Use at your own risk.
|
|
152
42
|
|
|
153
|
-
|
|
154
|
-
createChipiServer({
|
|
155
|
-
secretKey: 'your-secret-key',
|
|
156
|
-
apiPublicKey: 'your-public-key',
|
|
157
|
-
environment: 'production'
|
|
158
|
-
});
|
|
159
|
-
```
|
|
43
|
+
For more information and to report security issues, please refer to our [security documentation](https://docs.chipipay.com).
|
|
@@ -35,7 +35,7 @@ async function ChipiProvider({ children }) {
|
|
|
35
35
|
if (process.env.NEXT_PUBLIC_CHIPI_ENV === "development") {
|
|
36
36
|
environment = "development";
|
|
37
37
|
}
|
|
38
|
-
console.log("environment", environment);
|
|
38
|
+
console.log("environment?", environment);
|
|
39
39
|
if (!apiPublicKey) {
|
|
40
40
|
throw new Error(
|
|
41
41
|
" NEXT_PUBLIC_CHIPI_API_KEY environment variable. Please add it to your .env file."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.NEXT_PUBLIC_CHIPI_ENV\",\n process.env.NEXT_PUBLIC_CHIPI_ENV\n );\n if (process.env.NEXT_PUBLIC_CHIPI_ENV === \"development\") {\n environment = \"development\";\n }\n\n console.log(\"environment
|
|
1
|
+
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.NEXT_PUBLIC_CHIPI_ENV\",\n process.env.NEXT_PUBLIC_CHIPI_ENV\n );\n if (process.env.NEXT_PUBLIC_CHIPI_ENV === \"development\") {\n environment = \"development\";\n }\n\n console.log(\"environment?\", environment);\n // Validate required environment variables\n if (!apiPublicKey) {\n throw new Error(\n \" NEXT_PUBLIC_CHIPI_API_KEY environment variable. Please add it to your .env file.\"\n );\n }\n\n if (!secretKey) {\n throw new Error(\n \"Missing CHIPI_SECRET_KEY environment variable. Server-side features will not work properly.\"\n );\n }\n\n // Initialize server SDK (this runs on server only)\n createChipiServer({\n secretKey,\n apiPublicKey,\n environment,\n debug: environment === \"development\",\n });\n\n // Return the client provider which will hydrate on the client\n // Note: This works because ChipiClientProvider is marked with 'use client'\n return (\n <ChipiClientProvider apiPublicKey={apiPublicKey} environment={environment}>\n {children}\n </ChipiClientProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDI;AAnDJ,+BAAkC;AAClC,2BAAqD;AAYrD,eAAsB,cAAc,EAAE,SAAS,GAAuB;AAEpE,QAAM,eAAe,QAAQ,IAAI;AACjC,QAAM,YAAY,QAAQ,IAAI;AAC9B,MAAI,cAAc;AAClB,UAAQ;AAAA,IACN;AAAA,IACA,QAAQ,IAAI;AAAA,EACd;AACA,MAAI,QAAQ,IAAI,0BAA0B,eAAe;AACvD,kBAAc;AAAA,EAChB;AAEA,UAAQ,IAAI,gBAAgB,WAAW;AAEvC,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAAC,WAAW;AACd,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,kDAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,gBAAgB;AAAA,EACzB,CAAC;AAID,SACE,4CAAC,qBAAAA,eAAA,EAAoB,cAA4B,aAC9C,UACH;AAEJ;","names":["ChipiClientProvider"]}
|
package/dist/cjs/hooks.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet,
|
|
1
|
+
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet, useGetWallet, useRecordSendTransaction, useStakeVesuUsdc, useTransfer, useWithdrawVesuUsdc } from '@chipi-stack/chipi-react';
|
package/dist/cjs/hooks.js
CHANGED
|
@@ -23,7 +23,6 @@ __export(hooks_exports, {
|
|
|
23
23
|
useCallAnyContract: () => import_chipi_react.useCallAnyContract,
|
|
24
24
|
useChipiContext: () => import_chipi_react.useChipiContext,
|
|
25
25
|
useCreateWallet: () => import_chipi_react.useCreateWallet,
|
|
26
|
-
useExecuteTransaction: () => import_chipi_react.useExecuteTransaction,
|
|
27
26
|
useGetWallet: () => import_chipi_react.useGetWallet,
|
|
28
27
|
useRecordSendTransaction: () => import_chipi_react.useRecordSendTransaction,
|
|
29
28
|
useStakeVesuUsdc: () => import_chipi_react.useStakeVesuUsdc,
|
|
@@ -38,7 +37,6 @@ var import_chipi_react = require("@chipi-stack/chipi-react");
|
|
|
38
37
|
useCallAnyContract,
|
|
39
38
|
useChipiContext,
|
|
40
39
|
useCreateWallet,
|
|
41
|
-
useExecuteTransaction,
|
|
42
40
|
useGetWallet,
|
|
43
41
|
useRecordSendTransaction,
|
|
44
42
|
useStakeVesuUsdc,
|
package/dist/cjs/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks.ts"],"sourcesContent":["\"use client\";\n\n// Client-side hooks for Next.js Chipi SDK\n// These are re-exported from @chipi-stack/chipi-react for convenience\n// This file is marked as 'use client' to ensure it only runs on the client\n\nexport {\n // Context hook\n useChipiContext,\n\n // Wallet hooks\n useCreateWallet,\n useGetWallet,\n\n // Transaction hooks\n useApprove,\n useTransfer,\n
|
|
1
|
+
{"version":3,"sources":["../../src/hooks.ts"],"sourcesContent":["\"use client\";\n\n// Client-side hooks for Next.js Chipi SDK\n// These are re-exported from @chipi-stack/chipi-react for convenience\n// This file is marked as 'use client' to ensure it only runs on the client\n\nexport {\n // Context hook\n useChipiContext,\n\n // Wallet hooks\n useCreateWallet,\n useGetWallet,\n\n // Transaction hooks\n useApprove,\n useTransfer,\n\n // SKU hooks\n\n // Specialized transaction hooks\n useStakeVesuUsdc,\n useWithdrawVesuUsdc,\n useCallAnyContract,\n\n // Record send transaction hook\n useRecordSendTransaction,\n} from \"@chipi-stack/chipi-react\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,yBAqBO;","names":[]}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServerComponentsServerModuleTypes } from './components.server.js';
|
|
2
2
|
export { ChipiProvider as ChipiClientProvider } from './app-router/client/ChipiProvider.js';
|
|
3
|
-
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet,
|
|
3
|
+
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet, useGetWallet, useRecordSendTransaction, useStakeVesuUsdc, useTransfer, useWithdrawVesuUsdc } from '@chipi-stack/chipi-react';
|
|
4
4
|
export * from '@chipi-stack/types';
|
|
5
5
|
import './app-router/server/ChipiProvider.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
@@ -12,7 +12,7 @@ async function ChipiProvider({ children }) {
|
|
|
12
12
|
if (process.env.NEXT_PUBLIC_CHIPI_ENV === "development") {
|
|
13
13
|
environment = "development";
|
|
14
14
|
}
|
|
15
|
-
console.log("environment", environment);
|
|
15
|
+
console.log("environment?", environment);
|
|
16
16
|
if (!apiPublicKey) {
|
|
17
17
|
throw new Error(
|
|
18
18
|
" NEXT_PUBLIC_CHIPI_API_KEY environment variable. Please add it to your .env file."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.NEXT_PUBLIC_CHIPI_ENV\",\n process.env.NEXT_PUBLIC_CHIPI_ENV\n );\n if (process.env.NEXT_PUBLIC_CHIPI_ENV === \"development\") {\n environment = \"development\";\n }\n\n console.log(\"environment
|
|
1
|
+
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.NEXT_PUBLIC_CHIPI_ENV\",\n process.env.NEXT_PUBLIC_CHIPI_ENV\n );\n if (process.env.NEXT_PUBLIC_CHIPI_ENV === \"development\") {\n environment = \"development\";\n }\n\n console.log(\"environment?\", environment);\n // Validate required environment variables\n if (!apiPublicKey) {\n throw new Error(\n \" NEXT_PUBLIC_CHIPI_API_KEY environment variable. Please add it to your .env file.\"\n );\n }\n\n if (!secretKey) {\n throw new Error(\n \"Missing CHIPI_SECRET_KEY environment variable. Server-side features will not work properly.\"\n );\n }\n\n // Initialize server SDK (this runs on server only)\n createChipiServer({\n secretKey,\n apiPublicKey,\n environment,\n debug: environment === \"development\",\n });\n\n // Return the client provider which will hydrate on the client\n // Note: This works because ChipiClientProvider is marked with 'use client'\n return (\n <ChipiClientProvider apiPublicKey={apiPublicKey} environment={environment}>\n {children}\n </ChipiClientProvider>\n );\n}\n"],"mappings":"AAoDI;AAnDJ,SAAS,yBAAyB;AAClC,SAAS,iBAAiB,2BAA2B;AAYrD,eAAsB,cAAc,EAAE,SAAS,GAAuB;AAEpE,QAAM,eAAe,QAAQ,IAAI;AACjC,QAAM,YAAY,QAAQ,IAAI;AAC9B,MAAI,cAAc;AAClB,UAAQ;AAAA,IACN;AAAA,IACA,QAAQ,IAAI;AAAA,EACd;AACA,MAAI,QAAQ,IAAI,0BAA0B,eAAe;AACvD,kBAAc;AAAA,EAChB;AAEA,UAAQ,IAAI,gBAAgB,WAAW;AAEvC,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAAC,WAAW;AACd,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,oBAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,gBAAgB;AAAA,EACzB,CAAC;AAID,SACE,oBAAC,uBAAoB,cAA4B,aAC9C,UACH;AAEJ;","names":[]}
|
package/dist/esm/hooks.js
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
useGetWallet,
|
|
6
6
|
useApprove,
|
|
7
7
|
useTransfer,
|
|
8
|
-
useExecuteTransaction,
|
|
9
8
|
useStakeVesuUsdc,
|
|
10
9
|
useWithdrawVesuUsdc,
|
|
11
10
|
useCallAnyContract,
|
|
@@ -16,7 +15,6 @@ export {
|
|
|
16
15
|
useCallAnyContract,
|
|
17
16
|
useChipiContext,
|
|
18
17
|
useCreateWallet,
|
|
19
|
-
useExecuteTransaction,
|
|
20
18
|
useGetWallet,
|
|
21
19
|
useRecordSendTransaction,
|
|
22
20
|
useStakeVesuUsdc,
|
package/dist/esm/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks.ts"],"sourcesContent":["\"use client\";\n\n// Client-side hooks for Next.js Chipi SDK\n// These are re-exported from @chipi-stack/chipi-react for convenience\n// This file is marked as 'use client' to ensure it only runs on the client\n\nexport {\n // Context hook\n useChipiContext,\n\n // Wallet hooks\n useCreateWallet,\n useGetWallet,\n\n // Transaction hooks\n useApprove,\n useTransfer,\n
|
|
1
|
+
{"version":3,"sources":["../../src/hooks.ts"],"sourcesContent":["\"use client\";\n\n// Client-side hooks for Next.js Chipi SDK\n// These are re-exported from @chipi-stack/chipi-react for convenience\n// This file is marked as 'use client' to ensure it only runs on the client\n\nexport {\n // Context hook\n useChipiContext,\n\n // Wallet hooks\n useCreateWallet,\n useGetWallet,\n\n // Transaction hooks\n useApprove,\n useTransfer,\n\n // SKU hooks\n\n // Specialized transaction hooks\n useStakeVesuUsdc,\n useWithdrawVesuUsdc,\n useCallAnyContract,\n\n // Record send transaction hook\n useRecordSendTransaction,\n} from \"@chipi-stack/chipi-react\";\n"],"mappings":";AAMA;AAAA,EAEE;AAAA,EAGA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAKA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,OACK;","names":[]}
|
package/dist/hooks.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet,
|
|
1
|
+
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet, useGetWallet, useRecordSendTransaction, useStakeVesuUsdc, useTransfer, useWithdrawVesuUsdc } from '@chipi-stack/chipi-react';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServerComponentsServerModuleTypes } from './components.server.mjs';
|
|
2
2
|
export { ChipiProvider as ChipiClientProvider } from './app-router/client/ChipiProvider.mjs';
|
|
3
|
-
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet,
|
|
3
|
+
export { useApprove, useCallAnyContract, useChipiContext, useCreateWallet, useGetWallet, useRecordSendTransaction, useStakeVesuUsdc, useTransfer, useWithdrawVesuUsdc } from '@chipi-stack/chipi-react';
|
|
4
4
|
export * from '@chipi-stack/types';
|
|
5
5
|
import './app-router/server/ChipiProvider.mjs';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chipi-stack/nextjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Chipi SDK for Next.js applications with server-side support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chipi",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@tanstack/react-query": "^5.85.0",
|
|
76
|
-
"@chipi-stack/
|
|
77
|
-
"@chipi-stack/
|
|
78
|
-
"@chipi-stack/
|
|
79
|
-
"@chipi-stack/
|
|
76
|
+
"@chipi-stack/chipi-react": "^11.0.0",
|
|
77
|
+
"@chipi-stack/backend": "^11.0.0",
|
|
78
|
+
"@chipi-stack/types": "^11.0.0",
|
|
79
|
+
"@chipi-stack/shared": "^11.0.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"next": ">=13.0.0",
|