@console-wallet/dapp-sdk 1.0.1 → 1.1.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 +20 -186
- package/README.md +20 -16
- package/dist/cjs/api/client.api.d.ts +23 -0
- package/dist/cjs/api/generated-wallet-api.d.ts +189 -1
- package/dist/cjs/api/generated-wallet-api.js +129 -0
- package/dist/cjs/api/generated-wallet-api.js.map +1 -1
- package/dist/cjs/helpers/handleResponce.helper.d.ts +1 -1
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/requests/getCoinsBalance.d.ts +15 -0
- package/dist/cjs/requests/getCoinsBalance.js +37 -0
- package/dist/cjs/requests/getCoinsBalance.js.map +1 -0
- package/dist/cjs/requests/getNodeOffers.d.ts +13 -0
- package/dist/cjs/requests/getNodeOffers.js +35 -0
- package/dist/cjs/requests/getNodeOffers.js.map +1 -0
- package/dist/cjs/requests/getNodeTransfer.d.ts +13 -0
- package/dist/cjs/requests/getNodeTransfer.js +35 -0
- package/dist/cjs/requests/getNodeTransfer.js.map +1 -0
- package/dist/cjs/requests/getNodeTransfers.d.ts +15 -0
- package/dist/cjs/requests/getNodeTransfers.js +37 -0
- package/dist/cjs/requests/getNodeTransfers.js.map +1 -0
- package/dist/cjs/requests/index.d.ts +4 -0
- package/dist/cjs/requests/index.js +4 -0
- package/dist/cjs/requests/index.js.map +1 -1
- package/dist/cjs/types/communication.types.d.ts +5 -1
- package/dist/cjs/types/communication.types.js +4 -0
- package/dist/cjs/types/communication.types.js.map +1 -1
- package/dist/cjs/types/history.types.d.ts +24 -0
- package/dist/cjs/types/token.types.d.ts +21 -2
- package/dist/cjs/types/token.types.js +13 -1
- package/dist/cjs/types/token.types.js.map +1 -1
- package/dist/esm/api/client.api.d.ts +23 -0
- package/dist/esm/api/generated-wallet-api.d.ts +189 -1
- package/dist/esm/api/generated-wallet-api.js +129 -0
- package/dist/esm/api/generated-wallet-api.js.map +1 -1
- package/dist/esm/helpers/handleResponce.helper.d.ts +1 -1
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/requests/getCoinsBalance.d.ts +15 -0
- package/dist/esm/requests/getCoinsBalance.js +33 -0
- package/dist/esm/requests/getCoinsBalance.js.map +1 -0
- package/dist/esm/requests/getNodeOffers.d.ts +13 -0
- package/dist/esm/requests/getNodeOffers.js +31 -0
- package/dist/esm/requests/getNodeOffers.js.map +1 -0
- package/dist/esm/requests/getNodeTransfer.d.ts +13 -0
- package/dist/esm/requests/getNodeTransfer.js +31 -0
- package/dist/esm/requests/getNodeTransfer.js.map +1 -0
- package/dist/esm/requests/getNodeTransfers.d.ts +15 -0
- package/dist/esm/requests/getNodeTransfers.js +33 -0
- package/dist/esm/requests/getNodeTransfers.js.map +1 -0
- package/dist/esm/requests/index.d.ts +4 -0
- package/dist/esm/requests/index.js +4 -0
- package/dist/esm/requests/index.js.map +1 -1
- package/dist/esm/types/communication.types.d.ts +5 -1
- package/dist/esm/types/communication.types.js +4 -0
- package/dist/esm/types/communication.types.js.map +1 -1
- package/dist/esm/types/history.types.d.ts +24 -0
- package/dist/esm/types/token.types.d.ts +21 -2
- package/dist/esm/types/token.types.js +12 -0
- package/dist/esm/types/token.types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,202 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
Human‑readable diff between `0.0
|
|
3
|
+
Human‑readable diff between `1.0.0` and `1.1.0` .
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Update — 2025-12-04
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Added support of direct activity requests and supporting token-standard coins.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Watch helpers:
|
|
11
|
-
- `onAccountsChanged(onChange)` — callback receives `GetAccountResponse`.
|
|
12
|
-
- `onConnectionStatusChanged(onChange)` — callback receives `ConnectResponse`.
|
|
13
|
-
- `onTxStatusChanged(onChange)` — callback receives `TxChangedEvent`.
|
|
9
|
+
### Features
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
- Added `getCoinsBalance()` request for aggregated coin balances and prices.
|
|
12
|
+
- Added node requests: `getNodeTransfers()`, `getNodeTransfer()`, `getNodeOffers()`.
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
- `getActiveAccount()` → `getPrimaryAccount()` (clarifies the wallet-selected account).
|
|
19
|
-
- `getTransfers(...)` → `getTokenTransfers(...)` (name reflects token transfer history).
|
|
14
|
+
### Requests Exports
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
- Exported new request modules from `src/requests/index.ts`.
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
- Responses: `SignSendResponse`, `SignedMessageResponse`, `TokenTransfersResponse`, `OffersResponse`, `TransferResponse`, `GetBalanceResponse`.
|
|
25
|
-
- Connection: `ConnectRequest`, `ConnectResponse`, `DisconnectResponse`, `NetworkStatus`.
|
|
26
|
-
- Network metadata: `Network`, `CANTON_NETWORK_VARIANTS`.
|
|
18
|
+
### Types
|
|
27
19
|
|
|
28
|
-
|
|
20
|
+
- Extended history types with node request/response aliases:
|
|
21
|
+
- `CoinTransfersFromNodeRequest` / `CoinTransfersFromNodeResponse`
|
|
22
|
+
- `TransferFromNodeRequest` / `TransferFromNodeResponse`
|
|
23
|
+
- `OffersFromNodeRequest` / `OffersFromNodeResponse`
|
|
24
|
+
- Minor alignments across transfer and offer type naming for consistency.
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
- Shape: `{ id: CANTON_NETWORK_VARIANTS; name; description; shortName?; icon?; synchronizerId?; identityProviderId; baseUrl; explorerUrl?; nativeTokenId }`
|
|
32
|
-
- Example:
|
|
33
|
-
```ts
|
|
34
|
-
const network: Network = {
|
|
35
|
-
id: CANTON_NETWORK_VARIANTS.CANTON_NETWORK_DEV,
|
|
36
|
-
name: 'Canton Devnet',
|
|
37
|
-
description: 'Development network',
|
|
38
|
-
identityProviderId: 'auth-dev',
|
|
39
|
-
baseUrl: 'https://devnet.ccview.io',
|
|
40
|
-
explorerUrl: 'https://explorer.devnet.ccview.io',
|
|
41
|
-
nativeTokenId: 'CANTON_COIN',
|
|
42
|
-
};
|
|
43
|
-
```
|
|
26
|
+
### API
|
|
44
27
|
|
|
45
|
-
-
|
|
46
|
-
- Key fields: `primary`, `status ('initialized' | 'allocated')`, `partyId` (template literal type `${string}::${string}`), `hint`, `publicKey`, `namespace`, `networkId: CANTON_NETWORK_VARIANTS`, `signingProviderId`, `externalTxId?`, `topologyTransactions?`.
|
|
47
|
-
- Responses:
|
|
48
|
-
- `GetAccountsResponse = Wallet[] | undefined`
|
|
49
|
-
- `GetAccountResponse = Wallet | undefined`
|
|
50
|
-
- Example:
|
|
51
|
-
```ts
|
|
52
|
-
const wallet: Wallet = {
|
|
53
|
-
primary: true,
|
|
54
|
-
status: 'initialized',
|
|
55
|
-
partyId: 'partyHint::partyId',
|
|
56
|
-
hint: 'partyHint',
|
|
57
|
-
publicKey: '0xabcdef...',
|
|
58
|
-
namespace: 'namespace-1',
|
|
59
|
-
networkId: CANTON_NETWORK_VARIANTS.CANTON_NETWORK_DEV,
|
|
60
|
-
signingProviderId: 'provider-123',
|
|
61
|
-
};
|
|
62
|
-
```
|
|
28
|
+
- Regenerated `src/api/generated-wallet-api.ts` DTOs to reflect latest backend schema.
|
|
63
29
|
|
|
64
|
-
|
|
65
|
-
- `TokenData` includes `price` and optional `balanceUsd` for convenience.
|
|
66
|
-
- `GetBalanceResponse` returns `{ tokens: TokenData[]; isSplitedBalance: boolean; price: string }`.
|
|
30
|
+
### Documentation
|
|
67
31
|
|
|
68
|
-
|
|
32
|
+
- Updated README Supported Requests table to include new methods and clarify indexer vs node.
|
|
69
33
|
|
|
70
|
-
###
|
|
34
|
+
### Internal
|
|
71
35
|
|
|
72
|
-
-
|
|
73
|
-
- `ConnectRequest`: `{ icon?: string; name?: string }`
|
|
74
|
-
- `ConnectStatus`: `'connected' | 'disconnected'`
|
|
75
|
-
- `NetworkStatus`: `boolean`
|
|
76
|
-
- `ConnectResponse`: `ConnectStatus`
|
|
77
|
-
- `DisconnectResponse`: `ConnectStatus`
|
|
78
|
-
- `ConnectRequestInternal`: `{ referer: `http://${string}` | `https://${string}` }` (wallet-internal)
|
|
79
|
-
- Example:
|
|
80
|
-
```ts
|
|
81
|
-
const connectPayload: ConnectRequest = { name: 'My dApp', icon: 'https://...' };
|
|
82
|
-
const status: ConnectResponse = 'connected';
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
- Signing types (in `src/types/signed.type.ts`):
|
|
86
|
-
- `SignMessageRequest`: `{ message: { hex } | { base64 }; metaData?: Record<string,string> }`
|
|
87
|
-
- `SignedMessageResponse`: `string | undefined`
|
|
88
|
-
- `SignSendRequest`: `{ from; to; amount; expireDate; waitForFinalization?: number }`
|
|
89
|
-
- `SignSendResponse`: `{ status: boolean; signature?: string; confirmationData?: SendConfirmationDataType } | undefined`
|
|
90
|
-
- Example:
|
|
91
|
-
```ts
|
|
92
|
-
const msgReq: SignMessageRequest = { message: { hex: '0xabc123' } };
|
|
93
|
-
const txReq: SignSendRequest = {
|
|
94
|
-
from: 'party::A',
|
|
95
|
-
to: 'party::B',
|
|
96
|
-
amount: '10',
|
|
97
|
-
expireDate: '2025-01-01',
|
|
98
|
-
};
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
- History/indexer types (in `src/types/history.types.ts`):
|
|
102
|
-
- `TokenTransfersQuery`: parameters of `api.indexer.tokenTransferByPartyIdV2`
|
|
103
|
-
- `TokenTransfersRequest`: `{ query: TokenTransfersQuery; network: CANTON_NETWORK_VARIANTS }`
|
|
104
|
-
- `TokenTransfersResponse`: `PagedByCombinedCursorResponseTokenTransferSummary | null`
|
|
105
|
-
- `OffersQuery`: parameters of `api.indexer.offerBySenderPartyV2`
|
|
106
|
-
- `OffersRequest`: `{ query: OffersQuery; network: CANTON_NETWORK_VARIANTS }`
|
|
107
|
-
- `OffersResponse`: `PagedByCombinedCursorResponseOffer | null`
|
|
108
|
-
- `TransferRequest`: `{ eventId: string; network: CANTON_NETWORK_VARIANTS }`
|
|
109
|
-
- `TransferResponse`: `Awaited<ReturnType<typeof api.indexer.tokenTransferByEventIdV2>> | null`
|
|
110
|
-
|
|
111
|
-
- Helper utility types (in `src/types/helpers.types.ts`):
|
|
112
|
-
- `DiscriminantKeys<T>`: keys of `T` when object
|
|
113
|
-
- `ChildOf<T, K>`: type of property `K` from `T`
|
|
114
|
-
- `ElementType<T>`: element type of array `T`
|
|
115
|
-
|
|
116
|
-
- Trigger types (in `src/types/txTriggers.type.ts`):
|
|
117
|
-
- `TxEventStatus`: `'pending' | 'signed' | 'executed' | 'failed'`
|
|
118
|
-
- Event payloads: `TxChangedSignedPayload`, `TxChangedExecutedPayload`
|
|
119
|
-
- Event unions: `TxChangedEvent = Pending | Signed | Executed | Failed`
|
|
120
|
-
- Example:
|
|
121
|
-
```ts
|
|
122
|
-
const evSigned: TxChangedEvent = {
|
|
123
|
-
status: TxEventStatus.SIGNED,
|
|
124
|
-
commandId: 'cmd-123',
|
|
125
|
-
payload: { signature: '0x..', signedBy: 'party::A', party: 'party::A' },
|
|
126
|
-
};
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Documentation and Hints
|
|
130
|
-
|
|
131
|
-
- README updated:
|
|
132
|
-
- Supported Requests table aligned to new names and types.
|
|
133
|
-
- New Watch Requests table (subscribe methods with payload types).
|
|
134
|
-
- JSDoc standardized across requests and types for consistent intellisense.
|
|
135
|
-
|
|
136
|
-
## Migration Guide (Before → After)
|
|
137
|
-
|
|
138
|
-
### Signing and Sending
|
|
139
|
-
|
|
140
|
-
- Before: `signSend(data)`
|
|
141
|
-
- After: `submitCommands(data)`
|
|
142
|
-
|
|
143
|
-
Example:
|
|
144
|
-
|
|
145
|
-
```ts
|
|
146
|
-
// before
|
|
147
|
-
const res = await consoleWalletPixelplex.signSend({ from, to, amount, expireDate });
|
|
148
|
-
|
|
149
|
-
// after
|
|
150
|
-
const res = await consoleWalletPixelplex.submitCommands({ from, to, amount, expireDate });
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Account Access
|
|
154
|
-
|
|
155
|
-
- Before: `getActiveAccount()`
|
|
156
|
-
- After: `getPrimaryAccount()`
|
|
157
|
-
|
|
158
|
-
```ts
|
|
159
|
-
const account = await consoleWalletPixelplex.getPrimaryAccount();
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Transfers
|
|
163
|
-
|
|
164
|
-
- Before: `getTransfers({ ... })`
|
|
165
|
-
- After: `getTokenTransfers({ query, network })`
|
|
166
|
-
|
|
167
|
-
```ts
|
|
168
|
-
const transfers = await consoleWalletPixelplex.getTokenTransfers({ query, network });
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Connection Status
|
|
172
|
-
|
|
173
|
-
- New: `status()` returns `ConnectResponse` (`'connected' | 'disconnected'`).
|
|
174
|
-
- `isConnected()` returns `NetworkStatus` (`boolean`).
|
|
175
|
-
|
|
176
|
-
```ts
|
|
177
|
-
const s = await consoleWalletPixelplex.status(); // 'connected' | 'disconnected'
|
|
178
|
-
const ok = await consoleWalletPixelplex.isConnected(); // true | false
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Watchers
|
|
182
|
-
|
|
183
|
-
```ts
|
|
184
|
-
onAccountsChanged((acc) => {
|
|
185
|
-
/* acc: GetAccountResponse */
|
|
186
|
-
});
|
|
187
|
-
onConnectionStatusChanged((st) => {
|
|
188
|
-
/* st: ConnectResponse */
|
|
189
|
-
});
|
|
190
|
-
onTxStatusChanged((ev) => {
|
|
191
|
-
/* ev: TxChangedEvent */
|
|
192
|
-
});
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
## File‑Level Diff (Curated)
|
|
196
|
-
|
|
197
|
-
- Added: `src/requests/getStatus.ts` (new `status()` request).
|
|
198
|
-
- Added: `src/triggersNative/index.ts`, `onAccountsChanged.ts`, `onConnectionStatusChanged.ts`, `onTxChanged.ts`.
|
|
199
|
-
- Added: `src/types/txTriggers.type.ts`.
|
|
200
|
-
- Renamed: `src/requests/signSend.ts` → `src/requests/submitCommands.ts`.
|
|
201
|
-
- Updated: request modules and types to reflect new names and stricter typing.
|
|
202
|
-
- Updated: `README.md` to include the Watch Requests section and revised Supported Requests.
|
|
36
|
+
- Tweaked `communication.types.ts` to keep request routing constants consistent.
|
package/README.md
CHANGED
|
@@ -81,21 +81,25 @@ This approach ensures **reliable, asynchronous communication** between the DApp
|
|
|
81
81
|
The SDK exposes several high-level request methods that communicate with the **Console Wallet Extension** through secure message passing.
|
|
82
82
|
Each request is automatically tagged with a **unique request ID** to ensure reliable response matching.
|
|
83
83
|
|
|
84
|
-
| Method | Description | Request Payload | Response
|
|
85
|
-
| ------------------------ | --------------------------------------------------------------------------- | --------------------------------- |
|
|
86
|
-
| `getAccounts()`
|
|
87
|
-
| `getPrimaryAccount()`
|
|
88
|
-
| `getActiveNetwork()`
|
|
89
|
-
| `signMessage(message)`
|
|
90
|
-
| `submitCommands(data)`
|
|
91
|
-
| `connect(data)`
|
|
92
|
-
| `status()`
|
|
93
|
-
| `isConnected()`
|
|
94
|
-
| `disconnect()`
|
|
95
|
-
| `getBalance()`
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
84
|
+
| Method | Description | Request Payload | Response |
|
|
85
|
+
| ------------------------ | --------------------------------------------------------------------------- | --------------------------------- | --------------------------------- |
|
|
86
|
+
| `getAccounts()` | Retrieves the account(s) basic data. | — | `GetAccountsResponse` |
|
|
87
|
+
| `getPrimaryAccount()` | Returns the currently selected account in the Wallet. | — | `GetAccountResponse` |
|
|
88
|
+
| `getActiveNetwork()` | Returns the currently selected network metadata. | — | `Network` |
|
|
89
|
+
| `signMessage(message)` | Requests the user to sign a message (hex/base64). | `SignMessageRequest` | `SignedMessageResponse` |
|
|
90
|
+
| `submitCommands(data)` | Signs and broadcasts a transaction to send Canton Coin. | `SignSendRequest` | `SignSendResponse` |
|
|
91
|
+
| `connect(data)` | Prompts the user to connect their Console Wallet to the DApp. | `ConnectRequest` | `ConnectResponse` |
|
|
92
|
+
| `status()` | Returns current connection status for the dApp origin. | — | `ConnectResponse` |
|
|
93
|
+
| `isConnected()` | Checks if the network available. | — | `NetworkStatus` |
|
|
94
|
+
| `disconnect()` | Disconnects the DApp from the wallet. | — | `DisconnectResponse` |
|
|
95
|
+
| `getBalance()` | Check party balance; includes current Canton Coin price. | `GetBalanceRequest` | `GetBalanceResponse` |
|
|
96
|
+
| `getCoinsBalance()` | Check balances and prices for supported coins. | `GetBalanceRequest` | `GetCoinsResponse` |
|
|
97
|
+
| `getTokenTransfers()` | Check party token transfers with pagination (indexer). | `TokenTransfersRequest` | `TokenTransfersResponse` |
|
|
98
|
+
| `getTransfer()` | Check party token transfer details (indexer). | `TransferRequest` | `TransferResponse` |
|
|
99
|
+
| `getOffers()` | Check party offers with pagination (indexer). | `OffersRequest` | `OffersResponse` |
|
|
100
|
+
| `getNodeTransfers()` | Check standard coin transfers with pagination (wallet node). | `CoinTransfersFromNodeRequest` | `CoinTransfersFromNodeResponse` |
|
|
101
|
+
| `getNodeTransfer()` | Check single transfer details (wallet node). | `TransferFromNodeRequest` | `TransferFromNodeResponse` |
|
|
102
|
+
| `getNodeOffers()` | Check pending transactions/offers with pagination (wallet node). | `OffersFromNodeRequest` | `OffersFromNodeResponse` |
|
|
99
103
|
|
|
100
104
|
---
|
|
101
105
|
|
|
@@ -173,4 +177,4 @@ const handleCheckConnection = async () => {
|
|
|
173
177
|
console.error('Error checking connection:', error);
|
|
174
178
|
}
|
|
175
179
|
};
|
|
176
|
-
```
|
|
180
|
+
```
|
|
@@ -5,6 +5,11 @@ export declare const api: {
|
|
|
5
5
|
externalPartyControllerSubmitExternalParty: (data: import("./generated-wallet-api").SubmitExternalPartyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitExternalPartyResponseDTO>;
|
|
6
6
|
invitationsControllerRequestInvitation: (data: import("./generated-wallet-api").RequestInvitationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").RequestInvitationResponseDTO>;
|
|
7
7
|
invitationsControllerVerifyInvitation: (data: import("./generated-wallet-api").VerifyInvitationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").VerifyInvitationResponseDTO>;
|
|
8
|
+
mergeDelegationControllerGetMergeUtxosStatus: (query: {
|
|
9
|
+
partyId: string;
|
|
10
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetMergeUtxosStatusResponseDTO>;
|
|
11
|
+
mergeDelegationControllerPrepareMergeDelegation: (data: import("./generated-wallet-api").PrepareMergeDelegationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareMergeDelegationResponseDTO>;
|
|
12
|
+
mergeDelegationControllerSubmitMergeDelegation: (data: import("./generated-wallet-api").SubmitMergeDelegationBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitMergeDelegationResponseDTO>;
|
|
8
13
|
proxyIndexerControllerProxyLegacy: (data: import("./generated-wallet-api").ProxyRequestDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetOffersSearchResponseDTO | import("./generated-wallet-api").GetPartyDetailsResponseDTO | import("./generated-wallet-api").GetPricesResponseDTO | import("./generated-wallet-api").GetTokenTransfersByPartyResponseDTO | import("./generated-wallet-api").GetTransferDetailsResponseDTO>;
|
|
9
14
|
proxyIndexerControllerProxyMapped: (data: import("./generated-wallet-api").ProxyRequestDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ProxyIndexerResponseDTO>;
|
|
10
15
|
proxyW3AControllerProxy: (data: import("./generated-wallet-api").ProxyBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ProxyResponseDTO>;
|
|
@@ -13,17 +18,25 @@ export declare const api: {
|
|
|
13
18
|
settingControllerGetSettings: (params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetSettingsResponseDTO>;
|
|
14
19
|
settingControllerUpdateSetting: (id: number, data: import("./generated-wallet-api").UpdateSettingBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").UpdateSettingResponseDTO>;
|
|
15
20
|
tokenStandardControllerCreateTap: (data: import("./generated-wallet-api").CreateTapDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<void>;
|
|
21
|
+
tokenStandardControllerGetBalances: (query: {
|
|
22
|
+
partyId: string;
|
|
23
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").CoinsBalancesResponseDTO>;
|
|
16
24
|
tokenStandardControllerGetPendingTransactions: (query: {
|
|
17
25
|
partyId: string;
|
|
18
26
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetPendingTransactionsResponseDTO>;
|
|
27
|
+
tokenStandardControllerGetPendingTransactionsFull: (query: {
|
|
28
|
+
partyId: string;
|
|
29
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetPendingTransactionsFullResponseDTO>;
|
|
19
30
|
tokenStandardControllerListUtxoHoldings: (query: {
|
|
20
31
|
partyId: string;
|
|
21
32
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").ListUtxosResponseDTO>;
|
|
22
33
|
transferControllerGetTransferPreApproval: (query: {
|
|
23
34
|
partyId: string;
|
|
24
35
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetTransferPreApprovalResponseDTO>;
|
|
36
|
+
transferControllerPrepareBatchTransfer: (data: import("./generated-wallet-api").PrepareBatchTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareBatchTransferResponseDTO>;
|
|
25
37
|
transferControllerPrepareResolveTransfer: (data: import("./generated-wallet-api").PrepareResolveTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareResolveTransferResponseDTO>;
|
|
26
38
|
transferControllerPrepareTransfer: (data: import("./generated-wallet-api").PrepareTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareTransferResponseDTO>;
|
|
39
|
+
transferControllerSubmitBatchTransfer: (data: import("./generated-wallet-api").SubmitBatchTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitBatchTransferResponseDTO>;
|
|
27
40
|
transferControllerSubmitResolveTransfer: (data: import("./generated-wallet-api").SubmitResolveTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitResolveTransferResponseDTO>;
|
|
28
41
|
transferControllerSubmitTransfer: (data: import("./generated-wallet-api").SubmitTransferBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitTransferResponseDTO>;
|
|
29
42
|
transferControllerWaitForTxCompletion: (query: {
|
|
@@ -31,6 +44,16 @@ export declare const api: {
|
|
|
31
44
|
ledgerEnd: number;
|
|
32
45
|
partyId: string;
|
|
33
46
|
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").WaitForTxCompletionResponseDTO>;
|
|
47
|
+
transferHistoryControllerGetTransfer: (id: number, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").TransferResponseDTO>;
|
|
48
|
+
transferHistoryControllerGetTransfers: (query: {
|
|
49
|
+
coin: "CC" | "CBTC" | "USDCx";
|
|
50
|
+
filter?: "ALL" | "Pending" | "Accepted" | "Rejected" | undefined;
|
|
51
|
+
limit?: number | undefined;
|
|
52
|
+
offset?: number | undefined;
|
|
53
|
+
partyId: string;
|
|
54
|
+
sortBy?: "createdAt" | undefined;
|
|
55
|
+
sortDirection?: "ASC" | "DESC" | undefined;
|
|
56
|
+
}, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").GetTransfersHistoryResponseDTO>;
|
|
34
57
|
transferPreapprovalControllerPrepareCancelTransferPreapproval: (data: import("./generated-wallet-api").PrepareCancelTransferPreapprovalBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareCancelTransferPreapprovalResponseDTO>;
|
|
35
58
|
transferPreapprovalControllerPrepareCreateTransferPreapproval: (data: import("./generated-wallet-api").PrepareCreateTransferPreapprovalBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").PrepareCreateTransferPreapprovalResponseDTO>;
|
|
36
59
|
transferPreapprovalControllerSubmitCancelTransferPreapproval: (data: import("./generated-wallet-api").SubmitCancelTransferPreapprovalBodyDTO, params?: import("./generated-wallet-api").RequestParams) => Promise<import("./generated-wallet-api").SubmitCancelTransferPreapprovalResponseDTO>;
|
|
@@ -25,6 +25,17 @@ export interface BalanceDTO {
|
|
|
25
25
|
total_locked_coin: string;
|
|
26
26
|
total_unlocked_coin: string;
|
|
27
27
|
}
|
|
28
|
+
export interface BatchTransferReceiverItemDTO {
|
|
29
|
+
amount: string;
|
|
30
|
+
receiver: string;
|
|
31
|
+
}
|
|
32
|
+
export interface CoinBalanceResponseDTO {
|
|
33
|
+
balance: string;
|
|
34
|
+
coin: "CC" | "CBTC" | "USDCx";
|
|
35
|
+
}
|
|
36
|
+
export interface CoinsBalancesResponseDTO {
|
|
37
|
+
balances: CoinBalanceResponseDTO[];
|
|
38
|
+
}
|
|
28
39
|
export interface CreateSettingBodyDTO {
|
|
29
40
|
key: string;
|
|
30
41
|
value: string;
|
|
@@ -43,6 +54,9 @@ export interface CreateTapDTO {
|
|
|
43
54
|
partyId: string;
|
|
44
55
|
privateKey: string;
|
|
45
56
|
}
|
|
57
|
+
export interface GetMergeUtxosStatusResponseDTO {
|
|
58
|
+
isMergeUtxosEnabled: boolean;
|
|
59
|
+
}
|
|
46
60
|
export interface GetOffersSearchResponseDTO {
|
|
47
61
|
data: OfferDTO[];
|
|
48
62
|
next_cursor?: string | null;
|
|
@@ -70,9 +84,12 @@ export interface GetPartyDetailsResponseDTO {
|
|
|
70
84
|
total_transfers_count: number;
|
|
71
85
|
validator_license: ValidatorLicenseDTO;
|
|
72
86
|
}
|
|
73
|
-
export interface
|
|
87
|
+
export interface GetPendingTransactionsFullResponseDTO {
|
|
74
88
|
items: object[];
|
|
75
89
|
}
|
|
90
|
+
export interface GetPendingTransactionsResponseDTO {
|
|
91
|
+
items: PendingTransfersResponseDTO[];
|
|
92
|
+
}
|
|
76
93
|
export interface GetPricesResponseDTO {
|
|
77
94
|
current?: string | null;
|
|
78
95
|
one_day_ago?: string | null;
|
|
@@ -99,6 +116,10 @@ export interface GetTransferPreApprovalResponseDTO {
|
|
|
99
116
|
receiverId: string;
|
|
100
117
|
templateId: string;
|
|
101
118
|
}
|
|
119
|
+
export interface GetTransfersHistoryResponseDTO {
|
|
120
|
+
items: TransferResponseDTO[];
|
|
121
|
+
totalAmount: number;
|
|
122
|
+
}
|
|
102
123
|
export interface InstructionSummaryDTO {
|
|
103
124
|
amount: string;
|
|
104
125
|
contract_id?: string | null;
|
|
@@ -135,6 +156,32 @@ export interface PayloadResponseDTO {
|
|
|
135
156
|
name: string;
|
|
136
157
|
subcategory: string;
|
|
137
158
|
}
|
|
159
|
+
export interface PendingTransfersResponseDTO {
|
|
160
|
+
amount: string;
|
|
161
|
+
coin: "CC" | "CBTC" | "USDCx";
|
|
162
|
+
/** @format date-time */
|
|
163
|
+
createdAt: string;
|
|
164
|
+
/** @format date-time */
|
|
165
|
+
expiredAt: string;
|
|
166
|
+
receiver: string;
|
|
167
|
+
sender: string;
|
|
168
|
+
status: "Pending" | "Accepted" | "Rejected";
|
|
169
|
+
transferCid: string;
|
|
170
|
+
}
|
|
171
|
+
export interface PrepareBatchTransferBodyDTO {
|
|
172
|
+
/** @format date-time */
|
|
173
|
+
expiryDate?: string;
|
|
174
|
+
memo?: string;
|
|
175
|
+
receivers: BatchTransferReceiverItemDTO[];
|
|
176
|
+
sender: string;
|
|
177
|
+
}
|
|
178
|
+
export interface PrepareBatchTransferResponseDTO {
|
|
179
|
+
hashingDetails: string;
|
|
180
|
+
hashingSchemeVersion: string;
|
|
181
|
+
preparedTransaction: string;
|
|
182
|
+
preparedTransactionHash: string;
|
|
183
|
+
submissionId: string;
|
|
184
|
+
}
|
|
138
185
|
export interface PrepareCancelTransferPreapprovalBodyDTO {
|
|
139
186
|
contractId: string;
|
|
140
187
|
partyId: string;
|
|
@@ -158,8 +205,16 @@ export interface PrepareExternalPartyBodyDTO {
|
|
|
158
205
|
export interface PrepareExternalPartyResponseDTO {
|
|
159
206
|
preparedParty: PreparedExternalPartyResponseDTO;
|
|
160
207
|
}
|
|
208
|
+
export interface PrepareMergeDelegationBodyDTO {
|
|
209
|
+
partyId: string;
|
|
210
|
+
}
|
|
211
|
+
export interface PrepareMergeDelegationResponseDTO {
|
|
212
|
+
preparedSubmission: PreparedSubmissionResponseDTO;
|
|
213
|
+
submissionId: string;
|
|
214
|
+
}
|
|
161
215
|
export interface PrepareResolveTransferBodyDTO {
|
|
162
216
|
choice: "Accept" | "Reject" | "Withdraw";
|
|
217
|
+
coin?: "CC" | "CBTC" | "USDCx";
|
|
163
218
|
partyId: string;
|
|
164
219
|
transferCid: string;
|
|
165
220
|
}
|
|
@@ -169,6 +224,7 @@ export interface PrepareResolveTransferResponseDTO {
|
|
|
169
224
|
}
|
|
170
225
|
export interface PrepareTransferBodyDTO {
|
|
171
226
|
amount: string;
|
|
227
|
+
coin?: "CC" | "CBTC" | "USDCx";
|
|
172
228
|
/** @format date-time */
|
|
173
229
|
expiryDate?: string;
|
|
174
230
|
memo?: string;
|
|
@@ -260,6 +316,14 @@ export interface SpentReceiverItemDTO {
|
|
|
260
316
|
amount: string;
|
|
261
317
|
receiver: string;
|
|
262
318
|
}
|
|
319
|
+
export interface SubmitBatchTransferBodyDTO {
|
|
320
|
+
preparedTransfer: PrepareTransferResponseDTO;
|
|
321
|
+
publicKey: string;
|
|
322
|
+
signature: string;
|
|
323
|
+
}
|
|
324
|
+
export interface SubmitBatchTransferResponseDTO {
|
|
325
|
+
ledgerEnd: number;
|
|
326
|
+
}
|
|
263
327
|
export interface SubmitCancelTransferPreapprovalBodyDTO {
|
|
264
328
|
partyId: string;
|
|
265
329
|
preparedSubmission: PreparedSubmissionBodyDTO;
|
|
@@ -289,16 +353,30 @@ export interface SubmitExternalPartyBodyDTO {
|
|
|
289
353
|
export interface SubmitExternalPartyResponseDTO {
|
|
290
354
|
partyId: string;
|
|
291
355
|
}
|
|
356
|
+
export interface SubmitMergeDelegationBodyDTO {
|
|
357
|
+
partyId: string;
|
|
358
|
+
preparedSubmission: PreparedSubmissionBodyDTO;
|
|
359
|
+
publicKey: string;
|
|
360
|
+
signature: string;
|
|
361
|
+
submissionId: string;
|
|
362
|
+
}
|
|
363
|
+
export interface SubmitMergeDelegationResponseDTO {
|
|
364
|
+
ledgerEnd: number;
|
|
365
|
+
}
|
|
292
366
|
export interface SubmitResolveTransferBodyDTO {
|
|
367
|
+
choice?: "Accept" | "Reject" | "Withdraw";
|
|
368
|
+
partyId?: string;
|
|
293
369
|
preparedSubmission: PreparedSubmissionBodyDTO;
|
|
294
370
|
publicKey: string;
|
|
295
371
|
signature: string;
|
|
296
372
|
submissionId: string;
|
|
373
|
+
transferCid?: string;
|
|
297
374
|
}
|
|
298
375
|
export interface SubmitResolveTransferResponseDTO {
|
|
299
376
|
ledgerEnd: number;
|
|
300
377
|
}
|
|
301
378
|
export interface SubmitTransferBodyDTO {
|
|
379
|
+
partyId?: string;
|
|
302
380
|
preparedTransfer: PrepareTransferResponseDTO;
|
|
303
381
|
publicKey: string;
|
|
304
382
|
signature: string;
|
|
@@ -359,6 +437,21 @@ export interface TransferPreApprovedInstructionDTO {
|
|
|
359
437
|
spent: SpentDTO;
|
|
360
438
|
summary: InstructionSummaryDTO;
|
|
361
439
|
}
|
|
440
|
+
export interface TransferResponseDTO {
|
|
441
|
+
amount: string;
|
|
442
|
+
coin: "CC" | "CBTC" | "USDCx";
|
|
443
|
+
contractId: string;
|
|
444
|
+
/** @format date-time */
|
|
445
|
+
createdAt: string;
|
|
446
|
+
holdingFee: string;
|
|
447
|
+
id: number;
|
|
448
|
+
outputFee: string;
|
|
449
|
+
receiver: string;
|
|
450
|
+
sender: string;
|
|
451
|
+
senderFee: string;
|
|
452
|
+
status: "Pending" | "Accepted" | "Rejected";
|
|
453
|
+
type: "Instruction" | "Transfer";
|
|
454
|
+
}
|
|
362
455
|
export interface TransferStepDTO {
|
|
363
456
|
event_id: string;
|
|
364
457
|
record_time: string;
|
|
@@ -488,6 +581,32 @@ export declare class WalletApi<SecurityDataType extends unknown> extends HttpCli
|
|
|
488
581
|
* @request POST:/api/v1/invitations/verification
|
|
489
582
|
*/
|
|
490
583
|
invitationsControllerVerifyInvitation: (data: VerifyInvitationBodyDTO, params?: RequestParams) => Promise<VerifyInvitationResponseDTO>;
|
|
584
|
+
/**
|
|
585
|
+
* No description
|
|
586
|
+
*
|
|
587
|
+
* @tags token-standard/merge-delegation
|
|
588
|
+
* @name MergeDelegationControllerGetMergeUtxosStatus
|
|
589
|
+
* @request GET:/api/v1/token-standard/merge-delegation/status
|
|
590
|
+
*/
|
|
591
|
+
mergeDelegationControllerGetMergeUtxosStatus: (query: {
|
|
592
|
+
partyId: string;
|
|
593
|
+
}, params?: RequestParams) => Promise<GetMergeUtxosStatusResponseDTO>;
|
|
594
|
+
/**
|
|
595
|
+
* No description
|
|
596
|
+
*
|
|
597
|
+
* @tags token-standard/merge-delegation
|
|
598
|
+
* @name MergeDelegationControllerPrepareMergeDelegation
|
|
599
|
+
* @request POST:/api/v1/token-standard/merge-delegation/prepare
|
|
600
|
+
*/
|
|
601
|
+
mergeDelegationControllerPrepareMergeDelegation: (data: PrepareMergeDelegationBodyDTO, params?: RequestParams) => Promise<PrepareMergeDelegationResponseDTO>;
|
|
602
|
+
/**
|
|
603
|
+
* No description
|
|
604
|
+
*
|
|
605
|
+
* @tags token-standard/merge-delegation
|
|
606
|
+
* @name MergeDelegationControllerSubmitMergeDelegation
|
|
607
|
+
* @request POST:/api/v1/token-standard/merge-delegation/submit
|
|
608
|
+
*/
|
|
609
|
+
mergeDelegationControllerSubmitMergeDelegation: (data: SubmitMergeDelegationBodyDTO, params?: RequestParams) => Promise<SubmitMergeDelegationResponseDTO>;
|
|
491
610
|
/**
|
|
492
611
|
* No description
|
|
493
612
|
*
|
|
@@ -552,6 +671,16 @@ export declare class WalletApi<SecurityDataType extends unknown> extends HttpCli
|
|
|
552
671
|
* @request POST:/api/v1/token-standard/tap
|
|
553
672
|
*/
|
|
554
673
|
tokenStandardControllerCreateTap: (data: CreateTapDTO, params?: RequestParams) => Promise<void>;
|
|
674
|
+
/**
|
|
675
|
+
* No description
|
|
676
|
+
*
|
|
677
|
+
* @tags token-standard
|
|
678
|
+
* @name TokenStandardControllerGetBalances
|
|
679
|
+
* @request GET:/api/v1/token-standard/balances
|
|
680
|
+
*/
|
|
681
|
+
tokenStandardControllerGetBalances: (query: {
|
|
682
|
+
partyId: string;
|
|
683
|
+
}, params?: RequestParams) => Promise<CoinsBalancesResponseDTO>;
|
|
555
684
|
/**
|
|
556
685
|
* No description
|
|
557
686
|
*
|
|
@@ -562,6 +691,16 @@ export declare class WalletApi<SecurityDataType extends unknown> extends HttpCli
|
|
|
562
691
|
tokenStandardControllerGetPendingTransactions: (query: {
|
|
563
692
|
partyId: string;
|
|
564
693
|
}, params?: RequestParams) => Promise<GetPendingTransactionsResponseDTO>;
|
|
694
|
+
/**
|
|
695
|
+
* No description
|
|
696
|
+
*
|
|
697
|
+
* @tags token-standard
|
|
698
|
+
* @name TokenStandardControllerGetPendingTransactionsFull
|
|
699
|
+
* @request GET:/api/v1/token-standard/transactions/pending/full
|
|
700
|
+
*/
|
|
701
|
+
tokenStandardControllerGetPendingTransactionsFull: (query: {
|
|
702
|
+
partyId: string;
|
|
703
|
+
}, params?: RequestParams) => Promise<GetPendingTransactionsFullResponseDTO>;
|
|
565
704
|
/**
|
|
566
705
|
* No description
|
|
567
706
|
*
|
|
@@ -582,6 +721,14 @@ export declare class WalletApi<SecurityDataType extends unknown> extends HttpCli
|
|
|
582
721
|
transferControllerGetTransferPreApproval: (query: {
|
|
583
722
|
partyId: string;
|
|
584
723
|
}, params?: RequestParams) => Promise<GetTransferPreApprovalResponseDTO>;
|
|
724
|
+
/**
|
|
725
|
+
* No description
|
|
726
|
+
*
|
|
727
|
+
* @tags token-standard/transfer
|
|
728
|
+
* @name TransferControllerPrepareBatchTransfer
|
|
729
|
+
* @request POST:/api/v1/token-standard/transfer/batch/prepare
|
|
730
|
+
*/
|
|
731
|
+
transferControllerPrepareBatchTransfer: (data: PrepareBatchTransferBodyDTO, params?: RequestParams) => Promise<PrepareBatchTransferResponseDTO>;
|
|
585
732
|
/**
|
|
586
733
|
* No description
|
|
587
734
|
*
|
|
@@ -598,6 +745,14 @@ export declare class WalletApi<SecurityDataType extends unknown> extends HttpCli
|
|
|
598
745
|
* @request POST:/api/v1/token-standard/transfer/prepare
|
|
599
746
|
*/
|
|
600
747
|
transferControllerPrepareTransfer: (data: PrepareTransferBodyDTO, params?: RequestParams) => Promise<PrepareTransferResponseDTO>;
|
|
748
|
+
/**
|
|
749
|
+
* No description
|
|
750
|
+
*
|
|
751
|
+
* @tags token-standard/transfer
|
|
752
|
+
* @name TransferControllerSubmitBatchTransfer
|
|
753
|
+
* @request POST:/api/v1/token-standard/transfer/batch/submit
|
|
754
|
+
*/
|
|
755
|
+
transferControllerSubmitBatchTransfer: (data: SubmitBatchTransferBodyDTO, params?: RequestParams) => Promise<SubmitBatchTransferResponseDTO>;
|
|
601
756
|
/**
|
|
602
757
|
* No description
|
|
603
758
|
*
|
|
@@ -626,6 +781,39 @@ export declare class WalletApi<SecurityDataType extends unknown> extends HttpCli
|
|
|
626
781
|
ledgerEnd: number;
|
|
627
782
|
partyId: string;
|
|
628
783
|
}, params?: RequestParams) => Promise<WaitForTxCompletionResponseDTO>;
|
|
784
|
+
/**
|
|
785
|
+
* No description
|
|
786
|
+
*
|
|
787
|
+
* @tags token-standard/transfer
|
|
788
|
+
* @name TransferHistoryControllerGetTransfer
|
|
789
|
+
* @request GET:/api/v1/token-standard/transfer/history/{id}
|
|
790
|
+
*/
|
|
791
|
+
transferHistoryControllerGetTransfer: (id: number, params?: RequestParams) => Promise<TransferResponseDTO>;
|
|
792
|
+
/**
|
|
793
|
+
* No description
|
|
794
|
+
*
|
|
795
|
+
* @tags token-standard/transfer
|
|
796
|
+
* @name TransferHistoryControllerGetTransfers
|
|
797
|
+
* @request GET:/api/v1/token-standard/transfer/history
|
|
798
|
+
*/
|
|
799
|
+
transferHistoryControllerGetTransfers: (query: {
|
|
800
|
+
/** @example "CC" */
|
|
801
|
+
coin: "CC" | "CBTC" | "USDCx";
|
|
802
|
+
filter?: "ALL" | "Pending" | "Accepted" | "Rejected";
|
|
803
|
+
/**
|
|
804
|
+
* @min 0
|
|
805
|
+
* @example 10
|
|
806
|
+
*/
|
|
807
|
+
limit?: number;
|
|
808
|
+
/**
|
|
809
|
+
* @min 0
|
|
810
|
+
* @example 0
|
|
811
|
+
*/
|
|
812
|
+
offset?: number;
|
|
813
|
+
partyId: string;
|
|
814
|
+
sortBy?: "createdAt";
|
|
815
|
+
sortDirection?: "ASC" | "DESC";
|
|
816
|
+
}, params?: RequestParams) => Promise<GetTransfersHistoryResponseDTO>;
|
|
629
817
|
/**
|
|
630
818
|
* No description
|
|
631
819
|
*
|