@console-wallet/dapp-sdk 1.2.1 → 2.0.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/CHANGELOG.md +35 -0
- package/README.md +118 -190
- package/dist/cjs/api/client.api.d.ts +39 -1
- package/dist/cjs/api/generated-wallet-api.d.ts +803 -27
- package/dist/cjs/api/generated-wallet-api.js +362 -1
- package/dist/cjs/api/generated-wallet-api.js.map +1 -1
- package/dist/cjs/constants/config.constants.d.ts +3 -0
- package/dist/cjs/constants/config.constants.js +4 -1
- package/dist/cjs/constants/config.constants.js.map +1 -1
- package/dist/cjs/helpers/handleResponse.helper.d.ts +3 -0
- package/dist/cjs/helpers/{handleResponce.helper.js → handleResponse.helper.js} +1 -1
- package/dist/cjs/helpers/{handleResponce.helper.js.map → handleResponse.helper.js.map} +1 -1
- package/dist/cjs/index.d.ts +10 -7
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/requests/checkAvailability.d.ts +3 -3
- package/dist/cjs/requests/checkAvailability.js +52 -11
- package/dist/cjs/requests/checkAvailability.js.map +1 -1
- package/dist/cjs/requests/connect.d.ts +1 -1
- package/dist/cjs/requests/connect.js +37 -20
- package/dist/cjs/requests/connect.js.map +1 -1
- package/dist/cjs/requests/disconnect.js +5 -4
- package/dist/cjs/requests/disconnect.js.map +1 -1
- package/dist/cjs/requests/getAccounts.js +6 -7
- package/dist/cjs/requests/getAccounts.js.map +1 -1
- package/dist/cjs/requests/getActiveAccount.js +6 -7
- package/dist/cjs/requests/getActiveAccount.js.map +1 -1
- package/dist/cjs/requests/getActiveNetwork.js +6 -7
- package/dist/cjs/requests/getActiveNetwork.js.map +1 -1
- package/dist/cjs/requests/getBalance.js +5 -4
- package/dist/cjs/requests/getBalance.js.map +1 -1
- package/dist/cjs/requests/getCoinsBalance.js +5 -4
- package/dist/cjs/requests/getCoinsBalance.js.map +1 -1
- package/dist/cjs/requests/getIsConnected.d.ts +3 -3
- package/dist/cjs/requests/getIsConnected.js +7 -8
- package/dist/cjs/requests/getIsConnected.js.map +1 -1
- package/dist/cjs/requests/getNodeOffers.js +5 -4
- package/dist/cjs/requests/getNodeOffers.js.map +1 -1
- package/dist/cjs/requests/getNodeTransfer.js +5 -4
- package/dist/cjs/requests/getNodeTransfer.js.map +1 -1
- package/dist/cjs/requests/getNodeTransfers.js +5 -4
- package/dist/cjs/requests/getNodeTransfers.js.map +1 -1
- package/dist/cjs/requests/getOffers.js +5 -4
- package/dist/cjs/requests/getOffers.js.map +1 -1
- package/dist/cjs/requests/getStatus.d.ts +3 -3
- package/dist/cjs/requests/getStatus.js +15 -9
- package/dist/cjs/requests/getStatus.js.map +1 -1
- package/dist/cjs/requests/getTransfer.js +5 -4
- package/dist/cjs/requests/getTransfer.js.map +1 -1
- package/dist/cjs/requests/getTransfers.js +5 -4
- package/dist/cjs/requests/getTransfers.js.map +1 -1
- package/dist/cjs/requests/getWalletVersion.d.ts +12 -0
- package/dist/cjs/requests/getWalletVersion.js +39 -0
- package/dist/cjs/requests/getWalletVersion.js.map +1 -0
- package/dist/cjs/requests/index.d.ts +3 -0
- package/dist/cjs/requests/index.js +3 -0
- package/dist/cjs/requests/index.js.map +1 -1
- package/dist/cjs/requests/ledgerApi.d.ts +16 -0
- package/dist/cjs/requests/ledgerApi.js +49 -0
- package/dist/cjs/requests/ledgerApi.js.map +1 -0
- package/dist/cjs/requests/signMessage.js +3 -2
- package/dist/cjs/requests/signMessage.js.map +1 -1
- package/dist/cjs/requests/singBatch.js +3 -2
- package/dist/cjs/requests/singBatch.js.map +1 -1
- package/dist/cjs/requests/submitCommands.js +3 -2
- package/dist/cjs/requests/submitCommands.js.map +1 -1
- package/dist/cjs/requests/submitInstructionChoice.d.ts +23 -0
- package/dist/cjs/requests/submitInstructionChoice.js +51 -0
- package/dist/cjs/requests/submitInstructionChoice.js.map +1 -0
- package/dist/cjs/triggersNative/onAccountsChanged.js +1 -2
- package/dist/cjs/triggersNative/onAccountsChanged.js.map +1 -1
- package/dist/cjs/triggersNative/onConnectionStatusChanged.d.ts +2 -2
- package/dist/cjs/triggersNative/onConnectionStatusChanged.js +15 -4
- package/dist/cjs/triggersNative/onConnectionStatusChanged.js.map +1 -1
- package/dist/cjs/types/communication.types.d.ts +5 -1
- package/dist/cjs/types/communication.types.js +3 -0
- package/dist/cjs/types/communication.types.js.map +1 -1
- package/dist/cjs/types/connect.type.d.ts +46 -4
- package/dist/cjs/types/connect.type.js +8 -0
- package/dist/cjs/types/connect.type.js.map +1 -1
- package/dist/cjs/types/error.type.d.ts +32 -2
- package/dist/cjs/types/error.type.js +138 -0
- package/dist/cjs/types/error.type.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/types/ledger.type.d.ts +6 -0
- package/dist/cjs/types/ledger.type.js +3 -0
- package/dist/cjs/types/ledger.type.js.map +1 -0
- package/dist/cjs/types/signed.type.d.ts +20 -0
- package/dist/cjs/types/signed.type.js +7 -1
- package/dist/cjs/types/signed.type.js.map +1 -1
- package/dist/cjs/types/token.types.d.ts +8 -0
- package/dist/cjs/types/token.types.js +7 -1
- package/dist/cjs/types/token.types.js.map +1 -1
- package/dist/esm/api/client.api.d.ts +39 -1
- package/dist/esm/api/generated-wallet-api.d.ts +803 -27
- package/dist/esm/api/generated-wallet-api.js +361 -0
- package/dist/esm/api/generated-wallet-api.js.map +1 -1
- package/dist/esm/constants/config.constants.d.ts +3 -0
- package/dist/esm/constants/config.constants.js +3 -0
- package/dist/esm/constants/config.constants.js.map +1 -1
- package/dist/esm/helpers/handleResponse.helper.d.ts +3 -0
- package/dist/esm/helpers/{handleResponce.helper.js → handleResponse.helper.js} +1 -1
- package/dist/esm/helpers/{handleResponce.helper.js.map → handleResponse.helper.js.map} +1 -1
- package/dist/esm/index.d.ts +10 -7
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/requests/checkAvailability.d.ts +3 -3
- package/dist/esm/requests/checkAvailability.js +52 -11
- package/dist/esm/requests/checkAvailability.js.map +1 -1
- package/dist/esm/requests/connect.d.ts +1 -1
- package/dist/esm/requests/connect.js +38 -21
- package/dist/esm/requests/connect.js.map +1 -1
- package/dist/esm/requests/disconnect.js +5 -4
- package/dist/esm/requests/disconnect.js.map +1 -1
- package/dist/esm/requests/getAccounts.js +7 -8
- package/dist/esm/requests/getAccounts.js.map +1 -1
- package/dist/esm/requests/getActiveAccount.js +7 -8
- package/dist/esm/requests/getActiveAccount.js.map +1 -1
- package/dist/esm/requests/getActiveNetwork.js +7 -8
- package/dist/esm/requests/getActiveNetwork.js.map +1 -1
- package/dist/esm/requests/getBalance.js +5 -4
- package/dist/esm/requests/getBalance.js.map +1 -1
- package/dist/esm/requests/getCoinsBalance.js +5 -4
- package/dist/esm/requests/getCoinsBalance.js.map +1 -1
- package/dist/esm/requests/getIsConnected.d.ts +3 -3
- package/dist/esm/requests/getIsConnected.js +8 -9
- package/dist/esm/requests/getIsConnected.js.map +1 -1
- package/dist/esm/requests/getNodeOffers.js +5 -4
- package/dist/esm/requests/getNodeOffers.js.map +1 -1
- package/dist/esm/requests/getNodeTransfer.js +5 -4
- package/dist/esm/requests/getNodeTransfer.js.map +1 -1
- package/dist/esm/requests/getNodeTransfers.js +5 -4
- package/dist/esm/requests/getNodeTransfers.js.map +1 -1
- package/dist/esm/requests/getOffers.js +5 -4
- package/dist/esm/requests/getOffers.js.map +1 -1
- package/dist/esm/requests/getStatus.d.ts +3 -3
- package/dist/esm/requests/getStatus.js +16 -10
- package/dist/esm/requests/getStatus.js.map +1 -1
- package/dist/esm/requests/getTransfer.js +5 -4
- package/dist/esm/requests/getTransfer.js.map +1 -1
- package/dist/esm/requests/getTransfers.js +5 -4
- package/dist/esm/requests/getTransfers.js.map +1 -1
- package/dist/esm/requests/getWalletVersion.d.ts +12 -0
- package/dist/esm/requests/getWalletVersion.js +35 -0
- package/dist/esm/requests/getWalletVersion.js.map +1 -0
- package/dist/esm/requests/index.d.ts +3 -0
- package/dist/esm/requests/index.js +3 -0
- package/dist/esm/requests/index.js.map +1 -1
- package/dist/esm/requests/ledgerApi.d.ts +16 -0
- package/dist/esm/requests/ledgerApi.js +45 -0
- package/dist/esm/requests/ledgerApi.js.map +1 -0
- package/dist/esm/requests/signMessage.js +3 -2
- package/dist/esm/requests/signMessage.js.map +1 -1
- package/dist/esm/requests/singBatch.js +3 -2
- package/dist/esm/requests/singBatch.js.map +1 -1
- package/dist/esm/requests/submitCommands.js +3 -2
- package/dist/esm/requests/submitCommands.js.map +1 -1
- package/dist/esm/requests/submitInstructionChoice.d.ts +23 -0
- package/dist/esm/requests/submitInstructionChoice.js +47 -0
- package/dist/esm/requests/submitInstructionChoice.js.map +1 -0
- package/dist/esm/triggersNative/onAccountsChanged.js +1 -2
- package/dist/esm/triggersNative/onAccountsChanged.js.map +1 -1
- package/dist/esm/triggersNative/onConnectionStatusChanged.d.ts +2 -2
- package/dist/esm/triggersNative/onConnectionStatusChanged.js +17 -6
- package/dist/esm/triggersNative/onConnectionStatusChanged.js.map +1 -1
- package/dist/esm/types/communication.types.d.ts +5 -1
- package/dist/esm/types/communication.types.js +3 -0
- package/dist/esm/types/communication.types.js.map +1 -1
- package/dist/esm/types/connect.type.d.ts +46 -4
- package/dist/esm/types/connect.type.js +7 -1
- package/dist/esm/types/connect.type.js.map +1 -1
- package/dist/esm/types/error.type.d.ts +32 -2
- package/dist/esm/types/error.type.js +137 -1
- package/dist/esm/types/error.type.js.map +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/types/ledger.type.d.ts +6 -0
- package/dist/esm/types/ledger.type.js +2 -0
- package/dist/esm/types/ledger.type.js.map +1 -0
- package/dist/esm/types/signed.type.d.ts +20 -0
- package/dist/esm/types/signed.type.js +6 -0
- package/dist/esm/types/signed.type.js.map +1 -1
- package/dist/esm/types/token.types.d.ts +8 -0
- package/dist/esm/types/token.types.js +6 -0
- package/dist/esm/types/token.types.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/helpers/handleResponce.helper.d.ts +0 -3
- package/dist/esm/helpers/handleResponce.helper.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
# Changelog 2.0.0
|
|
2
|
+
|
|
3
|
+
Human‑readable diff between `1.2.0` and `2.0.0`.
|
|
4
|
+
|
|
5
|
+
## Update — 2026-02-09
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- Added `submitInstructionChoice(data)` request to interact with pending Transfer Instructions.
|
|
10
|
+
- Added `ledgerApi(request)` request for raw ledger API interactions.
|
|
11
|
+
- Added `getWalletVersion()` request to fetch the connected wallet version.
|
|
12
|
+
- **Error Capability**: `ConsoleWalletError` is now fully capable/compatible with [EIP-1474](https://eips.ethereum.org/EIPS/eip-1474#error-codes) standard.
|
|
13
|
+
- **Version Checks**: `checkExtensionAvailability()` now includes version validation logic (`isExtensionCapableByVersion`) against `MINIMAL_CAPABLE_VERSION`.
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
- Added [CIP-0103](https://github.com/mjuchli-da/cips/blob/205eb941031b476a990a56734ff1a73fd87ef743/cip-0103/cip-0103.md) compatibility.
|
|
18
|
+
- Expanded **Error Handling** section with detailed EIP-1474 error codes and `ConsoleWalletError` interface.
|
|
19
|
+
- Updated **API Methods** tables in README to reflect current return types and new methods.
|
|
20
|
+
|
|
21
|
+
### Breaking Changes / Type Updates
|
|
22
|
+
|
|
23
|
+
- `status()` now returns `StatusEvent`.
|
|
24
|
+
- `isConnected()` now returns `ConnectResponse`.
|
|
25
|
+
|
|
26
|
+
# -
|
|
27
|
+
|
|
28
|
+
# -
|
|
29
|
+
|
|
30
|
+
# -
|
|
31
|
+
|
|
32
|
+
# -
|
|
33
|
+
|
|
34
|
+
# -
|
|
35
|
+
|
|
1
36
|
# Changelog 1.2.0
|
|
2
37
|
|
|
3
38
|
Human‑readable diff between `1.1.2` and `1.2.0` .
|
package/README.md
CHANGED
|
@@ -1,53 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Console DApp SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Console DApp SDK allows dApps to connect to a Console Wallet account. The Console wallet is a browser extension. All interaction happens inside the dApp. For signing, users will be prompted to sign in their Console Wallet browser extension.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This SDK is compatible with the [CIP-0103](https://github.com/mjuchli-da/cips/blob/205eb941031b476a990a56734ff1a73fd87ef743/cip-0103/cip-0103.md) protocol.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
It provides simple APIs to:
|
|
12
|
-
|
|
13
|
-
- 🔗 **Connect** your DApp to a user’s Console Wallet
|
|
14
|
-
- 👤 **Access** the active account and connection state
|
|
15
|
-
- ✍️ **Request message signing** to the wallet
|
|
16
|
-
- 💰 **Send Canton Coin** transactions securely and reliably
|
|
17
|
-
|
|
18
|
-
With just a few lines of code, you can authenticate users, sign data, or trigger Canton blockchain transactions — all through a unified SDK built for simplicity and safety.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## ⚙️ Key Features
|
|
23
|
-
|
|
24
|
-
| Feature | Description |
|
|
25
|
-
| -------------------------- |------------------------------------------------------------------|
|
|
26
|
-
| 🔌 **Easy Integration** | One SDK import connects your app to Console Wallet instantly |
|
|
27
|
-
| 👛 **Account Access** | Retrieve connected account address and chain info |
|
|
28
|
-
| 🧾 **Message Signing** | Sign arbitrary messages or typed data directly from the wallet |
|
|
29
|
-
| 💸 **Transaction Support** | Send Canton Coin with a simple API call |
|
|
30
|
-
| 🔒 **Secure by Design** | Uses wallet’s native permissions and confirmation flows |
|
|
31
|
-
| 🧠 **Framework Agnostic** | Works with React, Vue, Angular, Svelte or vanilla JS apps |
|
|
32
|
-
| 📊 **Balance & History** | Query balances, transfers, and transaction history |
|
|
33
|
-
| 🔄 **Real-time Updates** | Subscribe to account, connection, and transaction status changes |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 🧠 Why Use Console DApp SDK?
|
|
38
|
-
|
|
39
|
-
Instead of manually handling RPC connections or building custom wallet logic, `@console-wallet/dapp-sdk` provides a **clean, unified interface** for interacting with the Canton ecosystem.
|
|
40
|
-
|
|
41
|
-
It’s ideal for:
|
|
42
|
-
|
|
43
|
-
- Light start with Canton blockchain
|
|
44
|
-
- Web3 DApps that need wallet connection and signing
|
|
45
|
-
- Any app that interacts with Canton
|
|
46
|
-
- Applications requiring transaction history and balance queries
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 📦 Installation
|
|
9
|
+
To use the Console DApp SDK, you first need to install it from NPM:
|
|
51
10
|
|
|
52
11
|
```bash
|
|
53
12
|
npm install @console-wallet/dapp-sdk
|
|
@@ -55,7 +14,7 @@ npm install @console-wallet/dapp-sdk
|
|
|
55
14
|
yarn add @console-wallet/dapp-sdk
|
|
56
15
|
```
|
|
57
16
|
|
|
58
|
-
|
|
17
|
+
Note that, if you don't want to implement a build process, you can include the file directly with `unpkg`:
|
|
59
18
|
|
|
60
19
|
```html
|
|
61
20
|
<script type="module">
|
|
@@ -63,39 +22,7 @@ If you don't want to implement a build process, you can include the file directl
|
|
|
63
22
|
</script>
|
|
64
23
|
```
|
|
65
24
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## 🧠 Core Functionality
|
|
69
|
-
|
|
70
|
-
The **Console DApp SDK** provides a communication layer between your Web3 application and the **Console Wallet Extension** using the browser’s native `window.postMessage` API.
|
|
71
|
-
|
|
72
|
-
It handles all low-level messaging logic automatically, so you can focus on building your DApp — not managing communication details.
|
|
73
|
-
|
|
74
|
-
### 🔄 How It Works
|
|
75
|
-
|
|
76
|
-
1. When your DApp sends a request (e.g., `connect()`, `signMessage()`, or `submitCommands()`),
|
|
77
|
-
the SDK transmits a structured message to the **Console Wallet Extension** via `window.postMessage`.
|
|
78
|
-
|
|
79
|
-
2. Each outgoing request is assigned a **unique request ID**, which is included in both the request and the extension’s response.
|
|
80
|
-
|
|
81
|
-
3. The SDK listens for incoming responses from the extension, matches them to their original request using the ID,
|
|
82
|
-
and automatically resolves the corresponding Promise in your application.
|
|
83
|
-
|
|
84
|
-
This approach ensures **reliable, asynchronous communication** between the DApp and the extension — preventing race conditions, mismatched responses, or orphaned message handlers.
|
|
85
|
-
|
|
86
|
-
### 🧩 Benefits
|
|
87
|
-
|
|
88
|
-
- ✅ Fully **type-safe and asynchronous** API
|
|
89
|
-
- 🧭 No manual message listeners required
|
|
90
|
-
- 🛡️ Prevents **response mismatch errors** with per-request unique IDs
|
|
91
|
-
- ⚡ Lightweight and dependency-free
|
|
92
|
-
- 🧠 Extensible for future Console Wallet capabilities (multi-chain support, session management, etc.)
|
|
93
|
-
|
|
94
|
-
> In short: the SDK abstracts all the complex message passing between your DApp and the wallet, providing a **stable and predictable communication layer** out of the box.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 🔌 Quick Start
|
|
25
|
+
## Usage Guide
|
|
99
26
|
|
|
100
27
|
### 1. Import the SDK
|
|
101
28
|
|
|
@@ -105,18 +32,24 @@ import { consoleWalletPixelplex } from '@console-wallet/dapp-sdk';
|
|
|
105
32
|
|
|
106
33
|
### 2. Check Wallet Availability
|
|
107
34
|
|
|
108
|
-
Before attempting to connect, check if the Console Wallet extension is installed:
|
|
35
|
+
Before attempting to connect, check if the Console Wallet extension is installed and capable by version:
|
|
109
36
|
|
|
110
37
|
```typescript
|
|
111
38
|
const checkWallet = async () => {
|
|
112
39
|
try {
|
|
113
40
|
const availability = await consoleWalletPixelplex.checkExtensionAvailability();
|
|
114
|
-
if (availability === 'installed') {
|
|
41
|
+
if (availability.status === 'installed') {
|
|
115
42
|
console.log('Console Wallet is installed');
|
|
116
43
|
} else {
|
|
117
44
|
console.log('Console Wallet is not installed');
|
|
118
45
|
// Show installation instructions to the user
|
|
119
46
|
}
|
|
47
|
+
|
|
48
|
+
if (availability.isExtensionCapableByVersion) {
|
|
49
|
+
console.log('Console Wallet is capable by version');
|
|
50
|
+
} else {
|
|
51
|
+
console.log('Console Wallet is not capable by version');
|
|
52
|
+
}
|
|
120
53
|
} catch (error) {
|
|
121
54
|
console.error('Error checking wallet availability:', error);
|
|
122
55
|
}
|
|
@@ -131,7 +64,7 @@ You can check the current connection status at any time:
|
|
|
131
64
|
const checkStatus = async () => {
|
|
132
65
|
try {
|
|
133
66
|
const status = await consoleWalletPixelplex.status();
|
|
134
|
-
console.log('Connection status:', status); // 'connected' or 'disconnected'
|
|
67
|
+
console.log('Connection status:', status.isConnected); // 'connected' or 'disconnected'
|
|
135
68
|
} catch (error) {
|
|
136
69
|
console.error('Error checking status:', error);
|
|
137
70
|
}
|
|
@@ -149,7 +82,7 @@ const handleConnect = async () => {
|
|
|
149
82
|
name: 'My Awesome dApp',
|
|
150
83
|
icon: 'https://example.com/icon.png', // Optional: absolute URL to your dApp icon
|
|
151
84
|
});
|
|
152
|
-
|
|
85
|
+
|
|
153
86
|
if (status === 'connected') {
|
|
154
87
|
console.log('Successfully connected to Console Wallet');
|
|
155
88
|
// Proceed with your dApp logic
|
|
@@ -179,50 +112,48 @@ const getAccount = async () => {
|
|
|
179
112
|
};
|
|
180
113
|
```
|
|
181
114
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
## 📡 Supported Requests
|
|
115
|
+
## API Methods
|
|
185
116
|
|
|
186
|
-
The SDK exposes several high-level request methods that communicate with the
|
|
187
|
-
Each request is automatically tagged with a **unique request ID** to ensure reliable response matching.
|
|
117
|
+
The SDK exposes several high-level request methods that communicate with the Console Wallet Extension through secure message passing. Each request is automatically tagged with a unique request ID to ensure reliable response matching.
|
|
188
118
|
|
|
189
119
|
### Connection & Account Management
|
|
190
120
|
|
|
191
|
-
| Method
|
|
192
|
-
|
|
|
193
|
-
| `connect(data)`
|
|
194
|
-
| `status()`
|
|
195
|
-
| `disconnect()`
|
|
196
|
-
| `checkExtensionAvailability()`
|
|
197
|
-
| `isConnected()`
|
|
198
|
-
| `getAccounts()`
|
|
199
|
-
| `getPrimaryAccount()`
|
|
200
|
-
| `getActiveNetwork()`
|
|
121
|
+
| Method | Description | Request Payload | Response |
|
|
122
|
+
| ------------------------------ | ------------------------------------------------------------- | ------------------ | ---------------------- |
|
|
123
|
+
| `connect(data)` | Prompts the user to connect their Console Wallet to the DApp. | `ConnectRequest` | `ConnectResponse` |
|
|
124
|
+
| `status()` | Returns current connection status for the dApp origin. | — | `StatusEvent` |
|
|
125
|
+
| `disconnect()` | Disconnects the DApp from the wallet. | — | `DisconnectResponse` |
|
|
126
|
+
| `checkExtensionAvailability()` | Checks whether the wallet browser extension is installed. | — | `AvailabilityResponse` |
|
|
127
|
+
| `isConnected()` | Checks if the network is available. | — | `ConnectResponse` |
|
|
128
|
+
| `getAccounts()` | Retrieves all account(s) basic data. | — | `GetAccountsResponse` |
|
|
129
|
+
| `getPrimaryAccount()` | Returns the currently selected account in the Wallet. | — | `GetAccountResponse` |
|
|
130
|
+
| `getActiveNetwork()` | Returns the currently selected network metadata. | — | `Network` |
|
|
131
|
+
| `getWalletVersion()` | Fetches wallet version. | — | `WalletVersion` |
|
|
132
|
+
| `ledgerApi(request)` | Raw data request to ledger API. | `LedgerApiRequest` | `LedgerApiResponse` |
|
|
201
133
|
|
|
202
134
|
### Signing & Transactions
|
|
203
135
|
|
|
204
|
-
| Method
|
|
205
|
-
|
|
|
206
|
-
| `signMessage(message)`
|
|
207
|
-
| `submitCommands(data)`
|
|
208
|
-
| `signBatch(data)`
|
|
136
|
+
| Method | Description | Request Payload | Response |
|
|
137
|
+
| ------------------------------- | ------------------------------------------------------- | ------------------------------ | ----------------------- |
|
|
138
|
+
| `signMessage(message)` | Requests the user to sign a message (hex/base64). | `SignMessageRequest` | `SignedMessageResponse` |
|
|
139
|
+
| `submitCommands(data)` | Signs and broadcasts a transaction to send Canton Coin. | `SignSendRequest` | `SignSendResponse` |
|
|
140
|
+
| `signBatch(data)` | Signs and broadcasts a batch of transactions. | `SignBatchRequest` | `SignBatchResponse` |
|
|
141
|
+
| `submitInstructionChoice(data)` | Request user to interact with pending Transfer Instruction. | `SignInstructionChoiceRequest` | `SignInstructionChoiceResponse` |
|
|
209
142
|
|
|
210
143
|
### Balance & History Queries
|
|
211
144
|
|
|
212
|
-
| Method
|
|
213
|
-
|
|
|
214
|
-
| `getBalance()`
|
|
215
|
-
| `getCoinsBalance()`
|
|
216
|
-
| `getTokenTransfers()`
|
|
217
|
-
| `getTransfer()`
|
|
218
|
-
| `getOffers()`
|
|
219
|
-
| `getNodeTransfers()`
|
|
220
|
-
| `getNodeTransfer()`
|
|
221
|
-
| `getNodeOffers()`
|
|
145
|
+
| Method | Description | Request Payload | Response |
|
|
146
|
+
| --------------------- | ---------------------------------------------------------------- | ------------------------------ | ------------------------------- |
|
|
147
|
+
| `getBalance()` | Check party balance; includes current Canton Coin price. | `GetBalanceRequest` | `GetBalanceResponse` |
|
|
148
|
+
| `getCoinsBalance()` | Check balances and prices for supported coins. | `GetBalanceRequest` | `GetCoinsResponse` |
|
|
149
|
+
| `getTokenTransfers()` | Check party token transfers with pagination (indexer). | `TokenTransfersRequest` | `TokenTransfersResponse` |
|
|
150
|
+
| `getTransfer()` | Check party token transfer details (indexer). | `TransferRequest` | `TransferResponse` |
|
|
151
|
+
| `getOffers()` | Check party offers with pagination (indexer). | `OffersRequest` | `OffersResponse` |
|
|
152
|
+
| `getNodeTransfers()` | Check standard coin transfers with pagination (wallet node). | `CoinTransfersFromNodeRequest` | `CoinTransfersFromNodeResponse` |
|
|
153
|
+
| `getNodeTransfer()` | Check single transfer details (wallet node). | `TransferFromNodeRequest` | `TransferFromNodeResponse` |
|
|
154
|
+
| `getNodeOffers()` | Check pending transactions/offers with pagination (wallet node). | `OffersFromNodeRequest` | `OffersFromNodeResponse` |
|
|
222
155
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
## 💻 Usage Examples
|
|
156
|
+
## Usage Examples
|
|
226
157
|
|
|
227
158
|
### Sign a Message
|
|
228
159
|
|
|
@@ -267,7 +198,7 @@ const sendTransaction = async () => {
|
|
|
267
198
|
try {
|
|
268
199
|
// Get the active account first
|
|
269
200
|
const activeAccount = await consoleWalletPixelplex.getPrimaryAccount();
|
|
270
|
-
|
|
201
|
+
|
|
271
202
|
if (!activeAccount) {
|
|
272
203
|
throw new Error('No active account found');
|
|
273
204
|
}
|
|
@@ -308,7 +239,7 @@ Sign and send multiple transactions in a batch:
|
|
|
308
239
|
const signBatchTransactions = async () => {
|
|
309
240
|
try {
|
|
310
241
|
const activeAccount = await consoleWalletPixelplex.getPrimaryAccount();
|
|
311
|
-
|
|
242
|
+
|
|
312
243
|
if (!activeAccount) {
|
|
313
244
|
throw new Error('No active account found');
|
|
314
245
|
}
|
|
@@ -351,14 +282,14 @@ const signBatchTransactions = async () => {
|
|
|
351
282
|
|
|
352
283
|
### Get Balance
|
|
353
284
|
|
|
354
|
-
Check the balance for a party (
|
|
285
|
+
Check the balance for a party (CC balance only):
|
|
355
286
|
|
|
356
287
|
```typescript
|
|
357
288
|
const checkBalance = async () => {
|
|
358
289
|
try {
|
|
359
290
|
const activeAccount = await consoleWalletPixelplex.getPrimaryAccount();
|
|
360
291
|
const activeNetwork = await consoleWalletPixelplex.getActiveNetwork();
|
|
361
|
-
|
|
292
|
+
|
|
362
293
|
if (!activeAccount || !activeNetwork) {
|
|
363
294
|
throw new Error('No active account or network found');
|
|
364
295
|
}
|
|
@@ -368,7 +299,7 @@ const checkBalance = async () => {
|
|
|
368
299
|
network: activeNetwork.id,
|
|
369
300
|
});
|
|
370
301
|
|
|
371
|
-
console.log('
|
|
302
|
+
console.log('CC utxos:', balance.tokens);
|
|
372
303
|
console.log('Is split balance:', balance.isSplitedBalance);
|
|
373
304
|
console.log('1 CC price:', balance.price);
|
|
374
305
|
// Access individual token balances
|
|
@@ -390,7 +321,7 @@ const getCoinsBalance = async () => {
|
|
|
390
321
|
try {
|
|
391
322
|
const activeAccount = await consoleWalletPixelplex.getPrimaryAccount();
|
|
392
323
|
const activeNetwork = await consoleWalletPixelplex.getActiveNetwork();
|
|
393
|
-
|
|
324
|
+
|
|
394
325
|
if (!activeAccount || !activeNetwork) {
|
|
395
326
|
throw new Error('No active account or network found');
|
|
396
327
|
}
|
|
@@ -416,7 +347,7 @@ Query transaction history with pagination:
|
|
|
416
347
|
const getTransactionHistory = async () => {
|
|
417
348
|
try {
|
|
418
349
|
const activeAccount = await consoleWalletPixelplex.getPrimaryAccount();
|
|
419
|
-
|
|
350
|
+
|
|
420
351
|
if (!activeAccount) {
|
|
421
352
|
throw new Error('No active account found');
|
|
422
353
|
}
|
|
@@ -432,11 +363,11 @@ const getTransactionHistory = async () => {
|
|
|
432
363
|
|
|
433
364
|
// Get token transfers directly from node (separated by token) *Preferred
|
|
434
365
|
const cip56Transfers = await consoleWalletPixelplex.getNodeTransfers({
|
|
435
|
-
query: { partyId: partyId, limit: 10, coin:
|
|
366
|
+
query: { partyId: partyId, limit: 10, coin: 'CBTC', offset: 0 },
|
|
436
367
|
network,
|
|
437
368
|
});
|
|
438
|
-
|
|
439
|
-
console.log('Transfers', cip56Transfers?.items)
|
|
369
|
+
|
|
370
|
+
console.log('Transfers', cip56Transfers?.items);
|
|
440
371
|
|
|
441
372
|
// Get offers from indexer (Only CC)
|
|
442
373
|
const offers = await consoleWalletPixelplex.getOffers({
|
|
@@ -452,26 +383,23 @@ const getTransactionHistory = async () => {
|
|
|
452
383
|
query: { party_id: partyId, limit: 10, cursor: '0' },
|
|
453
384
|
network,
|
|
454
385
|
});
|
|
455
|
-
|
|
456
|
-
console.log('nodeOffers', nodeOffers?.items)
|
|
457
386
|
|
|
387
|
+
console.log('nodeOffers', nodeOffers?.items);
|
|
458
388
|
} catch (error) {
|
|
459
389
|
console.error('Error getting transaction history:', error);
|
|
460
390
|
}
|
|
461
391
|
};
|
|
462
392
|
```
|
|
463
393
|
|
|
464
|
-
|
|
394
|
+
## Subscriptions
|
|
465
395
|
|
|
466
|
-
|
|
396
|
+
The SDK provides subscription-style helpers to watch for changes from the Console Wallet. These functions register a callback and invoke it whenever the corresponding state changes.
|
|
467
397
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
|
471
|
-
|
|
|
472
|
-
| `
|
|
473
|
-
| `onConnectionStatusChanged(onChange)` | Subscribes to wallet connection status changes | `ConnectResponse` |
|
|
474
|
-
| `onTxStatusChanged(onChange)` | Subscribes to transaction status lifecycle updates | `TxChangedEvent` |
|
|
398
|
+
| Method | Description | Callback Payload |
|
|
399
|
+
| ------------------------------------- | -------------------------------------------------- | -------------------- |
|
|
400
|
+
| `onAccountsChanged(onChange)` | Subscribes to active account changes | `GetAccountResponse` |
|
|
401
|
+
| `onConnectionStatusChanged(onChange)` | Subscribes to wallet connection status changes | `ConnectResponse` |
|
|
402
|
+
| `onTxStatusChanged(onChange)` | Subscribes to transaction status lifecycle updates | `TxChangedEvent` |
|
|
475
403
|
|
|
476
404
|
### Example: Watch Account Changes
|
|
477
405
|
|
|
@@ -511,12 +439,44 @@ consoleWalletPixelplex.onTxStatusChanged((event) => {
|
|
|
511
439
|
});
|
|
512
440
|
```
|
|
513
441
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
## ⚠️ Error Handling
|
|
442
|
+
## Error Handling
|
|
517
443
|
|
|
518
444
|
All request helpers return Promises and can reject with a `ConsoleWalletError` when something goes wrong.
|
|
519
445
|
|
|
446
|
+
The `ConsoleWalletError` is fully compatible with [EIP-1474](https://eips.ethereum.org/EIPS/eip-1474#error-codes) error codes, ensuring a standardized error handling experience similar to other blockchain ecosystems.
|
|
447
|
+
|
|
448
|
+
### ConsoleWalletError Interface
|
|
449
|
+
|
|
450
|
+
```typescript
|
|
451
|
+
type ConsoleWalletError = Error & {
|
|
452
|
+
name: string;
|
|
453
|
+
message: string;
|
|
454
|
+
code: number; // EIP-1474 error code
|
|
455
|
+
data?: unknown;
|
|
456
|
+
};
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Common Error Codes
|
|
460
|
+
|
|
461
|
+
| Code | Name | Description |
|
|
462
|
+
| ------ | ------------------ | ------------------------------------------ |
|
|
463
|
+
| 4001 | UserRejected | User rejected the request. |
|
|
464
|
+
| 4100 | Unauthorized | Unauthorized. |
|
|
465
|
+
| 4200 | UnsupportedMethod | Unsupported method. |
|
|
466
|
+
| 4900 | Disconnected | Disconnected from the wallet. |
|
|
467
|
+
| 4901 | ChainDisconnected | Disconnected from the chain. |
|
|
468
|
+
| -32700 | ParseError | Parse error. |
|
|
469
|
+
| -32600 | InvalidRequest | Invalid request. |
|
|
470
|
+
| -32601 | MethodNotFound | Method not found. |
|
|
471
|
+
| -32602 | InvalidParams | Invalid params. |
|
|
472
|
+
| -32603 | InternalError | Internal error. |
|
|
473
|
+
| -32000 | InvalidInput | Invalid input. |
|
|
474
|
+
| -32001 | ResourceNotFound | Resource not found. |
|
|
475
|
+
| -32002 | ResourceUnavailable| Resource unavailable. |
|
|
476
|
+
| -32003 | TransactionRejected| Transaction rejected. |
|
|
477
|
+
| -32004 | MethodNotSupported | Method not supported. |
|
|
478
|
+
| -32005 | LimitExceeded | Limit exceeded. |
|
|
479
|
+
|
|
520
480
|
- User-driven errors (rejection, invalid input, permission issues) are reported by the wallet and surfaced as rejected Promises with a `ConsoleWalletError` payload.
|
|
521
481
|
- Transport-level issues (extension not installed, no response within the timeout) are also represented as `ConsoleWalletError` rejections where applicable (for example, account and network queries).
|
|
522
482
|
- Some helpers, such as `checkAvailability()`, internally handle timeouts and resolve with a best-effort status instead of rejecting.
|
|
@@ -528,15 +488,16 @@ try {
|
|
|
528
488
|
const accounts = await consoleWalletPixelplex.getAccounts();
|
|
529
489
|
// happy path
|
|
530
490
|
} catch (error) {
|
|
531
|
-
|
|
491
|
+
const err = error as ConsoleWalletError;
|
|
492
|
+
if (err.code === 4001) {
|
|
493
|
+
console.log('User rejected the request');
|
|
494
|
+
} else {
|
|
495
|
+
console.error('An error occurred:', err.message);
|
|
496
|
+
}
|
|
532
497
|
}
|
|
533
498
|
```
|
|
534
499
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
## 🔐 Transaction Metadata
|
|
538
|
-
|
|
539
|
-
### Transaction Metadata
|
|
500
|
+
## Transaction Metadata
|
|
540
501
|
|
|
541
502
|
When submitting transactions, you can include optional metadata:
|
|
542
503
|
|
|
@@ -553,56 +514,25 @@ const transactionWithMetadata = await consoleWalletPixelplex.submitCommands({
|
|
|
553
514
|
|
|
554
515
|
The `memo` field allows you to attach additional information to the transaction, which is stored as transfer metadata and can be retrieved when querying transaction history.
|
|
555
516
|
|
|
556
|
-
|
|
517
|
+
## Transaction Costs
|
|
557
518
|
|
|
558
519
|
All transactions on Canton are free. There are no transaction fees, traffic consumption costs, or native token costs for transaction processing.
|
|
559
520
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
## 🎯 Signing Any Transaction Type
|
|
563
|
-
|
|
564
|
-
The SDK supports signing various types of transactions:
|
|
521
|
+
## How It Works
|
|
565
522
|
|
|
566
|
-
|
|
523
|
+
The Console DApp SDK provides a communication layer between your Web3 application and the Console Wallet Extension using the browser's native `window.postMessage` API.
|
|
567
524
|
|
|
568
|
-
|
|
569
|
-
await consoleWalletPixelplex.submitCommands({
|
|
570
|
-
from: 'sender::fingerprint',
|
|
571
|
-
to: 'receiver::fingerprint',
|
|
572
|
-
token: 'CC',
|
|
573
|
-
amount: '10.0',
|
|
574
|
-
expireDate: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
|
|
575
|
-
});
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
### 2. Batch Transactions
|
|
579
|
-
|
|
580
|
-
```typescript
|
|
581
|
-
await consoleWalletPixelplex.signBatch({
|
|
582
|
-
batchType: 'SEND',
|
|
583
|
-
requests: [
|
|
584
|
-
// Multiple transfer requests
|
|
585
|
-
],
|
|
586
|
-
});
|
|
587
|
-
```
|
|
525
|
+
It handles all low-level messaging logic automatically, so you can focus on building your DApp — not managing communication details.
|
|
588
526
|
|
|
589
|
-
|
|
527
|
+
1. When your DApp sends a request (e.g., `connect()`, `signMessage()`, or `submitCommands()`), the SDK transmits a structured message to the Console Wallet Extension via `window.postMessage`.
|
|
590
528
|
|
|
591
|
-
|
|
529
|
+
2. Each outgoing request is assigned a unique request ID, which is included in both the request and the extension's response.
|
|
592
530
|
|
|
593
|
-
|
|
594
|
-
await consoleWalletPixelplex.signMessage({
|
|
595
|
-
message: { hex: '0x...' }, // or { base64: '...' }
|
|
596
|
-
metaData: {
|
|
597
|
-
purpose: 'authentication',
|
|
598
|
-
// Any additional metadata
|
|
599
|
-
},
|
|
600
|
-
});
|
|
601
|
-
```
|
|
531
|
+
3. The SDK listens for incoming responses from the extension, matches them to their original request using the ID, and automatically resolves the corresponding Promise in your application.
|
|
602
532
|
|
|
603
|
-
|
|
533
|
+
This approach ensures reliable, asynchronous communication between the DApp and the extension — preventing race conditions, mismatched responses, or orphaned message handlers.
|
|
604
534
|
|
|
605
|
-
##
|
|
535
|
+
## API Reference
|
|
606
536
|
|
|
607
537
|
For detailed API reference, see the TypeScript type definitions in `src/types/`. All methods are fully typed and include JSDoc comments.
|
|
608
538
|
|
|
@@ -648,8 +578,6 @@ utils.equalBytes(a: Uint8Array, b: Uint8Array): boolean
|
|
|
648
578
|
|
|
649
579
|
These utilities are essential for converting data between different formats (hex, base64, bytes) that the network and extension expect.
|
|
650
580
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
## 📝 Changelog
|
|
581
|
+
## Changelog
|
|
654
582
|
|
|
655
583
|
See [CHANGELOG.md](./CHANGELOG.md) for a list of changes and version history.
|
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
export declare const api: {
|
|
2
2
|
wallet: {
|
|
3
3
|
api: {
|
|
4
|
+
authControllerCreateSessionToken: (data: import("./generated-wallet-api").CreateSessionBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<void>;
|
|
5
|
+
cbtcBridgeControllerExecuteDeposit: (data: import("./generated-wallet-api").ExecuteDepositBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ExecuteDepositResponseDTO>;
|
|
6
|
+
cbtcBridgeControllerExecuteWithdrawInit: (data: import("./generated-wallet-api").ExecuteWithdrawInitBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ExecuteWithdrawInitResponseDTO>;
|
|
7
|
+
cbtcBridgeControllerExecuteWithdrawRequest: (data: import("./generated-wallet-api").ExecuteWithdrawRequestBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ExecuteWithdrawRequestResponseDTO>;
|
|
8
|
+
cbtcBridgeControllerGetDepositAccounts: (query: {
|
|
9
|
+
partyId: string;
|
|
10
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").DepositAccountsResponseDTO>;
|
|
11
|
+
cbtcBridgeControllerGetHoldings: (query: {
|
|
12
|
+
partyId: string;
|
|
13
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").HoldingsResponseDTO>;
|
|
14
|
+
cbtcBridgeControllerGetWithdrawAccounts: (query: {
|
|
15
|
+
partyId: string;
|
|
16
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").WithdrawAccountsResponseDTO>;
|
|
17
|
+
cbtcBridgeControllerGetWithdrawalHistory: (query: {
|
|
18
|
+
partyId: string;
|
|
19
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").WithdrawalHistoryResponseDTO>;
|
|
20
|
+
cbtcBridgeControllerGetWithdrawRequests: (query: {
|
|
21
|
+
partyId: string;
|
|
22
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").WithdrawRequestsResponseDTO>;
|
|
23
|
+
cbtcBridgeControllerPrepareDeposit: (data: import("./generated-wallet-api").PrepareDepositBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareDepositResponseDTO>;
|
|
24
|
+
cbtcBridgeControllerPrepareWithdrawInit: (data: import("./generated-wallet-api").PrepareWithdrawInitBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareWithdrawInitResponseDTO>;
|
|
25
|
+
cbtcBridgeControllerPrepareWithdrawRequest: (data: import("./generated-wallet-api").PrepareWithdrawRequestBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareWithdrawRequestResponseDTO>;
|
|
26
|
+
evmControllerAddUserEvmWalletAddress: (partyId: string, data: import("./generated-wallet-api").CreateUserEvmAddressDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetUserEvmAddressResponseDTO>;
|
|
27
|
+
evmControllerAddUserEvmWalletAddresses: (partyId: string, data: import("./generated-wallet-api").CreateUserEvmAddressBulkBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").CreateUserEvmAddressBulkResponseDTO>;
|
|
28
|
+
externalPartyControllerGetPartyByFingerprint: (query: {
|
|
29
|
+
fingerprint: string;
|
|
30
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetPartyByFingerprintResponseDTO>;
|
|
4
31
|
externalPartyControllerPrepareExternalParty: (data: import("./generated-wallet-api").PrepareExternalPartyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareExternalPartyResponseDTO>;
|
|
5
32
|
externalPartyControllerSubmitExternalParty: (data: import("./generated-wallet-api").SubmitExternalPartyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitExternalPartyResponseDTO>;
|
|
6
33
|
invitationsControllerRequestInvitation: (data: import("./generated-wallet-api").RequestInvitationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").RequestInvitationResponseDTO>;
|
|
@@ -10,10 +37,14 @@ export declare const api: {
|
|
|
10
37
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetMergeUtxosStatusResponseDTO>;
|
|
11
38
|
mergeDelegationControllerPrepareMergeDelegation: (data: import("./generated-wallet-api").PrepareMergeDelegationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareMergeDelegationResponseDTO>;
|
|
12
39
|
mergeDelegationControllerSubmitMergeDelegation: (data: import("./generated-wallet-api").SubmitMergeDelegationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitMergeDelegationResponseDTO>;
|
|
40
|
+
proxyCcviewUserApiControllerGetDevice: (deviceId: string, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetDeviceResponseDTO>;
|
|
41
|
+
proxyCcviewUserApiControllerSubscribe: (data: import("./generated-wallet-api").SubscribeDeviceDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubscribeResponseDTO>;
|
|
42
|
+
proxyCcviewUserApiControllerUnsubscribe: (data: import("./generated-wallet-api").UnsubscribeDeviceDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").UnsubscribeResponseDTO>;
|
|
13
43
|
proxyIndexerControllerProxyLegacy: (data: import("./generated-wallet-api").ProxyRequestDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetAnsContextListEntryDTO | import("./generated-wallet-api").GetAnsListEntryDTO | import("./generated-wallet-api").GetGeneralSearchResultResponseDTO | import("./generated-wallet-api").GetOffersSearchResponseDTO | import("./generated-wallet-api").GetPartyDetailsResponseDTO | import("./generated-wallet-api").GetPricesProxyResponseDTO | import("./generated-wallet-api").GetPricesResponseDTO | import("./generated-wallet-api").GetTokenTransfersByPartyResponseDTO | import("./generated-wallet-api").GetTransferDetailsResponseDTO>;
|
|
14
44
|
proxyIndexerControllerProxyMapped: (data: import("./generated-wallet-api").ProxyRequestDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ProxyIndexerResponseDTO>;
|
|
15
|
-
proxyPriceApiControllerProxy: (data: import("./generated-wallet-api").CryptoAPIProxyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<
|
|
45
|
+
proxyPriceApiControllerProxy: (data: import("./generated-wallet-api").CryptoAPIProxyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").CryptoAPIProxyResponseDTO>;
|
|
16
46
|
proxyW3AControllerProxy: (data: import("./generated-wallet-api").ProxyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ProxyResponseDTO>;
|
|
47
|
+
sdkLedgerProxyControllerProxyRequest: (data: import("./generated-wallet-api").SdkLedgerProxyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SdkLedgerProxyResponseDTO>;
|
|
17
48
|
settingControllerCreateSetting: (data: import("./generated-wallet-api").CreateSettingBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").CreateSettingResponseDTO>;
|
|
18
49
|
settingControllerDeleteSetting: (id: number, params?: import("./generated-wallet-api").RequestParams) => Promise<void>;
|
|
19
50
|
settingControllerGetSettings: (params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetSettingsResponseDTO>;
|
|
@@ -23,11 +54,13 @@ export declare const api: {
|
|
|
23
54
|
partyId: string;
|
|
24
55
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").CoinsBalancesResponseDTO>;
|
|
25
56
|
tokenStandardControllerGetPendingTransactions: (query: {
|
|
57
|
+
coin?: "CC" | "CBTC" | "USDCx" | undefined;
|
|
26
58
|
limit?: number | undefined;
|
|
27
59
|
offset?: number | undefined;
|
|
28
60
|
partyId: string;
|
|
29
61
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetPendingTransactionsResponseDTO>;
|
|
30
62
|
tokenStandardControllerGetPendingTransactionsFull: (query: {
|
|
63
|
+
coin?: "CC" | "CBTC" | "USDCx" | undefined;
|
|
31
64
|
limit?: number | undefined;
|
|
32
65
|
offset?: number | undefined;
|
|
33
66
|
partyId: string;
|
|
@@ -38,6 +71,7 @@ export declare const api: {
|
|
|
38
71
|
transferControllerGetTransferPreApprovalOrFail: (query: {
|
|
39
72
|
partyId: string;
|
|
40
73
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetTransferPreApprovalResponseDTO>;
|
|
74
|
+
transferControllerGetTransferPreApprovals: (data: import("./generated-wallet-api").GetTransferPreApprovalsBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetTransferPreApprovalsResponseDTO>;
|
|
41
75
|
transferControllerPrepareBatchTransfer: (data: import("./generated-wallet-api").PrepareBatchTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareBatchTransferResponseDTO>;
|
|
42
76
|
transferControllerPrepareResolveTransfer: (data: import("./generated-wallet-api").PrepareResolveTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareResolveTransferResponseDTO>;
|
|
43
77
|
transferControllerPrepareTransfer: (data: import("./generated-wallet-api").PrepareTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareTransferResponseDTO>;
|
|
@@ -65,6 +99,10 @@ export declare const api: {
|
|
|
65
99
|
transferPreapprovalControllerPrepareCreateTransferPreapproval: (data: import("./generated-wallet-api").PrepareCreateTransferPreapprovalBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareCreateTransferPreapprovalResponseDTO>;
|
|
66
100
|
transferPreapprovalControllerSubmitCancelTransferPreapproval: (data: import("./generated-wallet-api").SubmitCancelTransferPreapprovalBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitCancelTransferPreapprovalResponseDTO>;
|
|
67
101
|
transferPreapprovalControllerSubmitCreateTransferPreapproval: (data: import("./generated-wallet-api").SubmitCreateTransferPreapprovalBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitCreateTransferPreapprovalResponseDTO>;
|
|
102
|
+
userControllerGetUserWithInfo: (partyId: string, query?: {
|
|
103
|
+
address?: string | undefined;
|
|
104
|
+
networkId?: number | undefined;
|
|
105
|
+
} | undefined, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetUserInfoWithEvmAddressResponseDTO>;
|
|
68
106
|
};
|
|
69
107
|
setSecurityData: (data: unknown) => void;
|
|
70
108
|
request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: import("./generated-wallet-api").FullRequestParams) => Promise<T>;
|