@ledgerhq/device-contacts-kit 0.4.0 → 0.4.1
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/lib/cjs/api/app-binder/RenameContactDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/model/ContactsVersionRequirements.js +1 -1
- package/lib/cjs/api/model/ContactsVersionRequirements.js.map +3 -3
- package/lib/cjs/api/model/ContactsVersionRequirements.test.js +1 -1
- package/lib/cjs/api/model/ContactsVersionRequirements.test.js.map +2 -2
- package/lib/cjs/api/model/RenameContact.js.map +1 -1
- package/lib/cjs/internal/app-binder/command/EditExternalAddressIdentifierCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/EditExternalAddressIdentifierCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/EditExternalAddressScopeCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/EditExternalAddressScopeCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideContactCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideContactCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/RegisterIdentityCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/RegisterIdentityCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/RenameContactCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/RenameContactCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/RenameContactCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/RenameContactCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/contactsVersionGuards.js +1 -1
- package/lib/cjs/internal/app-binder/contactsVersionGuards.js.map +3 -3
- package/lib/cjs/internal/app-binder/contactsVersionGuards.test.js +1 -1
- package/lib/cjs/internal/app-binder/contactsVersionGuards.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.test.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/model/contactsErrors.js +1 -1
- package/lib/cjs/internal/app-binder/model/contactsErrors.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SendRenameContactTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendRenameContactTask.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendRenameContactTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendRenameContactTask.test.js.map +3 -3
- package/lib/cjs/package.json +2 -2
- package/lib/esm/api/model/ContactsVersionRequirements.js +1 -1
- package/lib/esm/api/model/ContactsVersionRequirements.js.map +3 -3
- package/lib/esm/api/model/ContactsVersionRequirements.test.js +1 -1
- package/lib/esm/api/model/ContactsVersionRequirements.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/EditExternalAddressIdentifierCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/EditExternalAddressIdentifierCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/EditExternalAddressScopeCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/EditExternalAddressScopeCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideContactCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideContactCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/RegisterIdentityCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/RegisterIdentityCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/RenameContactCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/RenameContactCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/RenameContactCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/RenameContactCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/contactsVersionGuards.js +1 -1
- package/lib/esm/internal/app-binder/contactsVersionGuards.js.map +3 -3
- package/lib/esm/internal/app-binder/contactsVersionGuards.test.js +1 -1
- package/lib/esm/internal/app-binder/contactsVersionGuards.test.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.test.js +1 -1
- package/lib/esm/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.test.js.map +3 -3
- package/lib/esm/internal/app-binder/model/contactsErrors.js +1 -1
- package/lib/esm/internal/app-binder/model/contactsErrors.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SendRenameContactTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendRenameContactTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SendRenameContactTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/SendRenameContactTask.test.js.map +3 -3
- package/lib/esm/package.json +2 -2
- package/lib/types/api/app-binder/RenameContactDeviceActionTypes.d.ts +2 -1
- package/lib/types/api/app-binder/RenameContactDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/model/ContactsVersionRequirements.d.ts +33 -0
- package/lib/types/api/model/ContactsVersionRequirements.d.ts.map +1 -1
- package/lib/types/api/model/RenameContact.d.ts +5 -3
- package/lib/types/api/model/RenameContact.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/EditExternalAddressIdentifierCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/EditExternalAddressScopeCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideContactCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/RegisterIdentityCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/RenameContactCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/contactsVersionGuards.d.ts +9 -1
- package/lib/types/internal/app-binder/contactsVersionGuards.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.d.ts +4 -3
- package/lib/types/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/model/contactsErrors.d.ts +21 -2
- package/lib/types/internal/app-binder/model/contactsErrors.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendRenameContactTask.d.ts +8 -0
- package/lib/types/internal/app-binder/task/SendRenameContactTask.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -15,6 +15,18 @@ export type ContactsModelSupport = {
|
|
|
15
15
|
readonly supported: true;
|
|
16
16
|
readonly minOsVersion: string;
|
|
17
17
|
readonly minAppVersion: Readonly<Record<string, string>>;
|
|
18
|
+
/**
|
|
19
|
+
* TEMPORARY (DSDK-1481) — the first OS build for this model that no longer
|
|
20
|
+
* wants the `DERIVATION_PATH` (tag 0x69) on EDIT CONTACT NAME. Rename is
|
|
21
|
+
* served by the OS, and OS builds *below* this version still require the path
|
|
22
|
+
* (omitting it yields 0x686A), while this build and later reject it
|
|
23
|
+
* (0x6A80). So the path is sent only when the device OS is below this
|
|
24
|
+
* cutoff. Absent means the model never wanted the path (send nothing — the
|
|
25
|
+
* GA end-state). Delete this field, its constants, and
|
|
26
|
+
* {@link renameRequiresDerivationPath} once no in-the-field OS predates the
|
|
27
|
+
* cutoff.
|
|
28
|
+
*/
|
|
29
|
+
readonly renameDerivationPathRequiredBelowOsVersion?: string;
|
|
18
30
|
};
|
|
19
31
|
/** Marks a device model on which Contacts is not supported at all. */
|
|
20
32
|
export type ContactsModelUnsupported = {
|
|
@@ -49,4 +61,25 @@ export declare function resolveContactsVersionRequirements(deviceModelId: Device
|
|
|
49
61
|
* passes a check.
|
|
50
62
|
*/
|
|
51
63
|
export declare function isVersionAtLeast(actual: string, minimum: string): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether `actual` is strictly less than `boundary`, comparing as semver with
|
|
66
|
+
* prerelease precedence preserved — unlike {@link isVersionAtLeast}, neither
|
|
67
|
+
* side is coerced, so `1.7.0-rc2` sorts *below* `1.7.0-rc3` (and both below the
|
|
68
|
+
* `1.7.0` release). Used to tell release candidates apart for the DSDK-1481
|
|
69
|
+
* derivation-path cutoff, which `isVersionAtLeast` cannot do (it drops the
|
|
70
|
+
* `-rcN` tag). Requires strict semver on both sides; returns `false` when
|
|
71
|
+
* either cannot be parsed, so an unknown version is treated as *not* below the
|
|
72
|
+
* boundary (i.e. the newer/GA payload shape).
|
|
73
|
+
*/
|
|
74
|
+
export declare function isVersionBelow(actual: string, boundary: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* TEMPORARY (DSDK-1481) — whether the EDIT CONTACT NAME (rename) payload must
|
|
77
|
+
* carry the `DERIVATION_PATH` (tag 0x69) for a device on `osVersion`. True only
|
|
78
|
+
* when the model is supported, declares a
|
|
79
|
+
* {@link ContactsModelSupport.renameDerivationPathRequiredBelowOsVersion}
|
|
80
|
+
* cutoff, and the fresh device OS version is strictly below that cutoff
|
|
81
|
+
* (prerelease-aware). Callers pass the OS version read freshly from the device
|
|
82
|
+
* (not the session state, which may be stale/absent on the dashboard path).
|
|
83
|
+
*/
|
|
84
|
+
export declare function renameRequiresDerivationPath(deviceModelId: DeviceModelId, osVersion: string): boolean;
|
|
52
85
|
//# sourceMappingURL=ContactsVersionRequirements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactsVersionRequirements.d.ts","sourceRoot":"","sources":["../../../../src/api/model/ContactsVersionRequirements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGhE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ContactsVersionRequirements.d.ts","sourceRoot":"","sources":["../../../../src/api/model/ContactsVersionRequirements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGhE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,0CAA0C,CAAC,EAAE,MAAM,CAAC;CAC9D,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC,oBAAoB,GACpB,wBAAwB,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAChD,MAAM,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAChD,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAwB5C;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,2BAgC3C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,aAAa,EAAE,aAAa,GAC3B,wBAAwB,CAE1B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,MAAM,GAChB,OAAO,CAMT"}
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
* name proof needs re-persisting.
|
|
9
9
|
*
|
|
10
10
|
* Proof material (`groupHandle`, `hmacProof`) is passed and returned as raw
|
|
11
|
-
* bytes; the host owns persistence and address-book state.
|
|
12
|
-
*
|
|
13
|
-
* (a
|
|
11
|
+
* bytes; the host owns persistence and address-book state. The rename itself is
|
|
12
|
+
* name-only, so no derivation path is exposed. As a temporary compatibility
|
|
13
|
+
* shim (DSDK-1481), the kit sends a fixed `m/44'/60'/0'/0/0` on the wire only
|
|
14
|
+
* for OS builds below the model's cutoff, which still mandate it; newer builds
|
|
15
|
+
* send nothing. Either way the host never chooses this.
|
|
14
16
|
*/
|
|
15
17
|
export type RenameContactInput = {
|
|
16
18
|
/** The contact's current name, proven to the device via `hmacProof`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenameContact.d.ts","sourceRoot":"","sources":["../../../../src/api/model/RenameContact.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"RenameContact.d.ts","sourceRoot":"","sources":["../../../../src/api/model/RenameContact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,mDAAmD;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,8EAA8E;IAC9E,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,mDAAmD;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;CAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditExternalAddressIdentifierCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/EditExternalAddressIdentifierCommand.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"EditExternalAddressIdentifierCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/EditExternalAddressIdentifierCommand.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AASzC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AAGnD,MAAM,MAAM,wCAAwC,GAAG;IACrD,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4CAA4C,GAAG;IACzD;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC,CAAC;AAkBF,qBAAa,oCACX,YACE,OAAO,CACL,4CAA4C,EAC5C,wCAAwC,EACxC,kBAAkB,CACnB;IAEH,QAAQ,CAAC,IAAI,mCAAmC;IAChD,QAAQ,CAAC,IAAI,EAAE,wCAAwC,CAAC;IACxD,OAAO,CAAC,QAAQ,CAAC,WAAW,CACqD;gBAErE,IAAI,EAAE,wCAAwC;IAI1D,OAAO,IAAI,IAAI;IAWf,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CACd,4CAA4C,EAC5C,kBAAkB,CACnB;CAoCF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditExternalAddressScopeCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/EditExternalAddressScopeCommand.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"EditExternalAddressScopeCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/EditExternalAddressScopeCommand.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AASzC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AAGnD,MAAM,MAAM,mCAAmC,GAAG;IAChD,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG;IACpD;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC,CAAC;AAkBF,qBAAa,+BACX,YACE,OAAO,CACL,uCAAuC,EACvC,mCAAmC,EACnC,kBAAkB,CACnB;IAEH,QAAQ,CAAC,IAAI,8BAA8B;IAC3C,QAAQ,CAAC,IAAI,EAAE,mCAAmC,CAAC;IACnD,OAAO,CAAC,QAAQ,CAAC,WAAW,CACgD;gBAEhE,IAAI,EAAE,mCAAmC;IAIrD,OAAO,IAAI,IAAI;IAWf,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CACd,uCAAuC,EACvC,kBAAkB,CACnB;CAoCF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProvideContactCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/ProvideContactCommand.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ProvideContactCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/ProvideContactCommand.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AAQzC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,yBAAyB,GAAG;IACtC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC;AAEjD,qBAAa,qBACX,YACE,OAAO,CACL,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,CACnB;IAEH,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CACsC;gBAEtD,IAAI,EAAE,yBAAyB;IAI3C,OAAO,IAAI,IAAI;IAWf,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,6BAA6B,EAAE,kBAAkB,CAAC;CASpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegisterIdentityCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/RegisterIdentityCommand.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"RegisterIdentityCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/RegisterIdentityCommand.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AAWzC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,2BAA2B,GAAG;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC,CAAC;AAkBF,qBAAa,uBACX,YACE,OAAO,CACL,+BAA+B,EAC/B,2BAA2B,EAC3B,kBAAkB,CACnB;IAEH,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CACwC;gBAExD,IAAI,EAAE,2BAA2B;IAI7C,OAAO,IAAI,IAAI;IAWf,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,+BAA+B,EAAE,kBAAkB,CAAC;CAoDtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenameContactCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/RenameContactCommand.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"RenameContactCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/RenameContactCommand.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AASzC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AAGnD,MAAM,MAAM,wBAAwB,GAAG;IACrC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;CACjC,CAAC;AAkBF,qBAAa,oBACX,YACE,OAAO,CACL,4BAA4B,EAC5B,wBAAwB,EACxB,kBAAkB,CACnB;IAEH,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CACqC;gBAErD,IAAI,EAAE,wBAAwB;IAI1C,OAAO,IAAI,IAAI;IAWf,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC;CAoCnE"}
|
|
@@ -15,9 +15,17 @@ export type RunningApp = {
|
|
|
15
15
|
* The running-app dimension is intentionally skipped: on the dashboard there is
|
|
16
16
|
* no embedded app to gate on (the running "app" is BOLOS).
|
|
17
17
|
*
|
|
18
|
+
* The OS `version` is supplied by the caller so it can come from a fresh
|
|
19
|
+
* `GetOsVersion` result rather than the device session state, whose
|
|
20
|
+
* `firmwareVersion` is often absent on the dashboard path (the session
|
|
21
|
+
* refresher and `GoToDashboard` re-read only the running app, never the OS
|
|
22
|
+
* version). The model comes from the session state, which does not change
|
|
23
|
+
* under the caller's feet the way a stale/missing OS version would.
|
|
24
|
+
*
|
|
18
25
|
* @param internalApi - the DeviceAction's internal API for the current session.
|
|
26
|
+
* @param osVersion - the device OS version, read freshly from the device.
|
|
19
27
|
*/
|
|
20
|
-
export declare function
|
|
28
|
+
export declare function isContactsOsVersionSupportedForSession(internalApi: InternalApi, osVersion: string): boolean;
|
|
21
29
|
/**
|
|
22
30
|
* Session-aware Contacts support check, for internal consumption by app-owned
|
|
23
31
|
* Contacts `DeviceAction`s (registering / editing external addresses). These
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contactsVersionGuards.d.ts","sourceRoot":"","sources":["../../../../src/internal/app-binder/contactsVersionGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iCAAiC,CAAC;AAWzC,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AASF
|
|
1
|
+
{"version":3,"file":"contactsVersionGuards.d.ts","sourceRoot":"","sources":["../../../../src/internal/app-binder/contactsVersionGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iCAAiC,CAAC;AAWzC,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AASF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sCAAsC,CACpD,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAQT;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uCAAuC,CACrD,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,UAAU,GACd,OAAO,CAiBT"}
|
package/lib/types/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type DeviceActionStateMachine, type InternalApi, XStateDeviceAction } from "@ledgerhq/device-management-kit";
|
|
1
|
+
import { type DeviceActionStateMachine, type GetOsVersionCommandResult, type InternalApi, XStateDeviceAction } from "@ledgerhq/device-management-kit";
|
|
2
2
|
import { type RenameContactDAError, type RenameContactDAInput, type RenameContactDAIntermediateValue, type RenameContactDAInternalState, type RenameContactDAOutput } from "../../../../api/app-binder/RenameContactDeviceActionTypes";
|
|
3
3
|
import { type RenameContactProof, SendRenameContactTask } from "../../../app-binder/task/SendRenameContactTask";
|
|
4
4
|
export type RenameContactMachineDependencies = {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly getOsVersion: () => Promise<GetOsVersionCommandResult>;
|
|
6
|
+
readonly isOsVersionSupported: (osVersion: string) => boolean;
|
|
7
|
+
readonly renameContact: (input: RenameContactDAInput, includeDerivationPath: boolean) => Promise<Awaited<ReturnType<SendRenameContactTask["run"]>>>;
|
|
7
8
|
};
|
|
8
9
|
export declare class RenameContactDeviceAction extends XStateDeviceAction<RenameContactDAOutput, RenameContactDAInput, RenameContactDAError, RenameContactDAIntermediateValue, RenameContactDAInternalState> {
|
|
9
10
|
makeStateMachine(internalApi: InternalApi): DeviceActionStateMachine<RenameContactDAOutput, RenameContactDAInput, RenameContactDAError, RenameContactDAIntermediateValue, RenameContactDAInternalState>;
|
package/lib/types/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenameContactDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAKhB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC3B,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"RenameContactDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/app-binder/device-action/RenameContact/RenameContactDeviceAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EAE9B,KAAK,WAAW,EAKhB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC3B,MAAM,gDAAgD,CAAC;AAIxD,OAAO,EACL,KAAK,kBAAkB,EACvB,qBAAqB,EACtB,MAAM,iDAAiD,CAAC;AAIzD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChE,QAAQ,CAAC,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9D,QAAQ,CAAC,aAAa,EAAE,CACtB,KAAK,EAAE,oBAAoB,EAC3B,qBAAqB,EAAE,OAAO,KAC3B,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACjE,CAAC;AAEF,qBAAa,yBAA0B,SAAQ,kBAAkB,CAC/D,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gCAAgC,EAChC,4BAA4B,CAC7B;IACC,gBAAgB,CACd,WAAW,EAAE,WAAW,GACvB,wBAAwB,CACzB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gCAAgC,EAChC,4BAA4B,CAC7B;IAwQD,mBAAmB,CACjB,WAAW,EAAE,WAAW,GACvB,gCAAgC;CAqBpC;AAED,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type CommandErrorArgs, type CommandErrors, DeviceExchangeError, type DmkError } from "@ledgerhq/device-management-kit";
|
|
1
|
+
import { type ApduResponse, type CommandErrorArgs, type CommandErrors, type CommandResult, DeviceExchangeError, type DmkError } from "@ledgerhq/device-management-kit";
|
|
2
|
+
import { CommandErrorHelper } from "@ledgerhq/signer-utils";
|
|
2
3
|
/**
|
|
3
4
|
* Status word returned by the app's Address Book *edit* operations when the
|
|
4
5
|
* seed-bound HMAC / group-handle verification fails — i.e. the entry was
|
|
@@ -10,12 +11,30 @@ import { type CommandErrorArgs, type CommandErrors, DeviceExchangeError, type Dm
|
|
|
10
11
|
* signal that consumers (e.g. Ledger Wallet) can catch to guide the user.
|
|
11
12
|
*/
|
|
12
13
|
export declare const CONTACT_SEED_MISMATCH_ERROR_CODE: "6982";
|
|
13
|
-
export type ContactsErrorCodes = "6982" | "6800" | "6983" | "6984" | "6985" | "6a80" | "6a84" | "6a88" | "6af0" | "6b00" | "6f00";
|
|
14
|
+
export type ContactsErrorCodes = "6982" | "6800" | "6983" | "6984" | "6985" | "686a" | "6a80" | "6a84" | "6a88" | "6af0" | "6b00" | "6f00";
|
|
14
15
|
export declare const CONTACTS_APP_ERRORS: CommandErrors<ContactsErrorCodes>;
|
|
15
16
|
export declare class ContactsCommandError extends DeviceExchangeError<ContactsErrorCodes> {
|
|
16
17
|
constructor(args: CommandErrorArgs<ContactsErrorCodes>);
|
|
17
18
|
}
|
|
18
19
|
export declare const contactsCommandErrorFactory: (args: CommandErrorArgs<ContactsErrorCodes>) => ContactsCommandError;
|
|
20
|
+
/**
|
|
21
|
+
* A {@link CommandErrorHelper} preconfigured with the Contacts error map, that
|
|
22
|
+
* additionally guarantees no address-book command ever surfaces a bare
|
|
23
|
+
* `UnknownDeviceExchangeError`.
|
|
24
|
+
*
|
|
25
|
+
* The base helper maps known status words to a {@link ContactsCommandError} and
|
|
26
|
+
* falls back to the global handler for the rest — which, for a status word in
|
|
27
|
+
* neither the Contacts nor the global dictionary (e.g. 0x686A before it was
|
|
28
|
+
* mapped), yields an `UnknownDeviceExchangeError` whose message is a generic
|
|
29
|
+
* "Unexpected device exchange error happened." with no status word and no
|
|
30
|
+
* guidance. This subclass replaces that specific case with an
|
|
31
|
+
* `InvalidStatusWordError` naming the actual status word and pointing at a
|
|
32
|
+
* firmware/app update, so the host always has something actionable to show.
|
|
33
|
+
*/
|
|
34
|
+
export declare class ContactsCommandErrorHelper<Response> extends CommandErrorHelper<Response, ContactsErrorCodes> {
|
|
35
|
+
constructor();
|
|
36
|
+
getError(apduResponse: ApduResponse): CommandResult<Response, ContactsErrorCodes> | undefined;
|
|
37
|
+
}
|
|
19
38
|
/**
|
|
20
39
|
* Raised by a Contacts `DeviceAction` when the connected device model, app
|
|
21
40
|
* version, or OS version does not meet the Contacts requirements — i.e. the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contactsErrors.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/model/contactsErrors.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"contactsErrors.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/model/contactsErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAErB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,mBAAmB,EACnB,KAAK,QAAQ,EAId,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,EAAG,MAAe,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,CAAC;AAEX,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,kBAAkB,CA2BjE,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,mBAAmB,CAAC,kBAAkB,CAAC;gBACnE,IAAI,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CAGvD;AAED,eAAO,MAAM,2BAA2B,GACtC,MAAM,gBAAgB,CAAC,kBAAkB,CAAC,yBACT,CAAC;AAEpC;;;;;;;;;;;;;GAaG;AACH,qBAAa,0BAA0B,CAAC,QAAQ,CAAE,SAAQ,kBAAkB,CAC1E,QAAQ,EACR,kBAAkB,CACnB;;IAKU,QAAQ,CACf,YAAY,EAAE,YAAY,GACzB,aAAa,CAAC,QAAQ,EAAE,kBAAkB,CAAC,GAAG,SAAS;CAqB3D;AAED;;;;GAIG;AACH,qBAAa,+BAAgC,YAAW,QAAQ;IAI5D,QAAQ,CAAC,OAAO;IAHlB,QAAQ,CAAC,IAAI,qCAAqC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;gBAEtB,OAAO,SAAiF;CAEpG"}
|
|
@@ -8,6 +8,14 @@ export type SendRenameContactTaskArgs = {
|
|
|
8
8
|
readonly newContactName: string;
|
|
9
9
|
readonly groupHandle: Uint8Array;
|
|
10
10
|
readonly hmacProof: Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* TEMPORARY (DSDK-1481) — emit the `DERIVATION_PATH` (tag 0x69) TLV. Defaults
|
|
13
|
+
* to `false` (the GA payload, path-free). The caller sets it `true` only for
|
|
14
|
+
* OS builds below the model's cutoff, which still mandate the path; see
|
|
15
|
+
* {@link renameRequiresDerivationPath}. Not exposed on the public
|
|
16
|
+
* `RenameContactInput` — the host never chooses this.
|
|
17
|
+
*/
|
|
18
|
+
readonly includeDerivationPath?: boolean;
|
|
11
19
|
readonly logger?: LoggerPublisherService;
|
|
12
20
|
};
|
|
13
21
|
export declare class SendRenameContactTask {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendRenameContactTask.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/task/SendRenameContactTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SendRenameContactTask.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/task/SendRenameContactTask.ts"],"names":[],"mappings":"AA4BA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,WAAW,EAGhB,KAAK,sBAAsB,EAC5B,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAYpF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC;CAC1C,CAAC;AAEF,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBADJ,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,yBAAyB;IAG5C,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IA6B3E,OAAO,CAAC,YAAY;CAmCrB"}
|