@fairmint/canton-node-sdk 0.0.281 → 0.0.283

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.
Files changed (72) hide show
  1. package/README.md +128 -154
  2. package/build/src/utils/external-signing/wallet-ownership-challenger.d.ts.map +1 -1
  3. package/build/src/utils/external-signing/wallet-ownership-challenger.js +2 -3
  4. package/build/src/utils/external-signing/wallet-ownership-challenger.js.map +1 -1
  5. package/build/src/utils/external-signing/wallet-ownership.d.ts.map +1 -1
  6. package/build/src/utils/external-signing/wallet-ownership.js +8 -18
  7. package/build/src/utils/external-signing/wallet-ownership.js.map +1 -1
  8. package/build/src/wallets/acs.d.ts +2 -1
  9. package/build/src/wallets/acs.d.ts.map +1 -1
  10. package/build/src/wallets/acs.js +6 -31
  11. package/build/src/wallets/acs.js.map +1 -1
  12. package/build/src/wallets/cip103.d.ts +32 -68
  13. package/build/src/wallets/cip103.d.ts.map +1 -1
  14. package/build/src/wallets/cip103.js +112 -230
  15. package/build/src/wallets/cip103.js.map +1 -1
  16. package/build/src/wallets/commands.d.ts +39 -6
  17. package/build/src/wallets/commands.d.ts.map +1 -1
  18. package/build/src/wallets/commands.js +50 -5
  19. package/build/src/wallets/commands.js.map +1 -1
  20. package/build/src/wallets/contracts.d.ts +12 -0
  21. package/build/src/wallets/contracts.d.ts.map +1 -1
  22. package/build/src/wallets/contracts.js +21 -5
  23. package/build/src/wallets/contracts.js.map +1 -1
  24. package/build/src/wallets/da-utilities/client.d.ts +61 -29
  25. package/build/src/wallets/da-utilities/client.d.ts.map +1 -1
  26. package/build/src/wallets/da-utilities/client.js +78 -75
  27. package/build/src/wallets/da-utilities/client.js.map +1 -1
  28. package/build/src/wallets/errors.d.ts +11 -8
  29. package/build/src/wallets/errors.d.ts.map +1 -1
  30. package/build/src/wallets/errors.js +13 -3
  31. package/build/src/wallets/errors.js.map +1 -1
  32. package/build/src/wallets/holdings.d.ts +14 -4
  33. package/build/src/wallets/holdings.d.ts.map +1 -1
  34. package/build/src/wallets/holdings.js +27 -47
  35. package/build/src/wallets/holdings.js.map +1 -1
  36. package/build/src/wallets/index.d.ts +17 -21
  37. package/build/src/wallets/index.d.ts.map +1 -1
  38. package/build/src/wallets/index.js +14 -23
  39. package/build/src/wallets/index.js.map +1 -1
  40. package/build/src/wallets/instrument.js +1 -1
  41. package/build/src/wallets/instrument.js.map +1 -1
  42. package/build/src/wallets/ownership.d.ts +20 -26
  43. package/build/src/wallets/ownership.d.ts.map +1 -1
  44. package/build/src/wallets/ownership.js +33 -27
  45. package/build/src/wallets/ownership.js.map +1 -1
  46. package/build/src/wallets/session.d.ts +30 -68
  47. package/build/src/wallets/session.d.ts.map +1 -1
  48. package/build/src/wallets/session.js +119 -167
  49. package/build/src/wallets/session.js.map +1 -1
  50. package/build/src/wallets/store.d.ts +148 -86
  51. package/build/src/wallets/store.d.ts.map +1 -1
  52. package/build/src/wallets/store.js +267 -99
  53. package/build/src/wallets/store.js.map +1 -1
  54. package/build/src/wallets/templates.d.ts +10 -23
  55. package/build/src/wallets/templates.d.ts.map +1 -1
  56. package/build/src/wallets/templates.js +9 -33
  57. package/build/src/wallets/templates.js.map +1 -1
  58. package/build/src/wallets/types.d.ts +6 -20
  59. package/build/src/wallets/types.d.ts.map +1 -1
  60. package/build/src/wallets/wallet.d.ts +130 -74
  61. package/build/src/wallets/wallet.d.ts.map +1 -1
  62. package/build/src/wallets/wallet.js +347 -185
  63. package/build/src/wallets/wallet.js.map +1 -1
  64. package/package.json +1 -1
  65. package/build/src/wallets/cip56-core.d.ts +0 -175
  66. package/build/src/wallets/cip56-core.d.ts.map +0 -1
  67. package/build/src/wallets/cip56-core.js +0 -325
  68. package/build/src/wallets/cip56-core.js.map +0 -1
  69. package/build/src/wallets/token-registry.d.ts +0 -97
  70. package/build/src/wallets/token-registry.d.ts.map +0 -1
  71. package/build/src/wallets/token-registry.js +0 -19
  72. package/build/src/wallets/token-registry.js.map +0 -1
