@ledgerhq/hw-app-celo 6.34.2 → 6.34.3-nightly.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +14 -0
- package/lib/Celo.d.ts +1 -2
- package/lib/Celo.d.ts.map +1 -1
- package/lib/Celo.js +9 -3
- package/lib/Celo.js.map +1 -1
- package/lib-es/Celo.d.ts +1 -2
- package/lib-es/Celo.d.ts.map +1 -1
- package/lib-es/Celo.js +9 -3
- package/lib-es/Celo.js.map +1 -1
- package/package.json +7 -7
- package/src/Celo.ts +8 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @ledgerhq/hw-app-celo@6.34.
|
|
2
|
+
> @ledgerhq/hw-app-celo@6.34.3-nightly.0 build /home/runner/work/ledger-live/ledger-live/libs/ledgerjs/packages/hw-app-celo
|
|
3
3
|
> tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ledgerhq/hw-app-polkadot
|
|
2
2
|
|
|
3
|
+
## 6.34.3-nightly.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @ledgerhq/hw-app-eth@6.45.18-nightly.1
|
|
9
|
+
|
|
10
|
+
## 6.34.3-nightly.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies []:
|
|
15
|
+
- @ledgerhq/hw-app-eth@6.45.18-nightly.0
|
|
16
|
+
|
|
3
17
|
## 6.34.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/lib/Celo.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Eth from "@ledgerhq/hw-app-eth";
|
|
2
2
|
import { LegacyEncodedTx } from "@celo/wallet-base";
|
|
3
3
|
import type { CeloTx, RLPEncodedTx } from "@celo/connect";
|
|
4
|
-
import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types";
|
|
5
4
|
/**
|
|
6
5
|
* Heavily inspiried by celo-web-wallet
|
|
7
6
|
* https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
|
|
8
7
|
*/
|
|
9
8
|
export default class Celo extends Eth {
|
|
10
|
-
signTransaction(path: string, rawTxHex: string
|
|
9
|
+
signTransaction(path: string, rawTxHex: string): Promise<{
|
|
11
10
|
s: string;
|
|
12
11
|
v: string;
|
|
13
12
|
r: string;
|
package/lib/Celo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AAEvC,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AAEvC,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,GAAG;IAC7B,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAczC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
|
package/lib/Celo.js
CHANGED
|
@@ -11,8 +11,14 @@ const wallet_base_1 = require("@celo/wallet-base");
|
|
|
11
11
|
* https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
|
|
12
12
|
*/
|
|
13
13
|
class Celo extends hw_app_eth_1.default {
|
|
14
|
-
async signTransaction(path, rawTxHex
|
|
15
|
-
return super.signTransaction(path, rawTxHex,
|
|
14
|
+
async signTransaction(path, rawTxHex) {
|
|
15
|
+
return super.signTransaction(path, rawTxHex, {
|
|
16
|
+
erc20Tokens: [],
|
|
17
|
+
nfts: [],
|
|
18
|
+
externalPlugin: [],
|
|
19
|
+
plugin: [],
|
|
20
|
+
domains: [],
|
|
21
|
+
});
|
|
16
22
|
}
|
|
17
23
|
// celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
|
|
18
24
|
// this legacy version of the app also only supported celo type 0 transactions.
|
|
@@ -22,7 +28,7 @@ class Celo extends hw_app_eth_1.default {
|
|
|
22
28
|
const tokenInfo = (0, tokens_1.tokenInfoByAddressAndChainId)(to, chainId);
|
|
23
29
|
if (tokenInfo) {
|
|
24
30
|
// celo-spender-app below version 1.2.3 expected unprefixed hex strings only
|
|
25
|
-
const dataString =
|
|
31
|
+
const dataString = `${tokenInfo.data.toString("hex")}`;
|
|
26
32
|
await this.provideERC20TokenInformation(dataString);
|
|
27
33
|
}
|
|
28
34
|
}
|
package/lib/Celo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":";;;;;AAAA,sEAAuC;AACvC,2DAA8E;AAC9E,mDAAkE;
|
|
1
|
+
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":";;;;;AAAA,sEAAuC;AACvC,2DAA8E;AAC9E,mDAAkE;AAGlE;;;GAGG;AACH,MAAqB,IAAK,SAAQ,oBAAG;IACnC,KAAK,CAAC,eAAe,CACnB,IAAY,EACZ,QAAgB;QAEhB,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE;YAC3C,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,EAAE;YACR,cAAc,EAAE,EAAE;YAClB,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC;IACL,CAAC;IAED,kGAAkG;IAClG,+EAA+E;IAC/E,6GAA6G;IAC7G,iDAAiD;IACjD,KAAK,CAAC,eAAe,CAAC,EAAU,EAAE,OAAe;QAC/C,MAAM,SAAS,GAAG,IAAA,qCAA4B,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAI,SAAS,EAAE,CAAC;YACd,4EAA4E;YAC5E,MAAM,UAAU,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,OAAO,IAAA,0BAAY,EAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AA/BD,uBA+BC"}
|
package/lib-es/Celo.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Eth from "@ledgerhq/hw-app-eth";
|
|
2
2
|
import { LegacyEncodedTx } from "@celo/wallet-base";
|
|
3
3
|
import type { CeloTx, RLPEncodedTx } from "@celo/connect";
|
|
4
|
-
import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types";
|
|
5
4
|
/**
|
|
6
5
|
* Heavily inspiried by celo-web-wallet
|
|
7
6
|
* https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
|
|
8
7
|
*/
|
|
9
8
|
export default class Celo extends Eth {
|
|
10
|
-
signTransaction(path: string, rawTxHex: string
|
|
9
|
+
signTransaction(path: string, rawTxHex: string): Promise<{
|
|
11
10
|
s: string;
|
|
12
11
|
v: string;
|
|
13
12
|
r: string;
|
package/lib-es/Celo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AAEvC,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AAEvC,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,GAAG;IAC7B,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAczC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
|
package/lib-es/Celo.js
CHANGED
|
@@ -6,8 +6,14 @@ import { rlpEncodedTx } from "@celo/wallet-base";
|
|
|
6
6
|
* https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
|
|
7
7
|
*/
|
|
8
8
|
export default class Celo extends Eth {
|
|
9
|
-
async signTransaction(path, rawTxHex
|
|
10
|
-
return super.signTransaction(path, rawTxHex,
|
|
9
|
+
async signTransaction(path, rawTxHex) {
|
|
10
|
+
return super.signTransaction(path, rawTxHex, {
|
|
11
|
+
erc20Tokens: [],
|
|
12
|
+
nfts: [],
|
|
13
|
+
externalPlugin: [],
|
|
14
|
+
plugin: [],
|
|
15
|
+
domains: [],
|
|
16
|
+
});
|
|
11
17
|
}
|
|
12
18
|
// celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
|
|
13
19
|
// this legacy version of the app also only supported celo type 0 transactions.
|
|
@@ -17,7 +23,7 @@ export default class Celo extends Eth {
|
|
|
17
23
|
const tokenInfo = tokenInfoByAddressAndChainId(to, chainId);
|
|
18
24
|
if (tokenInfo) {
|
|
19
25
|
// celo-spender-app below version 1.2.3 expected unprefixed hex strings only
|
|
20
|
-
const dataString =
|
|
26
|
+
const dataString = `${tokenInfo.data.toString("hex")}`;
|
|
21
27
|
await this.provideERC20TokenInformation(dataString);
|
|
22
28
|
}
|
|
23
29
|
}
|
package/lib-es/Celo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAGlE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,GAAG;IACnC,KAAK,CAAC,eAAe,CACnB,IAAY,EACZ,QAAgB;QAEhB,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE;YAC3C,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,EAAE;YACR,cAAc,EAAE,EAAE;YAClB,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC;IACL,CAAC;IAED,kGAAkG;IAClG,+EAA+E;IAC/E,6GAA6G;IAC7G,iDAAiD;IACjD,KAAK,CAAC,eAAe,CAAC,EAAU,EAAE,OAAe;QAC/C,MAAM,SAAS,GAAG,4BAA4B,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAI,SAAS,EAAE,CAAC;YACd,4EAA4E;YAC5E,MAAM,UAAU,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/hw-app-celo",
|
|
3
|
-
"version": "6.34.
|
|
3
|
+
"version": "6.34.3-nightly.1",
|
|
4
4
|
"description": "Ledger Hardware Wallet Celo Application API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"types": "lib/Celo.d.ts",
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@celo/connect": "^
|
|
31
|
-
"@celo/contractkit": "^
|
|
32
|
-
"@celo/utils": "^
|
|
33
|
-
"@celo/wallet-base": "^
|
|
34
|
-
"@celo/wallet-ledger": "^
|
|
30
|
+
"@celo/connect": "^7.0.0",
|
|
31
|
+
"@celo/contractkit": "^10.0.0",
|
|
32
|
+
"@celo/utils": "^8.0.3",
|
|
33
|
+
"@celo/wallet-base": "^8.0.0",
|
|
34
|
+
"@celo/wallet-ledger": "^8.0.0",
|
|
35
35
|
"bip32-path": "^0.4.2",
|
|
36
36
|
"rlp": "^3.0.0",
|
|
37
37
|
"semver": "^7.3.5",
|
|
38
38
|
"@ledgerhq/errors": "^6.25.0",
|
|
39
|
-
"@ledgerhq/hw-app-eth": "^6.45.
|
|
39
|
+
"@ledgerhq/hw-app-eth": "^6.45.18-nightly.1",
|
|
40
40
|
"@ledgerhq/hw-transport": "^6.31.10"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
package/src/Celo.ts
CHANGED
|
@@ -2,7 +2,6 @@ import Eth from "@ledgerhq/hw-app-eth";
|
|
|
2
2
|
import { tokenInfoByAddressAndChainId } from "@celo/wallet-ledger/lib/tokens";
|
|
3
3
|
import { rlpEncodedTx, LegacyEncodedTx } from "@celo/wallet-base";
|
|
4
4
|
import type { CeloTx, RLPEncodedTx } from "@celo/connect";
|
|
5
|
-
import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Heavily inspiried by celo-web-wallet
|
|
@@ -12,9 +11,14 @@ export default class Celo extends Eth {
|
|
|
12
11
|
async signTransaction(
|
|
13
12
|
path: string,
|
|
14
13
|
rawTxHex: string,
|
|
15
|
-
resolution?: LedgerEthTransactionResolution | null,
|
|
16
14
|
): Promise<{ s: string; v: string; r: string }> {
|
|
17
|
-
return super.signTransaction(path, rawTxHex,
|
|
15
|
+
return super.signTransaction(path, rawTxHex, {
|
|
16
|
+
erc20Tokens: [],
|
|
17
|
+
nfts: [],
|
|
18
|
+
externalPlugin: [],
|
|
19
|
+
plugin: [],
|
|
20
|
+
domains: [],
|
|
21
|
+
});
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
// celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
|
|
@@ -26,7 +30,7 @@ export default class Celo extends Eth {
|
|
|
26
30
|
|
|
27
31
|
if (tokenInfo) {
|
|
28
32
|
// celo-spender-app below version 1.2.3 expected unprefixed hex strings only
|
|
29
|
-
const dataString =
|
|
33
|
+
const dataString = `${tokenInfo.data.toString("hex")}`;
|
|
30
34
|
await this.provideERC20TokenInformation(dataString);
|
|
31
35
|
}
|
|
32
36
|
}
|