@ledgerhq/wallet-api-deeplink-module 0.2.0-nightly.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2017-present Ledger https://www.ledger.com/
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/lib/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { CustomModule } from "@ledgerhq/wallet-api-client";
2
+ export * from "./types";
3
+ export declare class DeeplinkModule extends CustomModule {
4
+ /**
5
+ * Open a deeplink
6
+ * @param url - the url to open
7
+ *
8
+ * @returns - void
9
+ */
10
+ open(url: string): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,cAAc,SAAS,CAAC;AAExB,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;;;OAKG;IACG,IAAI,CAAC,GAAG,EAAE,MAAM;CAKvB"}
package/lib/index.js ADDED
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DeeplinkModule = void 0;
18
+ const wallet_api_client_1 = require("@ledgerhq/wallet-api-client");
19
+ __exportStar(require("./types"), exports);
20
+ class DeeplinkModule extends wallet_api_client_1.CustomModule {
21
+ /**
22
+ * Open a deeplink
23
+ * @param url - the url to open
24
+ *
25
+ * @returns - void
26
+ */
27
+ async open(url) {
28
+ await this.request("custom.deeplink.open", {
29
+ url,
30
+ });
31
+ }
32
+ }
33
+ exports.DeeplinkModule = DeeplinkModule;
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mEAA2D;AAG3D,0CAAwB;AAExB,MAAa,cAAe,SAAQ,gCAAY;IAC9C;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CAAC,GAAW;QACpB,MAAM,IAAI,CAAC,OAAO,CAA2B,sBAAsB,EAAE;YACnE,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;CACF;AAZD,wCAYC"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export type DeeplinkOpenParams = {
2
+ url: string;
3
+ };
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
package/lib/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { CustomModule } from "@ledgerhq/wallet-api-client";
2
+ export * from "./types";
3
+ export declare class DeeplinkModule extends CustomModule {
4
+ /**
5
+ * Open a deeplink
6
+ * @param url - the url to open
7
+ *
8
+ * @returns - void
9
+ */
10
+ open(url: string): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,cAAc,SAAS,CAAC;AAExB,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;;;OAKG;IACG,IAAI,CAAC,GAAG,EAAE,MAAM;CAKvB"}
@@ -0,0 +1,16 @@
1
+ import { CustomModule } from "@ledgerhq/wallet-api-client";
2
+ export * from "./types";
3
+ export class DeeplinkModule extends CustomModule {
4
+ /**
5
+ * Open a deeplink
6
+ * @param url - the url to open
7
+ *
8
+ * @returns - void
9
+ */
10
+ async open(url) {
11
+ await this.request("custom.deeplink.open", {
12
+ url,
13
+ });
14
+ }
15
+ }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,cAAc,SAAS,CAAC;AAExB,MAAM,OAAO,cAAe,SAAQ,YAAY;IAC9C;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CAAC,GAAW;QACpB,MAAM,IAAI,CAAC,OAAO,CAA2B,sBAAsB,EAAE;YACnE,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -0,0 +1,4 @@
1
+ export type DeeplinkOpenParams = {
2
+ url: string;
3
+ };
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@ledgerhq/wallet-api-deeplink-module",
3
+ "version": "0.2.0-nightly.0",
4
+ "description": "Wallet-API Deeplink Module for Ledger Live",
5
+ "license": "Apache-2.0",
6
+ "keywords": [
7
+ "Ledger"
8
+ ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/LedgerHQ/ledger-live.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/LedgerHQ/ledger-live/issues"
15
+ },
16
+ "homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/deeplink-module",
17
+ "main": "lib/index.js",
18
+ "module": "lib-es/index.js",
19
+ "types": "lib/index.d.ts",
20
+ "files": [
21
+ "/lib",
22
+ "/lib-es"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "dependencies": {
28
+ "@ledgerhq/wallet-api-client": "^1.10.0",
29
+ "@ledgerhq/wallet-api-core": "^1.22.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^22.10.10"
33
+ },
34
+ "scripts": {
35
+ "clean": "rimraf lib lib-es",
36
+ "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es && node scripts/createModulePackage.mjs",
37
+ "prewatch": "pnpm build",
38
+ "watch": "tsc --watch",
39
+ "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es",
40
+ "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx",
41
+ "lint:fix": "pnpm lint --fix"
42
+ }
43
+ }