@settlemint/sdk-cli 0.8.6-pr79ec3fd4 → 0.8.6-pr87ba00fb

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 +146 -11
  2. package/dist/cli.js +493 -594
  3. package/dist/cli.js.map +76 -77
  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,158 @@
26
26
  <br />
27
27
  </div>
28
28
 
29
- ## Getting started
29
+ ## Table of Contents
30
+
31
+ - [About](#about)
32
+ - [Usage](#usage)
33
+ - [Login to the platform](#login-to-the-platform)
34
+ - [Creating a new project from a starter kit template](#creating-a-new-project-from-a-starter-kit-template)
35
+ - [Installing dependencies](#installing-dependencies)
36
+ - [Connecting to your SettleMint infrastructure](#connecting-to-your-settlemint-infrastructure)
37
+ - [Deploying your smart contracts and subgraphs](#deploying-your-smart-contracts-and-subgraphs)
38
+ - [Generating code for your dApp](#generating-code-for-your-dapp)
39
+ - [Start your dApp in development mode](#start-your-dapp-in-development-mode)
40
+ - [Creating a new project from a smart contract template](#creating-a-new-project-from-a-smart-contract-template)
41
+ - [Testing your smart contracts on a local network](#testing-your-smart-contracts-on-a-local-network)
42
+ - [Deploying your smart contracts and subgraphs](#deploying-your-smart-contracts-and-subgraphs)
43
+ - [API Reference](#api-reference)
44
+ - [Contributing](#contributing)
45
+ - [License](#license)
46
+
47
+ ## About
48
+
49
+ 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.
50
+
51
+ ## Usage
52
+
53
+ ### Login to the platform
54
+
55
+ 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.
56
+
57
+ Visit [the documentation](https://console.settlemint.com/documentation/docs/using-platform/personal-access-tokens/) to learn how to create a Personal Access Token.
58
+
59
+ Then run the login command and paste your token when prompted:
60
+
61
+ ```bash
62
+ settlemint login
63
+ ```
64
+
65
+ ### Creating a new project from a starter kit template
66
+
67
+ To create a new project from a starter kit template, use the `create` command with the `--template` flag:
68
+
69
+ ```bash
70
+ settlemint create --project-name <project-name> --template <template-name>
71
+ ```
72
+
73
+ #### Installing dependencies
74
+
75
+ To install the dependencies for your project, use the `dependencies` command.
30
76
 
31
- First we will create a new Next JS project using the following command.
77
+ ##### Using bun
32
78
 
33
79
  ```bash
34
- # Using npx
35
- npx @settlemint/sdk-cli@latest create
80
+ bun install
81
+ bun run dependencies
82
+ ```
83
+
84
+ ##### Using npm
85
+
86
+ ```bash
87
+ npm install
88
+ npm run dependencies
89
+ ```
36
90
 
37
- # Using bun
38
- bunx @settlemint/sdk-cli@latest create
91
+ ##### Using yarn
39
92
 
40
- # Using pnpm
41
- pnpm dlx @settlemint/sdk-cli@latest create
93
+ ```bash
94
+ yarn install
95
+ yarn run dependencies
96
+ ```
97
+
98
+ ##### Using pnpm
99
+
100
+ ```bash
101
+ pnpm install
102
+ pnpm run dependencies
42
103
  ```
43
104
 
44
- Then following the next steps in your terminal.
105
+ #### Connecting to your SettleMint infrastructure
45
106
 
46
- ## Commands
107
+ 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.
108
+
109
+ You can use the `connect` command to automatically configure your project and select the services you want to connect to.
110
+
111
+ ```bash
112
+ settlemint connect
113
+ ```
114
+
115
+ #### Deploying your smart contracts and subgraphs
116
+
117
+ To deploy your smart contracts and subgraphs, you can use the `deploy` command.
118
+
119
+ ```bash
120
+ settlemint scs hardhat deploy remote --accept-defaults
121
+ ```
122
+
123
+ To deploy your subgraphs, use the `subgraph` command.
124
+
125
+ ```bash
126
+ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
127
+ ```
128
+
129
+ #### Generating code for your dApp
130
+
131
+ 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.
132
+
133
+ ```bash
134
+ settlemint codegen
135
+ ```
136
+
137
+ #### Start your dApp in development mode
138
+
139
+ ```bash
140
+ bun run dev
141
+ ```
142
+
143
+ ### Creating a new project from a smart contract template
144
+
145
+ To create a new project from a smart contract template, use the `create` command with the `--use-case` flag:
146
+
147
+ ```bash
148
+ settlemint scs create --project-name <project-name> --use-case <use-case-name>
149
+ ```
150
+
151
+ #### Testing your smart contracts on a local network
152
+
153
+ To test your smart contracts, you can use the `test` command.
154
+
155
+ ```bash
156
+ settlemint scs foundry test
157
+ ```
158
+
159
+ #### Deploying your smart contracts and subgraphs
160
+
161
+ To deploy your smart contracts and subgraphs, you can use the `deploy` command.
162
+
163
+ ```bash
164
+ settlemint scs hardhat deploy remote --accept-defaults
165
+ ```
166
+
167
+ To deploy your subgraphs, use the `subgraph` command.
168
+
169
+ ```bash
170
+ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
171
+ ```
172
+
173
+ ## API Reference
47
174
 
48
175
  See the [documentation](./docs/settlemint.md) for available commands.
176
+
177
+ ## Contributing
178
+
179
+ 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.
180
+
181
+ ## License
182
+
183
+ The SettleMint SDK is released under the [FSL Software License](https://fsl.software). See the [LICENSE](LICENSE) file for more details.