@shapeshiftoss/hdwallet-keepkey 1.55.3 → 1.55.4
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/dist/adapter.js +148 -93
- package/dist/adapter.js.map +1 -1
- package/dist/binance.js +135 -96
- package/dist/binance.js.map +1 -1
- package/dist/bitcoin.js +323 -257
- package/dist/bitcoin.js.map +1 -1
- package/dist/bnbencoding.js +40 -9
- package/dist/bnbencoding.js.map +1 -1
- package/dist/cosmos.js +206 -158
- package/dist/cosmos.js.map +1 -1
- package/dist/eos.js +152 -108
- package/dist/eos.js.map +1 -1
- package/dist/ethereum.js +242 -189
- package/dist/ethereum.js.map +1 -1
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/dist/keepkey.js +582 -444
- package/dist/keepkey.js.map +1 -1
- package/dist/osmosis.js +259 -211
- package/dist/osmosis.js.map +1 -1
- package/dist/ripple.js +96 -52
- package/dist/ripple.js.map +1 -1
- package/dist/thorchain.js +162 -114
- package/dist/thorchain.js.map +1 -1
- package/dist/transport.js +278 -220
- package/dist/transport.js.map +1 -1
- package/dist/typeRegistry.js +41 -12
- package/dist/typeRegistry.js.map +1 -1
- package/dist/utils.js +37 -7
- package/dist/utils.js.map +1 -1
- package/package.json +3 -3
package/dist/ethereum.js
CHANGED
|
@@ -1,24 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.ethSupportsNetwork = ethSupportsNetwork;
|
|
39
|
+
exports.ethSupportsSecureTransfer = ethSupportsSecureTransfer;
|
|
40
|
+
exports.ethSupportsNativeShapeShift = ethSupportsNativeShapeShift;
|
|
41
|
+
exports.ethGetAccountPaths = ethGetAccountPaths;
|
|
42
|
+
exports.ethSignTx = ethSignTx;
|
|
43
|
+
exports.ethGetAddress = ethGetAddress;
|
|
44
|
+
exports.ethSignMessage = ethSignMessage;
|
|
45
|
+
exports.ethSignTypedData = ethSignTypedData;
|
|
46
|
+
exports.ethVerifyMessage = ethVerifyMessage;
|
|
47
|
+
const common_1 = __importDefault(require("@ethereumjs/common"));
|
|
48
|
+
const tx_1 = require("@ethereumjs/tx");
|
|
49
|
+
const Messages = __importStar(require("@keepkey/device-protocol/lib/messages_pb"));
|
|
50
|
+
const Ethereum = __importStar(require("@keepkey/device-protocol/lib/messages-ethereum_pb"));
|
|
51
|
+
const Types = __importStar(require("@keepkey/device-protocol/lib/types_pb"));
|
|
52
|
+
const eth_sig_util_1 = require("@metamask/eth-sig-util");
|
|
53
|
+
const core = __importStar(require("@shapeshiftoss/hdwallet-core"));
|
|
54
|
+
const eip55 = __importStar(require("eip55"));
|
|
55
|
+
const utils_js_1 = require("ethers/lib/utils.js");
|
|
56
|
+
const utils_1 = require("./utils");
|
|
11
57
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
-
|
|
13
|
-
return
|
|
58
|
+
function ethSupportsNetwork(chainId) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return true;
|
|
61
|
+
});
|
|
14
62
|
}
|
|
15
|
-
|
|
16
|
-
return
|
|
63
|
+
function ethSupportsSecureTransfer() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return true;
|
|
66
|
+
});
|
|
17
67
|
}
|
|
18
|
-
|
|
68
|
+
function ethSupportsNativeShapeShift() {
|
|
19
69
|
return true;
|
|
20
70
|
}
|
|
21
|
-
|
|
71
|
+
function ethGetAccountPaths(msg) {
|
|
22
72
|
const slip44 = core.slip44ByCoin(msg.coin);
|
|
23
73
|
if (slip44 === undefined)
|
|
24
74
|
return [];
|
|
@@ -35,141 +85,140 @@ function stripLeadingZeroes(buf) {
|
|
|
35
85
|
const firstZeroIndex = buf.findIndex((x) => x !== 0);
|
|
36
86
|
return buf.slice(firstZeroIndex !== -1 ? firstZeroIndex : buf.length);
|
|
37
87
|
}
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (msg.maxFeePerGas) {
|
|
48
|
-
est.setMaxFeePerGas(core.arrayify(msg.maxFeePerGas));
|
|
49
|
-
est.setType(core.ETHTransactionType.ETH_TX_TYPE_EIP_1559);
|
|
50
|
-
if (msg.maxPriorityFeePerGas) {
|
|
51
|
-
est.setMaxPriorityFeePerGas(core.arrayify(msg.maxPriorityFeePerGas));
|
|
88
|
+
function ethSignTx(transport, msg) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
return transport.lockDuring(() => __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const est = new Ethereum.EthereumSignTx();
|
|
92
|
+
est.setAddressNList(msg.addressNList);
|
|
93
|
+
est.setNonce(stripLeadingZeroes(core.arrayify(msg.nonce)));
|
|
94
|
+
est.setGasLimit(core.arrayify(msg.gasLimit));
|
|
95
|
+
if (msg.gasPrice) {
|
|
96
|
+
est.setGasPrice(core.arrayify(msg.gasPrice));
|
|
52
97
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
est.setToAddressNList(msg.toAddressNList);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
est.setAddressType(Types.OutputAddressType.SPEND);
|
|
63
|
-
}
|
|
64
|
-
if (msg.to) {
|
|
65
|
-
est.setTo(core.arrayify(msg.to));
|
|
66
|
-
}
|
|
67
|
-
let dataChunk = null;
|
|
68
|
-
let dataRemaining = undefined;
|
|
69
|
-
if (msg.data) {
|
|
70
|
-
dataRemaining = core.arrayify(msg.data);
|
|
71
|
-
est.setDataLength(dataRemaining.length);
|
|
72
|
-
dataChunk = dataRemaining.slice(0, 1024);
|
|
73
|
-
dataRemaining = dataRemaining.slice(dataChunk.length);
|
|
74
|
-
est.setDataInitialChunk(dataChunk);
|
|
75
|
-
}
|
|
76
|
-
if (msg.chainId !== undefined) {
|
|
77
|
-
est.setChainId(msg.chainId);
|
|
78
|
-
}
|
|
79
|
-
let response;
|
|
80
|
-
let nextResponse = await transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMSIGNTX, est, {
|
|
81
|
-
msgTimeout: core.LONG_TIMEOUT,
|
|
82
|
-
omitLock: true,
|
|
83
|
-
});
|
|
84
|
-
response = nextResponse.proto;
|
|
85
|
-
try {
|
|
86
|
-
const esa = new Ethereum.EthereumTxAck();
|
|
87
|
-
while (response.hasDataLength()) {
|
|
88
|
-
const dataLength = response.getDataLength();
|
|
89
|
-
dataRemaining = core.mustBeDefined(dataRemaining);
|
|
90
|
-
dataChunk = dataRemaining.slice(0, dataLength);
|
|
91
|
-
dataRemaining = dataRemaining.slice(dataLength, dataRemaining.length);
|
|
92
|
-
esa.setDataChunk(dataChunk);
|
|
93
|
-
nextResponse = await transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMTXACK, esa, {
|
|
94
|
-
msgTimeout: core.LONG_TIMEOUT,
|
|
95
|
-
omitLock: true,
|
|
96
|
-
});
|
|
97
|
-
response = nextResponse.proto;
|
|
98
|
+
if (msg.maxFeePerGas) {
|
|
99
|
+
est.setMaxFeePerGas(core.arrayify(msg.maxFeePerGas));
|
|
100
|
+
est.setType(core.ETHTransactionType.ETH_TX_TYPE_EIP_1559);
|
|
101
|
+
if (msg.maxPriorityFeePerGas) {
|
|
102
|
+
est.setMaxPriorityFeePerGas(core.arrayify(msg.maxPriorityFeePerGas));
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
105
|
+
if (msg.value.match("^0x0*$") === null) {
|
|
106
|
+
est.setValue(core.arrayify(msg.value));
|
|
107
|
+
}
|
|
108
|
+
if (msg.toAddressNList) {
|
|
109
|
+
est.setAddressType(Types.OutputAddressType.SPEND);
|
|
110
|
+
est.setToAddressNList(msg.toAddressNList);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
est.setAddressType(Types.OutputAddressType.SPEND);
|
|
114
|
+
}
|
|
115
|
+
if (msg.to) {
|
|
116
|
+
est.setTo(core.arrayify(msg.to));
|
|
117
|
+
}
|
|
118
|
+
let dataChunk = null;
|
|
119
|
+
let dataRemaining = undefined;
|
|
120
|
+
if (msg.data) {
|
|
121
|
+
dataRemaining = core.arrayify(msg.data);
|
|
122
|
+
est.setDataLength(dataRemaining.length);
|
|
123
|
+
dataChunk = dataRemaining.slice(0, 1024);
|
|
124
|
+
dataRemaining = dataRemaining.slice(dataChunk.length);
|
|
125
|
+
est.setDataInitialChunk(dataChunk);
|
|
126
|
+
}
|
|
127
|
+
if (msg.chainId !== undefined) {
|
|
128
|
+
est.setChainId(msg.chainId);
|
|
129
|
+
}
|
|
130
|
+
let response;
|
|
131
|
+
let nextResponse = yield transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMSIGNTX, est, {
|
|
132
|
+
msgTimeout: core.LONG_TIMEOUT,
|
|
133
|
+
omitLock: true,
|
|
134
|
+
});
|
|
135
|
+
response = nextResponse.proto;
|
|
136
|
+
try {
|
|
137
|
+
const esa = new Ethereum.EthereumTxAck();
|
|
138
|
+
while (response.hasDataLength()) {
|
|
139
|
+
const dataLength = response.getDataLength();
|
|
140
|
+
dataRemaining = core.mustBeDefined(dataRemaining);
|
|
141
|
+
dataChunk = dataRemaining.slice(0, dataLength);
|
|
142
|
+
dataRemaining = dataRemaining.slice(dataLength, dataRemaining.length);
|
|
143
|
+
esa.setDataChunk(dataChunk);
|
|
144
|
+
nextResponse = yield transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMTXACK, esa, {
|
|
145
|
+
msgTimeout: core.LONG_TIMEOUT,
|
|
146
|
+
omitLock: true,
|
|
147
|
+
});
|
|
148
|
+
response = nextResponse.proto;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
console.error({ error });
|
|
153
|
+
throw new Error("Failed to sign ETH transaction");
|
|
154
|
+
}
|
|
155
|
+
const utxBase = {
|
|
156
|
+
to: msg.to,
|
|
157
|
+
value: msg.value,
|
|
158
|
+
data: msg.data,
|
|
159
|
+
chainId: msg.chainId,
|
|
160
|
+
nonce: msg.nonce,
|
|
161
|
+
gasLimit: msg.gasLimit,
|
|
124
162
|
maxFeePerGas: msg.maxFeePerGas,
|
|
125
163
|
maxPriorityFeePerGas: msg.maxPriorityFeePerGas,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
164
|
+
};
|
|
165
|
+
const r = "0x" + core.toHexString(response.getSignatureR_asU8());
|
|
166
|
+
const s = "0x" + core.toHexString(response.getSignatureS_asU8());
|
|
167
|
+
if (!response.hasSignatureV())
|
|
168
|
+
throw new Error("could not get v");
|
|
169
|
+
const v = core.mustBeDefined(response.getSignatureV());
|
|
170
|
+
const v2 = "0x" + v.toString(16);
|
|
171
|
+
const common = common_1.default.custom({ chainId: msg.chainId });
|
|
172
|
+
const tx = msg.maxFeePerGas
|
|
173
|
+
? tx_1.FeeMarketEIP1559Transaction.fromTxData(Object.assign(Object.assign({}, utxBase), { maxFeePerGas: msg.maxFeePerGas, maxPriorityFeePerGas: msg.maxPriorityFeePerGas, r: r, s: s, v: v2 }))
|
|
174
|
+
: tx_1.Transaction.fromTxData(Object.assign(Object.assign({}, utxBase), { gasPrice: msg.gasPrice, r: r, s: s, v: v2 }), { common });
|
|
175
|
+
return {
|
|
176
|
+
r,
|
|
177
|
+
s,
|
|
178
|
+
v,
|
|
179
|
+
serialized: "0x" + core.toHexString(tx.serialize()),
|
|
180
|
+
};
|
|
181
|
+
}));
|
|
137
182
|
});
|
|
138
183
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
184
|
+
function ethGetAddress(transport, msg) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
const getAddr = new Ethereum.EthereumGetAddress();
|
|
187
|
+
getAddr.setAddressNList(msg.addressNList);
|
|
188
|
+
getAddr.setShowDisplay(msg.showDisplay !== false);
|
|
189
|
+
const response = yield transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMGETADDRESS, getAddr, {
|
|
190
|
+
msgTimeout: core.LONG_TIMEOUT,
|
|
191
|
+
});
|
|
192
|
+
const ethAddress = response.proto;
|
|
193
|
+
let address;
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
195
|
+
if (ethAddress.hasAddressStr())
|
|
196
|
+
address = ethAddress.getAddressStr();
|
|
197
|
+
else if (ethAddress.hasAddress())
|
|
198
|
+
address = "0x" + core.toHexString(ethAddress.getAddress_asU8());
|
|
199
|
+
else
|
|
200
|
+
throw new Error("Unable to obtain ETH address from device.");
|
|
201
|
+
return address;
|
|
145
202
|
});
|
|
146
|
-
const ethAddress = response.proto;
|
|
147
|
-
let address;
|
|
148
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
149
|
-
if (ethAddress.hasAddressStr())
|
|
150
|
-
address = ethAddress.getAddressStr();
|
|
151
|
-
else if (ethAddress.hasAddress())
|
|
152
|
-
address = "0x" + core.toHexString(ethAddress.getAddress_asU8());
|
|
153
|
-
else
|
|
154
|
-
throw new Error("Unable to obtain ETH address from device.");
|
|
155
|
-
return address;
|
|
156
203
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
204
|
+
function ethSignMessage(transport, msg) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const { addressNList, message } = msg;
|
|
207
|
+
if (!(0, utils_js_1.isHexString)(message))
|
|
208
|
+
throw new Error("data is not an hex string");
|
|
209
|
+
const m = new Ethereum.EthereumSignMessage();
|
|
210
|
+
m.setAddressNList(addressNList);
|
|
211
|
+
const messageBytes = (0, utils_js_1.arrayify)(message);
|
|
212
|
+
m.setMessage(messageBytes);
|
|
213
|
+
const response = yield transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMSIGNMESSAGE, m, {
|
|
214
|
+
msgTimeout: core.LONG_TIMEOUT,
|
|
215
|
+
});
|
|
216
|
+
const sig = response.proto;
|
|
217
|
+
return {
|
|
218
|
+
address: eip55.encode("0x" + core.toHexString(sig.getAddress_asU8())), // FIXME: this should be done in the firmware
|
|
219
|
+
signature: "0x" + core.toHexString(sig.getSignature_asU8()),
|
|
220
|
+
};
|
|
167
221
|
});
|
|
168
|
-
const sig = response.proto;
|
|
169
|
-
return {
|
|
170
|
-
address: eip55.encode("0x" + core.toHexString(sig.getAddress_asU8())), // FIXME: this should be done in the firmware
|
|
171
|
-
signature: "0x" + core.toHexString(sig.getSignature_asU8()),
|
|
172
|
-
};
|
|
173
222
|
}
|
|
174
223
|
/**
|
|
175
224
|
* Supports EIP-712 eth_signTypedData_v4
|
|
@@ -177,55 +226,59 @@ export async function ethSignMessage(transport, msg) {
|
|
|
177
226
|
* Due to lack of firmware support, a hashed version of the data is
|
|
178
227
|
* displayed to the user on the device when signing
|
|
179
228
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
229
|
+
function ethSignTypedData(transport, msg) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
try {
|
|
232
|
+
const version = eth_sig_util_1.SignTypedDataVersion.V4;
|
|
233
|
+
const EIP_712_DOMAIN = "EIP712Domain";
|
|
234
|
+
const { types, primaryType, domain, message } = msg.typedData;
|
|
235
|
+
const domainSeparatorHash = eth_sig_util_1.TypedDataUtils.hashStruct(EIP_712_DOMAIN, domain, types, version);
|
|
236
|
+
const ethereumSignTypedHash = new Ethereum.EthereumSignTypedHash();
|
|
237
|
+
ethereumSignTypedHash.setAddressNList(msg.addressNList);
|
|
238
|
+
ethereumSignTypedHash.setDomainSeparatorHash(domainSeparatorHash);
|
|
239
|
+
let messageHash = undefined;
|
|
240
|
+
// If "EIP712Domain" is the primaryType, messageHash is not required - look at T1 connect impl ;)
|
|
241
|
+
// todo: the firmware should define messageHash as an optional Uint8Array field for this case
|
|
242
|
+
if (primaryType !== EIP_712_DOMAIN) {
|
|
243
|
+
messageHash = eth_sig_util_1.TypedDataUtils.hashStruct(primaryType, message, types, version);
|
|
244
|
+
ethereumSignTypedHash.setMessageHash(messageHash);
|
|
245
|
+
}
|
|
246
|
+
const response = yield transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMSIGNTYPEDHASH, ethereumSignTypedHash, {
|
|
247
|
+
msgTimeout: core.LONG_TIMEOUT,
|
|
248
|
+
});
|
|
249
|
+
const result = response.proto;
|
|
250
|
+
const res = {
|
|
251
|
+
address: result.getAddress() || "",
|
|
252
|
+
signature: "0x" + core.toHexString(result.getSignature_asU8()),
|
|
253
|
+
};
|
|
254
|
+
return res;
|
|
195
255
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
address: result.getAddress() || "",
|
|
202
|
-
signature: "0x" + core.toHexString(result.getSignature_asU8()),
|
|
203
|
-
};
|
|
204
|
-
return res;
|
|
205
|
-
}
|
|
206
|
-
catch (error) {
|
|
207
|
-
console.error({ error });
|
|
208
|
-
throw new Error("Failed to sign typed ETH message");
|
|
209
|
-
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
console.error({ error });
|
|
258
|
+
throw new Error("Failed to sign typed ETH message");
|
|
259
|
+
}
|
|
260
|
+
});
|
|
210
261
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
catch (e) {
|
|
223
|
-
if (core.isIndexable(e) && e.message_enum === Messages.MessageType.MESSAGETYPE_FAILURE) {
|
|
224
|
-
return false;
|
|
262
|
+
function ethVerifyMessage(transport, msg) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
const m = new Ethereum.EthereumVerifyMessage();
|
|
265
|
+
m.setAddress(core.arrayify(msg.address));
|
|
266
|
+
m.setSignature(core.arrayify(msg.signature));
|
|
267
|
+
m.setMessage((0, utils_js_1.isBytes)(msg.message) ? (0, utils_js_1.arrayify)(msg.message) : (0, utils_1.toUTF8Array)(msg.message));
|
|
268
|
+
let event;
|
|
269
|
+
try {
|
|
270
|
+
event = yield transport.call(Messages.MessageType.MESSAGETYPE_ETHEREUMVERIFYMESSAGE, m, {
|
|
271
|
+
msgTimeout: core.LONG_TIMEOUT,
|
|
272
|
+
});
|
|
225
273
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
274
|
+
catch (e) {
|
|
275
|
+
if (core.isIndexable(e) && e.message_enum === Messages.MessageType.MESSAGETYPE_FAILURE) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
throw e;
|
|
279
|
+
}
|
|
280
|
+
const success = event.proto;
|
|
281
|
+
return success.getMessage() === "Message verified";
|
|
282
|
+
});
|
|
230
283
|
}
|
|
231
284
|
//# sourceMappingURL=ethereum.js.map
|
package/dist/ethereum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../src/ethereum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../src/ethereum.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,gDAEC;AAED,8DAEC;AAED,kEAEC;AAED,gDAWC;AAOD,8BA6GC;AAED,sCAgBC;AAED,wCAeC;AAQD,4CAyCC;AAED,4CAkBC;AAjQD,gEAAwC;AACxC,uCAA0E;AAC1E,mFAAqE;AACrE,4FAA8E;AAC9E,6EAA+D;AAC/D,yDAA8E;AAC9E,mEAAqD;AACrD,6CAA+B;AAC/B,kDAAqE;AAGrE,mCAAsC;AAEtC,6DAA6D;AAC7D,SAAsB,kBAAkB,CAAC,OAAe;;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;CAAA;AAED,SAAsB,yBAAyB;;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;CAAA;AAED,SAAgB,2BAA2B;IACzC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAA2B;IAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACpC,OAAO;QACL;YACE,YAAY,EAAE,CAAC,UAAU,GAAG,EAAE,EAAE,UAAU,GAAG,MAAM,EAAE,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CA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AU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7C,CAAC,CAAC,UAAU,CAAC,IAAA,kBAAO,EAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAW,EAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACtF,IAAI,KAAiB,CAAC;QACtB,IAAI,CAAC;YACH,KAAK,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,iCAAiC,EAAE,CAAC,EAAE;gBACtF,UAAU,EAAE,IAAI,CAAC,YAAY;aAC9B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,KAAK,QAAQ,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC;gBACvF,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;QACD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAyB,CAAC;QAChD,OAAO,OAAO,CAAC,UAAU,EAAE,KAAK,kBAAkB,CAAC;IACrD,CAAC;CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
__exportStar(require("./adapter"), exports);
|
|
18
|
+
__exportStar(require("./keepkey"), exports);
|
|
19
|
+
__exportStar(require("./transport"), exports);
|
|
20
|
+
__exportStar(require("./typeRegistry"), exports);
|
|
21
|
+
__exportStar(require("./utils"), exports);
|
|
6
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,8CAA4B;AAC5B,iDAA+B;AAC/B,0CAAwB"}
|