create-partylayer-app 0.5.0 → 0.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-partylayer-app",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Scaffold a PartyLayer dApp (Canton wallet integration) in seconds.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  # {{PROJECT_NAME}}
2
2
 
3
- A [PartyLayer](https://partylayer.xyz) dApp — Next.js App Router with **SSR session**.
3
+ A [PartyLayer](https://partylayer.xyz) dApp: Next.js App Router with **SSR session**.
4
4
 
5
5
  ## Develop
6
6
 
@@ -11,8 +11,8 @@ npm run dev
11
11
  ## How SSR session works
12
12
 
13
13
  - **Server** ([lib/session.ts](lib/session.ts)) reads the session cookie via `next/headers` `cookies()` + `@partylayer/session`'s `createCookieStorage` → the connected party is rendered in the **initial HTML** (no disconnected→connected flash). `app/page.tsx` is a Server Component that gates on `getServerSession()`.
14
- - **Client** ([app/providers.tsx](app/providers.tsx)) wraps the app in `PartyLayerKit` with `sessionOptions={{ storage: createCookieStorage() }}` — `document.cookie` (synchronous), the **same** cookie the server reads.
15
- - `next/headers` is imported only in your app (`lib/session.ts`), never in `@partylayer/session` — the library stays framework-agnostic.
14
+ - **Client** ([app/providers.tsx](app/providers.tsx)) wraps the app in `PartyLayerKit` with `sessionOptions={{ storage: createCookieStorage() }}`. This uses `document.cookie` (synchronous), the **same** cookie the server reads.
15
+ - `next/headers` is imported only in your app (`lib/session.ts`), never in `@partylayer/session`. The library stays framework-agnostic.
16
16
 
17
17
  Switch networks by changing `network` in `app/providers.tsx` and `appName` accordingly.
18
18
 
@@ -25,4 +25,4 @@ npm run build && npm start
25
25
  ## Docs
26
26
 
27
27
  - [PartyLayer docs](https://partylayer.xyz/docs/introduction)
28
- - [@partylayer/session — createCookieStorage](https://www.npmjs.com/package/@partylayer/session)
28
+ - [@partylayer/session: createCookieStorage](https://www.npmjs.com/package/@partylayer/session)
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@partylayer/react": "^2.1.0",
14
- "@partylayer/sdk": "^0.15.0",
14
+ "@partylayer/sdk": "^0.17.0",
15
15
  "@partylayer/session": "^1.1.4",
16
16
  "@tanstack/react-query": "^5.0.0",
17
17
  "next": "^14.2.5",
@@ -126,3 +126,9 @@ fetchers. The hooks and the UI stay exactly as they are.
126
126
  - Settle. The venue's trade app exercises its own settle choice, whose body runs
127
127
  `Allocation_ExecuteTransfer` for every leg in one transaction. The official Splice
128
128
  token-standard trading-app example is the canonical reference for this flow.
129
+
130
+ For the shapes these fetchers pass around, `@partylayer/react/query` exports the
131
+ disclosed contract and choice context types (`TokenDisclosedContract`,
132
+ `TokenChoiceContext`, `TokenTransferFactory`, `TokenAllocationFactory`) plus
133
+ `mergeDisclosedContracts` for combining the disclosures of several registry contexts
134
+ into one submission.
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@partylayer/react": "^2.2.1",
13
- "@partylayer/sdk": "^0.15.0",
13
+ "@partylayer/sdk": "^0.17.0",
14
14
  "@partylayer/adapter-console": "^0.3.15",
15
15
  "@tanstack/react-query": "^5.0.0",
16
16
  "react": "^18.3.1",
@@ -123,6 +123,12 @@ the transfer flow against the registry's allocation-instruction factory endpoint
123
123
  the per-action choice contexts for `Allocation_ExecuteTransfer`, `Allocation_Cancel`,
124
124
  and `Allocation_Withdraw`.
125
125
 
126
+ For the shapes these fetchers pass around, `@partylayer/react/query` exports the
127
+ disclosed contract and choice context types (`TokenDisclosedContract`,
128
+ `TokenChoiceContext`, `TokenTransferFactory`, `TokenAllocationFactory`) plus
129
+ `mergeDisclosedContracts` for combining the disclosures of several registry contexts
130
+ into one submission.
131
+
126
132
  Issuer writes (mint, freeze). These are registry-specific admin operations, shown
127
133
  here through the generic `useChoice` escape hatch. Real registries typically expose
128
134
  issuance through the standard's `BurnMintV1` (`BurnMintFactory_BurnMint`, which
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@partylayer/react": "^2.2.1",
13
- "@partylayer/sdk": "^0.15.0",
13
+ "@partylayer/sdk": "^0.17.0",
14
14
  "@partylayer/adapter-console": "^0.3.15",
15
15
  "@tanstack/react-query": "^5.0.0",
16
16
  "react": "^18.3.1",
@@ -1,6 +1,6 @@
1
1
  # {{PROJECT_NAME}}
2
2
 
3
- A [PartyLayer](https://partylayer.xyz) dApp — React + Vite, with Canton wallet integration.
3
+ A [PartyLayer](https://partylayer.xyz) dApp: React + Vite, with Canton wallet integration.
4
4
 
5
5
  ## Develop
6
6
 
@@ -8,7 +8,7 @@ A [PartyLayer](https://partylayer.xyz) dApp — React + Vite, with Canton wallet
8
8
  npm run dev
9
9
  ```
10
10
 
11
- Open the app and click **Connect Wallet** — the modal lists every verified Canton wallet from the registry.
11
+ Open the app and click **Connect Wallet**. The modal lists every verified Canton wallet from the registry.
12
12
 
13
13
  ## How it's wired
14
14
 
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@partylayer/react": "^2.1.0",
13
- "@partylayer/sdk": "^0.15.0",
13
+ "@partylayer/sdk": "^0.17.0",
14
14
  "@tanstack/react-query": "^5.0.0",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
@@ -1,6 +1,6 @@
1
1
  # {{PROJECT_NAME}}
2
2
 
3
- A [PartyLayer](https://partylayer.xyz) dApp — vanilla TypeScript + Vite, no framework.
3
+ A [PartyLayer](https://partylayer.xyz) dApp: vanilla TypeScript + Vite, no framework.
4
4
 
5
5
  ## Develop
6
6
 
@@ -22,7 +22,7 @@ client.on('session:disconnected', () => { /* … */ });
22
22
  const active = await client.getActiveSession(); // restore on load
23
23
  ```
24
24
 
25
- `createPartyLayer` is the dApp connect API — no framework bindings needed. See `src/main.ts` for the full hand-rolled connect UI. Switch networks by changing `network` to `"testnet"` or `"mainnet"`.
25
+ `createPartyLayer` is the dApp connect API, no framework bindings needed. See `src/main.ts` for the full hand-rolled connect UI. Switch networks by changing `network` to `"testnet"` or `"mainnet"`.
26
26
 
27
27
  ## Build
28
28
 
@@ -9,7 +9,7 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@partylayer/sdk": "^0.15.0"
12
+ "@partylayer/sdk": "^0.17.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "typescript": "^5.6.2",
@@ -9,7 +9,7 @@ const app = document.querySelector<HTMLDivElement>('#app')!;
9
9
  app.innerHTML = `
10
10
  <main class="app">
11
11
  <h1>{{PROJECT_NAME}}</h1>
12
- <p class="subtitle">A PartyLayer dApp on Canton — vanilla TypeScript, no framework.</p>
12
+ <p class="subtitle">A PartyLayer dApp on Canton: vanilla TypeScript, no framework.</p>
13
13
  <div id="status" class="status"></div>
14
14
  <button id="connect" class="btn">Connect Wallet</button>
15
15
  <ul id="wallets" class="wallets" hidden></ul>
@@ -34,7 +34,7 @@ function renderConnected(session: Session) {
34
34
  }
35
35
 
36
36
  function renderDisconnected() {
37
- statusEl.textContent = 'Not connected — connect a wallet to continue.';
37
+ statusEl.textContent = 'Not connected. Connect a wallet to continue.';
38
38
  connectBtn.hidden = false;
39
39
  walletsEl.hidden = true;
40
40
  }
@@ -1,6 +1,6 @@
1
1
  # {{PROJECT_NAME}}
2
2
 
3
- A [PartyLayer](https://partylayer.xyz) dApp — Nuxt 3 + Vue 3 + Pinia, with **SSR session**.
3
+ A [PartyLayer](https://partylayer.xyz) dApp: Nuxt 3 + Vue 3 + Pinia, with **SSR session**.
4
4
 
5
5
  ## Develop
6
6
 
@@ -12,8 +12,8 @@ npm run dev
12
12
 
13
13
  - **Server** ([lib/session.ts](lib/session.ts)) reads the session cookie via Nuxt's SSR-aware `useCookie()`, wrapped as a `CookieAdapter` and fed to `@partylayer/session`'s `createCookieStorage` → the connected party renders in the **initial HTML** (no flash). `app.vue` gates on `getServerSession()`.
14
14
  - **Client** ([plugins/partylayer.client.ts](plugins/partylayer.client.ts)) creates the PartyLayer client and provides the session store (`createPartyLayerSession`), using `createCookieStorage()` (the same cookie, `document.cookie`).
15
- - **Pinia** ([stores/session.ts](stores/session.ts)) surfaces the PartyLayer session (`isConnected` / `party` / `status` + `connect`/`disconnect`) as a store — components read the store. This is the idiomatic "PartyLayer + Pinia" pattern.
16
- - Nuxt's cookie API is used only in your app (`lib/session.ts`), never in `@partylayer/session` — the library stays framework-agnostic (the same `CookieAdapter` the Next template feeds with `cookies()`).
15
+ - **Pinia** ([stores/session.ts](stores/session.ts)) surfaces the PartyLayer session (`isConnected` / `party` / `status` + `connect`/`disconnect`) as a store. Components read the store. This is the idiomatic "PartyLayer + Pinia" pattern.
16
+ - Nuxt's cookie API is used only in your app (`lib/session.ts`), never in `@partylayer/session`. The library stays framework-agnostic (the same `CookieAdapter` the Next template feeds with `cookies()`).
17
17
 
18
18
  ## Build
19
19
 
@@ -10,7 +10,7 @@
10
10
  "postinstall": "nuxt prepare"
11
11
  },
12
12
  "dependencies": {
13
- "@partylayer/sdk": "^0.15.0",
13
+ "@partylayer/sdk": "^0.17.0",
14
14
  "@partylayer/session": "^1.1.4",
15
15
  "@partylayer/vue": "^1.0.1",
16
16
  "@pinia/nuxt": "^0.5.5",