@markee_team/sdk 0.1.0-alpha.3 → 0.1.0-alpha.4

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 (2) hide show
  1. package/README.md +56 -66
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  An ESM JavaScript SDK with a self-contained, Shadow DOM modal and an optional React entry point. The SDK knows the Markee API endpoint; the host only supplies its placement and, optionally, its current wallet provider. No Alchemy, Redis, Privy, or bridge-provider key belongs in the consuming app.
4
4
 
5
- This is an experimental `0.1.0-alpha.3` release for wallet-funded For Sale and For Rent flows. Hosted card checkout and incoming cross-chain funding are not included.
5
+ This is an experimental `0.1.0-alpha.4` release for wallet-funded For Sale and For Rent flows. Hosted card checkout and incoming cross-chain funding are not included.
6
6
 
7
7
  Install the alpha:
8
8
 
9
9
  ```sh
10
- npm install @markee_team/sdk@alpha
10
+ npm install @markee_team/sdk@latest
11
11
  ```
12
12
 
13
13
  Use React 18 or 19 for the optional React entry point. The plain JavaScript entry point does not require React. Both TypeScript bundler and NodeNext resolution are supported.
@@ -146,68 +146,58 @@ No API URL configuration is required. This alpha uses the Markee staging API at
146
146
  Copy this prompt into your coding assistant. It gathers missing requirements before implementing the integration.
147
147
 
