@ledgerhq/hw-app-eth 6.21.0 → 6.22.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/README.md +51 -100
- package/erc20.js +1 -1
- package/lib/Eth.d.ts +14 -33
- package/lib/Eth.d.ts.map +1 -1
- package/lib/Eth.js +273 -305
- package/lib/Eth.js.map +1 -1
- package/lib/services/ledger/contracts.d.ts +14 -0
- package/lib/services/ledger/contracts.d.ts.map +1 -0
- package/lib/{contracts.js → services/ledger/contracts.js} +0 -0
- package/lib/services/ledger/contracts.js.map +1 -0
- package/lib/services/ledger/erc20.d.ts +22 -0
- package/lib/services/ledger/erc20.d.ts.map +1 -0
- package/lib/{erc20.js → services/ledger/erc20.js} +0 -0
- package/lib/services/ledger/erc20.js.map +1 -0
- package/lib/services/ledger/index.d.ts +4 -0
- package/lib/services/ledger/index.d.ts.map +1 -0
- package/lib/services/ledger/index.js +168 -0
- package/lib/services/ledger/index.js.map +1 -0
- package/lib/services/ledger/loadConfig.d.ts +3 -0
- package/lib/services/ledger/loadConfig.d.ts.map +1 -0
- package/lib/{loadConfig.js → services/ledger/loadConfig.js} +0 -0
- package/lib/services/ledger/loadConfig.js.map +1 -0
- package/lib/services/ledger/nfts.d.ts +10 -0
- package/lib/services/ledger/nfts.d.ts.map +1 -0
- package/lib/{nfts.js → services/ledger/nfts.js} +3 -14
- package/lib/services/ledger/nfts.js.map +1 -0
- package/lib/services/types.d.ts +18 -0
- package/lib/services/types.d.ts.map +1 -0
- package/lib/services/types.js +3 -0
- package/lib/services/types.js.map +1 -0
- package/lib/utils.d.ts +8 -27
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +68 -68
- package/lib/utils.js.map +1 -1
- package/lib-es/Eth.d.ts +14 -33
- package/lib-es/Eth.d.ts.map +1 -1
- package/lib-es/Eth.js +261 -296
- package/lib-es/Eth.js.map +1 -1
- package/{lib → lib-es/services/ledger}/contracts.d.ts +1 -1
- package/lib-es/services/ledger/contracts.d.ts.map +1 -0
- package/lib-es/services/ledger/contracts.js +96 -0
- package/lib-es/services/ledger/contracts.js.map +1 -0
- package/{lib → lib-es/services/ledger}/erc20.d.ts +0 -0
- package/lib-es/services/ledger/erc20.d.ts.map +1 -0
- package/lib-es/services/ledger/erc20.js +64 -0
- package/lib-es/services/ledger/erc20.js.map +1 -0
- package/lib-es/services/ledger/index.d.ts +4 -0
- package/lib-es/services/ledger/index.d.ts.map +1 -0
- package/lib-es/services/ledger/index.js +166 -0
- package/lib-es/services/ledger/index.js.map +1 -0
- package/lib-es/services/ledger/loadConfig.d.ts +3 -0
- package/lib-es/services/ledger/loadConfig.d.ts.map +1 -0
- package/lib-es/services/ledger/loadConfig.js +20 -0
- package/lib-es/services/ledger/loadConfig.js.map +1 -0
- package/{lib → lib-es/services/ledger}/nfts.d.ts +2 -3
- package/lib-es/services/ledger/nfts.d.ts.map +1 -0
- package/lib-es/services/ledger/nfts.js +83 -0
- package/lib-es/services/ledger/nfts.js.map +1 -0
- package/lib-es/services/types.d.ts +18 -0
- package/lib-es/services/types.d.ts.map +1 -0
- package/lib-es/services/types.js +2 -0
- package/lib-es/services/types.js.map +1 -0
- package/lib-es/utils.d.ts +8 -27
- package/lib-es/utils.d.ts.map +1 -1
- package/lib-es/utils.js +66 -61
- package/lib-es/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/Eth.ts +124 -258
- package/src/{contracts.ts → services/ledger/contracts.ts} +1 -1
- package/src/{erc20.ts → services/ledger/erc20.ts} +0 -0
- package/src/services/ledger/index.ts +119 -0
- package/src/services/ledger/loadConfig.ts +14 -0
- package/src/{nfts.ts → services/ledger/nfts.ts} +5 -18
- package/src/services/types.ts +28 -0
- package/src/utils.ts +72 -94
- package/tests/Eth.test.ts +2 -2
- package/lib/contracts.d.ts.map +0 -1
- package/lib/contracts.js.map +0 -1
- package/lib/erc20.d.ts.map +0 -1
- package/lib/erc20.js.map +0 -1
- package/lib/loadConfig.d.ts +0 -7
- package/lib/loadConfig.d.ts.map +0 -1
- package/lib/loadConfig.js.map +0 -1
- package/lib/nfts.d.ts.map +0 -1
- package/lib/nfts.js.map +0 -1
- package/src/loadConfig.ts +0 -23
package/README.md
CHANGED
|
@@ -13,85 +13,48 @@ Ledger Hardware Wallet ETH JavaScript bindings.
|
|
|
13
13
|
|
|
14
14
|
#### Table of Contents
|
|
15
15
|
|
|
16
|
-
* [loadInfosForContractMethod](#loadinfosforcontractmethod)
|
|
17
|
-
* [Parameters](#parameters)
|
|
18
|
-
* [byContractAddressAndChainId](#bycontractaddressandchainid)
|
|
19
|
-
* [Parameters](#parameters-1)
|
|
20
|
-
* [list](#list)
|
|
21
16
|
* [Eth](#eth)
|
|
22
|
-
* [Parameters](#parameters
|
|
17
|
+
* [Parameters](#parameters)
|
|
23
18
|
* [Examples](#examples)
|
|
24
19
|
* [getAddress](#getaddress)
|
|
25
|
-
* [Parameters](#parameters-
|
|
20
|
+
* [Parameters](#parameters-1)
|
|
26
21
|
* [Examples](#examples-1)
|
|
27
|
-
* [provideERC20TokenInformation](#provideerc20tokeninformation)
|
|
28
|
-
* [Parameters](#parameters-4)
|
|
29
|
-
* [Examples](#examples-2)
|
|
30
22
|
* [signTransaction](#signtransaction)
|
|
31
|
-
* [Parameters](#parameters-
|
|
32
|
-
* [Examples](#examples-
|
|
23
|
+
* [Parameters](#parameters-2)
|
|
24
|
+
* [Examples](#examples-2)
|
|
33
25
|
* [getAppConfiguration](#getappconfiguration)
|
|
34
26
|
* [signPersonalMessage](#signpersonalmessage)
|
|
35
|
-
* [Parameters](#parameters-
|
|
36
|
-
* [Examples](#examples-
|
|
27
|
+
* [Parameters](#parameters-3)
|
|
28
|
+
* [Examples](#examples-3)
|
|
37
29
|
* [signEIP712HashedMessage](#signeip712hashedmessage)
|
|
38
|
-
* [Parameters](#parameters-
|
|
39
|
-
* [Examples](#examples-
|
|
30
|
+
* [Parameters](#parameters-4)
|
|
31
|
+
* [Examples](#examples-4)
|
|
40
32
|
* [starkGetPublicKey](#starkgetpublickey)
|
|
41
|
-
* [Parameters](#parameters-
|
|
33
|
+
* [Parameters](#parameters-5)
|
|
42
34
|
* [starkSignOrder](#starksignorder)
|
|
43
|
-
* [Parameters](#parameters-
|
|
35
|
+
* [Parameters](#parameters-6)
|
|
44
36
|
* [starkSignOrder_v2](#starksignorder_v2)
|
|
45
|
-
* [Parameters](#parameters-
|
|
37
|
+
* [Parameters](#parameters-7)
|
|
46
38
|
* [starkSignTransfer](#starksigntransfer)
|
|
47
|
-
* [Parameters](#parameters-
|
|
39
|
+
* [Parameters](#parameters-8)
|
|
48
40
|
* [starkSignTransfer_v2](#starksigntransfer_v2)
|
|
49
|
-
* [Parameters](#parameters-
|
|
41
|
+
* [Parameters](#parameters-9)
|
|
50
42
|
* [starkProvideQuantum](#starkprovidequantum)
|
|
51
|
-
* [Parameters](#parameters-
|
|
43
|
+
* [Parameters](#parameters-10)
|
|
52
44
|
* [starkProvideQuantum_v2](#starkprovidequantum_v2)
|
|
53
|
-
* [Parameters](#parameters-
|
|
45
|
+
* [Parameters](#parameters-11)
|
|
54
46
|
* [starkUnsafeSign](#starkunsafesign)
|
|
55
|
-
* [Parameters](#parameters-
|
|
47
|
+
* [Parameters](#parameters-12)
|
|
56
48
|
* [eth2GetPublicKey](#eth2getpublickey)
|
|
57
|
-
* [Parameters](#parameters-
|
|
58
|
-
* [Examples](#examples-
|
|
49
|
+
* [Parameters](#parameters-13)
|
|
50
|
+
* [Examples](#examples-5)
|
|
59
51
|
* [eth2SetWithdrawalIndex](#eth2setwithdrawalindex)
|
|
60
|
-
* [Parameters](#parameters-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
### loadInfosForContractMethod
|
|
67
|
-
|
|
68
|
-
Retrieve the metadatas a given contract address and a method selector
|
|
69
|
-
|
|
70
|
-
#### Parameters
|
|
71
|
-
|
|
72
|
-
* `contractAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
73
|
-
* `selector` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
74
|
-
* `chainId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
|
|
75
|
-
* `userLoadConfig` **LoadConfig**
|
|
76
|
-
|
|
77
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<(ContractMethod | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))>**
|
|
78
|
-
|
|
79
|
-
### byContractAddressAndChainId
|
|
80
|
-
|
|
81
|
-
Retrieve the token information by a given contract address if any
|
|
82
|
-
|
|
83
|
-
#### Parameters
|
|
84
|
-
|
|
85
|
-
* `contract` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
86
|
-
* `chainId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
|
|
87
|
-
|
|
88
|
-
Returns **(TokenInfo | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**
|
|
89
|
-
|
|
90
|
-
### list
|
|
91
|
-
|
|
92
|
-
list all the ERC20 tokens informations
|
|
93
|
-
|
|
94
|
-
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<TokenInfo>**
|
|
52
|
+
* [Parameters](#parameters-14)
|
|
53
|
+
* [loadInfosForContractMethod](#loadinfosforcontractmethod)
|
|
54
|
+
* [Parameters](#parameters-15)
|
|
55
|
+
* [byContractAddressAndChainId](#bycontractaddressandchainid)
|
|
56
|
+
* [Parameters](#parameters-16)
|
|
57
|
+
* [list](#list)
|
|
95
58
|
|
|
96
59
|
### Eth
|
|
97
60
|
|
|
@@ -128,44 +91,24 @@ eth.getAddress("44'/60'/0'/0/0").then(o => o.address)
|
|
|
128
91
|
|
|
129
92
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{publicKey: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), address: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), chainCode: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?}>** an object with a publicKey, address and (optionally) chainCode
|
|
130
93
|
|
|
131
|
-
#### provideERC20TokenInformation
|
|
132
|
-
|
|
133
|
-
This commands provides a trusted description of an ERC 20 token
|
|
134
|
-
to associate a contract address with a ticker and number of decimals.
|
|
135
|
-
|
|
136
|
-
It shall be run immediately before performing a transaction involving a contract
|
|
137
|
-
calling this contract address to display the proper token information to the user if necessary.
|
|
138
|
-
|
|
139
|
-
##### Parameters
|
|
140
|
-
|
|
141
|
-
* `info` **any** : a blob from "erc20.js" utilities that contains all token information.
|
|
142
|
-
|
|
143
|
-
* `info.data`
|
|
144
|
-
|
|
145
|
-
##### Examples
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
import { byContractAddressAndChainId } from "@ledgerhq/hw-app-eth/erc20"
|
|
149
|
-
const zrxInfo = byContractAddressAndChainId("0xe41d2489571d322189246dafa5ebde1f4699f498", chainId)
|
|
150
|
-
if (zrxInfo) await appEth.provideERC20TokenInformation(zrxInfo)
|
|
151
|
-
const signed = await appEth.signTransaction(path, rawTxHex)
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>**
|
|
155
|
-
|
|
156
94
|
#### signTransaction
|
|
157
95
|
|
|
158
|
-
You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign
|
|
96
|
+
You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign.
|
|
159
97
|
|
|
160
98
|
##### Parameters
|
|
161
99
|
|
|
162
|
-
* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
163
|
-
* `rawTxHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
100
|
+
* `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the BIP32 path to sign the transaction on
|
|
101
|
+
* `rawTxHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the raw ethereum transaction in hexadecimal to sign
|
|
102
|
+
* `resolution` **(LedgerEthTransactionResolution | null)?** : resolution is an object with all "resolved" metadata necessary to allow the device to clear sign information. This includes: ERC20 token information, plugins, contracts, NFT signatures,... You must explicitly provide something to avoid having a warning. By default, you can use Ledger's service or your own resolution service. See services/types.js for the contract. Setting the value to "null" will fallback everything to blind signing but will still allow the device to sign the transaction.
|
|
164
103
|
|
|
165
104
|
##### Examples
|
|
166
105
|
|
|
167
106
|
```javascript
|
|
168
|
-
|
|
107
|
+
import ledgerService from "@ledgerhq/hw-app-eth/lib/services/ledger"
|
|
108
|
+
const tx = "e8018504e3b292008252089428ee52a8f3d6e5d15f8b131996950d7f296c7952872bd72a2487400080"; // raw tx to sign
|
|
109
|
+
const resolution = await ledgerService.resolveTransaction(tx);
|
|
110
|
+
const result = eth.signTransaction("44'/60'/0'/0/0", tx, resolution);
|
|
111
|
+
console.log(result);
|
|
169
112
|
```
|
|
170
113
|
|
|
171
114
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{s: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), v: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>**
|
|
@@ -387,24 +330,32 @@ It shall be run before the ETH 2 deposit transaction is signed. If not called, t
|
|
|
387
330
|
|
|
388
331
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** True if the method was executed successfully
|
|
389
332
|
|
|
390
|
-
|
|
333
|
+
### loadInfosForContractMethod
|
|
391
334
|
|
|
392
|
-
|
|
335
|
+
Retrieve the metadatas a given contract address and a method selector
|
|
393
336
|
|
|
394
|
-
|
|
337
|
+
#### Parameters
|
|
395
338
|
|
|
396
|
-
* `pluginName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** string containing the name of the plugin, must have length between 1 and 30 bytes
|
|
397
339
|
* `contractAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
398
340
|
* `selector` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
341
|
+
* `chainId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
|
|
342
|
+
* `userLoadConfig` **LoadConfig**
|
|
399
343
|
|
|
400
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[
|
|
344
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<(ContractMethod | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))>**
|
|
345
|
+
|
|
346
|
+
### byContractAddressAndChainId
|
|
401
347
|
|
|
402
|
-
|
|
348
|
+
Retrieve the token information by a given contract address if any
|
|
403
349
|
|
|
404
|
-
|
|
350
|
+
#### Parameters
|
|
405
351
|
|
|
406
|
-
|
|
352
|
+
* `contract` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
353
|
+
* `chainId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
|
|
407
354
|
|
|
408
|
-
|
|
355
|
+
Returns **(TokenInfo | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**
|
|
409
356
|
|
|
410
|
-
|
|
357
|
+
### list
|
|
358
|
+
|
|
359
|
+
list all the ERC20 tokens informations
|
|
360
|
+
|
|
361
|
+
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<TokenInfo>**
|
package/erc20.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require("./lib/erc20");
|
|
1
|
+
module.exports = require("./lib/services/ledger/erc20");
|
package/lib/Eth.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type Transport from "@ledgerhq/hw-transport";
|
|
3
3
|
import { BigNumber } from "bignumber.js";
|
|
4
|
-
import
|
|
4
|
+
import { LedgerEthTransactionResolution, LoadConfig } from "./services/types";
|
|
5
5
|
export declare type StarkQuantizationType = "eth" | "erc20" | "erc721" | "erc20mintable" | "erc721mintable";
|
|
6
6
|
/**
|
|
7
7
|
* Ethereum API
|
|
@@ -30,29 +30,19 @@ export default class Eth {
|
|
|
30
30
|
chainCode?: string;
|
|
31
31
|
}>;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* to associate a contract address with a ticker and number of decimals.
|
|
33
|
+
* You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign.
|
|
35
34
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @param {*} info: a blob from "erc20.js" utilities that contains all token information.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* import { byContractAddressAndChainId } from "@ledgerhq/hw-app-eth/erc20"
|
|
43
|
-
* const zrxInfo = byContractAddressAndChainId("0xe41d2489571d322189246dafa5ebde1f4699f498", chainId)
|
|
44
|
-
* if (zrxInfo) await appEth.provideERC20TokenInformation(zrxInfo)
|
|
45
|
-
* const signed = await appEth.signTransaction(path, rawTxHex)
|
|
46
|
-
*/
|
|
47
|
-
provideERC20TokenInformation({ data }: {
|
|
48
|
-
data: Buffer;
|
|
49
|
-
}): Promise<boolean>;
|
|
50
|
-
/**
|
|
51
|
-
* You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign
|
|
35
|
+
* @param path: the BIP32 path to sign the transaction on
|
|
36
|
+
* @param rawTxHex: the raw ethereum transaction in hexadecimal to sign
|
|
37
|
+
* @param resolution: resolution is an object with all "resolved" metadata necessary to allow the device to clear sign information. This includes: ERC20 token information, plugins, contracts, NFT signatures,... You must explicitly provide something to avoid having a warning. By default, you can use Ledger's service or your own resolution service. See services/types.js for the contract. Setting the value to "null" will fallback everything to blind signing but will still allow the device to sign the transaction.
|
|
52
38
|
* @example
|
|
53
|
-
|
|
39
|
+
import ledgerService from "@ledgerhq/hw-app-eth/lib/services/ledger"
|
|
40
|
+
const tx = "e8018504e3b292008252089428ee52a8f3d6e5d15f8b131996950d7f296c7952872bd72a2487400080"; // raw tx to sign
|
|
41
|
+
const resolution = await ledgerService.resolveTransaction(tx);
|
|
42
|
+
const result = eth.signTransaction("44'/60'/0'/0/0", tx, resolution);
|
|
43
|
+
console.log(result);
|
|
54
44
|
*/
|
|
55
|
-
signTransaction(path: string, rawTxHex: string): Promise<{
|
|
45
|
+
signTransaction(path: string, rawTxHex: string, resolution?: LedgerEthTransactionResolution | null): Promise<{
|
|
56
46
|
s: string;
|
|
57
47
|
v: string;
|
|
58
48
|
r: string;
|
|
@@ -238,19 +228,10 @@ export default class Eth {
|
|
|
238
228
|
* @return True if the method was executed successfully
|
|
239
229
|
*/
|
|
240
230
|
eth2SetWithdrawalIndex(withdrawalIndex: number): Promise<boolean>;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
* @param pluginName string containing the name of the plugin, must have length between 1 and 30 bytes
|
|
245
|
-
* @return True if the method was executed successfully
|
|
246
|
-
*/
|
|
231
|
+
provideERC20TokenInformation({ data }: {
|
|
232
|
+
data: Buffer;
|
|
233
|
+
}): Promise<boolean>;
|
|
247
234
|
setExternalPlugin(pluginName: string, contractAddress: string, selector: string): Promise<boolean>;
|
|
248
|
-
/**
|
|
249
|
-
* Set the plugin (internal or external) that should be used to parse the next transaction
|
|
250
|
-
*
|
|
251
|
-
* @param data string containing the payload and signature that will be parsed and verified by the device.
|
|
252
|
-
* @return True if the method was executed successfully
|
|
253
|
-
*/
|
|
254
235
|
setPlugin(data: string): Promise<boolean>;
|
|
255
236
|
}
|
|
256
237
|
//# sourceMappingURL=Eth.d.ts.map
|
package/lib/Eth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Eth.d.ts","sourceRoot":"","sources":["../src/Eth.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Eth.d.ts","sourceRoot":"","sources":["../src/Eth.ts"],"names":[],"mappings":";AAkBA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,8BAA8B,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9E,oBAAY,qBAAqB,GAC7B,KAAK,GACL,OAAO,GACP,QAAQ,GACR,eAAe,GACf,gBAAgB,CAAC;AA6CrB;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,GAAG;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IAEvB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;gBAKzC,SAAS,EAAE,SAAS,EACpB,WAAW,SAAQ,EACnB,UAAU,GAAE,UAAe;IA8B7B;;;;;;;;OAQG;IACH,UAAU,CACR,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,OAAO,EACrB,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC;QACT,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,C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