@@ -4,11 +4,10 @@ exports.qualifiedName = qualifiedName;
4
4
  exports.sameQualifiedName = sameQualifiedName;
5
5
  exports.packageNameOf = packageNameOf;
6
6
  exports.requireQualifiedName = requireQualifiedName;
7
- exports.contractFilterKey = contractFilterKey;
8
- exports.contractMatchesFilter = contractMatchesFilter;
7
+ exports.isTemplate = isTemplate;
9
8
  /**
10
- * `Module:Entity` of a template or interface id in either form (`#pkg-name:M:E` or `pkgId:M:E`), or null when the id is
11
- * not of that shape.
9
+ * `Module:Entity` of a template id in either form (`#pkg-name:M:E` or `pkgId:M:E`), or null when the id is not of that
10
+ * shape.
12
11
  */
13
12
  function qualifiedName(id) {
14
13
  const separator = id.indexOf(':');
@@ -17,7 +16,7 @@ function qualifiedName(id) {
17
16
  const rest = id.slice(separator + 1);
18
17
  return /^[A-Za-z0-9_.]+:[A-Za-z0-9_.]+$/.test(rest) ? rest : null;
19
18
  }
20
- /** Whether two ids name the same template or interface, whatever package version or id form each uses. */
19
+ /** Whether two ids name the same template, whatever package version or id form each uses. */
21
20
  function sameQualifiedName(left, right) {
22
21
  const name = qualifiedName(left);
23
22
  return name !== null && name === qualifiedName(right);
@@ -36,35 +35,12 @@ function requireQualifiedName(id) {
36
35
  throw new TypeError(`Malformed template id ${id}`);
37
36
  return name;
38
37
  }
39
- /** A stable key of a filter: `t:<templateId>` or `i:<interfaceId>`. */
40
- function contractFilterKey(filter) {
41
- return 'templateId' in filter ? `t:${filter.templateId}` : `i:${filter.interfaceId}`;
42
- }
43
38
  /**
44
- * Whether a contract of a snapshot read with several filters at once is one the given filter would have returned on its
45
- * own: of the template, or carrying a view of the interface (the ledger computes views only for the interfaces the read
46
- * asked for).
47
- *
48
- * A template match needs proven package identity, not just the same `Module:Entity`: a cumulative read also returns
49
- * contracts matched only by one of its interface filters, and any party can create a template of that name in its own
50
- * package. So a package-name filter (`#pkg:M:E`) matches only a contract whose `packageName` is that package; the
51
- * Ledger JSON API v2 (Canton 3.x) always reports `createdEvent.packageName` (a required field), so a contract without
52
- * one is not classified at all (fail closed). A package-id filter matches only the exact template id.
39
+ * Whether a contract is of a template given in package-name form (`#pkg:Module:Entity`, as the SDK's constants spell
40
+ * them): the same `Module:Entity` and the same package name. Any party can create a template of that name in its own
41
+ * package, so the name alone proves nothing. An id in any other form matches nothing.
53
42
  */
54
- function contractMatchesFilter(contract, filter) {
55
- if ('templateId' in filter) {
56
- if (!sameQualifiedName(contract.templateId, filter.templateId))
57
- return false;
58
- const filterPackage = packageNameOf(filter.templateId);
59
- return filterPackage === null
60
- ? contract.templateId === filter.templateId
61
- : contract.packageName !== undefined && contract.packageName === filterPackage;
62
- }
63
- // Same rule for interfaces: a package-id filter (`pkgId:M:E`) matches only that exact interface id, so two
64
- // same-named interfaces from different packages in one cumulative read are never mixed up; a package-name filter
65
- // (`#pkg:M:E`) matches by name (the ledger reports a view's interface id with the package id it resolved).
66
- return contract.interfaceViews.some((view) => packageNameOf(filter.interfaceId) === null
67
- ? view.interfaceId === filter.interfaceId
68
- : sameQualifiedName(view.interfaceId, filter.interfaceId));
43
+ function isTemplate(contract, templateId) {
44
+ return sameQualifiedName(contract.templateId, templateId) && contract.packageName === packageNameOf(templateId);
69
45
  }
70
46
  //# sourceMappingURL=templates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/wallets/templates.ts"],"names":[],"mappings":";;;;;;;;AAWA;;;GAGG;AACH,uBAA8B,EAAU;IACtC,MAAM,SAAS,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,SAAS,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACrC,OAAO,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC;AAED,0GAA0G;AAC1G,2BAAkC,IAAY,E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GAAG,CAAC,CAAC;IAClC,OAAO,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvD,CAAC;AAED,yHAAyH;AACzH,8BAAqC,EAAU;IAC7C,MAAM,IAAI,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;IAC/B,IAAI,IAAI,KAAK,IAAI;QAAE,MAAM,IAAI,SAAS,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,oBAA2B,QAAwB,EAAE,UAAkB;IACrE,OAAO,iBAAiB,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,QAAQ,CAAC,WAAW,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC;AAClH,CAAC"}
@@ -29,46 +29,32 @@ export interface DisclosedContract {
29
29
  readonly createdEventBlob: string;
30
30
  readonly synchronizerId?: string;
31
31
  }
32
- /** One interface view of an active contract (only views the ledger computed successfully are kept). */
33
- export interface InterfaceView {
34
- readonly interfaceId: string;
35
- readonly viewValue: JsonObject;
36
- }
37
32
  /** An active contract read from the wallet party's ACS. */
38
33
  export interface ActiveContract {
39
34
  readonly contractId: string;
40
35
  /** As the ledger reports it: usually the package-id form `pkgId:Module:Entity`. */
41
36
  readonly templateId: string;
42
- /** The template's package name (`utility-registry-holding-v0`), when the ledger reported it. */
43
- readonly packageName?: string;
37
+ /** The template's package name (`utility-registry-holding-v0`); entries without one are not read. */
38
+ readonly packageName: string;
44
39
  /**
45
40
  * The parties that signed the contract. Only these are guaranteed: anyone can create a contract of their own package
46
- * with any create argument or interface view, so trust in a contract comes from who signed it.
41
+ * with any create argument, so trust in a contract comes from who signed it.
47
42
  */
48
43
  readonly signatories: readonly string[];
49
- /** Null when the ledger did not include it (for example for an interface filter). */
44
+ /** Null when the ledger did not include it. */
50
45
  readonly createArgument: JsonObject | null;
51
- readonly interfaceViews: readonly InterfaceView[];
52
- readonly createdEventBlob?: string;
53
46
  /** The synchronizer the contract is assigned to, when the ledger reported it. */
54
47
  readonly synchronizerId?: string;
55
48
  }
56
- /** Which contracts to read: one template or one interface (package-name `#pkg:Module:Entity` form). */
57
- export type ContractFilter = {
58
- readonly templateId: string;
59
- } | {
60
- readonly interfaceId: string;
61
- };
62
49
  /** What the SDK asks the wallet to sign and submit, acting as the wallet party only. */
63
50
  export interface WalletSubmission {
64
51
  readonly commands: readonly LedgerCommand[];
65
52
  readonly disclosedContracts?: readonly DisclosedContract[];
66
- /** Deduplication key; a random UUID when omitted. */
67
- readonly commandId?: string;
68
53
  }
69
54
  /** A committed submission. */
70
55
  export interface SubmitResult {
71
56
  readonly updateId: string;
72
- readonly commandId?: string;
57
+ /** The command id the submission was sent with (a random UUID). */
58
+ readonly commandId: string;
73
59
  }
74
60
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/wallets/types.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAClH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,aAAa,EAAE;QACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC;KACtC,CAAC;CACH;AAED,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,eAAe,EAAE;QACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC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AC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qGAAqG;IACrG,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,+CAA+C;IAC/C,QAAQ,CAAC,cAAc,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3C,iFAAiF;IACjF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC5D;AAED,8BAA8B;AAC9B,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -1,34 +1,111 @@
1
- import { type BurnRequest, type MintOffer } from './contracts';
2
- import { type DaNetwork } from './da-utilities/client';
3
- import { type TokenRegistry } from './token-registry';
4
- import { type BaseState, type CoreOptions, type TransferActions } from './cip56-core';
1
+ /**
2
+ * One wallet party's DA Utility Registry token actions through any CIP-0103 wallet provider: holdings, transfers,
3
+ * transfer offers, mint offers, burn requests and transfer preapprovals. Every write reads its contracts fresh, fetches
4
+ * its choice context from DA's Utilities API, refuses anything that does not check out, and submits as the wallet party
5
+ * only.
6
+ *
7
+ * Trust: a holding counts when its registrar and owner signed it; an offer, a request or a preapproval when it names
8
+ * DA's operator and (offers and requests) a provider trusted for its instrument admin signed it. By default a registrar
9
+ * must be its own provider; `registry.trustedProviders` trusts others (see `isFromRegistry`).
10
+ */
11
+ import { type Cip103Provider, type WalletReadRetryOptions } from './cip103';
12
+ import { type BurnRequest, type MintOffer, type TransferOffer, type TransferPreapproval } from './contracts';
13
+ import { type DaNetwork, type DaRegistryOptions, type TransferKind } from './da-utilities/client';
14
+ import { type Holding, type InstrumentBalance } from './holdings';
5
15
  import type { InstrumentId, SubmitResult } from './types';
6
- /** Burn requests: `executeBefore` defaults to now + 7 days, giving the registrar a week to accept or reject. */
7
- export declare const BURN_TTL_MS: number;
8
16
  /** A burn reference: no personal data (DA's operator and the registrar see it). */
9
17
  export declare const BURN_REFERENCE_PATTERN: RegExp;
18
+ /** The reason a rejected mint offer gives the registrar: fixed, so nothing personal reaches the ledger. */
19
+ export declare const MINT_OFFER_REJECT_REASON = "Rejected by the holder";
10
20
  /**
11
21
  * A burn reference with no personal data: `holder-burn-<UTC yyyymmddThhmmssZ>-<6 random base-36 digits>` (DA's operator
12
22
  * and the registrar see it). Never `redeem-…`, a prefix a transfer agent may reserve for the redemptions it files
13
23
  * itself. `requestBurn` uses one when no `reference` is given.
14
24
  */
15
- export declare function newBurnReference(now?: Date): string;
25
+ export declare function newBurnReference(now: Date): string;
26
+ export interface WalletOptions {
27
+ /** Any CIP-0103 (Canton dApp API) provider, already connected as `partyId`. */
28
+ readonly provider: Cip103Provider;
29
+ /** The party every action reads and acts as. */
30
+ readonly partyId: string;
31
+ /** The DA network the provider's ledger is on; selects DA's Utilities API. */
32
+ readonly network: DaNetwork;
33
+ readonly registry?: DaRegistryOptions;
34
+ /**
35
+ * Whether the wallet session this wallet belongs to is still live. Once it answers false, every write is refused with
36
+ * `invalid-input` before its first read, and again right before the wallet signs, so nothing is submitted: the
37
+ * provider may now be signed in to another account. Reads are not limited. Default: always live.
38
+ */
39
+ readonly isActive?: () => boolean;
40
+ }
41
+ /** Test hooks beside {@link WalletOptions}; not part of the public options. */
42
+ export interface WalletInternalOptions extends WalletOptions {
43
+ /** Defaults to the system clock. */
44
+ readonly now?: () => Date;
45
+ /** How reads back off when the wallet rate-limits them. */
46
+ readonly readRetry?: WalletReadRetryOptions;
47
+ }
48
+ export interface TransferOffers {
49
+ /** Offers to the wallet party, which it can accept or reject. */
50
+ readonly incoming: TransferOffer[];
51
+ /** The wallet party's own offers, which it can withdraw. */
52
+ readonly outgoing: TransferOffer[];
53
+ }
54
+ /** Everything a wallet page shows, read as one snapshot of the ledger. */
55
+ export interface WalletState {
56
+ /** The ledger offset every list was read at. */
57
+ readonly offset: number;
58
+ /** The wallet party's DA holdings, locked ones included. */
59
+ readonly holdings: Holding[];
60
+ /** `holdings` summed per instrument (unlocked and locked apart), sorted by instrument id then admin. */
61
+ readonly balances: InstrumentBalance[];
62
+ readonly transferOffers: TransferOffers;
63
+ /** Mint offers to the wallet party. */
64
+ readonly mintOffers: MintOffer[];
65
+ /** The wallet party's open burn requests (pending redemptions). */
66
+ readonly burnRequests: BurnRequest[];
67
+ /** The wallet party's transfer preapprovals. */
68
+ readonly transferPreapprovals: TransferPreapproval[];
69
+ }
70
+ export interface TransferRequest {
71
+ readonly receiver: string;
72
+ readonly instrumentId: InstrumentId;
73
+ /** Positive decimal, at most 10 places. */
74
+ readonly amount: string;
75
+ /** Shown to the receiver as the transfer's reason (`splice.lfdecentralizedtrust.org/reason`). */
76
+ readonly memo?: string;
77
+ /**
78
+ * Refuse (`preapproval-required`, at plan time, before anything is signed) unless the registry runs the transfer
79
+ * direct, so no offer is ever created.
80
+ */
81
+ readonly requirePreapproval?: boolean;
82
+ /** Offer acceptance deadline; defaults to now + 24 h at submission; must be in the future. */
83
+ readonly executeBefore?: Date;
84
+ }
85
+ export interface TransferResult extends SubmitResult {
86
+ readonly kind: TransferKind;
87
+ }
16
88
  /**
17
- * The wallet's provider, party and registry: pass `registry` (any `TokenRegistry`; DA's actions need
18
- * `createDaUtilitiesClient(...)`), or `network` to get `createDaUtilitiesClient({ network })` with the global `fetch`
19
- * and no trusted providers.
89
+ * A planned transfer, to show the user how the registry will run it before they confirm. `submit` sends exactly the
90
+ * planned request; when the registry now answers another kind (a preapproval expired or appeared in between), it is
91
+ * refused with `kind-changed` before signing.
20
92
  */
21
- export type WalletOptions = Omit<CoreOptions, 'registry'> & ({
22
- readonly registry: TokenRegistry;
23
- readonly network?: undefined;
24
- } | {
25
- readonly network: DaNetwork;
26
- readonly registry?: undefined;
27
- });
93
+ export interface TransferPlan {
94
+ /** How the registry would run the transfer when it was planned. */
95
+ readonly kind: TransferKind;
96
+ /** A sentence explaining `kind` to the user. */
97
+ readonly description: string;
98
+ /** The party the transfer is from. */
99
+ readonly partyId: string;
100
+ /** The request as planned (a frozen copy). */
101
+ readonly request: Readonly<TransferRequest>;
102
+ /** Run the transfer (a write: one at a time, see `Wallet`). */
103
+ submit(): Promise<TransferResult>;
104
+ }
28
105
  export interface BurnRequestOptions {
29
106
  readonly instrumentId: InstrumentId;
30
107
  readonly amount: string;
31
- /** Matches {@link BURN_REFERENCE_PATTERN}; never personal data. Defaults to {@link newBurnReference}. */
108
+ /** Matches {@link BURN_REFERENCE_PATTERN}; never personal data. Defaults to a generated `holder-burn-…` reference. */
32
109
  readonly reference?: string;
33
110
  /** Defaults to now + 7 days. */
34
111
  readonly executeBefore?: Date;
@@ -37,74 +114,53 @@ export interface BurnRequestOptions {
37
114
  export interface BurnRequestResult extends SubmitResult {
38
115
  readonly reference: string;
39
116
  }
40
- /** Everything a token wallet page shows, read as one snapshot of the ledger. */
41
- export interface WalletState extends BaseState {
42
- /** DA mint offers to the wallet party; `[]` when the registry is not DA's. */
43
- readonly mintOffers: MintOffer[];
44
- /** The wallet party's open DA burn requests; `[]` when the registry is not DA's. */
45
- readonly burnRequests: BurnRequest[];
117
+ export interface TransferPreapprovalOptions {
118
+ readonly instrumentAdmin: string;
119
+ /** Up to 10 instrument ids of the admin; empty or omitted: every instrument of the admin. */
120
+ readonly instrumentIds?: readonly string[];
46
121
  }
47
122
  /**
48
- * A wallet party's token actions through a CIP-0103 provider: the CIP-56 actions on any `TokenRegistry`'s instruments,
49
- * and DA's mint, burn and preapproval actions when the registry is DA's Utility Registry client. With another registry
50
- * those DA actions are refused with `unsupported-by-registry` (before anything is read or signed), and `loadState`
51
- * gives empty DA lists; `isDaUtilitiesClient` tells which registry a wallet has.
123
+ * A wallet party's DA Utility Registry token actions through a CIP-0103 provider.
52
124
  *
53
- * One write action at a time: a write started while another is in progress (from its first read to its submission's
54
- * outcome) is refused at once with `busy`, so two writes never pick the same holdings. Reads and previews are not
55
- * limited.
56
- *
57
- * Reads: `loadState` and the `list*` methods all read one snapshot (one ledger-end call and one paged ACS stream with
58
- * every filter the wallet needs; a registry that declares no `pendingTransferFilters` costs one more ACS stream, read
59
- * at the same offset), and calls made while a snapshot is in flight share it instead of reading again, unless a write
60
- * settled since it started. Load a page with `loadState`; writes do their own fresh reads.
125
+ * One write at a time: a write started while another is in progress (from its first read to its submission's outcome)
126
+ * is refused at once with `busy`, so two writes never pick the same holdings. `loadState` and `planTransfer` are reads
127
+ * and are not limited.
61
128
  */
62
- export interface Wallet extends TransferActions {
129
+ export interface Wallet {
130
+ readonly partyId: string;
131
+ readonly network: DaNetwork;
63
132
  /**
64
- * Holdings, transfer offers, mint offers and burn requests from one snapshot: one ledger-end call and one paged ACS
65
- * stream for all four. Load a page with this rather than the `list*` calls (which share one snapshot when called
66
- * together, but each still filters it). The DA lists are `[]` when the registry is not DA's.
133
+ * One ledger snapshot: holdings and balances, transfer offers (incoming and outgoing), mint offers, burn requests and
134
+ * transfer preapprovals (one ledger-end call and one ACS read). Calls made while a snapshot is in flight share it,
135
+ * unless a write settled since it started.
67
136
  */
68
137
  loadState(): Promise<WalletState>;
138
+ /** How the registry would run a transfer, kept to submit once the user confirmed it (see {@link TransferPlan}). */
139
+ planTransfer(request: TransferRequest): Promise<TransferPlan>;
140
+ acceptTransferOffer(transferOfferCid: string): Promise<SubmitResult>;
141
+ rejectTransferOffer(transferOfferCid: string): Promise<SubmitResult>;
142
+ /** Withdraw one of the party's own transfer offers, which unlocks its tokens (also after the offer expired). */
143
+ withdrawTransferOffer(transferOfferCid: string): Promise<SubmitResult>;
144
+ acceptMintOffer(mintOfferCid: string): Promise<SubmitResult>;
145
+ /** Reject a mint offer; the registrar sees {@link MINT_OFFER_REJECT_REASON}. */
146
+ rejectMintOffer(mintOfferCid: string): Promise<SubmitResult>;
69
147
  /**
70
- * Mint offers to the wallet party, made under their instrument admin's registry service. Needs DA's Utility Registry
71
- * client (`network`, or `registry: createDaUtilitiesClient(...)`); refused with `unsupported-by-registry` otherwise.
72
- */
73
- listMintOffers(): Promise<MintOffer[]>;
74
- /**
75
- * Accept a DA mint offer. Needs DA's Utility Registry client (`network`, or `registry:
76
- * createDaUtilitiesClient(...)`); refused with `unsupported-by-registry` otherwise.
77
- */
78
- acceptMintOffer(mintOfferCid: string, options?: {
79
- expectedRegistrar?: string;
80
- }): Promise<SubmitResult>;
81
- /**
82
- * File a burn (redemption) request; DA locks the amount until the registrar accepts or rejects it. Resolves with the
83
- * reference it was filed with, so a dApp can show it. If the submission fails, the `WalletSubmitError` carries that
84
- * reference too (`burnReference`, and in its message): after an `unknown` outcome, find the burn request by it before
85
- * filing another, or the amount may be locked twice. Needs DA's Utility Registry client (`network`, or `registry:
86
- * createDaUtilitiesClient(...)`); refused with `unsupported-by-registry` otherwise.
148
+ * File a burn (redemption) request; DA locks the amount until the registrar accepts or rejects it, or the holder
149
+ * cancels it. Resolves with the reference it was filed with. If the submission fails, the `WalletSubmitError` carries
150
+ * that reference too (`burnReference`, and in its message): after an `unknown` outcome, find the burn request by it
151
+ * before filing another, or the amount may be locked twice.
87
152
  */
88
153
  requestBurn(options: BurnRequestOptions): Promise<BurnRequestResult>;
154
+ /** Cancel one of the party's open burn requests; DA unlocks the amount. */
155
+ cancelBurnRequest(burnRequestCid: string): Promise<SubmitResult>;
89
156
  /**
90
- * Experimental: create the wallet party's DA transfer preapproval for an instrument admin (every instrument of the
91
- * admin when `instrumentIds` is empty or omitted, else up to 10). No live create has been observed yet. Needs DA's
92
- * Utility Registry client (`network`, or `registry: createDaUtilitiesClient(...)`); refused with
93
- * `unsupported-by-registry` otherwise.
157
+ * Create the party's transfer preapproval for an instrument admin, so transfers of those instruments to the party
158
+ * complete at once. Refused with `already-exists` when one of the party's preapprovals already covers them.
94
159
  */
95
- createTransferPreapproval(options: {
96
- instrumentAdmin: string;
97
- instrumentIds?: readonly string[];
98
- }): Promise<SubmitResult>;
99
- /**
100
- * The wallet party's open burn requests (pending redemptions). Needs DA's Utility Registry client (`network`, or
101
- * `registry: createDaUtilitiesClient(...)`); refused with `unsupported-by-registry` otherwise.
102
- */
103
- listBurnRequests(): Promise<BurnRequest[]>;
160
+ createTransferPreapproval(options: TransferPreapprovalOptions): Promise<SubmitResult>;
161
+ /** Withdraw one of the party's transfer preapprovals. */
162
+ removeTransferPreapproval(preapprovalCid: string): Promise<SubmitResult>;
104
163
  }
105
- /**
106
- * A `Wallet` over a CIP-0103 provider: the CIP-56 actions with any `TokenRegistry`, and DA's actions too with DA's
107
- * Utility Registry client (`network`, or `registry: createDaUtilitiesClient(...)`).
108
- */
164
+ /** The DA Registry token actions of `options.partyId` through `options.provider`. */
109
165
  export declare function createWallet(options: WalletOptions): Wallet;
110
166
  //# sourceMappingURL=wallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/wallets/wallet.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAoD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACjH,OAAO,EAKL,KAAK,SAAS,EAEf,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,WAAW,EAEhB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,KA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