@partylayer/sdk 0.21.0 → 0.22.1
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 +44 -0
- package/dist/application-ledger-reader-DYaIuRCD.d.mts +774 -0
- package/dist/application-ledger-reader-DYaIuRCD.d.ts +774 -0
- package/dist/index.d.mts +14 -707
- package/dist/index.d.ts +14 -707
- package/dist/index.js +1008 -984
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1010 -987
- package/dist/index.mjs.map +1 -1
- package/dist/internal/hosted-wallet-profiles.d.mts +16 -0
- package/dist/internal/hosted-wallet-profiles.d.ts +16 -0
- package/dist/internal/hosted-wallet-profiles.js +337 -0
- package/dist/internal/hosted-wallet-profiles.js.map +1 -0
- package/dist/internal/hosted-wallet-profiles.mjs +335 -0
- package/dist/internal/hosted-wallet-profiles.mjs.map +1 -0
- package/dist/native.d.mts +18 -0
- package/dist/native.d.ts +18 -0
- package/dist/native.js +2832 -0
- package/dist/native.js.map +1 -0
- package/dist/native.mjs +2827 -0
- package/dist/native.mjs.map +1 -0
- package/package.json +24 -12
package/README.md
CHANGED
|
@@ -139,6 +139,50 @@ Handle user rejection, unavailable wallets, timeouts, network mismatch and unsup
|
|
|
139
139
|
|
|
140
140
|
`client.on(event, handler)` returns an unsubscribe function. Release subscriptions and destroy clients you create when their owner is disposed. Never call `destroy()` on the client managed by a still-mounted React kit.
|
|
141
141
|
|
|
142
|
+
## Native applications
|
|
143
|
+
|
|
144
|
+
The native entry is available from SDK 0.22.1; SDK 0.22.0 does not include it.
|
|
145
|
+
React Native applications should normally install `@partylayer/react-native` 2.0
|
|
146
|
+
or later: it bundles the same native implementation without installing the web
|
|
147
|
+
SDK dependency graph. The direct SDK package retains that graph for its browser
|
|
148
|
+
wallet catalog.
|
|
149
|
+
|
|
150
|
+
Import `createPartyLayer` from `@partylayer/sdk/native` for a native application. This
|
|
151
|
+
entry shares the SDK client implementation, but registers only the native-compatible
|
|
152
|
+
adapters/providers your application supplies. It excludes browser wallet runtimes and
|
|
153
|
+
disables browser extension discovery. With no configured transport, the wallet list is empty.
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
import { createPartyLayer } from '@partylayer/sdk/native';
|
|
157
|
+
|
|
158
|
+
const client = createPartyLayer({
|
|
159
|
+
network: 'devnet',
|
|
160
|
+
app: { name: 'Native application', origin: 'myapp://' },
|
|
161
|
+
adapters: [myNativeCompatibleAdapter],
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Automatic `walletConnect` and `bron` options belong to the browser entry. Native callers
|
|
166
|
+
must supply a compatible transport through `adapters`; configuring those browser-only
|
|
167
|
+
options on the native entry produces an explicit error. React Native applications can
|
|
168
|
+
use `@partylayer/react-native`, which selects this entry and provides Linking and storage
|
|
169
|
+
building blocks. See that package's README for a development transport fixture.
|
|
170
|
+
|
|
171
|
+
### Secure randomness and session caches
|
|
172
|
+
|
|
173
|
+
New session identifiers require WebCrypto `getRandomValues`. A native runtime
|
|
174
|
+
without it must supply the `crypto` option with a secure platform-backed
|
|
175
|
+
`randomBytes(byteLength)` method returning exactly that many bytes as a `Uint8Array`
|
|
176
|
+
or a Promise for one, alongside the adapter's encryption, decryption and key-generation
|
|
177
|
+
methods. Encryption keys or key handles are never used as session identifiers.
|
|
178
|
+
|
|
179
|
+
The default encryption implementation requires WebCrypto AES-GCM; unavailable or
|
|
180
|
+
failed cryptography does not downgrade to plain base64. Valid AES-GCM cache records
|
|
181
|
+
remain supported. Unsupported legacy records require a wallet reconnect. Session
|
|
182
|
+
identifiers are client lifecycle identifiers, not server authentication credentials.
|
|
183
|
+
Cache encryption does not establish wallet identity or replace wallet-side restore
|
|
184
|
+
validation and independent server authorization.
|
|
185
|
+
|
|
142
186
|
## License
|
|
143
187
|
|
|
144
188
|
MIT
|