create-sbc-app 0.1.3 → 0.1.5

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
@@ -134,8 +134,14 @@ cd my-sbc-app
134
134
  # Copy environment template
135
135
  cp .env.template .env
136
136
 
137
- # Add your API key
138
- echo "VITE_SBC_API_KEY=your_actual_api_key" >> .env
137
+ # then ensure your .env has the environment variables set up
138
+
139
+ # "base" or "baseSepolia"
140
+ VITE_CHAIN="baseSepolia"
141
+ # Custom RPC URL (optional) - e.g. get one from Alchemey at https://dashboard.alchemy.com/apps
142
+ VITE_RPC_URL=
143
+ # Get your SBC API Key at https://dashboard.stablecoin.xyz
144
+ VITE_SBC_API_KEY=
139
145
  ```
140
146
 
141
147
  ### 3. Start Development
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sbc-app",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Scaffold a new SBC App Kit project with one command.",
5
5
  "bin": {
6
6
  "create-sbc-app": "bin/cli.js"
@@ -1,3 +1,6 @@
1
1
  # SBC App Kit Configuration
2
2
  VITE_CHAIN="baseSepolia"
3
+ # Custom RPC URL (optional) - e.g. get one from Alchemey at https://dashboard.alchemy.com/apps
4
+ VITE_RPC_URL=
5
+ # Get your SBC API Key at https://dashboard.stablecoin.xyz
3
6
  VITE_SBC_API_KEY={{apiKey}}
@@ -16,11 +16,14 @@ Copy the example environment file and add your SBC API key:
16
16
  cp .env.example .env # Optional: for local overrides
17
17
  ```
18
18
 
19
- Edit `.env` and add your SBC API key:
19
+ Edit `.env` and add your SBC API key and Chain, with the optional for a custom RPC:
20
20
  ```bash
21
- VITE_SBC_API_KEY=your_api_key_here
22
- VITE_SBC_CHAIN={{chain}}
23
- VITE_SBC_DEBUG=true
21
+ # "base" or "baseSepolia"
22
+ VITE_CHAIN="baseSepolia"
23
+ # Custom RPC URL (optional) - e.g. get one from Alchemey at https://dashboard.alchemy.com/apps
24
+ VITE_RPC_URL=
25
+ # Get your SBC API Key at https://dashboard.stablecoin.xyz
26
+ VITE_SBC_API_KEY=
24
27
  ```
25
28
 
26
29
  > **Get your API key:** Visit the [SBC Dashboard](https://dashboard.stablecoin.xyz) to create an account and get your API key.
@@ -7,6 +7,7 @@ import './App.css';
7
7
 
8
8
  // Chain selection helpers
9
9
  const chain = (import.meta.env.VITE_CHAIN === 'base') ? base : baseSepolia;
10
+ const rpcUrl = import.meta.env.VITE_RPC_URL;
10
11
 
11
12
  const SBC_TOKEN_ADDRESS = (chain) => {
12
13
  if (chain.id === baseSepolia.id) {
@@ -400,6 +401,7 @@ export default function App() {
400
401
  const sbcConfig = {
401
402
  apiKey: import.meta.env.VITE_SBC_API_KEY || '{{apiKey}}',
402
403
  chain,
404
+ rpcUrl,
403
405
  wallet: 'auto' as const,
404
406
  debug: true,
405
407
  walletOptions: { autoConnect: false },