@fairmint/canton-node-sdk 0.0.289 → 0.0.290
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 +91 -5
- package/build/src/wallets/commands.d.ts +5 -0
- package/build/src/wallets/commands.d.ts.map +1 -1
- package/build/src/wallets/commands.js +23 -7
- package/build/src/wallets/commands.js.map +1 -1
- package/build/src/wallets/contracts.d.ts +24 -0
- package/build/src/wallets/contracts.d.ts.map +1 -1
- package/build/src/wallets/contracts.js +15 -0
- package/build/src/wallets/contracts.js.map +1 -1
- package/build/src/wallets/holdings.d.ts +21 -0
- package/build/src/wallets/holdings.d.ts.map +1 -1
- package/build/src/wallets/holdings.js +1 -0
- package/build/src/wallets/holdings.js.map +1 -1
- package/build/src/wallets/index.d.ts +9 -2
- package/build/src/wallets/index.d.ts.map +1 -1
- package/build/src/wallets/index.js +13 -1
- package/build/src/wallets/index.js.map +1 -1
- package/build/src/wallets/store.d.ts +16 -1
- package/build/src/wallets/store.d.ts.map +1 -1
- package/build/src/wallets/store.js +67 -2
- package/build/src/wallets/store.js.map +1 -1
- package/build/src/wallets/tokens.d.ts +120 -0
- package/build/src/wallets/tokens.d.ts.map +1 -0
- package/build/src/wallets/tokens.js +166 -0
- package/build/src/wallets/tokens.js.map +1 -0
- package/build/src/wallets/wallet.d.ts +51 -1
- package/build/src/wallets/wallet.d.ts.map +1 -1
- package/build/src/wallets/wallet.js +127 -6
- package/build/src/wallets/wallet.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,8 +100,9 @@ works). The package root also exports it as the `Wallets` namespace.
|
|
|
100
100
|
- `createWallet({ provider, partyId, network })`: the same actions for one party, without the store.
|
|
101
101
|
|
|
102
102
|
The actions are `acceptMintOffer`, `rejectMintOffer`, `acceptTransferOffer`, `rejectTransferOffer`,
|
|
103
|
-
`withdrawTransferOffer`, `
|
|
104
|
-
`
|
|
103
|
+
`withdrawTransferOffer`, `withdrawExpiredTransferOffers`, `reclaimLockedTokens`, `requestBurn`,
|
|
104
|
+
`cancelBurnRequest`, `planTransfer` then `submitTransfer`, `createTransferPreapproval`,
|
|
105
|
+
`removeTransferPreapproval` and `proveOwnership`.
|
|
105
106
|
|
|
106
107
|
```ts
|
|
107
108
|
// Offer the installed wallets, then connect the one the user picks.
|
|
@@ -208,7 +209,7 @@ if (plan !== null && confirm(plan.description)) await store.act({ type: 'submitT
|
|
|
208
209
|
`requirePreapproval: true` refuses anything but `direct` before anything is signed, and
|
|
209
210
|
`submitTransfer` refuses with `kind-changed` when the registry now answers another kind. An offer
|
|
210
211
|
keeps the sender's tokens locked until it is accepted, rejected or withdrawn; expiry alone does
|
|
211
|
-
not unlock them.
|
|
212
|
+
not unlock them (see [Expired offers](#expired-offers)).
|
|
212
213
|
- A plan, and every write, belongs to the connected wallet that made it: once the session switched
|
|
213
214
|
account or disconnected, it is refused before anything is read or signed. `submitTransfer` sends
|
|
214
215
|
only a plan the same store planned for its current wallet.
|
|
@@ -235,6 +236,88 @@ if (plan !== null && confirm(plan.description)) await store.act({ type: 'submitT
|
|
|
235
236
|
- Wallet discovery follows the Canton dApp SDK's announce handshake; a CIP that standardizes
|
|
236
237
|
discovery is still a draft, so `discoverCip103Wallets` will follow it once it settles.
|
|
237
238
|
|
|
239
|
+
### One panel per token
|
|
240
|
+
|
|
241
|
+
`walletTokens(view.state)` gives one entry per token the state names, Canton Coin and DA Registry
|
|
242
|
+
tokens in the same shape, so a page renders one token picker and one panel whatever the token. A
|
|
243
|
+
token the party is only offered (a mint offer or an incoming transfer before its first holding) is
|
|
244
|
+
listed too, with zero balances. Entries are sorted by `symbol`, then instrument id and admin.
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
import { walletTokens } from '@fairmint/canton-node-sdk/wallets';
|
|
248
|
+
|
|
249
|
+
const tokens = view.state === null ? [] : walletTokens(view.state);
|
|
250
|
+
// Picker: tokens.map((t) => <option key={t.key} value={t.key}>{t.symbol}</option>)
|
|
251
|
+
const token = tokens.find((t) => t.key === selectedKey) ?? tokens[0];
|
|
252
|
+
// token.available, token.locked, token.lockedReclaimable, token.canReclaim, token.decimals
|
|
253
|
+
// token.offers.{incoming, outgoing, expiredIncoming, expiredOutgoing}, token.mintOffers, token.burnRequests
|
|
254
|
+
// token.preapproval: the party's DA preapproval covering it, or null
|
|
255
|
+
// token.preapprovalStatus: 'covered' | 'none' | 'unknown' (Canton Coin)
|
|
256
|
+
// token.capabilities: { send, burn, preapprove, answerOffers, withdrawOffers, answerMintOffers }
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
- `symbol`, `name` and `decimals` are the registry's metadata (`CC` and `Canton Coin` for Canton
|
|
260
|
+
Coin, also when the party is only offered it), else the instrument id and 10 decimals.
|
|
261
|
+
- `offers.expiredIncoming` lists the incoming offers the party can no longer accept (the ledger
|
|
262
|
+
refuses it; rejecting still works): hide Accept on them.
|
|
263
|
+
- `capabilities` says what this wallet can do with the token today. For Canton Coin, `send`, `burn`,
|
|
264
|
+
`preapprove` and `answerMintOffers` are false (see [Canton Coin](#canton-coin)); answering
|
|
265
|
+
incoming offers and withdrawing its own are true. For a DA Registry token all are true.
|
|
266
|
+
- `preapproval` uses `coveringPreapproval(existing, { instrumentAdmin, instrumentIds })`, the same
|
|
267
|
+
rule `createTransferPreapproval` refuses with `already-exists` by: an issuer-wide preapproval
|
|
268
|
+
covers everything of its admin; one that lists ids covers a request whose ids it all names (never
|
|
269
|
+
an issuer-wide request). Use it to hide or disable a pre-approve button. For Canton Coin
|
|
270
|
+
`preapproval` is null and `preapprovalStatus` is `unknown`: its preapproval is a DSO-signed Splice
|
|
271
|
+
`TransferPreapproval` made through the party's validator, which this wallet does not read, so do
|
|
272
|
+
not say the party has none.
|
|
273
|
+
|
|
274
|
+
### Expired offers
|
|
275
|
+
|
|
276
|
+
A transfer offer's `executeBefore` only stops the receiver accepting it: the sender's tokens stay
|
|
277
|
+
locked until the sender withdraws it (or the receiver rejects it). `loadState` marks every offer
|
|
278
|
+
`expired` when its `executeBefore` has passed by the wallet's clock (the ledger decides by ledger
|
|
279
|
+
time, which can differ by a little), and each balance's `lockedInExpiredOffers` is the part of
|
|
280
|
+
`locked` that the party's own expired offers keep locked (`lockedReclaimable` in `walletTokens`).
|
|
281
|
+
|
|
282
|
+
```ts
|
|
283
|
+
if (token.canReclaim) {
|
|
284
|
+
// Button: `Reclaim ${token.lockedReclaimable} ${token.symbol}`
|
|
285
|
+
await store.act({ type: 'reclaimLockedTokens', instrumentId: token.instrumentId });
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- `reclaimLockedTokens` unlocks everything of the token that no longer needs to be locked: it
|
|
290
|
+
withdraws the expired outgoing offers (below), then, for Canton Coin, releases each of the party's
|
|
291
|
+
own expired locks that no active offer names (`LockedAmulet_OwnerExpireLockV2`, which Splice lets
|
|
292
|
+
the owner alone run once `expiresAt` passed; a lock left after its offer is gone, for example from
|
|
293
|
+
an earlier run). `InstrumentBalance.lockedInExpiredLocks` is what those locks hold;
|
|
294
|
+
`lockedReclaimable` is both parts, capped at `locked`. `withdrawExpiredTransferOffers` does the
|
|
295
|
+
offers only.
|
|
296
|
+
- Both stop at the first failed submission. A failure before anything committed is thrown as usual;
|
|
297
|
+
after that, the call resolves with what committed (`withdrawn`, `released`), the failure
|
|
298
|
+
(`failed: { contractId, error }`, an `unknown` outcome included) and what it did not get to
|
|
299
|
+
(`notAttempted`). The store reports such a result as a failure whose message names what committed,
|
|
300
|
+
and an unknown outcome still locks writes until acknowledged.
|
|
301
|
+
|
|
302
|
+
- `withdrawExpiredTransferOffers` withdraws every expired outgoing offer of the token, oldest
|
|
303
|
+
deadline first, one `TransferInstruction_Withdraw` submission each, exactly as
|
|
304
|
+
`withdrawTransferOffer` sends it, with the choice context of the offer's own registry (Scan for
|
|
305
|
+
Canton Coin, DA's Utilities API for a DA token). It resolves with the offers withdrawn and is
|
|
306
|
+
refused with `not-found` when there is none.
|
|
307
|
+
- Canton Coin (checked against Splice's `AmuletTransferInstruction` and Scan's choice-context
|
|
308
|
+
handler): `TransferInstruction_Withdraw` has no deadline check, and Scan's withdraw context sets
|
|
309
|
+
`expire-lock` to whether the offer's `LockedAmulet` is still active. While it is, the withdrawal
|
|
310
|
+
unlocks it (`LockedAmulet_UnlockV2`, which the DSO's signature on the offer authorizes), so it
|
|
311
|
+
works on an expired offer. When the lock was already released (its owner ran
|
|
312
|
+
`LockedAmulet_OwnerExpireLockV2` after the lock's expiry), the withdrawal only archives the
|
|
313
|
+
expired offer. `lockedInExpiredOffers` counts the `LockedAmulet`'s own amount (which can exceed
|
|
314
|
+
the offered amount), and nothing once it is gone.
|
|
315
|
+
- DA tokens: DA's `TransferOffer` implements the same CIP-56 `TransferInstruction_Withdraw`
|
|
316
|
+
(controller: the sender), and the wallet asks DA's registry for its withdraw context. DA's
|
|
317
|
+
contract source is not public, so the reclaimable amount is an estimate: each expired offer's
|
|
318
|
+
amount (capped at the token's locked total), since its create argument names no locked holding.
|
|
319
|
+
Withdrawing still archives the expired offer either way.
|
|
320
|
+
|
|
238
321
|
### Canton Coin
|
|
239
322
|
|
|
240
323
|
Canton Coin is on by default: a wallet lists the party's Canton Coin with its other tokens and
|
|
@@ -307,8 +390,11 @@ const store = createWalletStore({
|
|
|
307
390
|
|
|
308
391
|
- New fields stay optional for objects built by hand: `Holding.source` and
|
|
309
392
|
`InstrumentBalance.source` (absent reads as `'da-registry'`), `TransferOffer.registry` (absent:
|
|
310
|
-
`'da'`), `
|
|
311
|
-
`
|
|
393
|
+
`'da'`), `TransferOffer.expired` (absent: not expired), `TransferOffer.lockedHoldingCid`,
|
|
394
|
+
`InstrumentBalance.lockedInExpiredOffers` and `.lockedInExpiredLocks`, `Holding.lockExpiresAt`,
|
|
395
|
+
`MintOffer.memo` and `BurnRequest.memo` (absent: `null`) and `WalletState.cantonCoinUnavailable`.
|
|
396
|
+
The wallet always sets them (`lockedHoldingCid` only for a Canton Coin offer, `lockExpiresAt` only
|
|
397
|
+
for a Canton Coin lock with an absolute expiry).
|
|
312
398
|
- To send Canton Coin from a provider validator (a faucet), use
|
|
313
399
|
`ExternalPartyWalletBridge.offerProviderTransfer({ receiverPartyId, amount, idempotencyKey, expiresAt })`:
|
|
314
400
|
it settles at once when the receiver pre-approved Canton Coin, else it lands as an offer in the
|
|
@@ -71,6 +71,11 @@ export declare function transferCommand(params: {
|
|
|
71
71
|
}): ExerciseCommand;
|
|
72
72
|
/** Accept or reject (receiver) or withdraw (sender) a pending CIP-56 transfer, on the TransferInstruction interface. */
|
|
73
73
|
export declare function transferInstructionCommand(transferInstructionCid: string, action: TransferInstructionAction, context: ChoiceContextData): ExerciseCommand;
|
|
74
|
+
/**
|
|
75
|
+
* Release one of the owner's own expired Canton Coin locks: Splice's `LockedAmulet_OwnerExpireLockV2` (no argument;
|
|
76
|
+
* controller the owner; it asserts the lock's `expiresAt` passed, then creates the unlocked `Amulet`).
|
|
77
|
+
*/
|
|
78
|
+
export declare function ownerExpireLockCommand(lockedAmuletCid: string): ExerciseCommand;
|
|
74
79
|
/** DA allows up to 10 instrument ids per preapproval; an empty list covers every instrument of the admin. */
|
|
75
80
|
export declare const MAX_PREAPPROVAL_INSTRUMENTS = 10;
|
|
76
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/wallets/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/wallets/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAQzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MA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gB,kCAAkC,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,CASzG"}
|
|
@@ -8,10 +8,12 @@ exports.cancelBurnRequestCommand = cancelBurnRequestCommand;
|
|
|
8
8
|
exports.requestBurnCommand = requestBurnCommand;
|
|
9
9
|
exports.transferCommand = transferCommand;
|
|
10
10
|
exports.transferInstructionCommand = transferInstructionCommand;
|
|
11
|
+
exports.ownerExpireLockCommand = ownerExpireLockCommand;
|
|
11
12
|
exports.createDaTransferPreapprovalCommand = createDaTransferPreapprovalCommand;
|
|
12
13
|
exports.withdrawTransferPreapprovalCommand = withdrawTransferPreapprovalCommand;
|
|
14
|
+
const constants_1 = require("./amulet/constants");
|
|
13
15
|
const templates_1 = require("../da-registry/templates");
|
|
14
|
-
const
|
|
16
|
+
const constants_2 = require("../utils/token-standard/v1/constants");
|
|
15
17
|
/** Splice `ExtraArgs`: the registry's context, unchanged, and empty metadata. */
|
|
16
18
|
function extraArgs(context) {
|
|
17
19
|
return { context: { values: context.values }, meta: { values: {} } };
|
|
@@ -92,9 +94,9 @@ function transferCommand(params) {
|
|
|
92
94
|
const { transfer } = params;
|
|
93
95
|
return {
|
|
94
96
|
ExerciseCommand: {
|
|
95
|
-
templateId:
|
|
97
|
+
templateId: constants_2.TOKEN_STANDARD_V1_TRANSFER_FACTORY_INTERFACE_ID,
|
|
96
98
|
contractId: params.factoryId,
|
|
97
|
-
choice:
|
|
99
|
+
choice: constants_2.TokenStandardV1Choice.transfer,
|
|
98
100
|
choiceArgument: {
|
|
99
101
|
expectedAdmin: params.expectedAdmin,
|
|
100
102
|
transfer: {
|
|
@@ -113,21 +115,35 @@ function transferCommand(params) {
|
|
|
113
115
|
};
|
|
114
116
|
}
|
|
115
117
|
const TRANSFER_INSTRUCTION_CHOICES = {
|
|
116
|
-
accept:
|
|
117
|
-
reject:
|
|
118
|
-
withdraw:
|
|
118
|
+
accept: constants_2.TokenStandardV1Choice.transferInstructionAccept,
|
|
119
|
+
reject: constants_2.TokenStandardV1Choice.transferInstructionReject,
|
|
120
|
+
withdraw: constants_2.TokenStandardV1Choice.transferInstructionWithdraw,
|
|
119
121
|
};
|
|
120
122
|
/** Accept or reject (receiver) or withdraw (sender) a pending CIP-56 transfer, on the TransferInstruction interface. */
|
|
121
123
|
function transferInstructionCommand(transferInstructionCid, action, context) {
|
|
122
124
|
return {
|
|
123
125
|
ExerciseCommand: {
|
|
124
|
-
templateId:
|
|
126
|
+
templateId: constants_2.TOKEN_STANDARD_V1_TRANSFER_INSTRUCTION_INTERFACE_ID,
|
|
125
127
|
contractId: transferInstructionCid,
|
|
126
128
|
choice: TRANSFER_INSTRUCTION_CHOICES[action],
|
|
127
129
|
choiceArgument: { extraArgs: extraArgs(context) },
|
|
128
130
|
},
|
|
129
131
|
};
|
|
130
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Release one of the owner's own expired Canton Coin locks: Splice's `LockedAmulet_OwnerExpireLockV2` (no argument;
|
|
135
|
+
* controller the owner; it asserts the lock's `expiresAt` passed, then creates the unlocked `Amulet`).
|
|
136
|
+
*/
|
|
137
|
+
function ownerExpireLockCommand(lockedAmuletCid) {
|
|
138
|
+
return {
|
|
139
|
+
ExerciseCommand: {
|
|
140
|
+
templateId: constants_1.AMULET_TEMPLATES.lockedAmulet,
|
|
141
|
+
contractId: lockedAmuletCid,
|
|
142
|
+
choice: 'LockedAmulet_OwnerExpireLockV2',
|
|
143
|
+
choiceArgument: {},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
131
147
|
/** DA allows up to 10 instrument ids per preapproval; an empty list covers every instrument of the admin. */
|
|
132
148
|
exports.MAX_PREAPPROVAL_INSTRUMENTS = 10;
|
|
133
149
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/wallets/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/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AC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;aACjE;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,4CAAmD,cAAsB,EAAE,KAAa;IACtF,OAAO;QACL,eAAe,EAAE;YACf,UAAU,EAAE,iCAAqB,CAAC,mBAAmB;YACrD,UAAU,EAAE,cAAc;YAC1B,MAAM,EAAE,8BAA8B;YACtC,cAAc,EAAE,EAAE,KAAK,EAAE;SAC1B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -41,6 +41,17 @@ export interface TransferOffer extends RegistryParties {
|
|
|
41
41
|
readonly memo: string | null;
|
|
42
42
|
readonly requestedAt: string;
|
|
43
43
|
readonly executeBefore: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether `executeBefore` had passed, by the wallet's clock, when the state was read: the receiver can no longer
|
|
46
|
+
* accept it, but the sender's tokens stay locked until the sender withdraws it (or the receiver rejects it). Set by
|
|
47
|
+
* `loadState`; absent on an offer read another way, which reads as not expired.
|
|
48
|
+
*/
|
|
49
|
+
readonly expired?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The holding the offer locked, when the offer names it: a Canton Coin offer's `LockedAmulet`. Absent for DA offers,
|
|
52
|
+
* whose create argument names no locked holding.
|
|
53
|
+
*/
|
|
54
|
+
readonly lockedHoldingCid?: string;
|
|
44
55
|
}
|
|
45
56
|
export interface BurnRequest extends RegistryParties {
|
|
46
57
|
readonly contractId: string;
|
|
@@ -68,6 +79,19 @@ export interface TransferPreapproval {
|
|
|
68
79
|
/** The instruments it covers; empty: every instrument of `instrumentAdmin`. */
|
|
69
80
|
readonly instrumentIds: readonly string[];
|
|
70
81
|
}
|
|
82
|
+
/** What a transfer preapproval covers: an instrument admin and its instrument ids (empty: every instrument of it). */
|
|
83
|
+
export interface PreapprovalScope {
|
|
84
|
+
readonly instrumentAdmin: string;
|
|
85
|
+
/** Empty: every instrument of `instrumentAdmin`. */
|
|
86
|
+
readonly instrumentIds: readonly string[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The first of `existing` that already covers `request`, or null: a preapproval covers a request of its own admin when
|
|
90
|
+
* it covers every instrument of the admin (empty `instrumentIds`), or when the request lists instrument ids and it
|
|
91
|
+
* names them all. An issuer-wide request is covered only by an issuer-wide preapproval. This is the rule
|
|
92
|
+
* `createTransferPreapproval` refuses with `already-exists` by; a page can use it to hide or disable the button.
|
|
93
|
+
*/
|
|
94
|
+
export declare function coveringPreapproval<T extends PreapprovalScope>(existing: readonly T[], request: PreapprovalScope): T | null;
|
|
71
95
|
/**
|
|
72
96
|
* A DA `MintOffer` (`{operator, provider, mint: {instrumentId, amount, holder, reference, requestedAt, executeBefore,
|
|
73
97
|
* meta}}`). `memo` is the mint's `meta` reason, the same key a transfer's memo uses.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/wallets/contracts.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5D,UAAU,eAAe;IACvB,2BAA2B;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qHAAqH;IACrH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,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AE,eAAe,GAAG;IAAE,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAA;CAAE,EACnE,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,UAAU,EAAE,MAAM,EAClB,kBAAkB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,GACjE,OAAO,CAMT"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.coveringPreapproval = coveringPreapproval;
|
|
3
4
|
exports.parseMintOffer = parseMintOffer;
|
|
4
5
|
exports.parseTransferOffer = parseTransferOffer;
|
|
5
6
|
exports.parseAmuletTransferOffer = parseAmuletTransferOffer;
|
|
@@ -17,6 +18,18 @@ const json_1 = require("./json");
|
|
|
17
18
|
const templates_1 = require("../da-registry/templates");
|
|
18
19
|
const templates_2 = require("./templates");
|
|
19
20
|
const constants_2 = require("../utils/token-standard/v1/constants");
|
|
21
|
+
/**
|
|
22
|
+
* The first of `existing` that already covers `request`, or null: a preapproval covers a request of its own admin when
|
|
23
|
+
* it covers every instrument of the admin (empty `instrumentIds`), or when the request lists instrument ids and it
|
|
24
|
+
* names them all. An issuer-wide request is covered only by an issuer-wide preapproval. This is the rule
|
|
25
|
+
* `createTransferPreapproval` refuses with `already-exists` by; a page can use it to hide or disable the button.
|
|
26
|
+
*/
|
|
27
|
+
function coveringPreapproval(existing, request) {
|
|
28
|
+
return (existing.find((candidate) => candidate.instrumentAdmin === request.instrumentAdmin &&
|
|
29
|
+
(candidate.instrumentIds.length === 0 ||
|
|
30
|
+
(request.instrumentIds.length > 0 &&
|
|
31
|
+
request.instrumentIds.every((id) => candidate.instrumentIds.includes(id))))) ?? null);
|
|
32
|
+
}
|
|
20
33
|
/** Fields that must all be non-empty strings, or null. */
|
|
21
34
|
function strings(source, keys) {
|
|
22
35
|
const result = {};
|
|
@@ -104,6 +117,7 @@ function parseAmuletTransferOffer(contract, dsoParty) {
|
|
|
104
117
|
return null;
|
|
105
118
|
if (!contract.signatories.includes(dsoParty) || !contract.signatories.includes(fields.sender))
|
|
106
119
|
return null;
|
|
120
|
+
const lockedHoldingCid = (0, json_1.nonEmptyString)(args['lockedAmulet']);
|
|
107
121
|
return {
|
|
108
122
|
registry: 'amulet',
|
|
109
123
|
contractId: contract.contractId,
|
|
@@ -112,6 +126,7 @@ function parseAmuletTransferOffer(contract, dsoParty) {
|
|
|
112
126
|
...fields,
|
|
113
127
|
instrumentId,
|
|
114
128
|
memo: reasonMemo(transfer),
|
|
129
|
+
...(lockedHoldingCid !== undefined && { lockedHoldingCid }),
|
|
115
130
|
};
|
|
116
131
|
}
|
|
117
132
|
/** A DA `BurnRequest` (`{operator, provider, burn: {..., meta}, lockedHoldingCid}`); `memo` is the burn's `meta` reason. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/wallets/contracts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/wallets/contracts.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;GAIG;AACH,kDAA4E;AAC5E,6CAAgD;AAChD,iCAAkD;AAClD,wDAAiE;AACjE,2CAAyC;AAEzC,oEAAyF;AA+FzF;;;;;GAKG;AACH,6BACE,QAAsB,EACtB,OAAyB;IAEzB,OAAO,CACL,QAAQ,CAAC,IAAI,CACX,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,eAAe,KAAK,OAAO,CAAC,eAAe;QACrD,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC;YACnC,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;gBAC/B,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAClF,IA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,QAAQ,CAAC;QAC3E,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACxC,CAAC;AACJ,CAAC"}
|
|
@@ -18,6 +18,12 @@ export interface Holding {
|
|
|
18
18
|
readonly amount: string;
|
|
19
19
|
/** Locked to an allocation, a burn request or a transfer in flight: it cannot be spent. */
|
|
20
20
|
readonly locked: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* When the lock expires (ISO 8601), for a locked holding whose lock has an absolute expiry: Canton Coin's
|
|
23
|
+
* `LockedAmulet`, from its `HoldingV1` view. After it, the owner alone can release the lock
|
|
24
|
+
* (`LockedAmulet_OwnerExpireLockV2`; see `Wallet.reclaimLockedTokens`). Absent for DA holdings.
|
|
25
|
+
*/
|
|
26
|
+
readonly lockExpiresAt?: string;
|
|
21
27
|
/** The synchronizer the holding is assigned to, when the ledger reported it. Inputs never mix synchronizers. */
|
|
22
28
|
readonly synchronizerId?: string;
|
|
23
29
|
/**
|
|
@@ -84,6 +90,21 @@ export interface InstrumentBalance {
|
|
|
84
90
|
readonly unlocked: string;
|
|
85
91
|
/** The total locked to a burn request, an allocation or a transfer in flight, with 10 decimal places. */
|
|
86
92
|
readonly locked: string;
|
|
93
|
+
/**
|
|
94
|
+
* The part of `locked` held by the party's own expired transfer offers of the instrument (10 decimal places): no
|
|
95
|
+
* receiver can accept them any more, so withdrawing them (`withdrawExpiredTransferOffers`) unlocks it. Set by
|
|
96
|
+
* `loadState` (`'0.0000000000'` when there is none); absent on a balance built another way. Exact for Canton Coin
|
|
97
|
+
* (the offer's own `LockedAmulet`); an estimate for a DA token, whose offer names no locked holding: each expired
|
|
98
|
+
* offer's amount, capped at `locked`.
|
|
99
|
+
*/
|
|
100
|
+
readonly lockedInExpiredOffers?: string;
|
|
101
|
+
/**
|
|
102
|
+
* The part of `locked` in the party's own Canton Coin locks that expired and that no active transfer offer names (an
|
|
103
|
+
* offer already gone, a lock left from an earlier run): the owner alone can release them (`reclaimLockedTokens`). Set
|
|
104
|
+
* by `loadState` (`'0.0000000000'` when there is none, and always for a DA token); absent on a balance built another
|
|
105
|
+
* way.
|
|
106
|
+
*/
|
|
107
|
+
readonly lockedInExpiredLocks?: string;
|
|
87
108
|
/** How many holdings (locked ones included) make up the totals. */
|
|
88
109
|
readonly holdingCount: number;
|
|
89
110
|
/** The registry's metadata of the instrument; absent when the registry did not answer it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holdings.d.ts","sourceRoot":"","sources":["../../../src/wallets/holdings.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,gHAAgH;IAChH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAClD;
|
|
1
|
+
{"version":3,"file":"holdings.d.ts","sourceRoot":"","sources":["../../../src/wallets/holdings.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,QAAQ,CAAC;AAErD,MAA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lock?.expiresAt != null && { lockExpiresAt: view.lock.expiresAt }),
|
|
85
86
|
...synchronizerOf(contract),
|
|
86
87
|
source: 'amulet',
|
|
87
88
|
meta: view.meta.values,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holdings.js","sourceRoot":"","sources":["../../../src/wallets/holdings.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;GAGG;AACH,kDAA4E;AAC5E,uCAAqF;AACrF,qCAAuC;AACvC,iDAA+C;AAC/C,6CAAgE;AAChE,iCAAkD;AAClD,wDAAiE;AACjE,2CAAyC;AAqCzC;;;GAGG;AACH,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACxD,IAAI,CAAC,IAAA,eAAQ,EAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,cAAc,GAAG,CAAC,QAAwB,EAA+B,EAAE,CAC/E,QAAQ,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAE3F,qHAAqH;AACrH,SAAS,cAAc,CAAC,QAAwB;IAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC;IACrC,MAAM,UAAU,GAAG,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;IACxC,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,IAAA,eAAQ,EAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACxD,MAAM,KAAK,GAAG,IAAA,qBAAc,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,IAAA,6BAAgB,EAAC,EAAE,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE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M,CAAC;QACxC,YAAY,EAAE,KAAK,CAAC,KAAK;QACzB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC;SACF,IAAI,CACH,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAC/G,CAAC;AACN,CAAC"}
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
* registry (`cantonCoin.registryUrl`, SV-1's Scan of the network by default). While it is unconfirmed, no Canton Coin
|
|
17
17
|
* is listed and `cantonCoinUnavailable` is true. Canton Coin cannot be transferred, burnt or pre-approved through the
|
|
18
18
|
* wallet.
|
|
19
|
+
* - `walletTokens(state)`: one entry per token (Canton Coin and DA Registry tokens alike) with its balances, offers,
|
|
20
|
+
* preapproval and honest `capabilities`, for one picker and one panel; `coveringPreapproval`, the rule
|
|
21
|
+
* `createTransferPreapproval` refuses `already-exists` by; expired offers (`TransferOffer.expired`,
|
|
22
|
+
* `InstrumentBalance.lockedInExpiredOffers`), expired Canton Coin locks no offer names
|
|
23
|
+
* (`InstrumentBalance.lockedInExpiredLocks`), and the `reclaimLockedTokens` action that unlocks both
|
|
24
|
+
* (`WalletToken.canReclaim` says when it applies).
|
|
19
25
|
* - The ownership proof's browser half (`requestWalletOwnershipVerdict`); the server half
|
|
20
26
|
* (`createWalletOwnershipChallenger`, `verifyWalletOwnership`) is Node-only and exported from the package root.
|
|
21
27
|
* - The errors, their guards (`isWalletError`, `isWalletSubmitError`, …: they match errors of any copy of this module,
|
|
@@ -26,13 +32,14 @@
|
|
|
26
32
|
*/
|
|
27
33
|
export { createCip103Session, type Cip103Session, type Cip103SessionOptions, type Cip103SessionState, type ConnectedWallet, } from './session';
|
|
28
34
|
export { canAct, createWalletStore, walletActionKey, type ActionOutcome, type ActionResultOf, type UnknownOutcome, type WalletAction, type WalletActionResults, type WalletNotice, type WalletStore, type WalletStoreOptions, type WalletView, } from './store';
|
|
29
|
-
export { createWallet, type BurnRequestOptions, type BurnRequestResult, type TransferOffers, type TransferPlan, type TransferPreapprovalOptions, type TransferRequest, type TransferResult, type Wallet, type WalletCallOptions, type WalletOptions, type WalletState, } from './wallet';
|
|
35
|
+
export { createWallet, type BurnRequestOptions, type BurnRequestResult, type TransferOffers, type TransferPlan, type TransferPreapprovalOptions, type TransferRequest, type TransferResult, type Wallet, type WalletCallOptions, type WalletOptions, type WalletState, type WithdrawExpiredResult, type WithdrawnOffer, type ReleasedLock, type ReclaimLockedTokensResult, } from './wallet';
|
|
30
36
|
export type { Cip103Connection, Cip103EventListener, Cip103Provider, Cip103Request } from './cip103';
|
|
31
37
|
export { discoverCip103Wallets, INJECTED_WALLET_ID, type Cip103DiscoveryHost, type DiscoverCip103WalletsOptions, type DiscoveredWallet, } from './discovery';
|
|
32
38
|
export { buildWalletOwnershipMessage, proveWalletOwnership, requestWalletOwnershipVerdict, type ProveWalletOwnershipOptions, type RequestWalletOwnershipVerdictOptions, type WalletOwnershipChallenge, type WalletOwnershipChallengeFailure, type WalletOwnershipChallengeResponse, type WalletOwnershipFailure, type WalletOwnershipMessageFields, type WalletOwnershipProof, type WalletOwnershipVerdict, } from './ownership';
|
|
33
39
|
export type { DaNetwork, DaRegistryOptions, FetchLike, TransferKind } from './da-utilities/client';
|
|
34
40
|
export { describeWalletError, isRegistryApiError, isRegistryResponseError, isWalletCancellation, isWalletError, isWalletReadError, isWalletSignError, isWalletSubmitError, RegistryApiError, RegistryResponseError, WalletError, WalletReadError, WalletSignError, WalletSubmitError, type WalletErrorCode, type WalletErrorDescription, type WalletSignErrorReason, type WalletSubmitCategory, type WalletSubmitErrorDetails, type WalletSubmitOutcome, } from './errors';
|
|
35
|
-
export type
|
|
41
|
+
export { coveringPreapproval, type BurnRequest, type MintOffer, type PreapprovalScope, type TransferOffer, type TransferOfferRegistry, type TransferPreapproval, } from './contracts';
|
|
42
|
+
export { isTransferOfferExpired, expiredUnclaimedLocks, walletTokens, type TokenCapabilities, type WalletToken, type WalletTokensInput, } from './tokens';
|
|
36
43
|
export { isCantonCoin, type Holding, type HoldingSource, type InstrumentBalance, type InstrumentMetadata, } from './holdings';
|
|
37
44
|
export { AMULET_INSTRUMENT_ID, AMULET_REGISTRY_BASE_URLS, AMULET_TEMPLATES, CANTON_COIN_METADATA, } from './amulet/constants';
|
|
38
45
|
export type { CantonCoinOptions } from './amulet/registry';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wallets/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wallets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,UAAU,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,cAA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,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,YAAY,EACZ,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseDecimalUnits = exports.formatDecimalUnits = exports.readHoldingView = exports.HOLDING_V1_INTERFACE_ID = exports.CANTON_COIN_METADATA = exports.AMULET_TEMPLATES = exports.AMULET_REGISTRY_BASE_URLS = exports.AMULET_INSTRUMENT_ID = exports.isCantonCoin = exports.WalletSubmitError = exports.WalletSignError = exports.WalletReadError = exports.WalletError = exports.RegistryResponseError = exports.RegistryApiError = exports.isWalletSubmitError = exports.isWalletSignError = exports.isWalletReadError = exports.isWalletError = exports.isWalletCancellation = exports.isRegistryResponseError = exports.isRegistryApiError = exports.describeWalletError = exports.requestWalletOwnershipVerdict = exports.proveWalletOwnership = exports.buildWalletOwnershipMessage = exports.INJECTED_WALLET_ID = exports.discoverCip103Wallets = exports.createWallet = exports.walletActionKey = exports.createWalletStore = exports.canAct = exports.createCip103Session = void 0;
|
|
3
|
+
exports.parseDecimalUnits = exports.formatDecimalUnits = exports.readHoldingView = exports.HOLDING_V1_INTERFACE_ID = exports.CANTON_COIN_METADATA = exports.AMULET_TEMPLATES = exports.AMULET_REGISTRY_BASE_URLS = exports.AMULET_INSTRUMENT_ID = exports.isCantonCoin = exports.walletTokens = exports.expiredUnclaimedLocks = exports.isTransferOfferExpired = exports.coveringPreapproval = exports.WalletSubmitError = exports.WalletSignError = exports.WalletReadError = exports.WalletError = exports.RegistryResponseError = exports.RegistryApiError = exports.isWalletSubmitError = exports.isWalletSignError = exports.isWalletReadError = exports.isWalletError = exports.isWalletCancellation = exports.isRegistryResponseError = exports.isRegistryApiError = exports.describeWalletError = exports.requestWalletOwnershipVerdict = exports.proveWalletOwnership = exports.buildWalletOwnershipMessage = exports.INJECTED_WALLET_ID = exports.discoverCip103Wallets = exports.createWallet = exports.walletActionKey = exports.createWalletStore = exports.canAct = exports.createCip103Session = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Browser-safe DA Utility Registry holder actions through any CIP-0103 (Canton dApp API) wallet provider. In a browser
|
|
6
6
|
* bundle import `@fairmint/canton-node-sdk/wallets`, which loads none of the SDK's Node dependencies (the deep path
|
|
@@ -19,6 +19,12 @@ exports.parseDecimalUnits = exports.formatDecimalUnits = exports.readHoldingView
|
|
|
19
19
|
* registry (`cantonCoin.registryUrl`, SV-1's Scan of the network by default). While it is unconfirmed, no Canton Coin
|
|
20
20
|
* is listed and `cantonCoinUnavailable` is true. Canton Coin cannot be transferred, burnt or pre-approved through the
|
|
21
21
|
* wallet.
|
|
22
|
+
* - `walletTokens(state)`: one entry per token (Canton Coin and DA Registry tokens alike) with its balances, offers,
|
|
23
|
+
* preapproval and honest `capabilities`, for one picker and one panel; `coveringPreapproval`, the rule
|
|
24
|
+
* `createTransferPreapproval` refuses `already-exists` by; expired offers (`TransferOffer.expired`,
|
|
25
|
+
* `InstrumentBalance.lockedInExpiredOffers`), expired Canton Coin locks no offer names
|
|
26
|
+
* (`InstrumentBalance.lockedInExpiredLocks`), and the `reclaimLockedTokens` action that unlocks both
|
|
27
|
+
* (`WalletToken.canReclaim` says when it applies).
|
|
22
28
|
* - The ownership proof's browser half (`requestWalletOwnershipVerdict`); the server half
|
|
23
29
|
* (`createWalletOwnershipChallenger`, `verifyWalletOwnership`) is Node-only and exported from the package root.
|
|
24
30
|
* - The errors, their guards (`isWalletError`, `isWalletSubmitError`, …: they match errors of any copy of this module,
|
|
@@ -57,6 +63,12 @@ Object.defineProperty(exports, "WalletError", { enumerable: true, get: function
|
|
|
57
63
|
Object.defineProperty(exports, "WalletReadError", { enumerable: true, get: function () { return errors_1.WalletReadError; } });
|
|
58
64
|
Object.defineProperty(exports, "WalletSignError", { enumerable: true, get: function () { return errors_1.WalletSignError; } });
|
|
59
65
|
Object.defineProperty(exports, "WalletSubmitError", { enumerable: true, get: function () { return errors_1.WalletSubmitError; } });
|
|
66
|
+
var contracts_1 = require("./contracts");
|
|
67
|
+
Object.defineProperty(exports, "coveringPreapproval", { enumerable: true, get: function () { return contracts_1.coveringPreapproval; } });
|
|
68
|
+
var tokens_1 = require("./tokens");
|
|
69
|
+
Object.defineProperty(exports, "isTransferOfferExpired", { enumerable: true, get: function () { return tokens_1.isTransferOfferExpired; } });
|
|
70
|
+
Object.defineProperty(exports, "expiredUnclaimedLocks", { enumerable: true, get: function () { return tokens_1.expiredUnclaimedLocks; } });
|
|
71
|
+
Object.defineProperty(exports, "walletTokens", { enumerable: true, get: function () { return tokens_1.walletTokens; } });
|
|
60
72
|
var holdings_1 = require("./holdings");
|
|
61
73
|
Object.defineProperty(exports, "isCantonCoin", { enumerable: true, get: function () { return holdings_1.isCantonCoin; } });
|
|
62
74
|
var constants_1 = require("./amulet/constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/wallets/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/wallets/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;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
@@ -4,7 +4,7 @@ import { type WalletErrorDescription } from './errors';
|
|
|
4
4
|
import { type WalletOwnershipVerdict } from './ownership';
|
|
5
5
|
import type { Cip103Session, Cip103SessionState, ConnectedWallet } from './session';
|
|
6
6
|
import type { InstrumentId, SubmitResult } from './types';
|
|
7
|
-
import { type BurnRequestResult, type TransferPlan, type TransferRequest, type TransferResult, type Wallet, type WalletCallOptions, type WalletOptions, type WalletState } from './wallet';
|
|
7
|
+
import { type BurnRequestResult, type TransferPlan, type TransferRequest, type TransferResult, type Wallet, type WalletCallOptions, type WalletOptions, type WalletState, type WithdrawExpiredResult } from './wallet';
|
|
8
8
|
/** What a page asks the store to do. `planTransfer` and `proveOwnership` only read; every other action is a write. */
|
|
9
9
|
export type WalletAction = {
|
|
10
10
|
readonly type: 'acceptMintOffer' | 'rejectMintOffer';
|
|
@@ -22,6 +22,19 @@ export type WalletAction = {
|
|
|
22
22
|
readonly type: 'cancelBurnRequest';
|
|
23
23
|
readonly burnRequestCid: string;
|
|
24
24
|
}
|
|
25
|
+
/** Withdraw all of the party's expired outgoing offers of one token, unlocking what they keep locked. */
|
|
26
|
+
| {
|
|
27
|
+
readonly type: 'withdrawExpiredTransferOffers';
|
|
28
|
+
readonly instrumentId: InstrumentId;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Unlock everything of one token that no longer needs to be locked: its expired outgoing offers, and its expired
|
|
32
|
+
* Canton Coin locks no offer names (`Wallet.reclaimLockedTokens`). Show it where `WalletToken.canReclaim`.
|
|
33
|
+
*/
|
|
34
|
+
| {
|
|
35
|
+
readonly type: 'reclaimLockedTokens';
|
|
36
|
+
readonly instrumentId: InstrumentId;
|
|
37
|
+
}
|
|
25
38
|
/** Read-only; resolves with a plan to show. Send it with `submitTransfer`: its own `submit()` refuses. */
|
|
26
39
|
| {
|
|
27
40
|
readonly type: 'planTransfer';
|
|
@@ -51,6 +64,8 @@ export interface WalletActionResults {
|
|
|
51
64
|
readonly acceptTransferOffer: SubmitResult;
|
|
52
65
|
readonly rejectTransferOffer: SubmitResult;
|
|
53
66
|
readonly withdrawTransferOffer: SubmitResult;
|
|
67
|
+
readonly withdrawExpiredTransferOffers: WithdrawExpiredResult;
|
|
68
|
+
readonly reclaimLockedTokens: WithdrawExpiredResult;
|
|
54
69
|
readonly requestBurn: BurnRequestResult;
|
|
55
70
|
readonly cancelBurnRequest: SubmitResult;
|
|
56
71
|
readonly planTransfer: TransferPlan;
|