@settlemint/sdk-cli 0.8.6-pr9429cc29 → 0.8.6-pr97bfb525

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 +138 -25
  2. package/dist/cli.js +45215 -45303
  3. package/dist/cli.js.map +91 -91
  4. package/package.json +8 -6
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,45 +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.
76
+
77
+ ##### Using bun
78
+
79
+ ```bash
80
+ bun install
81
+ bun run dependencies
82
+ ```
83
+
84
+ ##### Using npm
85
+
86
+ ```bash
87
+ npm install
88
+ npm run dependencies
89
+ ```
90
+
91
+ ##### Using yarn
92
+
93
+ ```bash
94
+ yarn install
95
+ yarn run dependencies
96
+ ```
97
+
98
+ ##### Using pnpm
99
+
100
+ ```bash
101
+ pnpm install
102
+ pnpm run dependencies
103
+ ```
104
+
105
+ #### Connecting to your SettleMint infrastructure
30
106
 
31
- First we will create a new Next JS project using the following command.
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.
32
110
 
33
111
  ```bash
34
- # Using npx
35
- npx @settlemint/sdk-cli@latest create
112
+ settlemint connect
113
+ ```
36
114
 
37
- # Using bun
38
- bunx @settlemint/sdk-cli@latest create
115
+ #### Deploying your smart contracts and subgraphs
39
116
 
40
- # Using pnpm
41
- pnpm dlx @settlemint/sdk-cli@latest create
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
42
121
  ```
43
122
 
44
- Then following the next steps in your terminal.
123
+ To deploy your subgraphs, use the `subgraph` command.
45
124
 
125
+ ```bash
126
+ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
127
+ ```
46
128
 
47
- ## Local development
129
+ #### Generating code for your dApp
48
130
 
49
- ### Debugging
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.
50
132
 
51
- To debug with interactive input you need to start the command from the terminal and then attach the debugger.
133
+ ```bash
134
+ settlemint codegen
135
+ ```
136
+
137
+ #### Start your dApp in development mode
52
138
 
53
139
  ```bash
54
- bun --inspect-wait=localhost:6499/ sdk/cli/src/cli.ts create
55
- # Attach the debugger using the "SDK: Attach to process" configuration
140
+ bun run dev
141
+ ```
56
142
 
57
- # Run from the directory created by the create command
58
- bun --inspect-wait=localhost:6499/ sdk/cli/src/cli.ts connect
59
- # Attach the debugger using the "SDK: Attach to process" configuration
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>
60
149
  ```
61
150
 
62
- ### e2e tests
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
174
+
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.
63
180
 
64
- Create a ".env" file in the root folder of this project.
181
+ ## License
65
182
 
66
- ```env
67
- SETTLEMINT_ACCESS_TOKEN_E2E_TESTS="sm_pat_xxx"
68
- SETTLEMINT_INSTANCE="https://me.settlemint.be"
69
- DISABLE_WORKSPACE_DELETE=true
70
- ```
183
+ The SettleMint SDK is released under the [FSL Software License](https://fsl.software). See the [LICENSE](LICENSE) file for more details.