@settlemint/sdk-cli 0.8.6-pre56b5e59 → 0.8.6-prefafe2e2

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.
Files changed (4) hide show
  1. package/README.md +136 -11
  2. package/dist/cli.js +238 -501
  3. package/dist/cli.js.map +46 -47
  4. package/package.json +5 -4
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  Integrate SettleMint into your application with ease.
8
8
  </p>
9
9
  </p>
10
- <br/>
10
+
11
11
  <p align="center">
12
12
  <a href="https://github.com/settlemint/sdk/actions?query=branch%3Amain"><img src="https://github.com/settlemint/sdk/actions/workflows/build.yml/badge.svg?event=push&branch=main" alt="CI status" /></a>
13
13
  <a href="https://fsl.software" rel="nofollow"><img src="https://img.shields.io/npm/l/@settlemint/sdk-cli" alt="License"></a>
@@ -26,23 +26,148 @@
26
26
  <br />
27
27
  </div>
28
28
 
29
- ## Getting started
29
+ ## Table of Contents
30
+
31
+ - [About](#about)
32
+ - [Usage](#usage)
33
+ - [API Reference](#api-reference)
34
+ - [Contributing](#contributing)
35
+ - [License](#license)
36
+
37
+ ## About
38
+
39
+ The SettleMint CLI provides a command-line interface for interacting with the SettleMint platform. It enables you to manage your blockchain networks, deploy smart contracts, configure your SettleMint infrastructure directly from the terminal.
40
+
41
+ ## Usage
42
+
43
+ ### Login to the platform
44
+
45
+ To use the SettleMint CLI, you first need to authenticate with the platform. Create a Personal Access Token (PAT) on the SettleMint platformand paste it when prompted by the login command.
46
+
47
+ Visit [the documentation](https://console.settlemint.com/documentation/docs/using-platform/personal-access-tokens/) to learn how to create a Personal Access Token.
48
+
49
+ Then run the login command and paste your token when prompted:
50
+
51
+ ```bash
52
+ settlemint login
53
+ ```
54
+
55
+ ### Creating a new project from a starter kit template
56
+
57
+ To create a new project from a starter kit template, use the `create` command with the `--template` flag:
58
+
59
+ ```bash
60
+ settlemint create --project-name <project-name> --template <template-name>
61
+ ```
62
+
63
+ #### Installing dependencies
64
+
65
+ To install the dependencies for your project, use the `dependencies` command.
30
66
 
31
- First we will create a new Next JS project using the following command.
67
+ ##### Using bun
32
68
 
33
69
  ```bash
34
- # Using npx
35
- npx @settlemint/sdk-cli@latest create
70
+ bun install
71
+ bun run dependencies
72
+ ```
73
+
74
+ ##### Using npm
75
+
76
+ ```bash
77
+ npm install
78
+ npm run dependencies
79
+ ```
36
80
 
37
- # Using bun
38
- bunx @settlemint/sdk-cli@latest create
81
+ ##### Using yarn
39
82
 
40
- # Using pnpm
41
- pnpm dlx @settlemint/sdk-cli@latest create
83
+ ```bash
84
+ yarn install
85
+ yarn run dependencies
86
+ ```
87
+
88
+ ##### Using pnpm
89
+
90
+ ```bash
91
+ pnpm install
92
+ pnpm run dependencies
42
93
  ```
43
94
 
44
- Then following the next steps in your terminal.
95
+ #### Connecting to your SettleMint infrastructure
45
96
 
46
- ## Commands
97
+ After creating your project, you'll need to connect it to your SettleMint infrastructure. This requires setting up environment variables with your SettleMint credentials and infrastructure details.
98
+
99
+ You can use the `connect` command to automatically configure your project and select the services you want to connect to.
100
+
101
+ ```bash
102
+ settlemint connect
103
+ ```
104
+
105
+ #### Deploying your smart contracts and subgraphs
106
+
107
+ To deploy your smart contracts and subgraphs, you can use the `deploy` command.
108
+
109
+ ```bash
110
+ settlemint scs hardhat deploy remote --accept-defaults
111
+ ```
112
+
113
+ To deploy your subgraphs, use the `subgraph` command.
114
+
115
+ ```bash
116
+ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
117
+ ```
118
+
119
+ #### Generating code for your dApp
120
+
121
+ After deploying your smart contracts and subgraphs, you can generate TypeScript code for your dApp to interact with them. The `codegen` command will generate type-safe code for your integrations with the services selected in the `connect` command.
122
+
123
+ ```bash
124
+ settlemint codegen
125
+ ```
126
+
127
+ #### Start your dApp in development mode
128
+
129
+ ```bash
130
+ bun run dev
131
+ ```
132
+
133
+ ### Creating a new project from a smart contract template
134
+
135
+ To create a new project from a smart contract template, use the `create` command with the `--use-case` flag:
136
+
137
+ ```bash
138
+ settlemint scs create --project-name <project-name> --use-case <use-case-name>
139
+ ```
140
+
141
+ #### Testing your smart contracts on a local network
142
+
143
+ To test your smart contracts, you can use the `test` command.
144
+
145
+ ```bash
146
+ settlemint scs foundry test
147
+ ```
148
+
149
+ #### Deploying your smart contracts and subgraphs
150
+
151
+ To deploy your smart contracts and subgraphs, you can use the `deploy` command.
152
+
153
+ ```bash
154
+ settlemint scs hardhat deploy remote --accept-defaults
155
+ ```
156
+
157
+ To deploy your subgraphs, use the `subgraph` command.
158
+
159
+ ```bash
160
+ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
161
+ ```
162
+
163
+ ## API Reference
47
164
 
48
165
  See the [documentation](./docs/settlemint.md) for available commands.
166
+
167
+ ## Contributing
168
+
169
+ We welcome contributions from the community! Please check out our [Contributing](../../.github/CONTRIBUTING.md) guide to learn how you can help improve the SettleMint SDK through bug reports, feature requests, documentation updates, or code contributions.
170
+
171
+ ## License
172
+
173
+ The SettleMint SDK is released under the [FSL Software License](https://fsl.software). See the [LICENSE](LICENSE) file for more details.