@canton-network/dapp-sdk 0.21.2 → 0.22.0
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 +224 -10
- package/dist/adapter/errors.d.ts +3 -0
- package/dist/adapter/errors.d.ts.map +1 -0
- package/dist/adapter/events.d.ts +3 -0
- package/dist/adapter/events.d.ts.map +1 -0
- package/dist/adapter/extension-adapter.d.ts +22 -0
- package/dist/adapter/extension-adapter.d.ts.map +1 -0
- package/dist/adapter/index.d.ts +7 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/remote-adapter.d.ts +35 -0
- package/dist/adapter/remote-adapter.d.ts.map +1 -0
- package/dist/adapter/types.d.ts +3 -0
- package/dist/adapter/types.d.ts.map +1 -0
- package/dist/client.d.ts +40 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/dapp-api/rpc-gen/typings.d.ts +37 -45
- package/dist/dapp-api/rpc-gen/typings.d.ts.map +1 -1
- package/dist/error.d.ts +0 -7
- package/dist/error.d.ts.map +1 -1
- package/dist/index.cjs +586 -284
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +547 -281
- package/dist/index.js.map +1 -1
- package/dist/sdk-controller.d.ts +16 -0
- package/dist/sdk-controller.d.ts.map +1 -0
- package/dist/sdk.d.ts +62 -0
- package/dist/sdk.d.ts.map +1 -0
- package/package.json +8 -6
- package/dist/listener.d.ts +0 -2
- package/dist/listener.d.ts.map +0 -1
- package/dist/provider/events.d.ts +0 -9
- package/dist/provider/events.d.ts.map +0 -1
- package/dist/provider/index.d.ts +0 -3
- package/dist/provider/index.d.ts.map +0 -1
- package/dist/provider/open.d.ts +0 -2
- package/dist/provider/open.d.ts.map +0 -1
- package/dist/provider/request.d.ts +0 -15
- package/dist/provider/request.d.ts.map +0 -1
- package/dist/provider.d.ts +0 -31
- package/dist/provider.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,23 +1,237 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dApp SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**`@canton-network/dapp-sdk`** — TypeScript SDK for building decentralized applications on the [Canton Network](https://www.canton.network/). Connect users to Canton wallets, manage accounts, sign messages, and execute transactions — all through a vendor-neutral interface defined by [CIP-0103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> [!IMPORTANT]
|
|
6
|
+
> This project is under active development and may introduce breaking changes until version 1.0.0. Migration guides for each release are published in [Discussions](https://github.com/hyperledger-labs/splice-wallet-kernel/discussions).
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **Wallet Discovery** — Automatically detect browser extension wallets and register remote Wallet Gateways via a pluggable adapter system
|
|
11
|
+
- **Wallet Picker UI** — Built-in, framework-agnostic Web Component that lets users choose a wallet, enter custom gateway URLs, and manage recently used connections
|
|
12
|
+
- **Wallet Connectivity** — Connect, disconnect, and monitor connection status
|
|
13
|
+
- **Account Management** — List accounts and respond to account changes
|
|
14
|
+
- **Transaction Execution** — Request user approval and signatures for Daml transactions
|
|
15
|
+
- **Ledger API Access** — Proxy authenticated requests to the Canton JSON Ledger API
|
|
16
|
+
- **Real-time Events** — Subscribe to status changes, account changes, and transaction lifecycle events
|
|
17
|
+
- **Multi-transport** — HTTP/SSE for remote Wallet Gateways, `postMessage` for browser extension wallets
|
|
18
|
+
- **Provider Interface** — `window.canton` provider following CIP-103 conventions
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
## Installation
|
|
10
21
|
|
|
11
22
|
```shell
|
|
12
|
-
|
|
23
|
+
npm install @canton-network/dapp-sdk
|
|
13
24
|
```
|
|
14
25
|
|
|
15
|
-
|
|
26
|
+
```shell
|
|
27
|
+
yarn add @canton-network/dapp-sdk
|
|
28
|
+
```
|
|
16
29
|
|
|
17
30
|
```shell
|
|
18
|
-
|
|
31
|
+
pnpm add @canton-network/dapp-sdk
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
The fastest way to get going is through the module-level convenience API. It manages a singleton `DappClient` behind the scenes, opens the wallet picker, and handles adapter registration for you.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import * as sdk from '@canton-network/dapp-sdk'
|
|
40
|
+
|
|
41
|
+
// Opens the wallet picker and connects to the selected wallet
|
|
42
|
+
const result = await sdk.connect()
|
|
43
|
+
console.log(result.isConnected)
|
|
44
|
+
|
|
45
|
+
// List the user's accounts (parties)
|
|
46
|
+
const accounts = await sdk.listAccounts()
|
|
47
|
+
|
|
48
|
+
// Execute a transaction
|
|
49
|
+
await sdk.prepareExecute({
|
|
50
|
+
commands: [
|
|
51
|
+
{
|
|
52
|
+
CreateCommand: {
|
|
53
|
+
templateId: '#MyApp:MyModule:MyTemplate',
|
|
54
|
+
createArguments: { owner: accounts[0].partyId },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
// Listen for real-time updates
|
|
61
|
+
sdk.onTxChanged((tx) => {
|
|
62
|
+
console.log('Transaction update:', tx)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
// Disconnect when done
|
|
66
|
+
await sdk.disconnect()
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Architecture
|
|
70
|
+
|
|
71
|
+
The SDK is built around three layers:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
┌──────────────────────────────────────────────┐
|
|
75
|
+
│ DappClient │
|
|
76
|
+
│ Thin wrapper: typed RPC helpers, events, │
|
|
77
|
+
│ window.canton injection, session persist │
|
|
78
|
+
├──────────────────────────────────────────────┤
|
|
79
|
+
│ DiscoveryClient │
|
|
80
|
+
│ Adapter registry, session restore, │
|
|
81
|
+
│ wallet picker integration │
|
|
82
|
+
├──────────────────────────────────────────────┤
|
|
83
|
+
│ ProviderAdapter │
|
|
84
|
+
│ ExtensionAdapter │ RemoteAdapter │
|
|
85
|
+
│ (postMessage) │ (HTTP/SSE bridge) │
|
|
86
|
+
└──────────────────────────────────────────────┘
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Usage
|
|
90
|
+
|
|
91
|
+
### Option A: Module-level API (recommended for most apps)
|
|
92
|
+
|
|
93
|
+
Import the SDK as a namespace. The `connect()` function opens the built-in wallet picker, registers available adapters, and returns a `ConnectResult`.
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import * as sdk from '@canton-network/dapp-sdk'
|
|
97
|
+
import { RemoteAdapter } from '@canton-network/dapp-sdk'
|
|
98
|
+
|
|
99
|
+
await sdk.connect()
|
|
100
|
+
const status = await sdk.status()
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
You can supply additional adapters at connect time:
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
await sdk.connect({
|
|
107
|
+
additionalAdapters: [
|
|
108
|
+
new RemoteAdapter({
|
|
109
|
+
name: 'My Gateway',
|
|
110
|
+
rpcUrl: 'https://gateway.example.com/api/json-rpc',
|
|
111
|
+
}),
|
|
112
|
+
],
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Option B: DappClient with DiscoveryClient
|
|
117
|
+
|
|
118
|
+
For more control over adapter registration and the connection flow, use `DiscoveryClient` directly and pass the resulting provider to `DappClient`.
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
import {
|
|
122
|
+
DappClient,
|
|
123
|
+
DiscoveryClient,
|
|
124
|
+
ExtensionAdapter,
|
|
125
|
+
RemoteAdapter,
|
|
126
|
+
} from '@canton-network/dapp-sdk'
|
|
127
|
+
|
|
128
|
+
const discovery = await DiscoveryClient.create({
|
|
129
|
+
adapters: [
|
|
130
|
+
new ExtensionAdapter(),
|
|
131
|
+
new RemoteAdapter({
|
|
132
|
+
name: 'Splice Wallet Gateway',
|
|
133
|
+
rpcUrl: 'https://gateway.example.com/api/json-rpc',
|
|
134
|
+
}),
|
|
135
|
+
],
|
|
136
|
+
})
|
|
137
|
+
await discovery.connect() // opens the picker if configured
|
|
138
|
+
|
|
139
|
+
const session = discovery.getActiveSession()!
|
|
140
|
+
const client = new DappClient(session.provider, {
|
|
141
|
+
providerType: session.adapter.type,
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
const status = await client.status()
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Option C: DappClient with a provider directly
|
|
148
|
+
|
|
149
|
+
If you already have a `Provider<DappRpcTypes>` (for example from your own adapter), you can skip discovery entirely.
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
import { DappClient, RemoteAdapter } from '@canton-network/dapp-sdk'
|
|
153
|
+
|
|
154
|
+
const provider = new RemoteAdapter({
|
|
155
|
+
name: 'Splice Wallet Gateway',
|
|
156
|
+
rpcUrl: 'https://gateway.example.com/api/json-rpc',
|
|
157
|
+
}).provider()
|
|
158
|
+
|
|
159
|
+
const client = new DappClient(provider)
|
|
160
|
+
const result = await client.connect()
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Provider API
|
|
164
|
+
|
|
165
|
+
The SDK also exposes a CIP-103 provider on `window.canton` (injected by default when a `DappClient` is created):
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
const provider = window.canton
|
|
169
|
+
|
|
170
|
+
const result = await provider.request({ method: 'connect' })
|
|
171
|
+
const accounts = await provider.request({ method: 'listAccounts' })
|
|
172
|
+
|
|
173
|
+
provider.on('statusChanged', (event) => {
|
|
174
|
+
console.log('Status:', event.connection.isConnected)
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
provider.removeListener('statusChanged', listener)
|
|
19
178
|
```
|
|
20
179
|
|
|
21
|
-
##
|
|
180
|
+
## API Reference
|
|
181
|
+
|
|
182
|
+
### DappClient
|
|
183
|
+
|
|
184
|
+
| Method | Returns | Description |
|
|
185
|
+
| ------------------------------- | ----------------------------- | ------------------------------------ |
|
|
186
|
+
| `connect()` | `ConnectResult` | Initiate connection via the provider |
|
|
187
|
+
| `disconnect()` | `void` | Disconnect and clear local state |
|
|
188
|
+
| `status()` | `StatusEvent` | Current connection status |
|
|
189
|
+
| `listAccounts()` | `ListAccountsResult` | List the user's accounts (parties) |
|
|
190
|
+
| `prepareExecute(params)` | `null` | Submit a transaction for signing |
|
|
191
|
+
| `prepareExecuteAndWait(params)` | `PrepareExecuteAndWaitResult` | Submit and wait for completion |
|
|
192
|
+
| `ledgerApi(params)` | `LedgerApiResult` | Proxy a Ledger API request |
|
|
193
|
+
| `open()` | `void` | Open the wallet UI |
|
|
194
|
+
| `getProvider()` | `Provider` | Access the underlying provider |
|
|
195
|
+
| `onStatusChanged(listener)` | `void` | Subscribe to status changes |
|
|
196
|
+
| `onAccountsChanged(listener)` | `void` | Subscribe to account changes |
|
|
197
|
+
| `onTxChanged(listener)` | `void` | Subscribe to transaction changes |
|
|
198
|
+
|
|
199
|
+
### DappClientOptions
|
|
200
|
+
|
|
201
|
+
| Option | Type | Default | Description |
|
|
202
|
+
| -------------- | -------------- | ---------- | ------------------------------------------------------------------------- |
|
|
203
|
+
| `injectGlobal` | `boolean` | `true` | Inject the provider into `window.canton` |
|
|
204
|
+
| `providerType` | `ProviderType` | `'remote'` | Affects `open()` routing (`'browser'` uses postMessage, others use popup) |
|
|
205
|
+
|
|
206
|
+
### DiscoveryClient
|
|
207
|
+
|
|
208
|
+
| Method | Description |
|
|
209
|
+
| -------------------------------- | ----------------------------------------------------------------------------- |
|
|
210
|
+
| `create(config)` | Create an initialized client and attempt session restore |
|
|
211
|
+
| `registerAdapter(adapter)` | Add a `ProviderAdapter` at runtime |
|
|
212
|
+
| `listAdapters()` | List registered adapters |
|
|
213
|
+
| `connect(providerId?)` | Connect to a specific adapter or open the picker |
|
|
214
|
+
| `disconnect()` | Disconnect the active session |
|
|
215
|
+
| `getActiveSession()` | Get the current `ActiveSession` or `null` |
|
|
216
|
+
| `on(event, handler)` | Listen for `discovery:connected`, `discovery:disconnected`, `discovery:error` |
|
|
217
|
+
| `removeListener(event, handler)` | Remove an event listener |
|
|
218
|
+
|
|
219
|
+
### Built-in Adapters
|
|
220
|
+
|
|
221
|
+
| Adapter | Provider Type | Transport | Description |
|
|
222
|
+
| ------------------ | ------------- | ----------- | ------------------------------------------------------------ |
|
|
223
|
+
| `ExtensionAdapter` | `'browser'` | postMessage | CIP-103 compliant browser extension wallets |
|
|
224
|
+
| `RemoteAdapter` | `'remote'` | HTTP/SSE | CIP-103 compliant Wallet Gateways reachable over the network |
|
|
225
|
+
|
|
226
|
+
## Documentation
|
|
227
|
+
|
|
228
|
+
Full documentation, including detailed usage guides, API reference, and configuration for the Wallet Gateway:
|
|
229
|
+
|
|
230
|
+
- [dApp Building Guide](https://github.com/hyperledger-labs/splice-wallet-kernel/tree/main/docs/dapp-building)
|
|
231
|
+
- [dApp SDK Documentation](https://github.com/hyperledger-labs/splice-wallet-kernel/tree/main/docs/dapp-building/dapp-sdk)
|
|
232
|
+
- [API Specifications (OpenRPC)](https://github.com/hyperledger-labs/splice-wallet-kernel/tree/main/api-specs)
|
|
233
|
+
- [Example dApps](https://github.com/hyperledger-labs/splice-wallet-kernel/tree/main/examples)
|
|
234
|
+
|
|
235
|
+
## License
|
|
22
236
|
|
|
23
|
-
|
|
237
|
+
[Apache-2.0](https://github.com/hyperledger-labs/splice-wallet-kernel/blob/main/LICENSE)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { DiscoveryError, WalletNotFoundError, WalletNotInstalledError, UserRejectedError, SessionExpiredError, TimeoutError, NotConnectedError, } from '@canton-network/core-wallet-discovery';
|
|
2
|
+
export type { DiscoveryErrorCode } from '@canton-network/core-wallet-discovery';
|
|
3
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/adapter/errors.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,GACpB,MAAM,uCAAuC,CAAA;AAE9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { EventEmitter } from '@canton-network/core-wallet-discovery';
|
|
2
|
+
export type { DiscoveryConnectedEvent, DiscoveryDisconnectedEvent, DiscoveryErrorEvent, DiscoveryClientEventMap, DiscoveryClientEventName, DiscoveryClientEventHandler, } from '@canton-network/core-wallet-discovery';
|
|
3
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/adapter/events.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AAEpE,YAAY,EACR,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,GAC9B,MAAM,uCAAuC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Provider } from '@canton-network/core-splice-provider';
|
|
2
|
+
import type { RpcTypes as DappRpcTypes } from '@canton-network/core-wallet-dapp-rpc-client';
|
|
3
|
+
import type { ProviderAdapter, WalletInfo } from '@canton-network/core-wallet-discovery';
|
|
4
|
+
import type { ProviderId, ProviderType } from '@canton-network/core-wallet-dapp-rpc-client';
|
|
5
|
+
/**
|
|
6
|
+
* ProviderAdapter for any CIP-103 compliant wallet exposed as a browser extension.
|
|
7
|
+
*
|
|
8
|
+
* provider() returns a DappProvider which communicates via postMessage
|
|
9
|
+
* and implements the full openrpc-dapp-api.json surface directly.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ExtensionAdapter implements ProviderAdapter {
|
|
12
|
+
readonly providerId: ProviderId;
|
|
13
|
+
readonly name = "Browser Extension";
|
|
14
|
+
readonly type: ProviderType;
|
|
15
|
+
readonly icon: string | undefined;
|
|
16
|
+
getInfo(): WalletInfo;
|
|
17
|
+
detect(): Promise<boolean>;
|
|
18
|
+
provider(): Provider<DappRpcTypes>;
|
|
19
|
+
teardown(): void;
|
|
20
|
+
restore(): Promise<Provider<DappRpcTypes> | null>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=extension-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/extension-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AAE/D,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,6CAA6C,CAAA;AAE3F,OAAO,KAAK,EACR,eAAe,EACf,UAAU,EACb,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EACR,UAAU,EACV,YAAY,EACf,MAAM,6CAA6C,CAAA;AAKpD;;;;;GAKG;AACH,qBAAa,gBAAiB,YAAW,eAAe;IACpD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAsB;IACrD,QAAQ,CAAC,IAAI,uBAAsB;IACnC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAY;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IAE7C,OAAO,IAAI,UAAU;IASf,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAyBhC,QAAQ,IAAI,QAAQ,CAAC,YAAY,CAAC;IAIlC,QAAQ,IAAI,IAAI;IAIV,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CAc1D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './errors';
|
|
3
|
+
export * from './events';
|
|
4
|
+
export { ExtensionAdapter } from './extension-adapter';
|
|
5
|
+
export { RemoteAdapter } from './remote-adapter';
|
|
6
|
+
export type { RemoteAdapterConfig } from './remote-adapter';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Provider } from '@canton-network/core-splice-provider';
|
|
2
|
+
import type { ProviderAdapterConfig } from '@canton-network/core-types';
|
|
3
|
+
import type { RpcTypes as DappRpcTypes } from '@canton-network/core-wallet-dapp-rpc-client';
|
|
4
|
+
import type { ProviderAdapter, WalletInfo } from '@canton-network/core-wallet-discovery';
|
|
5
|
+
import type { ProviderId, ProviderType } from '@canton-network/core-wallet-dapp-rpc-client';
|
|
6
|
+
export interface RemoteAdapterConfig extends ProviderAdapterConfig {
|
|
7
|
+
providerId?: string | undefined;
|
|
8
|
+
rpcUrl: string;
|
|
9
|
+
icon?: string | undefined;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* ProviderAdapter for any CIP-103 compliant wallet reachable over HTTP/SSE.
|
|
14
|
+
*
|
|
15
|
+
* provider() returns a provider that maps the remote API
|
|
16
|
+
* (openrpc-dapp-remote-api.json) to the dApp API
|
|
17
|
+
* (openrpc-dapp-api.json) via dappSDKController.
|
|
18
|
+
*/
|
|
19
|
+
export declare class RemoteAdapter implements ProviderAdapter {
|
|
20
|
+
readonly providerId: ProviderId;
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly type: ProviderType;
|
|
23
|
+
readonly icon: string | undefined;
|
|
24
|
+
readonly rpcUrl: string;
|
|
25
|
+
private _provider;
|
|
26
|
+
private description;
|
|
27
|
+
constructor(config: RemoteAdapterConfig);
|
|
28
|
+
getInfo(): WalletInfo;
|
|
29
|
+
detect(): Promise<boolean>;
|
|
30
|
+
provider(): Provider<DappRpcTypes>;
|
|
31
|
+
teardown(): void;
|
|
32
|
+
restore(): Promise<Provider<DappRpcTypes> | null>;
|
|
33
|
+
private setupSessionListeners;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=remote-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/remote-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAER,QAAQ,EACX,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EACR,qBAAqB,EAExB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,6CAA6C,CAAA;AAE3F,OAAO,KAAK,EACR,eAAe,EACf,UAAU,EACb,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EACR,UAAU,EACV,YAAY,EACf,MAAM,6CAA6C,CAAA;AAQpD,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAC9D,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC;AAED;;;;;;GAMG;AACH,qBAAa,aAAc,YAAW,eAAe;IACjD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAW;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,SAAS,CAAoC;IACrD,OAAO,CAAC,WAAW,CAAoB;gBAE3B,MAAM,EAAE,mBAAmB;IAQvC,OAAO,IAAI,UAAU;IAWf,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAIhC,QAAQ,IAAI,QAAQ,CAAC,YAAY,CAAC;IAUlC,QAAQ,IAAI,IAAI;IAIV,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAoBvD,OAAO,CAAC,qBAAqB;CAiChC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { WalletInfo, ProviderAdapter, WalletPickerEntry, WalletPickerResult, WalletPickerFn, } from '@canton-network/core-wallet-discovery';
|
|
2
|
+
export type { ProviderId, ProviderType, } from '@canton-network/core-wallet-dapp-rpc-client';
|
|
3
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapter/types.ts"],"names":[],"mappings":"AAIA,YAAY,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,GACjB,MAAM,uCAAuC,CAAA;AAE9C,YAAY,EACR,UAAU,EACV,YAAY,GACf,MAAM,6CAA6C,CAAA"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Provider, EventListener } from '@canton-network/core-splice-provider';
|
|
2
|
+
import type { AccountsChangedEvent, ConnectResult, RpcTypes as DappRpcTypes, LedgerApiParams, LedgerApiResult, ListAccountsResult, PrepareExecuteAndWaitResult, PrepareExecuteParams, ProviderType, StatusEvent, TxChangedEvent } from '@canton-network/core-wallet-dapp-rpc-client';
|
|
3
|
+
export interface DappClientOptions {
|
|
4
|
+
/** Inject provider into `window.canton`. Defaults to true. */
|
|
5
|
+
injectGlobal?: boolean | undefined;
|
|
6
|
+
/** Provider type hint — affects `open()` routing. Defaults to `'remote'`. */
|
|
7
|
+
providerType?: ProviderType | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* DappClient is a thin convenience wrapper around a connected
|
|
11
|
+
* `Provider<DappRpcTypes>`.
|
|
12
|
+
*
|
|
13
|
+
* It exposes typed RPC helpers, event subscription shortcuts,
|
|
14
|
+
* `window.canton` injection, and session-persistence listeners.
|
|
15
|
+
*
|
|
16
|
+
* How to obtain a provider is **not** this class's concern.
|
|
17
|
+
* Use `DiscoveryClient` + the wallet picker, or construct any
|
|
18
|
+
* `Provider<DappRpcTypes>` directly — then pass it here.
|
|
19
|
+
*/
|
|
20
|
+
export declare class DappClient {
|
|
21
|
+
private provider;
|
|
22
|
+
private options;
|
|
23
|
+
constructor(provider: Provider<DappRpcTypes>, options?: DappClientOptions);
|
|
24
|
+
getProvider(): Provider<DappRpcTypes>;
|
|
25
|
+
connect(): Promise<ConnectResult>;
|
|
26
|
+
status(): Promise<StatusEvent>;
|
|
27
|
+
listAccounts(): Promise<ListAccountsResult>;
|
|
28
|
+
prepareExecute(params: PrepareExecuteParams): Promise<null>;
|
|
29
|
+
prepareExecuteAndWait(params: PrepareExecuteParams): Promise<PrepareExecuteAndWaitResult>;
|
|
30
|
+
ledgerApi(params: LedgerApiParams): Promise<LedgerApiResult>;
|
|
31
|
+
onStatusChanged(listener: EventListener<StatusEvent>): void;
|
|
32
|
+
onAccountsChanged(listener: EventListener<AccountsChangedEvent>): void;
|
|
33
|
+
onTxChanged(listener: EventListener<TxChangedEvent>): void;
|
|
34
|
+
removeOnStatusChanged(listener: EventListener<StatusEvent>): void;
|
|
35
|
+
removeOnAccountsChanged(listener: EventListener<AccountsChangedEvent>): void;
|
|
36
|
+
removeOnTxChanged(listener: EventListener<TxChangedEvent>): void;
|
|
37
|
+
open(): Promise<void>;
|
|
38
|
+
discon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BAAiB,CAAC,QAAQ,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI;IAItE,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI;IAI1D,qBAAqB,CAAC,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,IAAI;IAIjE,uBAAuB,CACnB,QAAQ,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC9C,IAAI;IAOP,iBAAiB,CAAC,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI;IAM1D,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBrB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAOpC"}
|
|
@@ -64,7 +64,6 @@ export interface DisclosedContract {
|
|
|
64
64
|
contractId?: ContractId;
|
|
65
65
|
createdEventBlob: CreatedEventBlob;
|
|
66
66
|
synchronizerId?: SynchronizerId;
|
|
67
|
-
[k: string]: any;
|
|
68
67
|
}
|
|
69
68
|
/**
|
|
70
69
|
*
|
|
@@ -90,19 +89,25 @@ export type Resource = string;
|
|
|
90
89
|
export type Body = string;
|
|
91
90
|
/**
|
|
92
91
|
*
|
|
93
|
-
* The unique identifier of the
|
|
92
|
+
* The unique identifier of the Provider.
|
|
94
93
|
*
|
|
95
94
|
*/
|
|
96
|
-
export type
|
|
95
|
+
export type ProviderId = string;
|
|
97
96
|
/**
|
|
98
97
|
*
|
|
99
|
-
* The
|
|
98
|
+
* The version of the Provider.
|
|
100
99
|
*
|
|
101
100
|
*/
|
|
102
|
-
export type
|
|
101
|
+
export type Version = string;
|
|
103
102
|
/**
|
|
104
103
|
*
|
|
105
|
-
* The
|
|
104
|
+
* The type of client that implements the Provider.
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
export type ProviderType = 'browser' | 'desktop' | 'mobile' | 'remote';
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* The URL of the Wallet Provider.
|
|
106
111
|
*
|
|
107
112
|
*/
|
|
108
113
|
export type Url = string;
|
|
@@ -114,15 +119,15 @@ export type Url = string;
|
|
|
114
119
|
export type UserUrl = string;
|
|
115
120
|
/**
|
|
116
121
|
*
|
|
117
|
-
* Represents a
|
|
122
|
+
* Represents a Provider.
|
|
118
123
|
*
|
|
119
124
|
*/
|
|
120
|
-
export interface
|
|
121
|
-
id:
|
|
122
|
-
|
|
125
|
+
export interface Provider {
|
|
126
|
+
id: ProviderId;
|
|
127
|
+
version?: Version;
|
|
128
|
+
providerType?: ProviderType;
|
|
123
129
|
url?: Url;
|
|
124
130
|
userUrl?: UserUrl;
|
|
125
|
-
[k: string]: any;
|
|
126
131
|
}
|
|
127
132
|
/**
|
|
128
133
|
*
|
|
@@ -130,6 +135,12 @@ export interface KernelInfo {
|
|
|
130
135
|
*
|
|
131
136
|
*/
|
|
132
137
|
export type IsConnected = boolean;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* Reason for the wallet state, e.g., 'no signing provider matched'.
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
export type Reason = string;
|
|
133
144
|
/**
|
|
134
145
|
*
|
|
135
146
|
* Whether or not a connection to a network is established.
|
|
@@ -142,6 +153,13 @@ export type IsNetworkConnected = boolean;
|
|
|
142
153
|
*
|
|
143
154
|
*/
|
|
144
155
|
export type NetworkReason = string;
|
|
156
|
+
export interface ConnectResult {
|
|
157
|
+
isConnected: IsConnected;
|
|
158
|
+
reason?: Reason;
|
|
159
|
+
isNetworkConnected: IsNetworkConnected;
|
|
160
|
+
networkReason?: NetworkReason;
|
|
161
|
+
userUrl?: UserUrl;
|
|
162
|
+
}
|
|
145
163
|
/**
|
|
146
164
|
*
|
|
147
165
|
* The network ID the wallet corresponds to.
|
|
@@ -153,16 +171,13 @@ export type NetworkId = string;
|
|
|
153
171
|
* The base URL of the ledger API.
|
|
154
172
|
*
|
|
155
173
|
*/
|
|
156
|
-
export type
|
|
174
|
+
export type LedgerApiUrl = string;
|
|
157
175
|
/**
|
|
158
176
|
*
|
|
159
|
-
*
|
|
177
|
+
* JWT authentication token.
|
|
160
178
|
*
|
|
161
179
|
*/
|
|
162
|
-
export
|
|
163
|
-
baseUrl: BaseUrl;
|
|
164
|
-
[k: string]: any;
|
|
165
|
-
}
|
|
180
|
+
export type AccessToken = string;
|
|
166
181
|
/**
|
|
167
182
|
*
|
|
168
183
|
* Network information, if connected to a network.
|
|
@@ -170,15 +185,9 @@ export interface LedgerApiConfig {
|
|
|
170
185
|
*/
|
|
171
186
|
export interface Network {
|
|
172
187
|
networkId: NetworkId;
|
|
173
|
-
ledgerApi?:
|
|
174
|
-
|
|
188
|
+
ledgerApi?: LedgerApiUrl;
|
|
189
|
+
accessToken?: AccessToken;
|
|
175
190
|
}
|
|
176
|
-
/**
|
|
177
|
-
*
|
|
178
|
-
* JWT authentication token.
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
export type AccessToken = string;
|
|
182
191
|
/**
|
|
183
192
|
*
|
|
184
193
|
* The user identifier.
|
|
@@ -193,7 +202,6 @@ export type UserId = string;
|
|
|
193
202
|
export interface Session {
|
|
194
203
|
accessToken: AccessToken;
|
|
195
204
|
userId: UserId;
|
|
196
|
-
[k: string]: any;
|
|
197
205
|
}
|
|
198
206
|
/**
|
|
199
207
|
*
|
|
@@ -294,12 +302,6 @@ export type TopologyTransactions = string;
|
|
|
294
302
|
*
|
|
295
303
|
*/
|
|
296
304
|
export type Disabled = boolean;
|
|
297
|
-
/**
|
|
298
|
-
*
|
|
299
|
-
* Reason for the wallet state, e.g., 'no signing provider matched'.
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
export type Reason = string;
|
|
303
305
|
/**
|
|
304
306
|
*
|
|
305
307
|
* Structure representing a wallet
|
|
@@ -318,7 +320,6 @@ export interface Wallet {
|
|
|
318
320
|
topologyTransactions?: TopologyTransactions;
|
|
319
321
|
disabled?: Disabled;
|
|
320
322
|
reason?: Reason;
|
|
321
|
-
[k: string]: any;
|
|
322
323
|
}
|
|
323
324
|
/**
|
|
324
325
|
*
|
|
@@ -395,7 +396,6 @@ export interface PrepareExecuteParams {
|
|
|
395
396
|
disclosedContracts?: DisclosedContracts;
|
|
396
397
|
synchronizerId?: SynchronizerId;
|
|
397
398
|
packageIdSelectionPreference?: PackageIdSelectionPreference;
|
|
398
|
-
[k: string]: any;
|
|
399
399
|
}
|
|
400
400
|
/**
|
|
401
401
|
*
|
|
@@ -404,7 +404,6 @@ export interface PrepareExecuteParams {
|
|
|
404
404
|
*/
|
|
405
405
|
export interface SignMessageParams {
|
|
406
406
|
message: Message;
|
|
407
|
-
[k: string]: any;
|
|
408
407
|
}
|
|
409
408
|
/**
|
|
410
409
|
*
|
|
@@ -415,16 +414,12 @@ export interface LedgerApiParams {
|
|
|
415
414
|
requestMethod: RequestMethod;
|
|
416
415
|
resource: Resource;
|
|
417
416
|
body?: Body;
|
|
418
|
-
[k: string]: any;
|
|
419
417
|
}
|
|
420
418
|
export interface StatusEvent {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
isNetworkConnected: IsNetworkConnected;
|
|
424
|
-
networkReason?: NetworkReason;
|
|
419
|
+
provider: Provider;
|
|
420
|
+
connection: ConnectResult;
|
|
425
421
|
network?: Network;
|
|
426
422
|
session?: Session;
|
|
427
|
-
[k: string]: any;
|
|
428
423
|
}
|
|
429
424
|
/**
|
|
430
425
|
*
|
|
@@ -434,7 +429,6 @@ export interface StatusEvent {
|
|
|
434
429
|
export type Null = null;
|
|
435
430
|
export interface PrepareExecuteAndWaitResult {
|
|
436
431
|
tx: TxChangedExecutedEvent;
|
|
437
|
-
[k: string]: any;
|
|
438
432
|
}
|
|
439
433
|
/**
|
|
440
434
|
*
|
|
@@ -443,7 +437,6 @@ export interface PrepareExecuteAndWaitResult {
|
|
|
443
437
|
*/
|
|
444
438
|
export interface SignMessageResult {
|
|
445
439
|
signature: Signature;
|
|
446
|
-
[k: string]: any;
|
|
447
440
|
}
|
|
448
441
|
/**
|
|
449
442
|
*
|
|
@@ -452,7 +445,6 @@ export interface SignMessageResult {
|
|
|
452
445
|
*/
|
|
453
446
|
export interface LedgerApiResult {
|
|
454
447
|
response: Response;
|
|
455
|
-
[k: string]: any;
|
|
456
448
|
}
|
|
457
449
|
/**
|
|
458
450
|
*
|
|
@@ -478,7 +470,7 @@ export type TxChangedEvent = TxChangedPendingEvent | TxChangedSignedEvent | TxCh
|
|
|
478
470
|
*
|
|
479
471
|
*/
|
|
480
472
|
export type Status = () => Promise<StatusEvent>;
|
|
481
|
-
export type Connect = () => Promise<
|
|
473
|
+
export type Connect = () => Promise<ConnectResult>;
|
|
482
474
|
export type Disconnect = () => Promise<Null>;
|
|
483
475
|
export type GetActiveNetwork = () => Promise<Network>;
|
|
484
476
|
export type PrepareExecute = (params: PrepareExecuteParams) => Promise<Null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../src/dapp-api/rpc-gen/typings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../src/dapp-api/rpc-gen/typings.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB;AACD;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAA;AAC1B;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG,KAAK,EAAE,CAAA;AAC3B;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,EAAE,CAAA;AAC5B;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAC/B;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAC/B;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;A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