148
148
  ```text
149
- Integrate @markee_team/sdk@0.1.0-alpha.3 into this app. Inspect the app first and
150
- follow its existing framework, styling, and wallet patterns.
151
-
152
- Before changing code, inspect what is already available, then ask me the unanswered
153
- questions below in one concise group. Do not ask again for facts already provided.
154
- Wait for answers about strategy, placement, and intended scope before implementing.
155
-
156
- 1. Do you want For Rent (recurring streaming payments), For Sale (one-time
157
- funding), or both?
158
- 2. Is this a proof of concept or an integration with your own Markee placement?
159
- For your own placement, what are the chain ID and board address, or the Gardens
160
- community address and chain ID? If unknown, ask for the existing Markee/Gardens
161
- link so we can identify and verify the placement. Never invent an address or
162
- assume a board supports the chosen strategy. Offer demo boards only with consent;
163
- explain that they use real Base funds, not a sandbox. If no placement exists,
164
- identify that prerequisite instead of silently substituting a demo board.
165
- 3. Where should Markee appear (page/component), what should open the modal, and
166
- what should the button say? Is the placement fixed or selected per community?
167
- 4. Should we reuse the app's existing connected wallet or use SDK wallet discovery?
168
- Inspect the installed connector first. If a new host wallet connector is needed,
169
- ask which one; do not install ConnectKit automatically.
170
- 5. Should the modal match the app's theme, or use specific light/dark/system mode,
171
- brand colors, font, and corner radius? Suggest the existing app theme by default.
172
- 6. After a confirmed transaction, should the app show a message, refresh data,
173
- navigate, or notify an existing callback? Are there accessibility, mobile, or
174
- framework constraints not evident from the code?
175
-
176
- Explain that this alpha uses a built-in staging API and supports wallet-funded
177
- flows; card checkout and incoming bridging are unavailable. If either is required,
178
- ask whether to proceed with the supported scope instead of promising those features.
179
- Summarize the agreed requirements and implement only the selected flows.
180
-
181
- - Install @markee_team/sdk@0.1.0-alpha.3. The SDK knows its API endpoint. Do not
182
- request an API URL, build an API proxy, or add RPC/database/provider keys.
183
- - For React 18/19, import MarkeeModal from @markee_team/sdk/react in a client
184
- component and supply open, onClose, and placement. For other apps, import
185
- createMarkee from @markee_team/sdk, call createMarkee(), then open({ placement }).
186
- Close the instance on teardown. Reuse the built-in modal UI.
187
- - Use the agreed placement and strategy. Only if I explicitly choose a demo, use
188
- the corresponding existing Base board below (do not add both unless requested):
189
- For Sale: { kind: 'board', chainId: 8453,
190
- address: '0x2768BC6e90266248BD8bCF5401C36D8049CdF671' }
191
- For Rent: { kind: 'board', chainId: 8453,
192
- address: '0x82cbe3BdFC4e01940D186Ac5EA151355647DE0d3' }
193
- - Wallet integration is optional. Reuse the app's selected EIP-1193 provider via
194
- wallet.getProvider(): Promise<provider | null> and optional
195
- wallet.connect(): Promise<provider>. For ConnectKit/wagmi, use the active
196
- connector's provider, resolve connect after selection, and reject cancellation.
197
- Do not create a second wallet context or silently select another injected wallet.
198
- If there is no existing wallet integration, omit wallet for SDK wallet discovery.
199
- - Match the app using theme: mode ('light', 'dark', 'system'), fontFamily, radius,
200
- and semantic colors such as primary and primaryText. Preserve the built-in
201
- layout and its isolated Shadow DOM styles.
202
- - Optionally handle onEvent and show success only for a confirmed event. Let the
203
- SDK handle payment review, chain switching, submission, and verification.
204
- Do not advertise card checkout or incoming bridging: this alpha lacks those
205
- features. The demo boards use real Base funds.
206
- - Run typecheck/build and verify the selected modal flows load without API configuration,
207
- open/close correctly, and match the theme. Verify host wallet reuse if available.
208
- Do not sign or submit transactions during automated verification. Report changed
209
- files, checks, and remaining limitations.
210
-
211
- This alpha automatically uses Markee's temporary staging backend. Read the installed
212
- package README for exact types and configuration details.
149
+ Integrate @markee_team/sdk@latest into this app. Inspect the codebase first and
150
+ follow its existing framework, styling, and wallet patterns. Read the installed
151
+ package README and types for current capabilities.
152
+
153
+ Before implementing, ask me to create my leaderboard on Markee at
154
+ https://www.markee.xyz/create-a-markee, then provide its resulting Markee page link.
155
+ If I already have a leaderboard, ask for that link instead; do not create a duplicate.
156
+ Example link format:
157
+ https://www.markee.xyz/markee/0x6ceBC87DE40519Fa52fc40a1d49f16FF968bb439
158
+ Never silently substitute a demo board. Wait for my link before wiring the placement.
159
+
160
+ Extract the board address from the /markee/<address> path. Validate the Markee URL
161
+ and the address (0x followed by 40 hexadecimal characters). Markee website boards
162
+ currently use Base, chain ID 8453. Verify the board through the SDK snapshot API;
163
+ if verification fails, explain the error and ask for a corrected link.
164
+
165
+ Do not ask me to choose For Sale or For Rent in the host app. That choice is made
166
+ when creating the leaderboard on Markee. The API returns strategy and the SDK
167
+ adapts the modal automatically. Do not add a strategy prop, toggle, or hardcoded mode.
168
+
169
+ Ask only the remaining unanswered requirements in one concise group:
170
+ - Where should Markee appear, what opens the modal, and what should the button say?
171
+ - Should it reuse the app's existing wallet or use SDK wallet discovery? Inspect
172
+ existing connectors first; do not add a second wallet context or install a new
173
+ connector without agreement.
174
+ - Should the modal match the app theme or use specific colors, font, radius, and
175
+ light/dark/system mode?
176
+ - What should happen after a confirmed transaction: notification, refresh,
177
+ navigation, or callback? Are there additional mobile/accessibility requirements?
178
+
179
+ Then implement the agreed scope:
180
+ 1. Install @markee_team/sdk@latest. No API URL or Markee API key is required.
181
+ Do not create an API proxy or add RPC/database credentials.
182
+ 2. Use placement = { kind: 'board', chainId: 8453, address: extractedAddress }.
183
+ Use new MarkeeClient().snapshot(placement) to verify the board and read strategy,
184
+ name, minimum, and other metadata. The modal performs its own snapshot loading;
185
+ do not recreate that loading or strategy logic in the host app.
186
+ 3. For React, use MarkeeModal from @markee_team/sdk/react in a client component
187
+ with open, onClose, and placement. Otherwise use createMarkee() from
188
+ @markee_team/sdk, then open({ placement }); close it on teardown.
189
+ 4. If a host wallet exists, pass its selected EIP-1193 provider through the wallet
190
+ adapter. For ConnectKit/wagmi use the active connector. Resolve connect after
191
+ selection, reject cancellation, and do not silently switch wallet providers.
192
+ Otherwise omit wallet and use SDK wallet discovery.
193
+ 5. Apply theme options while preserving the built-in modal layout. Handle onEvent
194
+ if needed; show success only for a confirmed event. Let the SDK manage review,
195
+ network switching, submission, and verification.
196
+ 6. Verify build/types, loading of the supplied board, automatic strategy selection,
197
+ open/close behavior, theme, and wallet reuse. Do not sign or send transactions
198
+ during automated verification. Report changed files, checks, and limitations.
199
+
200
+ Check the installed release's limitations before promising features. This release
201
+ uses Markee's staging backend and supports wallet-funded flows; card checkout and
202
+ incoming bridging are not yet available. Transactions use real funds.
213
203
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markee_team/sdk",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "Self-contained Markee modal and API client, with an optional React adapter.",
5
5
  "type": "module",
6
6
  "sideEffects": false,