@ledgerhq/live-common 34.55.0-nightly.20251224024018 → 34.55.0-nightly.20251225024217
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/families/filecoin/common.d.ts +0 -5
- package/lib/families/filecoin/common.d.ts.map +1 -1
- package/lib/families/filecoin/common.js +1 -8
- package/lib/families/filecoin/common.js.map +1 -1
- package/lib/families/filecoin/setup.d.ts.map +1 -1
- package/lib/families/filecoin/setup.js +5 -17
- package/lib/families/filecoin/setup.js.map +1 -1
- package/lib-es/families/filecoin/common.d.ts +0 -5
- package/lib-es/families/filecoin/common.d.ts.map +1 -1
- package/lib-es/families/filecoin/common.js +0 -5
- package/lib-es/families/filecoin/common.js.map +1 -1
- package/lib-es/families/filecoin/setup.d.ts.map +1 -1
- package/lib-es/families/filecoin/setup.js +5 -17
- package/lib-es/families/filecoin/setup.js.map +1 -1
- package/package.json +75 -75
- package/src/families/filecoin/common.ts +0 -6
- package/src/families/filecoin/setup.ts +6 -27
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAAU,MAAM,WAA8D,CAAC"}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const isNoErrorReturnCode = (code) => code === 0x9000;
|
|
5
|
-
exports.isNoErrorReturnCode = isNoErrorReturnCode;
|
|
3
|
+
exports.getPath = void 0;
|
|
6
4
|
const getPath = (path) => (path && path.substr(0, 2) !== "m/" ? `m/${path}` : path);
|
|
7
5
|
exports.getPath = getPath;
|
|
8
|
-
const isError = (r) => {
|
|
9
|
-
if (!(0, exports.isNoErrorReturnCode)(r.return_code))
|
|
10
|
-
throw new Error(`${r.return_code} - ${r.error_message}`);
|
|
11
|
-
};
|
|
12
|
-
exports.isError = isError;
|
|
13
6
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":";;;AAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAAtF,QAAA,OAAO,WAA+E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAYzE,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,iBAAiB,CAE3D,CAAC;AAEF,QAAA,MAAM,aAAa;;;;;;;;;CAElB,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,QAAyD,CAAC;AAE1E,QAAA,MAAM,QAAQ;;;;;;;;;;;;CAAiB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -6,30 +6,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.resolver = exports.messageSigner = exports.cliTools = exports.bridge = void 0;
|
|
8
8
|
const index_1 = require("@ledgerhq/coin-filecoin/index");
|
|
9
|
-
const ledger_filecoin_1 =
|
|
9
|
+
const ledger_filecoin_1 = require("@zondax/ledger-filecoin");
|
|
10
10
|
const index_2 = __importDefault(require("@ledgerhq/coin-filecoin/signer/index"));
|
|
11
11
|
const hw_signMessage_1 = require("@ledgerhq/coin-filecoin/hw-signMessage");
|
|
12
12
|
const cli_1 = __importDefault(require("@ledgerhq/coin-filecoin/test/cli"));
|
|
13
13
|
const setup_1 = require("../../bridge/setup");
|
|
14
14
|
const common_1 = require("./common");
|
|
15
15
|
const createSigner = (transport) => {
|
|
16
|
-
const filecoin = new ledger_filecoin_1.
|
|
16
|
+
const filecoin = new ledger_filecoin_1.FilecoinApp(transport);
|
|
17
17
|
return {
|
|
18
|
-
showAddressAndPubKey:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return r;
|
|
22
|
-
},
|
|
23
|
-
getAddressAndPubKey: async (path) => {
|
|
24
|
-
const r = await filecoin.getAddressAndPubKey((0, common_1.getPath)(path));
|
|
25
|
-
(0, common_1.isError)(r);
|
|
26
|
-
return r;
|
|
27
|
-
},
|
|
28
|
-
sign: async (path, message) => {
|
|
29
|
-
const r = await filecoin.sign((0, common_1.getPath)(path), message);
|
|
30
|
-
(0, common_1.isError)(r);
|
|
31
|
-
return r;
|
|
32
|
-
},
|
|
18
|
+
showAddressAndPubKey: (path) => filecoin.showAddressAndPubKey((0, common_1.getPath)(path)),
|
|
19
|
+
getAddressAndPubKey: (path) => filecoin.getAddressAndPubKey((0, common_1.getPath)(path)),
|
|
20
|
+
sign: (path, message) => filecoin.sign((0, common_1.getPath)(path), Buffer.from(message)),
|
|
33
21
|
};
|
|
34
22
|
};
|
|
35
23
|
const bridge = (0, index_1.createBridges)((0, setup_1.executeWithSigner)(createSigner));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":";AAAA,wFAAwF;;;;;;AAExF,yDAA8D;AAE9D,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":";AAAA,wFAAwF;;;;;;AAExF,yDAA8D;AAE9D,6DAAsD;AACtD,iFAAoE;AACpE,2EAAqE;AAErE,2EAA4D;AAC5D,8CAAqF;AAGrF,qCAAmC;AAEnC,MAAM,YAAY,GAAiC,CAAC,SAAoB,EAAE,EAAE;IAC1E,MAAM,QAAQ,GAAG,IAAI,6BAAW,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO;QACL,oBAAoB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAA,gBAAO,EAAC,IAAI,CAAC,CAAC;QACpF,mBAAmB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAA,gBAAO,EAAC,IAAI,CAAC,CAAC;QAClF,IAAI,EAAE,CAAC,IAAY,EAAE,OAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAA,gBAAO,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAChG,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAoD,IAAA,qBAAa,EAC3E,IAAA,yBAAiB,EAAC,YAAY,CAAC,CAChC,CAAC;AAUO,wBAAM;AARf,MAAM,aAAa,GAAG;IACpB,WAAW,EAAX,4BAAW;CACZ,CAAC;AAMyB,sCAAa;AAJxC,MAAM,QAAQ,GAAa,IAAA,sBAAc,EAAC,YAAY,EAAE,eAAgB,CAAC,CAAC;AAIhC,4BAAQ;AAFlD,MAAM,QAAQ,GAAG,IAAA,aAAY,GAAE,CAAC;AAEf,4BAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAAU,MAAM,WAA8D,CAAC"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export const isNoErrorReturnCode = (code) => code === 0x9000;
|
|
2
1
|
export const getPath = (path) => (path && path.substr(0, 2) !== "m/" ? `m/${path}` : path);
|
|
3
|
-
export const isError = (r) => {
|
|
4
|
-
if (!isNoErrorReturnCode(r.return_code))
|
|
5
|
-
throw new Error(`${r.return_code} - ${r.error_message}`);
|
|
6
|
-
};
|
|
7
2
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/families/filecoin/common.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAYzE,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,iBAAiB,CAE3D,CAAC;AAEF,QAAA,MAAM,aAAa;;;;;;;;;CAElB,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,QAAyD,CAAC;AAE1E,QAAA,MAAM,QAAQ;;;;;;;;;;;;CAAiB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
// Goal of this file is to inject all necessary device/signer dependency to coin-modules
|
|
2
2
|
import { createBridges } from "@ledgerhq/coin-filecoin/index";
|
|
3
|
-
import FilecoinApp from "@zondax/ledger-filecoin";
|
|
3
|
+
import { FilecoinApp } from "@zondax/ledger-filecoin";
|
|
4
4
|
import filecoinResolver from "@ledgerhq/coin-filecoin/signer/index";
|
|
5
5
|
import { signMessage } from "@ledgerhq/coin-filecoin/hw-signMessage";
|
|
6
6
|
import makeCliTools from "@ledgerhq/coin-filecoin/test/cli";
|
|
7
7
|
import { createResolver, executeWithSigner } from "../../bridge/setup";
|
|
8
|
-
import { getPath
|
|
8
|
+
import { getPath } from "./common";
|
|
9
9
|
const createSigner = (transport) => {
|
|
10
10
|
const filecoin = new FilecoinApp(transport);
|
|
11
11
|
return {
|
|
12
|
-
showAddressAndPubKey:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return r;
|
|
16
|
-
},
|
|
17
|
-
getAddressAndPubKey: async (path) => {
|
|
18
|
-
const r = await filecoin.getAddressAndPubKey(getPath(path));
|
|
19
|
-
isError(r);
|
|
20
|
-
return r;
|
|
21
|
-
},
|
|
22
|
-
sign: async (path, message) => {
|
|
23
|
-
const r = await filecoin.sign(getPath(path), message);
|
|
24
|
-
isError(r);
|
|
25
|
-
return r;
|
|
26
|
-
},
|
|
12
|
+
showAddressAndPubKey: (path) => filecoin.showAddressAndPubKey(getPath(path)),
|
|
13
|
+
getAddressAndPubKey: (path) => filecoin.getAddressAndPubKey(getPath(path)),
|
|
14
|
+
sign: (path, message) => filecoin.sign(getPath(path), Buffer.from(message)),
|
|
27
15
|
};
|
|
28
16
|
};
|
|
29
17
|
const bridge = createBridges(executeWithSigner(createSigner));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,WAAW,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/filecoin/setup.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAgB,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGrF,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,MAAM,YAAY,GAAiC,CAAC,SAAoB,EAAE,EAAE;IAC1E,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO;QACL,oBAAoB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpF,mBAAmB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClF,IAAI,EAAE,CAAC,IAAY,EAAE,OAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAChG,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAoD,aAAa,CAC3E,iBAAiB,CAAC,YAAY,CAAC,CAChC,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,WAAW;CACZ,CAAC;AAEF,MAAM,QAAQ,GAAa,cAAc,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAE1E,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-common",
|
|
3
3
|
"description": "Common ground for the Ledger Live apps",
|
|
4
|
-
"version": "34.55.0-nightly.
|
|
4
|
+
"version": "34.55.0-nightly.20251225024217",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"@xstate/react": "^5.0.2",
|
|
141
141
|
"@zondax/ledger-casper": "^2.6.1",
|
|
142
142
|
"@zondax/ledger-cosmos-js": "3.0.3",
|
|
143
|
-
"@zondax/ledger-filecoin": "^
|
|
143
|
+
"@zondax/ledger-filecoin": "^3.0.6",
|
|
144
144
|
"@zondax/ledger-icp": "^0.7.0",
|
|
145
145
|
"@zondax/ledger-mina-js": "0.0.2",
|
|
146
146
|
"@zondax/ledger-stacks": "^1.0.2",
|
|
@@ -178,79 +178,79 @@
|
|
|
178
178
|
"xstate": "^5.19.2",
|
|
179
179
|
"yargs": "^17.0.0",
|
|
180
180
|
"zod": "^3.22.4",
|
|
181
|
-
"@ledgerhq/coin-algorand": "^0.15.0-nightly.
|
|
182
|
-
"@ledgerhq/coin-aptos": "^3.8.0-nightly.
|
|
183
|
-
"@ledgerhq/coin-bitcoin": "^0.27.0-nightly.
|
|
184
|
-
"@ledgerhq/coin-canton": "^0.12.0-nightly.
|
|
185
|
-
"@ledgerhq/coin-cardano": "^0.16.0-nightly.
|
|
186
|
-
"@ledgerhq/coin-casper": "^2.5.0-nightly.
|
|
187
|
-
"@ledgerhq/coin-celo": "^1.8.0-nightly.
|
|
188
|
-
"@ledgerhq/coin-cosmos": "^0.21.0-nightly.
|
|
189
|
-
"@ledgerhq/coin-evm": "^2.37.0-nightly.
|
|
190
|
-
"@ledgerhq/coin-filecoin": "^1.16.0-nightly.
|
|
191
|
-
"@ledgerhq/coin-framework": "^6.11.0-nightly.
|
|
192
|
-
"@ledgerhq/coin-
|
|
193
|
-
"@ledgerhq/coin-
|
|
194
|
-
"@ledgerhq/coin-kaspa": "^1.6.0-nightly.
|
|
195
|
-
"@ledgerhq/coin-mina": "^1.5.0-nightly.
|
|
196
|
-
"@ledgerhq/coin-
|
|
197
|
-
"@ledgerhq/coin-
|
|
198
|
-
"@ledgerhq/coin-
|
|
199
|
-
"@ledgerhq/coin-
|
|
200
|
-
"@ledgerhq/coin-
|
|
201
|
-
"@ledgerhq/coin-
|
|
202
|
-
"@ledgerhq/coin-
|
|
203
|
-
"@ledgerhq/coin-sui": "^0.19.0-nightly.
|
|
204
|
-
"@ledgerhq/coin-tezos": "^6.11.0-nightly.
|
|
205
|
-
"@ledgerhq/coin-ton": "^0.18.0-nightly.
|
|
206
|
-
"@ledgerhq/coin-tron": "^5.8.0-nightly.
|
|
207
|
-
"@ledgerhq/coin-vechain": "^2.14.0-nightly.
|
|
208
|
-
"@ledgerhq/coin-xrp": "^7.10.0-nightly.
|
|
209
|
-
"@ledgerhq/cryptoassets": "^13.35.0-nightly.
|
|
210
|
-
"@ledgerhq/device-core": "^0.6.11-nightly.
|
|
211
|
-
"@ledgerhq/devices": "8.8.0-nightly.
|
|
212
|
-
"@ledgerhq/errors": "^6.28.0-nightly.
|
|
213
|
-
"@ledgerhq/hw-app-algorand": "^6.31.11-nightly.
|
|
214
|
-
"@ledgerhq/hw-app-aptos": "^6.34.11-nightly.
|
|
215
|
-
"@ledgerhq/hw-app-btc": "^10.14.0-nightly.
|
|
216
|
-
"@ledgerhq/hw-app-cosmos": "^6.32.11-nightly.
|
|
217
|
-
"@ledgerhq/hw-app-celo": "^6.35.6-nightly.
|
|
218
|
-
"@ledgerhq/hw-app-eth": "^7.1.0-nightly.
|
|
219
|
-
"@ledgerhq/hw-app-
|
|
220
|
-
"@ledgerhq/hw-app-
|
|
221
|
-
"@ledgerhq/hw-app-icon": "^1.3.11-nightly.
|
|
222
|
-
"@ledgerhq/hw-app-kaspa": "^1.3.4-nightly.
|
|
223
|
-
"@ledgerhq/hw-app-multiversx": "^6.26.2-nightly.
|
|
224
|
-
"@ledgerhq/hw-app-near": "^6.31.11-nightly.
|
|
225
|
-
"@ledgerhq/hw-app-polkadot": "^6.34.11-nightly.
|
|
226
|
-
"@ledgerhq/hw-app-str": "^7.3.0-nightly.
|
|
181
|
+
"@ledgerhq/coin-algorand": "^0.15.0-nightly.20251225024217",
|
|
182
|
+
"@ledgerhq/coin-aptos": "^3.8.0-nightly.20251225024217",
|
|
183
|
+
"@ledgerhq/coin-bitcoin": "^0.27.0-nightly.20251225024217",
|
|
184
|
+
"@ledgerhq/coin-canton": "^0.12.0-nightly.20251225024217",
|
|
185
|
+
"@ledgerhq/coin-cardano": "^0.16.0-nightly.20251225024217",
|
|
186
|
+
"@ledgerhq/coin-casper": "^2.5.0-nightly.20251225024217",
|
|
187
|
+
"@ledgerhq/coin-celo": "^1.8.0-nightly.20251225024217",
|
|
188
|
+
"@ledgerhq/coin-cosmos": "^0.21.0-nightly.20251225024217",
|
|
189
|
+
"@ledgerhq/coin-evm": "^2.37.0-nightly.20251225024217",
|
|
190
|
+
"@ledgerhq/coin-filecoin": "^1.16.0-nightly.20251225024217",
|
|
191
|
+
"@ledgerhq/coin-framework": "^6.11.0-nightly.20251225024217",
|
|
192
|
+
"@ledgerhq/coin-icon": "^0.16.0-nightly.20251225024217",
|
|
193
|
+
"@ledgerhq/coin-internet_computer": "^1.12.0-nightly.20251225024217",
|
|
194
|
+
"@ledgerhq/coin-kaspa": "^1.6.0-nightly.20251225024217",
|
|
195
|
+
"@ledgerhq/coin-mina": "^1.5.0-nightly.20251225024217",
|
|
196
|
+
"@ledgerhq/coin-multiversx": "^0.9.0-nightly.20251225024217",
|
|
197
|
+
"@ledgerhq/coin-hedera": "^1.16.0-nightly.20251225024217",
|
|
198
|
+
"@ledgerhq/coin-near": "^0.17.0-nightly.20251225024217",
|
|
199
|
+
"@ledgerhq/coin-solana": "^0.39.0-nightly.20251225024217",
|
|
200
|
+
"@ledgerhq/coin-polkadot": "^6.14.0-nightly.20251225024217",
|
|
201
|
+
"@ledgerhq/coin-stacks": "^0.13.0-nightly.20251225024217",
|
|
202
|
+
"@ledgerhq/coin-stellar": "^6.9.0-nightly.20251225024217",
|
|
203
|
+
"@ledgerhq/coin-sui": "^0.19.0-nightly.20251225024217",
|
|
204
|
+
"@ledgerhq/coin-tezos": "^6.11.0-nightly.20251225024217",
|
|
205
|
+
"@ledgerhq/coin-ton": "^0.18.0-nightly.20251225024217",
|
|
206
|
+
"@ledgerhq/coin-tron": "^5.8.0-nightly.20251225024217",
|
|
207
|
+
"@ledgerhq/coin-vechain": "^2.14.0-nightly.20251225024217",
|
|
208
|
+
"@ledgerhq/coin-xrp": "^7.10.0-nightly.20251225024217",
|
|
209
|
+
"@ledgerhq/cryptoassets": "^13.35.0-nightly.20251225024217",
|
|
210
|
+
"@ledgerhq/device-core": "^0.6.11-nightly.20251225024217",
|
|
211
|
+
"@ledgerhq/devices": "8.8.0-nightly.20251225024217",
|
|
212
|
+
"@ledgerhq/errors": "^6.28.0-nightly.20251225024217",
|
|
213
|
+
"@ledgerhq/hw-app-algorand": "^6.31.11-nightly.20251225024217",
|
|
214
|
+
"@ledgerhq/hw-app-aptos": "^6.34.11-nightly.20251225024217",
|
|
215
|
+
"@ledgerhq/hw-app-btc": "^10.14.0-nightly.20251225024217",
|
|
216
|
+
"@ledgerhq/hw-app-cosmos": "^6.32.11-nightly.20251225024217",
|
|
217
|
+
"@ledgerhq/hw-app-celo": "^6.35.6-nightly.20251225024217",
|
|
218
|
+
"@ledgerhq/hw-app-eth": "^7.1.0-nightly.20251225024217",
|
|
219
|
+
"@ledgerhq/hw-app-exchange": "^0.18.2-nightly.20251225024217",
|
|
220
|
+
"@ledgerhq/hw-app-hedera": "^1.2.11-nightly.20251225024217",
|
|
221
|
+
"@ledgerhq/hw-app-icon": "^1.3.11-nightly.20251225024217",
|
|
222
|
+
"@ledgerhq/hw-app-kaspa": "^1.3.4-nightly.20251225024217",
|
|
223
|
+
"@ledgerhq/hw-app-multiversx": "^6.26.2-nightly.20251225024217",
|
|
224
|
+
"@ledgerhq/hw-app-near": "^6.31.11-nightly.20251225024217",
|
|
225
|
+
"@ledgerhq/hw-app-polkadot": "^6.34.11-nightly.20251225024217",
|
|
226
|
+
"@ledgerhq/hw-app-str": "^7.3.0-nightly.20251225024217",
|
|
227
227
|
"@ledgerhq/hw-app-sui": "^1.4.0",
|
|
228
|
-
"@ledgerhq/hw-app-tezos": "^6.32.0-nightly.
|
|
229
|
-
"@ledgerhq/hw-app-trx": "^6.31.11-nightly.
|
|
230
|
-
"@ledgerhq/hw-app-vet": "^0.8.2-nightly.
|
|
231
|
-
"@ledgerhq/hw-app-xrp": "^6.32.9-nightly.
|
|
232
|
-
"@ledgerhq/hw-bolos": "^6.32.11-nightly.
|
|
233
|
-
"@ledgerhq/hw-transport": "6.31.15-nightly.
|
|
234
|
-
"@ledgerhq/hw-transport-mocker": "^6.30.0-nightly.
|
|
235
|
-
"@ledgerhq/client-ids": "^0.2.0-nightly.
|
|
236
|
-
"@ledgerhq/ledger-cal-service": "^1.10.0-nightly.
|
|
237
|
-
"@ledgerhq/live-config": "^3.3.0-nightly.
|
|
238
|
-
"@ledgerhq/ledger-trust-service": "^0.4.5-nightly.
|
|
239
|
-
"@ledgerhq/live-countervalues": "^0.10.3-nightly.
|
|
240
|
-
"@ledgerhq/live-countervalues-react": "^0.7.5-nightly.
|
|
241
|
-
"@ledgerhq/live-dmk-shared": "^0.16.0-nightly.
|
|
242
|
-
"@ledgerhq/live-
|
|
243
|
-
"@ledgerhq/live-
|
|
244
|
-
"@ledgerhq/live-network": "^2.1.4-nightly.
|
|
245
|
-
"@ledgerhq/live-signer-evm": "^0.11.0-nightly.20251224024018",
|
|
228
|
+
"@ledgerhq/hw-app-tezos": "^6.32.0-nightly.20251225024217",
|
|
229
|
+
"@ledgerhq/hw-app-trx": "^6.31.11-nightly.20251225024217",
|
|
230
|
+
"@ledgerhq/hw-app-vet": "^0.8.2-nightly.20251225024217",
|
|
231
|
+
"@ledgerhq/hw-app-xrp": "^6.32.9-nightly.20251225024217",
|
|
232
|
+
"@ledgerhq/hw-bolos": "^6.32.11-nightly.20251225024217",
|
|
233
|
+
"@ledgerhq/hw-transport": "6.31.15-nightly.20251225024217",
|
|
234
|
+
"@ledgerhq/hw-transport-mocker": "^6.30.0-nightly.20251225024217",
|
|
235
|
+
"@ledgerhq/client-ids": "^0.2.0-nightly.20251225024217",
|
|
236
|
+
"@ledgerhq/ledger-cal-service": "^1.10.0-nightly.20251225024217",
|
|
237
|
+
"@ledgerhq/live-config": "^3.3.0-nightly.20251225024217",
|
|
238
|
+
"@ledgerhq/ledger-trust-service": "^0.4.5-nightly.20251225024217",
|
|
239
|
+
"@ledgerhq/live-countervalues": "^0.10.3-nightly.20251225024217",
|
|
240
|
+
"@ledgerhq/live-countervalues-react": "^0.7.5-nightly.20251225024217",
|
|
241
|
+
"@ledgerhq/live-dmk-shared": "^0.16.0-nightly.20251225024217",
|
|
242
|
+
"@ledgerhq/live-env": "^2.23.0-nightly.20251225024217",
|
|
243
|
+
"@ledgerhq/live-hooks": "0.3.0-nightly.20251225024217",
|
|
244
|
+
"@ledgerhq/live-network": "^2.1.4-nightly.20251225024217",
|
|
246
245
|
"@ledgerhq/live-promise": "^0.1.1",
|
|
247
|
-
"@ledgerhq/live-signer-canton": "^0.5.4-nightly.
|
|
248
|
-
"@ledgerhq/live-signer-
|
|
249
|
-
"@ledgerhq/live-
|
|
246
|
+
"@ledgerhq/live-signer-canton": "^0.5.4-nightly.20251225024217",
|
|
247
|
+
"@ledgerhq/live-signer-evm": "^0.11.0-nightly.20251225024217",
|
|
248
|
+
"@ledgerhq/live-signer-solana": "^0.8.0-nightly.20251225024217",
|
|
249
|
+
"@ledgerhq/live-wallet": "^0.17.0-nightly.20251225024217",
|
|
250
250
|
"@ledgerhq/logs": "^6.13.0",
|
|
251
|
-
"@ledgerhq/
|
|
252
|
-
"@ledgerhq/
|
|
253
|
-
"@ledgerhq/wallet-api-exchange-module": "^0.20.0-nightly.
|
|
251
|
+
"@ledgerhq/speculos-transport": "^0.4.0-nightly.20251225024217",
|
|
252
|
+
"@ledgerhq/wallet-api-acre-module": "^0.11.0-nightly.20251225024217",
|
|
253
|
+
"@ledgerhq/wallet-api-exchange-module": "^0.20.0-nightly.20251225024217"
|
|
254
254
|
},
|
|
255
255
|
"devDependencies": {
|
|
256
256
|
"@solana/web3.js": "1.95.4",
|
|
@@ -297,10 +297,10 @@
|
|
|
297
297
|
"undici": "6.19.2",
|
|
298
298
|
"uuid": "^8.3.2",
|
|
299
299
|
"ws": "8.18.3",
|
|
300
|
-
"@ledgerhq/
|
|
301
|
-
"@ledgerhq/
|
|
300
|
+
"@ledgerhq/device-react": "^0.3.5-nightly.20251225024217",
|
|
301
|
+
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251225024217",
|
|
302
302
|
"@ledgerhq/types-devices": "^6.27.0",
|
|
303
|
-
"@ledgerhq/types-live": "^6.91.0-nightly.
|
|
303
|
+
"@ledgerhq/types-live": "^6.91.0-nightly.20251225024217"
|
|
304
304
|
},
|
|
305
305
|
"scripts": {
|
|
306
306
|
"build": "zx ./scripts/build-ts.mjs",
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export const isNoErrorReturnCode = (code: number) => code === 0x9000;
|
|
2
|
-
|
|
3
1
|
export const getPath = (path: string) => (path && path.substr(0, 2) !== "m/" ? `m/${path}` : path);
|
|
4
|
-
|
|
5
|
-
export const isError = (r: { return_code: number; error_message: string }) => {
|
|
6
|
-
if (!isNoErrorReturnCode(r.return_code)) throw new Error(`${r.return_code} - ${r.error_message}`);
|
|
7
|
-
};
|
|
@@ -2,43 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
import { createBridges } from "@ledgerhq/coin-filecoin/index";
|
|
4
4
|
import Transport from "@ledgerhq/hw-transport";
|
|
5
|
-
import FilecoinApp from "@zondax/ledger-filecoin";
|
|
5
|
+
import { FilecoinApp } from "@zondax/ledger-filecoin";
|
|
6
6
|
import filecoinResolver from "@ledgerhq/coin-filecoin/signer/index";
|
|
7
7
|
import { signMessage } from "@ledgerhq/coin-filecoin/hw-signMessage";
|
|
8
8
|
import type { Account, Bridge } from "@ledgerhq/types-live";
|
|
9
9
|
import makeCliTools from "@ledgerhq/coin-filecoin/test/cli";
|
|
10
10
|
import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
|
|
11
11
|
import { Resolver } from "../../hw/getAddress/types";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
Transaction,
|
|
15
|
-
FilecoinGetAddrResponse,
|
|
16
|
-
FilecoinSignature,
|
|
17
|
-
FilecoinSigner,
|
|
18
|
-
} from "./types";
|
|
19
|
-
import { getPath, isError } from "./common";
|
|
12
|
+
import { TransactionStatus, Transaction, FilecoinSigner } from "./types";
|
|
13
|
+
import { getPath } from "./common";
|
|
20
14
|
|
|
21
15
|
const createSigner: CreateSigner<FilecoinSigner> = (transport: Transport) => {
|
|
22
16
|
const filecoin = new FilecoinApp(transport);
|
|
23
17
|
return {
|
|
24
|
-
showAddressAndPubKey:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return r;
|
|
29
|
-
},
|
|
30
|
-
getAddressAndPubKey: async (path: string): Promise<FilecoinGetAddrResponse> => {
|
|
31
|
-
const r = await filecoin.getAddressAndPubKey(getPath(path));
|
|
32
|
-
isError(r);
|
|
33
|
-
|
|
34
|
-
return r;
|
|
35
|
-
},
|
|
36
|
-
sign: async (path: string, message: Uint8Array): Promise<FilecoinSignature> => {
|
|
37
|
-
const r = await filecoin.sign(getPath(path), message);
|
|
38
|
-
isError(r);
|
|
39
|
-
|
|
40
|
-
return r;
|
|
41
|
-
},
|
|
18
|
+
showAddressAndPubKey: (path: string) => filecoin.showAddressAndPubKey(getPath(path)),
|
|
19
|
+
getAddressAndPubKey: (path: string) => filecoin.getAddressAndPubKey(getPath(path)),
|
|
20
|
+
sign: (path: string, message: Uint8Array) => filecoin.sign(getPath(path), Buffer.from(message)),
|
|
42
21
|
};
|
|
43
22
|
};
|
|
44
23
|
|
|
@@ -160,7 +160,7 @@ exports[`hedera currency bridge scanAccounts hedera seed 1 1`] = `
|
|
|
160
160
|
"delegation": {
|
|
161
161
|
"delegated": "334045080",
|
|
162
162
|
"nodeId": 18,
|
|
163
|
-
"pendingReward": "
|
|
163
|
+
"pendingReward": "102735",
|
|
164
164
|
},
|
|
165
165
|
"isAutoTokenAssociationEnabled": false,
|
|
166
166
|
"maxAutomaticTokenAssociations": 0,
|
|
@@ -188,12 +188,12 @@ exports[`hedera currency bridge scanAccounts hedera seed 1 1`] = `
|
|
|
188
188
|
"type": "TokenAccountRaw",
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
|
-
"balance": "
|
|
191
|
+
"balance": "40011",
|
|
192
192
|
"id": "js:2:hedera:0.0.8313485:hederaBip44+hedera%2Ferc20%2Fbonzo~!underscore!~atoken~!underscore!~usdc~!underscore!~0xb7687538c7f4cad022d5e97cc778d0b46457c5db",
|
|
193
193
|
"operationsCount": 4,
|
|
194
194
|
"parentId": "js:2:hedera:0.0.8313485:hederaBip44",
|
|
195
195
|
"pendingOperations": [],
|
|
196
|
-
"spendableBalance": "
|
|
196
|
+
"spendableBalance": "40011",
|
|
197
197
|
"swapHistory": [],
|
|
198
198
|
"tokenId": "hedera/erc20/bonzo_atoken_usdc_0xb7687538c7f4cad022d5e97cc778d0b46457c5db",
|
|
199
199
|
"type": "TokenAccountRaw",
|