@partylayer/sdk 0.17.0 → 0.17.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 +3 -3
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
### Features
|
|
20
20
|
|
|
21
|
-
- **Multi-Wallet Support**: Console, 5N Loop, Cantor8,
|
|
21
|
+
- **Multi-Wallet Support**: one integration for every wallet in the Canton registry (eight today, including Console, Send, 5N Loop, Cantor8, Nightly, Bron, Walley, and WalletConnect)
|
|
22
22
|
- **Zero Configuration**: Works out of the box with sensible defaults
|
|
23
23
|
- **Type-Safe**: Full TypeScript support with strict mode
|
|
24
24
|
- **Secure**: Encrypted session storage with origin binding
|
|
@@ -121,8 +121,8 @@ await client.disconnect();
|
|
|
121
121
|
| Wallet | Networks | Capabilities | Opt-in | Adapter |
|
|
122
122
|
|--------|----------|--------------|--------|---------|
|
|
123
123
|
| Console Wallet | devnet, testnet, mainnet | signMessage, signTransaction, submitTransaction, transactionStatus | No | `@partylayer/adapter-console` |
|
|
124
|
-
| 5N Loop | devnet,
|
|
125
|
-
| Cantor8 | devnet,
|
|
124
|
+
| 5N Loop | devnet, mainnet | signMessage, submitTransaction, transactionStatus | No | `@partylayer/adapter-loop` |
|
|
125
|
+
| Cantor8 | devnet, mainnet | submitTransaction, transactionStatus | No | `@partylayer/adapter-cantor8` |
|
|
126
126
|
| Bron | devnet, testnet, mainnet | signMessage, signTransaction | Yes | `@partylayer/adapter-bron` |
|
|
127
127
|
| Nightly | devnet, testnet, mainnet | signMessage, submitTransaction | No | `@partylayer/adapter-nightly` |
|
|
128
128
|
| Send | mainnet | signMessage, submitTransaction, transactionStatus | No | `@partylayer/adapter-send` |
|
package/dist/index.d.mts
CHANGED
|
@@ -101,22 +101,24 @@ interface PartyLayerConfig {
|
|
|
101
101
|
/**
|
|
102
102
|
* Wallet adapters to register (OPTIONAL)
|
|
103
103
|
*
|
|
104
|
-
* By default,
|
|
105
|
-
* - ConsoleAdapter (Console Wallet - browser extension)
|
|
104
|
+
* By default, the built-in adapters that need no configuration are registered:
|
|
106
105
|
* - LoopAdapter (5N Loop - QR code / popup)
|
|
107
106
|
* - Cantor8Adapter (Cantor8 - deep link transport)
|
|
107
|
+
* - NightlyAdapter (Nightly - injected extension)
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
* Console and Send are NOT in the defaults; they are CIP-0103 native and appear
|
|
110
|
+
* through the announce path. BronAdapter (hosted OAuth) and the WalletConnect
|
|
111
|
+
* adapter require configuration and are opt-in.
|
|
110
112
|
*
|
|
111
113
|
* Only provide this if you want to customize which adapters to use.
|
|
112
114
|
*
|
|
113
115
|
* @example
|
|
114
116
|
* ```typescript
|
|
115
|
-
* // Default:
|
|
117
|
+
* // Default: the no-config built-in adapters (recommended)
|
|
116
118
|
* const client = createPartyLayer({
|
|
117
119
|
* network: 'devnet',
|
|
118
120
|
* app: { name: 'My dApp' },
|
|
119
|
-
* // adapters not specified =
|
|
121
|
+
* // adapters not specified = getBuiltinAdapters() = Loop, Cantor8, Nightly
|
|
120
122
|
* });
|
|
121
123
|
*
|
|
122
124
|
* // Custom: only specific adapters
|
package/dist/index.d.ts
CHANGED
|
@@ -101,22 +101,24 @@ interface PartyLayerConfig {
|
|
|
101
101
|
/**
|
|
102
102
|
* Wallet adapters to register (OPTIONAL)
|
|
103
103
|
*
|
|
104
|
-
* By default,
|
|
105
|
-
* - ConsoleAdapter (Console Wallet - browser extension)
|
|
104
|
+
* By default, the built-in adapters that need no configuration are registered:
|
|
106
105
|
* - LoopAdapter (5N Loop - QR code / popup)
|
|
107
106
|
* - Cantor8Adapter (Cantor8 - deep link transport)
|
|
107
|
+
* - NightlyAdapter (Nightly - injected extension)
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
* Console and Send are NOT in the defaults; they are CIP-0103 native and appear
|
|
110
|
+
* through the announce path. BronAdapter (hosted OAuth) and the WalletConnect
|
|
111
|
+
* adapter require configuration and are opt-in.
|
|
110
112
|
*
|
|
111
113
|
* Only provide this if you want to customize which adapters to use.
|
|
112
114
|
*
|
|
113
115
|
* @example
|
|
114
116
|
* ```typescript
|
|
115
|
-
* // Default:
|
|
117
|
+
* // Default: the no-config built-in adapters (recommended)
|
|
116
118
|
* const client = createPartyLayer({
|
|
117
119
|
* network: 'devnet',
|
|
118
120
|
* app: { name: 'My dApp' },
|
|
119
|
-
* // adapters not specified =
|
|
121
|
+
* // adapters not specified = getBuiltinAdapters() = Loop, Cantor8, Nightly
|
|
120
122
|
* });
|
|
121
123
|
*
|
|
122
124
|
* // Custom: only specific adapters
|
package/dist/index.js
CHANGED
|
@@ -1811,6 +1811,19 @@ var PartyLayerClient = class {
|
|
|
1811
1811
|
const adapter = this.adapters.get(session.walletId);
|
|
1812
1812
|
if (adapter?.restore) {
|
|
1813
1813
|
const ctx = this.createAdapterContext();
|
|
1814
|
+
if (adapter instanceof GenericDiscoveryAdapter && adapter.usesFactory()) {
|
|
1815
|
+
let networkHosts = {};
|
|
1816
|
+
try {
|
|
1817
|
+
const entry = await this.registryClient.getWalletEntry(String(session.walletId));
|
|
1818
|
+
networkHosts = entry.adapter?.networkHosts ?? {};
|
|
1819
|
+
} catch {
|
|
1820
|
+
}
|
|
1821
|
+
adapter.setNetworkHosts(networkHosts);
|
|
1822
|
+
try {
|
|
1823
|
+
adapter.resolveOfficial(session.network);
|
|
1824
|
+
} catch {
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1814
1827
|
const restored = await adapter.restore(ctx, {
|
|
1815
1828
|
...session,
|
|
1816
1829
|
encrypted
|