solloop 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Howard Software
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,90 @@
1
- # Temporary Holding Version
1
+ # solloop
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The SolLoop checkout widget. It lets your customers subscribe with recurring
4
+ USDC payments on Solana. The widget renders inside a shadow root, so your
5
+ page's styles can't break it, and it loads the Solana code only when the
6
+ customer clicks.
7
+
8
+ You need a plan from the [SolLoop dashboard](https://dashboard.solloop.app).
9
+
10
+ ## Web component
11
+
12
+ ```sh
13
+ npm install solloop
14
+ ```
15
+
16
+ ```js
17
+ import 'solloop';
18
+ ```
19
+
20
+ ```html
21
+ <solloop-subscribe plan="plan_8xK2m"></solloop-subscribe>
22
+ ```
23
+
24
+ Importing the package registers `<solloop-subscribe>`. If you don't use a
25
+ bundler, load the script from the CDN instead:
26
+
27
+ ```html
28
+ <script src="https://cdn.solloop.app/widget.js" defer></script>
29
+ <solloop-subscribe plan="plan_8xK2m"></solloop-subscribe>
30
+ ```
31
+
32
+ The element fires events that bubble out of the shadow root:
33
+
34
+ ```js
35
+ document
36
+ .querySelector('solloop-subscribe')
37
+ .addEventListener('solloop:subscribed', (event) => {
38
+ console.log(event.detail.signature, event.detail.subscriptionPda);
39
+ });
40
+ ```
41
+
42
+ | Event | `detail` |
43
+ | --------------------- | -------------------------------- |
44
+ | `solloop:connected` | `{ address }` |
45
+ | `solloop:subscribing` | `{}` |
46
+ | `solloop:subscribed` | `{ signature, subscriptionPda }` |
47
+ | `solloop:error` | `{ code, message }` |
48
+ | `solloop:cancelled` | `{}` |
49
+
50
+ ## React
51
+
52
+ Requires React 19.
53
+
54
+ ```tsx
55
+ import { SolLoopSubscribe } from 'solloop/react';
56
+
57
+ export function Pricing() {
58
+ return (
59
+ <SolLoopSubscribe
60
+ plan="plan_8xK2m"
61
+ onSubscribed={(detail) => console.log(detail.signature)}
62
+ />
63
+ );
64
+ }
65
+ ```
66
+
67
+ ## Options
68
+
69
+ | Attribute | React prop | |
70
+ | ------------- | ------------ | ----------------------------------------------------------------------- |
71
+ | `plan` | `plan` | A plan id (`plan_…`) or a plan address. Required. |
72
+ | `theme` | `theme` | `light` (default) or `auto` |
73
+ | `accent` | `accent` | Hex colour for buttons and highlights |
74
+ | `radius` | `radius` | CSS length for the corner radius |
75
+ | `locale` | `locale` | |
76
+ | `cluster` | `cluster` | `mainnet-beta` or `devnet`, to override the plan's cluster when testing |
77
+ | `rpc` | `rpcUrl` | Your own Solana RPC endpoint |
78
+ | `success-url` | `successUrl` | Where to send the customer after they subscribe |
79
+
80
+ ## Don't grant access from the browser
81
+
82
+ `solloop:subscribed` and `onSubscribed` only update the UI. They don't prove
83
+ that a payment happened. Grant access on your server, after checking the
84
+ subscription on chain or receiving the `subscription.created` webhook.
85
+
86
+ ## Licence
87
+
88
+ MIT. The widget bundles open-source packages (Preact, `@solana/kit` and
89
+ others); their licences are in `THIRD_PARTY_NOTICES.txt`, which is also
90
+ served next to the CDN script.
@@ -0,0 +1,353 @@
1
+ Third-party software bundled in the SolLoop widget
2
+
3
+ The widget itself is MIT licensed. It bundles the packages below, whose
4
+ licences follow.
5
+
6
+ ------------------------------------------------------------------------
7
+
8
+ - @solana/accounts@7.1.1
9
+ - @solana/addresses@7.1.1
10
+ - @solana/assertions@7.1.1
11
+ - @solana/codecs-core@7.1.1
12
+ - @solana/codecs-data-structures@7.1.1
13
+ - @solana/codecs-numbers@7.1.1
14
+ - @solana/codecs-strings@7.1.1
15
+ - @solana/errors@7.1.1
16
+ - @solana/functional@7.1.1
17
+ - @solana/instructions@7.1.1
18
+ - @solana/keys@7.1.1
19
+ - @solana/options@7.1.1
20
+ - @solana/program-client-core@7.1.1
21
+ - @solana/programs@7.1.1
22
+ - @solana/promises@7.1.1
23
+ - @solana/rpc@7.1.1
24
+ - @solana/rpc-api@7.1.1
25
+ - @solana/rpc-spec@7.1.1
26
+ - @solana/rpc-spec-types@7.1.1
27
+ - @solana/rpc-transformers@7.1.1
28
+ - @solana/rpc-transport-http@7.1.1
29
+ - @solana/rpc-types@7.1.1
30
+ - @solana/subscribable@7.1.1
31
+ - @solana/transaction-messages@7.1.1
32
+ - @solana/transactions@7.1.1
33
+
34
+ Copyright (c) 2023 Solana Labs, Inc
35
+
36
+ Permission is hereby granted, free of charge, to any person obtaining
37
+ a copy of this software and associated documentation files (the
38
+ "Software"), to deal in the Software without restriction, including
39
+ without limitation the rights to use, copy, modify, merge, publish,
40
+ distribute, sublicense, and/or sell copies of the Software, and to
41
+ permit persons to whom the Software is furnished to do so, subject to
42
+ the following conditions:
43
+
44
+ The above copyright notice and this permission notice shall be
45
+ included in all copies or substantial portions of the Software.
46
+
47
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
48
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
49
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
50
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
51
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
52
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
53
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
54
+
55
+ ------------------------------------------------------------------------
56
+
57
+ - @solana/fast-stable-stringify@7.1.1
58
+
59
+ Copyright (c) 2023 Solana Labs, Inc
60
+ Copyright (c) 2017 Nicolaas Johannes Out
61
+
62
+ Permission is hereby granted, free of charge, to any person obtaining
63
+ a copy of this software and associated documentation files (the
64
+ "Software"), to deal in the Software without restriction, including
65
+ without limitation the rights to use, copy, modify, merge, publish,
66
+ distribute, sublicense, and/or sell copies of the Software, and to
67
+ permit persons to whom the Software is furnished to do so, subject to
68
+ the following conditions:
69
+
70
+ The above copyright notice and this permission notice shall be
71
+ included in all copies or substantial portions of the Software.
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
74
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
75
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
76
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
77
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
78
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
79
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
80
+
81
+ ------------------------------------------------------------------------
82
+
83
+ - @solana/signers@7.1.1
84
+
85
+ Copyright (c) 2018 Solana Labs, Inc
86
+
87
+ Permission is hereby granted, free of charge, to any person obtaining
88
+ a copy of this software and associated documentation files (the
89
+ "Software"), to deal in the Software without restriction, including
90
+ without limitation the rights to use, copy, modify, merge, publish,
91
+ distribute, sublicense, and/or sell copies of the Software, and to
92
+ permit persons to whom the Software is furnished to do so, subject to
93
+ the following conditions:
94
+
95
+ The above copyright notice and this permission notice shall be
96
+ included in all copies or substantial portions of the Software.
97
+
98
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
99
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
100
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
101
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
102
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
103
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
104
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
105
+
106
+ ------------------------------------------------------------------------
107
+
108
+ - @solana/subscriptions@0.5.0
109
+
110
+ MIT License
111
+
112
+ Copyright (c) 2026 Solana Foundation
113
+
114
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
115
+
116
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
117
+
118
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
119
+
120
+ ------------------------------------------------------------------------
121
+
122
+ - @solana/wallet-standard-features@1.5.0
123
+ - @wallet-standard/app@1.1.1
124
+ - @wallet-standard/features@1.1.1
125
+ - @solana-program/token@0.15.0 (Apache-2.0; ships no licence file)
126
+
127
+ Apache License
128
+ Version 2.0, January 2004
129
+ http://www.apache.org/licenses/
130
+
131
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
132
+
133
+ 1. Definitions.
134
+
135
+ "License" shall mean the terms and conditions for use, reproduction,
136
+ and distribution as defined by Sections 1 through 9 of this document.
137
+
138
+ "Licensor" shall mean the copyright owner or entity authorized by
139
+ the copyright owner that is granting the License.
140
+
141
+ "Legal Entity" shall mean the union of the acting entity and all
142
+ other entities that control, are controlled by, or are under common
143
+ control with that entity. For the purposes of this definition,
144
+ "control" means (i) the power, direct or indirect, to cause the
145
+ direction or management of such entity, whether by contract or
146
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
147
+ outstanding shares, or (iii) beneficial ownership of such entity.
148
+
149
+ "You" (or "Your") shall mean an individual or Legal Entity
150
+ exercising permissions granted by this License.
151
+
152
+ "Source" form shall mean the preferred form for making modifications,
153
+ including but not limited to software source code, documentation
154
+ source, and configuration files.
155
+
156
+ "Object" form shall mean any form resulting from mechanical
157
+ transformation or translation of a Source form, including but
158
+ not limited to compiled object code, generated documentation,
159
+ and conversions to other media types.
160
+
161
+ "Work" shall mean the work of authorship, whether in Source or
162
+ Object form, made available under the License, as indicated by a
163
+ copyright notice that is included in or attached to the work
164
+ (an example is provided in the Appendix below).
165
+
166
+ "Derivative Works" shall mean any work, whether in Source or Object
167
+ form, that is based on (or derived from) the Work and for which the
168
+ editorial revisions, annotations, elaborations, or other modifications
169
+ represent, as a whole, an original work of authorship. For the purposes
170
+ of this License, Derivative Works shall not include works that remain
171
+ separable from, or merely link (or bind by name) to the interfaces of,
172
+ the Work and Derivative Works thereof.
173
+
174
+ "Contribution" shall mean any work of authorship, including
175
+ the original version of the Work and any modifications or additions
176
+ to that Work or Derivative Works thereof, that is intentionally
177
+ submitted to Licensor for inclusion in the Work by the copyright owner
178
+ or by an individual or Legal Entity authorized to submit on behalf of
179
+ the copyright owner. For the purposes of this definition, "submitted"
180
+ means any form of electronic, verbal, or written communication sent
181
+ to the Licensor or its representatives, including but not limited to
182
+ communication on electronic mailing lists, source code control systems,
183
+ and issue tracking systems that are managed by, or on behalf of, the
184
+ Licensor for the purpose of discussing and improving the Work, but
185
+ excluding communication that is conspicuously marked or otherwise
186
+ designated in writing by the copyright owner as "Not a Contribution."
187
+
188
+ "Contributor" shall mean Licensor and any individual or Legal Entity
189
+ on behalf of whom a Contribution has been received by Licensor and
190
+ subsequently incorporated within the Work.
191
+
192
+ 2. Grant of Copyright License. Subject to the terms and conditions of
193
+ this License, each Contributor hereby grants to You a perpetual,
194
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
195
+ copyright license to reproduce, prepare Derivative Works of,
196
+ publicly display, publicly perform, sublicense, and distribute the
197
+ Work and such Derivative Works in Source or Object form.
198
+
199
+ 3. Grant of Patent License. Subject to the terms and conditions of
200
+ this License, each Contributor hereby grants to You a perpetual,
201
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
202
+ (except as stated in this section) patent license to make, have made,
203
+ use, offer to sell, sell, import, and otherwise transfer the Work,
204
+ where such license applies only to those patent claims licensable
205
+ by such Contributor that are necessarily infringed by their
206
+ Contribution(s) alone or by combination of their Contribution(s)
207
+ with the Work to which such Contribution(s) was submitted. If You
208
+ institute patent litigation against any entity (including a
209
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
210
+ or a Contribution incorporated within the Work constitutes direct
211
+ or contributory patent infringement, then any patent licenses
212
+ granted to You under this License for that Work shall terminate
213
+ as of the date such litigation is filed.
214
+
215
+ 4. Redistribution. You may reproduce and distribute copies of the
216
+ Work or Derivative Works thereof in any medium, with or without
217
+ modifications, and in Source or Object form, provided that You
218
+ meet the following conditions:
219
+
220
+ (a) You must give any other recipients of the Work or
221
+ Derivative Works a copy of this License; and
222
+
223
+ (b) You must cause any modified files to carry prominent notices
224
+ stating that You changed the files; and
225
+
226
+ (c) You must retain, in the Source form of any Derivative Works
227
+ that You distribute, all copyright, patent, trademark, and
228
+ attribution notices from the Source form of the Work,
229
+ excluding those notices that do not pertain to any part of
230
+ the Derivative Works; and
231
+
232
+ (d) If the Work includes a "NOTICE" text file as part of its
233
+ distribution, then any Derivative Works that You distribute must
234
+ include a readable copy of the attribution notices contained
235
+ within such NOTICE file, excluding those notices that do not
236
+ pertain to any part of the Derivative Works, in at least one
237
+ of the following places: within a NOTICE text file distributed
238
+ as part of the Derivative Works; within the Source form or
239
+ documentation, if provided along with the Derivative Works; or,
240
+ within a display generated by the Derivative Works, if and
241
+ wherever such third-party notices normally appear. The contents
242
+ of the NOTICE file are for informational purposes only and
243
+ do not modify the License. You may add Your own attribution
244
+ notices within Derivative Works that You distribute, alongside
245
+ or as an addendum to the NOTICE text from the Work, provided
246
+ that such additional attribution notices cannot be construed
247
+ as modifying the License.
248
+
249
+ You may add Your own copyright statement to Your modifications and
250
+ may provide additional or different license terms and conditions
251
+ for use, reproduction, or distribution of Your modifications, or
252
+ for any such Derivative Works as a whole, provided Your use,
253
+ reproduction, and distribution of the Work otherwise complies with
254
+ the conditions stated in this License.
255
+
256
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
257
+ any Contribution intentionally submitted for inclusion in the Work
258
+ by You to the Licensor shall be under the terms and conditions of
259
+ this License, without any additional terms or conditions.
260
+ Notwithstanding the above, nothing herein shall supersede or modify
261
+ the terms of any separate license agreement you may have executed
262
+ with Licensor regarding such Contributions.
263
+
264
+ 6. Trademarks. This License does not grant permission to use the trade
265
+ names, trademarks, service marks, or product names of the Licensor,
266
+ except as required for reasonable and customary use in describing the
267
+ origin of the Work and reproducing the content of the NOTICE file.
268
+
269
+ 7. Disclaimer of Warranty. Unless required by applicable law or
270
+ agreed to in writing, Licensor provides the Work (and each
271
+ Contributor provides its Contributions) on an "AS IS" BASIS,
272
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
273
+ implied, including, without limitation, any warranties or conditions
274
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
275
+ PARTICULAR PURPOSE. You are solely responsible for determining the
276
+ appropriateness of using or redistributing the Work and assume any
277
+ risks associated with Your exercise of permissions under this License.
278
+
279
+ 8. Limitation of Liability. In no event and under no legal theory,
280
+ whether in tort (including negligence), contract, or otherwise,
281
+ unless required by applicable law (such as deliberate and grossly
282
+ negligent acts) or agreed to in writing, shall any Contributor be
283
+ liable to You for damages, including any direct, indirect, special,
284
+ incidental, or consequential damages of any character arising as a
285
+ result of this License or out of the use or inability to use the
286
+ Work (including but not limited to damages for loss of goodwill,
287
+ work stoppage, computer failure or malfunction, or any and all
288
+ other commercial damages or losses), even if such Contributor
289
+ has been advised of the possibility of such damages.
290
+
291
+ 9. Accepting Warranty or Additional Liability. While redistributing
292
+ the Work or Derivative Works thereof, You may choose to offer,
293
+ and charge a fee for, acceptance of support, warranty, indemnity,
294
+ or other liability obligations and/or rights consistent with this
295
+ License. However, in accepting such obligations, You may act only
296
+ on Your own behalf and on Your sole responsibility, not on behalf
297
+ of any other Contributor, and only if You agree to indemnify,
298
+ defend, and hold each Contributor harmless for any liability
299
+ incurred by, or claims asserted against, such Contributor by reason
300
+ of your accepting any such warranty or additional liability.
301
+
302
+ END OF TERMS AND CONDITIONS
303
+
304
+ APPENDIX: How to apply the Apache License to your work.
305
+
306
+ To apply the Apache License to your work, attach the following
307
+ boilerplate notice, with the fields enclosed by brackets "[]"
308
+ replaced with your own identifying information. (Don't include
309
+ the brackets!) The text should be enclosed in the appropriate
310
+ comment syntax for the file format. We also recommend that a
311
+ file or class name and description of purpose be included on the
312
+ same "printed page" as the copyright notice for easier
313
+ identification within third-party archives.
314
+
315
+ Copyright [yyyy] [name of copyright owner]
316
+
317
+ Licensed under the Apache License, Version 2.0 (the "License");
318
+ you may not use this file except in compliance with the License.
319
+ You may obtain a copy of the License at
320
+
321
+ http://www.apache.org/licenses/LICENSE-2.0
322
+
323
+ Unless required by applicable law or agreed to in writing, software
324
+ distributed under the License is distributed on an "AS IS" BASIS,
325
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
326
+ See the License for the specific language governing permissions and
327
+ limitations under the License.
328
+
329
+ ------------------------------------------------------------------------
330
+
331
+ - preact@10.29.8
332
+
333
+ The MIT License (MIT)
334
+
335
+ Copyright (c) 2015-present Jason Miller
336
+
337
+ Permission is hereby granted, free of charge, to any person obtaining a copy
338
+ of this software and associated documentation files (the "Software"), to deal
339
+ in the Software without restriction, including without limitation the rights
340
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
341
+ copies of the Software, and to permit persons to whom the Software is
342
+ furnished to do so, subject to the following conditions:
343
+
344
+ The above copyright notice and this permission notice shall be included in all
345
+ copies or substantial portions of the Software.
346
+
347
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
348
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
349
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
350
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
351
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
352
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
353
+ SOFTWARE.