@ledgerhq/hw-app-celo 6.34.4 → 6.34.5-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/CHANGELOG.md +7 -0
- package/lib/Celo.d.ts +0 -1
- package/lib/Celo.d.ts.map +1 -1
- package/lib/Celo.js +1 -20
- package/lib/Celo.js.map +1 -1
- package/lib-es/Celo.d.ts +0 -1
- package/lib-es/Celo.d.ts.map +1 -1
- package/lib-es/Celo.js +1 -20
- package/lib-es/Celo.js.map +1 -1
- package/package.json +3 -3
- package/src/Celo.ts +1 -22
package/CHANGELOG.md
CHANGED
package/lib/Celo.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export default class Celo extends Eth {
|
|
|
11
11
|
v: string;
|
|
12
12
|
r: string;
|
|
13
13
|
}>;
|
|
14
|
-
verifyTokenInfo(to: string, chainId: number): Promise<void>;
|
|
15
14
|
rlpEncodedTxForLedger(txParams: CeloTx): Promise<RLPEncodedTx | LegacyEncodedTx>;
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=Celo.d.ts.map
|
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;
|
|
1
|
+
{"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,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;IAIzC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
|
package/lib/Celo.js
CHANGED
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const hw_app_eth_1 = __importDefault(require("@ledgerhq/hw-app-eth"));
|
|
7
|
-
const tokens_1 = require("@celo/wallet-ledger/lib/tokens");
|
|
8
7
|
const wallet_base_1 = require("@celo/wallet-base");
|
|
9
8
|
/**
|
|
10
9
|
* Heavily inspiried by celo-web-wallet
|
|
@@ -12,25 +11,7 @@ const wallet_base_1 = require("@celo/wallet-base");
|
|
|
12
11
|
*/
|
|
13
12
|
class Celo extends hw_app_eth_1.default {
|
|
14
13
|
async signTransaction(path, rawTxHex) {
|
|
15
|
-
return super.signTransaction(path, rawTxHex
|
|
16
|
-
erc20Tokens: [],
|
|
17
|
-
nfts: [],
|
|
18
|
-
externalPlugin: [],
|
|
19
|
-
plugin: [],
|
|
20
|
-
domains: [],
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
// celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
|
|
24
|
-
// this legacy version of the app also only supported celo type 0 transactions.
|
|
25
|
-
// if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work
|
|
26
|
-
// so you can safely remove all the legacy paths.
|
|
27
|
-
async verifyTokenInfo(to, chainId) {
|
|
28
|
-
const tokenInfo = (0, tokens_1.tokenInfoByAddressAndChainId)(to, chainId);
|
|
29
|
-
if (tokenInfo) {
|
|
30
|
-
// celo-spender-app below version 1.2.3 expected unprefixed hex strings only
|
|
31
|
-
const dataString = `${tokenInfo.data.toString("hex")}`;
|
|
32
|
-
await this.provideERC20TokenInformation(dataString);
|
|
33
|
-
}
|
|
14
|
+
return super.signTransaction(path, rawTxHex);
|
|
34
15
|
}
|
|
35
16
|
async rlpEncodedTxForLedger(txParams) {
|
|
36
17
|
return (0, wallet_base_1.rlpEncodedTx)(txParams);
|
package/lib/Celo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":";;;;;AAAA,sEAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":";;;;;AAAA,sEAAuC;AACvC,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,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,OAAO,IAAA,0BAAY,EAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AAXD,uBAWC"}
|
package/lib-es/Celo.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export default class Celo extends Eth {
|
|
|
11
11
|
v: string;
|
|
12
12
|
r: string;
|
|
13
13
|
}>;
|
|
14
|
-
verifyTokenInfo(to: string, chainId: number): Promise<void>;
|
|
15
14
|
rlpEncodedTxForLedger(txParams: CeloTx): Promise<RLPEncodedTx | LegacyEncodedTx>;
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=Celo.d.ts.map
|
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;
|
|
1
|
+
{"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,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;IAIzC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
|
package/lib-es/Celo.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Eth from "@ledgerhq/hw-app-eth";
|
|
2
|
-
import { tokenInfoByAddressAndChainId } from "@celo/wallet-ledger/lib/tokens";
|
|
3
2
|
import { rlpEncodedTx } from "@celo/wallet-base";
|
|
4
3
|
/**
|
|
5
4
|
* Heavily inspiried by celo-web-wallet
|
|
@@ -7,25 +6,7 @@ import { rlpEncodedTx } from "@celo/wallet-base";
|
|
|
7
6
|
*/
|
|
8
7
|
export default class Celo extends Eth {
|
|
9
8
|
async signTransaction(path, rawTxHex) {
|
|
10
|
-
return super.signTransaction(path, rawTxHex
|
|
11
|
-
erc20Tokens: [],
|
|
12
|
-
nfts: [],
|
|
13
|
-
externalPlugin: [],
|
|
14
|
-
plugin: [],
|
|
15
|
-
domains: [],
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
// celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
|
|
19
|
-
// this legacy version of the app also only supported celo type 0 transactions.
|
|
20
|
-
// if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work
|
|
21
|
-
// so you can safely remove all the legacy paths.
|
|
22
|
-
async verifyTokenInfo(to, chainId) {
|
|
23
|
-
const tokenInfo = tokenInfoByAddressAndChainId(to, chainId);
|
|
24
|
-
if (tokenInfo) {
|
|
25
|
-
// celo-spender-app below version 1.2.3 expected unprefixed hex strings only
|
|
26
|
-
const dataString = `${tokenInfo.data.toString("hex")}`;
|
|
27
|
-
await this.provideERC20TokenInformation(dataString);
|
|
28
|
-
}
|
|
9
|
+
return super.signTransaction(path, rawTxHex);
|
|
29
10
|
}
|
|
30
11
|
async rlpEncodedTxForLedger(txParams) {
|
|
31
12
|
return rlpEncodedTx(txParams);
|
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,
|
|
1
|
+
{"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,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,CAAC,CAAC;IAC/C,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.5-nightly.0",
|
|
4
4
|
"description": "Ledger Hardware Wallet Celo Application API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"bip32-path": "^0.4.2",
|
|
36
36
|
"rlp": "^3.0.0",
|
|
37
37
|
"semver": "^7.3.5",
|
|
38
|
-
"@ledgerhq/errors": "^6.
|
|
39
|
-
"@ledgerhq/hw-app-eth": "^6.45.
|
|
38
|
+
"@ledgerhq/errors": "^6.26.0-nightly.0",
|
|
39
|
+
"@ledgerhq/hw-app-eth": "^6.45.20-nightly.0",
|
|
40
40
|
"@ledgerhq/hw-transport": "^6.31.11"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
package/src/Celo.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Eth from "@ledgerhq/hw-app-eth";
|
|
2
|
-
import { tokenInfoByAddressAndChainId } from "@celo/wallet-ledger/lib/tokens";
|
|
3
2
|
import { rlpEncodedTx, LegacyEncodedTx } from "@celo/wallet-base";
|
|
4
3
|
import type { CeloTx, RLPEncodedTx } from "@celo/connect";
|
|
5
4
|
|
|
@@ -12,27 +11,7 @@ export default class Celo extends Eth {
|
|
|
12
11
|
path: string,
|
|
13
12
|
rawTxHex: string,
|
|
14
13
|
): Promise<{ s: string; v: string; r: string }> {
|
|
15
|
-
return super.signTransaction(path, rawTxHex
|
|
16
|
-
erc20Tokens: [],
|
|
17
|
-
nfts: [],
|
|
18
|
-
externalPlugin: [],
|
|
19
|
-
plugin: [],
|
|
20
|
-
domains: [],
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
|
|
25
|
-
// this legacy version of the app also only supported celo type 0 transactions.
|
|
26
|
-
// if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work
|
|
27
|
-
// so you can safely remove all the legacy paths.
|
|
28
|
-
async verifyTokenInfo(to: string, chainId: number): Promise<void> {
|
|
29
|
-
const tokenInfo = tokenInfoByAddressAndChainId(to, chainId);
|
|
30
|
-
|
|
31
|
-
if (tokenInfo) {
|
|
32
|
-
// celo-spender-app below version 1.2.3 expected unprefixed hex strings only
|
|
33
|
-
const dataString = `${tokenInfo.data.toString("hex")}`;
|
|
34
|
-
await this.provideERC20TokenInformation(dataString);
|
|
35
|
-
}
|
|
14
|
+
return super.signTransaction(path, rawTxHex);
|
|
36
15
|
}
|
|
37
16
|
|
|
38
17
|
async rlpEncodedTxForLedger(txParams: CeloTx): Promise<RLPEncodedTx | LegacyEncodedTx> {
|