{"_id":"@bangjelkoski/ledgerhq-hw-app-eth","_rev":"1-5bf4a338d0f4289156deb497d0adaf48","name":"@bangjelkoski/ledgerhq-hw-app-eth","dist-tags":{"latest":"6.42.6-beta.0"},"versions":{"6.42.6":{"name":"@bangjelkoski/ledgerhq-hw-app-eth","version":"6.42.6","keywords":["Ledger","LedgerWallet","eth","NanoS","Blue","Hardware Wallet"],"license":"Apache-2.0","_id":"@bangjelkoski/ledgerhq-hw-app-eth@6.42.6","maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"homepage":"https://github.com/LedgerHQ/ledger-live/tree/develop/libs/ledgerjs/packages/hw-app-eth","bugs":{"url":"https://github.com/LedgerHQ/ledger-live/issues"},"dist":{"shasum":"50200dd2a61d0fc9cfa233551829839ce1d6c3d2","tarball":"https://registry.npmjs.org/@bangjelkoski/ledgerhq-hw-app-eth/-/ledgerhq-hw-app-eth-6.42.6.tgz","fileCount":252,"integrity":"sha512-cL7X/xcBgS9Y4n6nw6wX8h8Z7iyTg4X9k0ka++sL9PfUeLU0tiuuuMkpXG7dMiqFzK+/NGD9g6hGrQZYKKhhHQ==","signatures":[{"sig":"MEYCIQCcuSR/gXCROUl7mXN+ILfXMlUQ5PuhXQueXboBHAbNSAIhALuKY8nqRNi+ypsK75OlGX7T/UYwWal7PzAd+2VFCdv7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2332146},"main":"lib/Eth.js","types":"lib/Eth.d.ts","module":"lib-es/Eth.js","gitHead":"dd0dea64b58e5a9125c8a422dcffd29e5ef6abec","scripts":{"doc":"documentation readme src/** --section=API --pe ts --re ts --re d.ts","lint":"eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache","test":"jest","build":"tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es","clean":"rimraf lib lib-es","watch":"tsc --watch","lint:fix":"pnpm lint --fix","prewatch":"pnpm build","watch:es":"tsc --watch -m esnext --moduleResolution bundler --outDir lib-es","unimported":"unimported"},"_npmUser":{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"},"overrides":{"@ethersproject/providers":{"ws":"7.5.10"}},"repository":{"url":"git+https://github.com/LedgerHQ/ledger-live.git","type":"git"},"_npmVersion":"10.8.2","description":"Ledger Hardware Wallet Ethereum Application API","directories":{},"_nodeVersion":"20.18.2","dependencies":{"axios":"1.7.7","semver":"^7.3.5","bignumber.js":"^9.1.2","@ledgerhq/logs":"workspace:^","@ledgerhq/errors":"workspace:^","@ethersproject/abi":"^5.7.0","@ethersproject/rlp":"^5.7.0","@ledgerhq/evm-tools":"workspace:^","@ledgerhq/types-live":"workspace:^","@ledgerhq/hw-transport":"workspace:^","@ledgerhq/domain-service":"workspace:^","@ethersproject/transactions":"^5.7.0","@ledgerhq/hw-transport-mocker":"workspace:^","@ledgerhq/cryptoassets-evm-signatures":"workspace:^"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","nock":"^13.0.5","rimraf":"^4.4.1","ts-jest":"^29.1.1","ts-node":"^10.4.0","@types/jest":"^29.5.10","@types/node":"^22.10.10","documentation":"14.0.2","source-map-support":"^0.5.21","@ethersproject/units":"^5.7.0","@ethersproject/bignumber":"^5.7.0","@ethersproject/constants":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/ledgerhq-hw-app-eth_6.42.6_1740050567288_0.014046296417671744","host":"s3://npm-registry-packages-npm-production"}},"6.42.6-beta.0":{"name":"@bangjelkoski/ledgerhq-hw-app-eth","version":"6.42.6-beta.0","description":"Ledger Hardware Wallet Ethereum Application API","keywords":["Ledger","LedgerWallet","eth","NanoS","Blue","Hardware Wallet"],"repository":{"type":"git","url":"git+https://github.com/LedgerHQ/ledger-live.git"},"bugs":{"url":"https://github.com/LedgerHQ/ledger-live/issues"},"homepage":"https://github.com/LedgerHQ/ledger-live/tree/develop/libs/ledgerjs/packages/hw-app-eth","publishConfig":{"access":"public"},"main":"lib/Eth.js","module":"lib-es/Eth.js","types":"lib/Eth.d.ts","license":"Apache-2.0","dependencies":{"@ethersproject/abi":"^5.7.0","@ethersproject/rlp":"^5.7.0","@ethersproject/transactions":"^5.7.0","axios":"1.7.7","bignumber.js":"^9.1.2","semver":"^7.3.5","@ledgerhq/cryptoassets-evm-signatures":"^13.5.3","@ledgerhq/domain-service":"^1.2.18","@ledgerhq/errors":"^6.19.1","@ledgerhq/evm-tools":"^1.4.0","@ledgerhq/hw-transport-mocker":"^6.29.4","@ledgerhq/hw-transport":"npm:@bangjelkoski/ledgerhq-hw-transport@^6.31.4-beta.0","@ledgerhq/logs":"^6.12.0","@ledgerhq/types-live":"^6.59.0"},"gitHead":"dd0dea64b58e5a9125c8a422dcffd29e5ef6abec","devDependencies":{"@ethersproject/bignumber":"^5.7.0","@ethersproject/constants":"^5.7.0","@ethersproject/units":"^5.7.0","@types/jest":"^29.5.10","@types/node":"^22.10.10","documentation":"14.0.2","jest":"^29.7.0","nock":"^13.0.5","rimraf":"^4.4.1","source-map-support":"^0.5.21","ts-jest":"^29.1.1","ts-node":"^10.4.0"},"overrides":{"@ethersproject/providers":{"ws":"7.5.10"}},"scripts":{"clean":"rimraf lib lib-es","build":"tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es","prewatch":"pnpm build","watch":"tsc --watch","watch:es":"tsc --watch -m esnext --moduleResolution bundler --outDir lib-es","doc":"documentation readme src/** --section=API --pe ts --re ts --re d.ts","lint":"eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache","lint:fix":"pnpm lint --fix","test":"jest","unimported":"unimported"},"_id":"@bangjelkoski/ledgerhq-hw-app-eth@6.42.6-beta.0","_integrity":"sha512-4JzHl4RsZbXanQv8od3J9IDBS7U/1vtfaZhuj89BekQYXZdaHJlqzLneG3cKpHNxB1eYo8fxQK7UlZN/RFeiDw==","_resolved":"/private/var/folders/81/1f_q36hn2lv9zvbgjm_bfv140000gn/T/ca13a239302ff8dd8382a09939e08dba/bangjelkoski-ledgerhq-hw-app-eth-6.42.6-beta.0.tgz","_from":"file:bangjelkoski-ledgerhq-hw-app-eth-6.42.6-beta.0.tgz","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-4JzHl4RsZbXanQv8od3J9IDBS7U/1vtfaZhuj89BekQYXZdaHJlqzLneG3cKpHNxB1eYo8fxQK7UlZN/RFeiDw==","shasum":"5459bbc3a25dffbb4e32a4e0413ed0492423d210","tarball":"https://registry.npmjs.org/@bangjelkoski/ledgerhq-hw-app-eth/-/ledgerhq-hw-app-eth-6.42.6-beta.0.tgz","fileCount":253,"unpackedSize":2333265,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9A3KXTtXBzCEGrHBJPbRa1Fa7hoMmfPSiCEMl1J0GdwIhAKdaT1N1kDiIYBKuVUmaWv8FLvzJisCnGW1XeHZv/Bhw"}]},"_npmUser":{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"},"directories":{},"maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ledgerhq-hw-app-eth_6.42.6-beta.0_1740052033305_0.2838893268166027"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-20T11:22:47.195Z","modified":"2025-02-20T11:47:13.790Z","6.42.6":"2025-02-20T11:22:47.528Z","6.42.6-beta.0":"2025-02-20T11:47:13.622Z"},"bugs":{"url":"https://github.com/LedgerHQ/ledger-live/issues"},"license":"Apache-2.0","homepage":"https://github.com/LedgerHQ/ledger-live/tree/develop/libs/ledgerjs/packages/hw-app-eth","keywords":["Ledger","LedgerWallet","eth","NanoS","Blue","Hardware Wallet"],"repository":{"type":"git","url":"git+https://github.com/LedgerHQ/ledger-live.git"},"description":"Ledger Hardware Wallet Ethereum Application API","maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"readme":"<img src=\"https://user-images.githubusercontent.com/4631227/191834116-59cf590e-25cc-4956-ae5c-812ea464f324.png\" height=\"100\" />\n\n[GitHub](https://github.com/LedgerHQ/ledger-live/),\n[Ledger Devs Discord](https://developers.ledger.com/discord-pro),\n[Developer Portal](https://developers.ledger.com/)\n\n## @ledgerhq/hw-app-eth\n\nLedger Hardware Wallet ETH JavaScript bindings.\n\n***\n\n## Are you adding Ledger support to your software wallet?\n\nYou may be using this package to communicate with the Ethereum Nano App.\n\nFor a smooth and quick integration:\n\n*   See the developers’ documentation on the [Developer Portal](https://developers.ledger.com/docs/transport/overview/) and\n*   Go on [Discord](https://developers.ledger.com/discord-pro/) to chat with developer support and the developer community.\n\n***\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n*   [Eth](#eth)\n    *   [Parameters](#parameters)\n    *   [Examples](#examples)\n    *   [getAddress](#getaddress)\n        *   [Parameters](#parameters-1)\n        *   [Examples](#examples-1)\n    *   [signTransaction](#signtransaction)\n        *   [Parameters](#parameters-2)\n        *   [Examples](#examples-2)\n    *   [clearSignTransaction](#clearsigntransaction)\n        *   [Parameters](#parameters-3)\n        *   [Examples](#examples-3)\n    *   [getAppConfiguration](#getappconfiguration)\n    *   [signPersonalMessage](#signpersonalmessage)\n        *   [Parameters](#parameters-4)\n        *   [Examples](#examples-4)\n    *   [signEIP712HashedMessage](#signeip712hashedmessage)\n        *   [Parameters](#parameters-5)\n        *   [Examples](#examples-5)\n    *   [signEIP712Message](#signeip712message)\n        *   [Parameters](#parameters-6)\n        *   [Examples](#examples-6)\n    *   [getChallenge](#getchallenge)\n    *   [starkGetPublicKey](#starkgetpublickey)\n        *   [Parameters](#parameters-7)\n    *   [starkSignOrder](#starksignorder)\n        *   [Parameters](#parameters-8)\n    *   [starkSignOrder\\_v2](#starksignorder_v2)\n        *   [Parameters](#parameters-9)\n    *   [starkSignTransfer](#starksigntransfer)\n        *   [Parameters](#parameters-10)\n    *   [starkSignTransfer\\_v2](#starksigntransfer_v2)\n        *   [Parameters](#parameters-11)\n    *   [starkProvideQuantum](#starkprovidequantum)\n        *   [Parameters](#parameters-12)\n    *   [starkProvideQuantum\\_v2](#starkprovidequantum_v2)\n        *   [Parameters](#parameters-13)\n    *   [starkUnsafeSign](#starkunsafesign)\n        *   [Parameters](#parameters-14)\n    *   [eth2GetPublicKey](#eth2getpublickey)\n        *   [Parameters](#parameters-15)\n        *   [Examples](#examples-7)\n    *   [eth2SetWithdrawalIndex](#eth2setwithdrawalindex)\n        *   [Parameters](#parameters-16)\n    *   [getEIP1024PublicEncryptionKey](#geteip1024publicencryptionkey)\n        *   [Parameters](#parameters-17)\n        *   [Examples](#examples-8)\n    *   [getEIP1024SharedSecret](#geteip1024sharedsecret)\n        *   [Parameters](#parameters-18)\n        *   [Examples](#examples-9)\n    *   [provideERC20TokenInformation](#provideerc20tokeninformation)\n        *   [Parameters](#parameters-19)\n    *   [setExternalPlugin](#setexternalplugin)\n        *   [Parameters](#parameters-20)\n    *   [setPlugin](#setplugin)\n        *   [Parameters](#parameters-21)\n    *   [provideNFTInformation](#providenftinformation)\n        *   [Parameters](#parameters-22)\n    *   [provideDomainName](#providedomainname)\n        *   [Parameters](#parameters-23)\n*   [loadInfosForContractMethod](#loadinfosforcontractmethod)\n    *   [Parameters](#parameters-24)\n*   [byContractAddressAndChainId](#bycontractaddressandchainid)\n    *   [Parameters](#parameters-25)\n*   [ResolutionConfig](#resolutionconfig)\n    *   [Properties](#properties)\n\n### Eth\n\nEthereum API\n\n#### Parameters\n\n*   `transport` **Transport**&#x20;\n*   `scrambleKey`   (optional, default `\"w0w\"`)\n*   `loadConfig` **LoadConfig**  (optional, default `{}`)\n\n#### Examples\n\n```javascript\nimport Eth from \"@ledgerhq/hw-app-eth\";\nconst eth = new Eth(transport)\n```\n\n#### getAddress\n\nget Ethereum address for a given BIP 32 path.\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `boolDisplay` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n*   `boolChaincode` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n*   `chainId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**&#x20;\n\n##### Examples\n\n```javascript\neth.getAddress(\"44'/60'/0'/0/0\").then(o => o.address)\n```\n\nReturns **[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\n\n#### signTransaction\n\nYou can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign.\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the BIP32 path to sign the transaction on\n*   `rawTxHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the raw ethereum transaction in hexadecimal to sign\n*   `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.\n\n##### Examples\n\n```javascript\nimport { ledgerService } from \"@ledgerhq/hw-app-eth\"\nconst tx = \"e8018504e3b292008252089428ee52a8f3d6e5d15f8b131996950d7f296c7952872bd72a2487400080\"; // raw tx to sign\nconst resolution = await ledgerService.resolveTransaction(tx);\nconst result = eth.signTransaction(\"44'/60'/0'/0/0\", tx, resolution);\nconsole.log(result);\n```\n\nReturns **[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)}>**&#x20;\n\n#### clearSignTransaction\n\nHelper to get resolution and signature of a transaction in a single method\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the BIP32 path to sign the transaction on\n*   `rawTxHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : the raw ethereum transaction in hexadecimal to sign\n*   `resolutionConfig` **[ResolutionConfig](#resolutionconfig)** : configuration about what should be clear signed in the transaction\n*   `throwOnError`  : optional parameter to determine if a failing resolution of the transaction should throw an error or not (optional, default `false`)\n\n##### Examples\n\n```javascript\nconst tx = \"e8018504e3b292008252089428ee52a8f3d6e5d15f8b131996950d7f296c7952872bd72a2487400080\"; // raw tx to sign\nconst result = eth.clearSignTransaction(\"44'/60'/0'/0/0\", tx, { erc20: true, externalPlugins: true, nft: true});\nconsole.log(result);\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), 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)}>**&#x20;\n\n#### getAppConfiguration\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{arbitraryDataEnabled: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), erc20ProvisioningNecessary: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), starkEnabled: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), starkv2Supported: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), version: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>**&#x20;\n\n#### signPersonalMessage\n\nYou can sign a message according to eth\\_sign RPC call and retrieve v, r, s given the message and the BIP 32 path of the account to sign.\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n*   `messageHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n\n##### Examples\n\n```javascript\neth.signPersonalMessage(\"44'/60'/0'/0/0\", Buffer.from(\"test\").toString(\"hex\")).then(result => {\nvar v = result['v'] - 27;\nv = v.toString(16);\nif (v.length < 2) {\nv = \"0\" + v;\n}\nconsole.log(\"Signature 0x\" + result['r'] + result['s'] + v);\n})\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{v: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), s: [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)}>**&#x20;\n\n#### signEIP712HashedMessage\n\nSign a prepared message following web3.eth.signTypedData specification. The host computes the domain separator and hashStruct(message)\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n*   `domainSeparatorHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n*   `hashStructMessageHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n\n##### Examples\n\n```javascript\neth.signEIP712HashedMessage(\"44'/60'/0'/0/0\", Buffer.from(\"0101010101010101010101010101010101010101010101010101010101010101\").toString(\"hex\"), Buffer.from(\"0202020202020202020202020202020202020202020202020202020202020202\").toString(\"hex\")).then(result => {\nvar v = result['v'] - 27;\nv = v.toString(16);\nif (v.length < 2) {\nv = \"0\" + v;\n}\nconsole.log(\"Signature 0x\" + result['r'] + result['s'] + v);\n})\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{v: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), s: [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)}>**&#x20;\n\n#### signEIP712Message\n\nSign an EIP-721 formatted message following the specification here:\n<https://github.com/LedgerHQ/app-ethereum/blob/develop/doc/ethapp.asc#sign-eth-eip-712>\n⚠️ This method is not compatible with nano S (LNS). Make sure to use a try/catch to fallback on the signEIP712HashedMessage method ⚠️\n\n##### Parameters\n\n*   `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** derivationPath\n*   `jsonMessage` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** message to sign\n*   `fullImplem` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use the legacy implementation (optional, default `false`)\n\n##### Examples\n\n```javascript\neth.signEIP721Message(\"44'/60'/0'/0/0\", {\ndomain: {\nchainId: 69,\nname: \"Da Domain\",\nverifyingContract: \"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC\",\nversion: \"1\"\n},\ntypes: {\n\"EIP712Domain\": [\n{ name: \"name\", type: \"string\" },\n{ name: \"version\", type: \"string\" },\n{ name: \"chainId\", type: \"uint256\" },\n{ name: \"verifyingContract\", type: \"address\" }\n],\n\"Test\": [\n{ name: \"contents\", type: \"string\" }\n]\n},\nprimaryType: \"Test\",\nmessage: {contents: \"Hello, Bob!\"},\n})\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)**&#x20;\n\n#### getChallenge\n\nMethod returning a 4 bytes TLV challenge as an hexa string\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;\n\n#### starkGetPublicKey\n\nget Stark public key for a given BIP 32 path.\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `boolDisplay` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Buffer](https://nodejs.org/api/buffer.html)>** the Stark public key\n\n#### starkSignOrder\n\nsign a Stark order\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `sourceTokenAddress` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `sourceQuantization` **BigNumber** quantization used for the source token\n*   `destinationTokenAddress` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `destinationQuantization` **BigNumber** quantization used for the destination token\n*   `sourceVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the source vault\n*   `destinationVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the destination vault\n*   `amountSell` **BigNumber** amount to sell\n*   `amountBuy` **BigNumber** amount to buy\n*   `nonce` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction nonce\n*   `timestamp` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction validity timestamp\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<([Buffer](https://nodejs.org/api/buffer.html) | {r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), s: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)})>** the signature\n\n#### starkSignOrder\\_v2\n\nsign a Stark order using the Starkex V2 protocol\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `sourceTokenAddress` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `sourceQuantizationType` **StarkQuantizationType** quantization type used for the source token\n*   `sourceQuantization` **(BigNumber | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `sourceMintableBlobOrTokenId` **(BigNumber | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `destinationTokenAddress` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `destinationQuantizationType` **StarkQuantizationType** quantization type used for the destination token\n*   `destinationQuantization` **(BigNumber | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `destinationMintableBlobOrTokenId` **(BigNumber | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `sourceVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the source vault\n*   `destinationVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the destination vault\n*   `amountSell` **BigNumber** amount to sell\n*   `amountBuy` **BigNumber** amount to buy\n*   `nonce` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction nonce\n*   `timestamp` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction validity timestamp\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<([Buffer](https://nodejs.org/api/buffer.html) | {r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), s: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)})>** the signature\n\n#### starkSignTransfer\n\nsign a Stark transfer\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `transferTokenAddress` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `transferQuantization` **BigNumber** quantization used for the token to be transferred\n*   `targetPublicKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** target Stark public key\n*   `sourceVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the source vault\n*   `destinationVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the destination vault\n*   `amountTransfer` **BigNumber** amount to transfer\n*   `nonce` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction nonce\n*   `timestamp` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction validity timestamp\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<([Buffer](https://nodejs.org/api/buffer.html) | {r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), s: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)})>** the signature\n\n#### starkSignTransfer\\_v2\n\nsign a Stark transfer or conditional transfer using the Starkex V2 protocol\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `transferTokenAddress` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `transferQuantizationType` **StarkQuantizationType** quantization type used for the token to be transferred\n*   `transferQuantization` **(BigNumber | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `transferMintableBlobOrTokenId` **(BigNumber | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;\n*   `targetPublicKey` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** target Stark public key\n*   `sourceVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the source vault\n*   `destinationVault` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ID of the destination vault\n*   `amountTransfer` **BigNumber** amount to transfer\n*   `nonce` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction nonce\n*   `timestamp` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** transaction validity timestamp\n*   `conditionalTransferAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**&#x20;\n*   `conditionalTransferFact` **BigNumber?**&#x20;\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<([Buffer](https://nodejs.org/api/buffer.html) | {r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), s: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)})>** the signature\n\n#### starkProvideQuantum\n\nprovide quantization information before singing a deposit or withdrawal Stark powered contract call\n\nIt shall be run following a provideERC20TokenInformation call for the given contract\n\n##### Parameters\n\n*   `operationContract` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** contract address of the token to be transferred (not present for ETH)\n*   `operationQuantization` **BigNumber** quantization used for the token to be transferred\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>**&#x20;\n\n#### starkProvideQuantum\\_v2\n\nprovide quantization information before singing a deposit or withdrawal Stark powered contract call using the Starkex V2 protocol\n\nIt shall be run following a provideERC20TokenInformation call for the given contract\n\n##### Parameters\n\n*   `operationContract` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** contract address of the token to be transferred (not present for ETH)\n*   `operationQuantizationType` **StarkQuantizationType** quantization type of the token to be transferred\n*   `operationQuantization` **BigNumber?**&#x20;\n*   `operationMintableBlobOrTokenId` **BigNumber?**&#x20;\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>**&#x20;\n\n#### starkUnsafeSign\n\nsign the given hash over the Stark curve\nIt is intended for speed of execution in case an unknown Stark model is pushed and should be avoided as much as possible.\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `hash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** hexadecimal hash to sign\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<([Buffer](https://nodejs.org/api/buffer.html) | {r: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), s: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)})>** the signature\n\n#### eth2GetPublicKey\n\nget an Ethereum 2 BLS-12 381 public key for a given BIP 32 path.\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `boolDisplay` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n\n##### Examples\n\n```javascript\neth.eth2GetPublicKey(\"12381/3600/0/0\").then(o => o.publicKey)\n```\n\nReturns **[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)}>** an object with a publicKey\n\n#### eth2SetWithdrawalIndex\n\nSet the index of a Withdrawal key used as withdrawal credentials in an ETH 2 deposit contract call signature\n\nIt shall be run before the ETH 2 deposit transaction is signed. If not called, the index is set to 0\n\n##### Parameters\n\n*   `withdrawalIndex` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** index path in the EIP 2334 path m/12381/3600/withdrawalIndex/0\n\nReturns **[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\n\n#### getEIP1024PublicEncryptionKey\n\nget a public encryption key on Curve25519 according to EIP 1024\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `boolDisplay` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n\n##### Examples\n\n```javascript\neth.getEIP1024PublicEncryptionKey(\"44'/60'/0'/0/0\").then(o => o.publicKey)\n```\n\nReturns **[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)}>** an object with a publicKey\n\n#### getEIP1024SharedSecret\n\nget a shared secret on Curve25519 according to EIP 1024\n\n##### Parameters\n\n*   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path in BIP 32 format\n*   `remotePublicKeyHex` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** remote Curve25519 public key\n*   `boolDisplay` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n\n##### Examples\n\n```javascript\neth.getEIP1024SharedSecret(\"44'/60'/0'/0/0\", \"87020e80af6e07a6e4697f091eacadb9e7e6629cb7e5a8a371689a3ed53b3d64\").then(o => o.sharedSecret)\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{sharedSecret: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>** an object with a shared secret\n\n#### provideERC20TokenInformation\n\nprovides a trusted description of an ERC 20 token to associate a contract address with a ticker and number of decimals.\n\n##### Parameters\n\n*   `data` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** stringified buffer of ERC20 signature\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** a boolean\n\n#### setExternalPlugin\n\nprovides the name of a trusted binding of a plugin with a contract address and a supported method selector. This plugin will be called to interpret contract data in the following transaction signing command.\n\n##### Parameters\n\n*   `payload` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** external plugin data\n*   `signature` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**&#x20;\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** a boolean\n\n#### setPlugin\n\nprovides the name of a trusted binding of a plugin with a contract address and a supported method selector. This plugin will be called to interpret contract data in the following transaction signing command.\n\n##### Parameters\n\n*   `data` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** stringified buffer of plugin signature\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** a boolean\n\n#### provideNFTInformation\n\nprovides a trusted description of an NFT to associate a contract address with a collectionName.\n\n##### Parameters\n\n*   `data` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** stringified buffer of the NFT description\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** a boolean\n\n#### provideDomainName\n\nprovides a domain name (like ENS) to be displayed during transactions in place of the address it is associated to. It shall be run just before a transaction involving the associated address that would be displayed on the device.\n\n##### Parameters\n\n*   `data` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** an stringied buffer of some TLV encoded data to represent the domain\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** a boolean\n\n### loadInfosForContractMethod\n\nRetrieve the metadatas a given contract address and a method selector\n\n#### Parameters\n\n*   `contractAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n*   `selector` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n*   `chainId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**&#x20;\n*   `userLoadConfig` **LoadConfig**&#x20;\n\nReturns **[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))>**&#x20;\n\n### byContractAddressAndChainId\n\nRetrieve the token information by a given contract address if any\n\n#### Parameters\n\n*   `contract` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;\n*   `chainId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**&#x20;\n*   `erc20SignaturesBlob` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | null)?**&#x20;\n\nReturns **ReturnType\\<any>**&#x20;\n\n### ResolutionConfig\n\nAllows to configure precisely what the service need to resolve.\nfor instance you can set nft:true if you need clear signing on NFTs. If you set it and it is not a NFT transaction, it should still work but will do a useless service resolution.\n\nType: {nft: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?, externalPlugins: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?, erc20: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?, domains: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\\<DomainDescriptor>?, uniswapV3: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?}\n\n#### Properties\n\n*   `nft` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n*   `externalPlugins` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n*   `erc20` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n*   `domains` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\\<DomainDescriptor>?**&#x20;\n*   `uniswapV3` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**&#x20;\n","readmeFilename":"README.md"}