@markee_team/sdk 0.1.0-beta.1 → 0.1.0-beta.3

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/README.md CHANGED
@@ -86,7 +86,7 @@ import { MarkeeModal } from '@markee_team/sdk/react';
86
86
  />;
87
87
  ```
88
88
 
89
- See [`examples/connectkit`](https://github.com/1Hive/markee/tree/feature/markee-sdk/examples/connectkit) for a complete adapter. Its connection promise resolves only once ConnectKit has selected a provider and rejects when the picker is dismissed. The SDK does not install a second wallet context.
89
+ See [`examples/connectkit`](https://github.com/1Hive/markee/tree/main/examples/connectkit) for a complete adapter. Its connection promise resolves only once ConnectKit has selected a provider and rejects when the picker is dismissed. The SDK does not install a second wallet context.
90
90
 
91
91
  ## Embed the current Markee sign
92
92
 
@@ -193,17 +193,19 @@ Community activation supports the current council Safe, a current Safe owner, or
193
193
  - The modal renders escaped text, uses isolated CSS, and supports keyboard focus, Escape, mobile sizing and reduced motion. A host CSP must permit the SDK's inline styles and connections to its configured Markee API. No external font or image is needed by the modal.
194
194
  - API failures are explicit. Without moderation data, message text is withheld. No mock balances or fabricated rewards are returned by production handlers.
195
195
 
196
- Backend configuration and API reference: [`docs/sdk/implementation.md`](https://github.com/1Hive/markee/blob/feature/markee-sdk/docs/sdk/implementation.md).
196
+ Backend configuration and API reference: [`docs/sdk/implementation.md`](https://github.com/1Hive/markee/blob/main/docs/sdk/implementation.md).
197
197
 
198
198
  ## API endpoint
199
199
 
200
200
  No API URL or Markee API key is required. The SDK default is:
201
201
 
202
202
  ```text
203
- https://staging.markee.xyz/api/sdk/v1
203
+ https://www.markee.xyz/api/sdk/v1
204
204
  ```
205
205
 
206
- Markee hosts this API and centralizes on-chain reads, metadata, and transaction preparation. Staging does not imply test funds: Base placements use real funds. For local development or testing, pass an optional `apiUrl` override to `createMarkee`, `MarkeeClient`, or the React modal. The endpoint used by your installed release is exported as `DEFAULT_MARKEE_API_URL`.
206
+ Markee hosts this API and centralizes on-chain reads, metadata, and transaction preparation. Base placements use real funds. For local development or testing, pass an optional `apiUrl` override to `createMarkee`, `MarkeeClient`, or the React modal. The endpoint used by your installed release is exported as `DEFAULT_MARKEE_API_URL`. Staging is an explicit override: `apiUrl: "https://staging.markee.xyz/api/sdk/v1"`.
207
+
208
+ When upgrading from the former staging default, pending transactions, community authorizations, and hosted checkouts remain bound to the staging API that created them. Keep that API available until those operations finish. New operations use production; the SDK never automatically resubmits a payment. A missing saved checkout requires recovery rather than silently creating another checkout.
207
209
 
208
210
  ## LLM implementation prompt
209
211
 
@@ -328,17 +330,17 @@ wallet payments remain available independently.
328
330
 
329
331
  ### Automatic message moderation
330
332
 
331
- When enabled by Markee, create/edit forms warn if a message matches the automatic profanity
332
- filter. Authors can edit or explicitly continue; publication may still be hidden. A passing
333
+ When enabled by Markee, create/edit forms warn if a message matches an automatic moderation
334
+ rule. Authors can edit or explicitly continue; publication may still be hidden. A passing
333
335
  message edit clears an automatic flag, while manual flags require moderator action.
334
336
 
335
337
  `await client.checkMessage(message)` exposes the same draft check for custom interfaces. It
336
- returns `enabled`, `state`, `contentHash`, `engine`, `policyVersion`, and optional `reason`.
338
+ returns `enabled`, `state`, `contentHash`, `engine`, `policyVersion`, and optional `reason` and `reasonCodes`.
337
339
  Treat `unavailable` as unknown, never as a pass. Names are not automatically checked.
338
340
  The standard modal handles these warnings for React and vanilla JavaScript integrations.
339
341
  No API key or moderation configuration is required in the host app.
340
342
 
341
343
  Snapshots retain `entry.moderated` (`false`, `true`, or `null`) and can additionally include
342
- `entry.moderation` with the state and reason. Hide unavailable and flagged content and do not
344
+ `entry.moderation` with the state, reason, and optional `reasonCodes`. Hide unavailable and flagged content and do not
343
345
  record views for it. A moderator's false-positive exception on Markee applies only on Markee;
344
346
  it does not change SDK visibility. This optional backend feature is disabled by default.
@@ -1,7 +1,7 @@
1
- import { type MarkeeClient } from './client.js';
1
+ import { MarkeeClient } from './client.js';
2
2
  import type { Action, CheckoutSession, CheckoutStatus, Placement, TransactionResult } from './types.js';
3
3
  export declare function savedCheckout(client: MarkeeClient, placement: Placement): CheckoutSession | null;
4
4
  export declare function checkoutStatus(client: MarkeeClient, session: CheckoutSession): Promise<CheckoutStatus>;
5
- export declare function forgetCheckout(client: MarkeeClient, placement: Placement): void;
5
+ export declare function forgetCheckout(client: MarkeeClient, placement: Placement, session?: CheckoutSession | null): void;
6
6
  /** Call directly from a click handler to preserve popup permission. */
7
7
  export declare function openHostedCheckout(client: MarkeeClient, placement: Placement, action: Action): Promise<TransactionResult>;
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { MessageCheck, Action, Address, AdminOperation, AdminResult, Authorization, BridgeStatus, ClaimQuote, EIP1193Provider, Hex, Placement, PreparedAction, SDKOptions, Snapshot, SiteVerification, TransactionResult } from './types.js';
2
2
  /** Markee-hosted API used by integrations unless overridden for local development. */
3
- export declare const DEFAULT_MARKEE_API_URL = "https://staging.markee.xyz/api/sdk/v1";
3
+ export declare const DEFAULT_MARKEE_API_URL = "https://www.markee.xyz/api/sdk/v1";
4
4
  export declare class MarkeeError extends Error {
5
5
  code: string;
6
6
  status?: number | undefined;
@@ -30,6 +30,8 @@ export declare class MarkeeClient {
30
30
  private readonly fetcher;
31
31
  private injected;
32
32
  private sending;
33
+ private pendingOrigins;
34
+ private adminOrigin?;
33
35
  private inMemoryPending;
34
36
  private adminMemory;
35
37
  private communityReceipts;
@@ -50,6 +52,7 @@ export declare class MarkeeClient {
50
52
  * retiring the old hash. Unknown/replaced transactions never authorize a retry. */
51
53
  reconcile(pending: PendingTransaction, replacementHash: Hex): Promise<TransactionResult>;
52
54
  private storageKey;
55
+ private recoveryClient;
53
56
  private records;
54
57
  private persist;
55
58
  pending(placement: Placement, account: Address): PendingTransaction | undefined;