{"_id":"@blooo/hw-app-everscale","name":"@blooo/hw-app-everscale","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@blooo/hw-app-everscale","type":"module","version":"1.0.0","description":"Ledger Hardware Wallet Everscale Application API","keywords":["Ledger","LedgerWallet","EVER","Everscale","NanoS+","NanoX","Flex","Stax","Blue","Hardware Wallet"],"repository":{"type":"git","url":"git+https://github.com/blooo-io/hw-app-everscale.git"},"bugs":{"url":"https://github.com/blooo-io/hw-app-everscale/issues"},"homepage":"https://github.com/blooo-io/hw-app-everscale","publishConfig":{"access":"public"},"main":"lib/Everscale.js","module":"lib/Everscale.js","types":"lib/Everscale.d.ts","license":"Apache-2.0","dependencies":{"@ledgerhq/errors":"^6.19.1","@ledgerhq/hw-transport":"^6.31.4","@ledgerhq/logs":"^6.12.0","@eversdk/core":"^1.0.0","@eversdk/lib-node":"^1.0.0","bip32-path":"^0.4.2"},"devDependencies":{"@ledgerhq/hw-transport-mocker":"^6.29.4","@types/jest":"^29.5.10","@types/node":"^20.8.10","documentation":"14.0.2","jest":"^29.7.0","rimraf":"^4.4.1","source-map-support":"^0.5.21","ts-jest":"^29.1.1","ts-node":"^10.4.0"},"scripts":{"clean":"rimraf lib lib-es","build":"tsc && tsc -m ES6 --outDir lib-es","prewatch":"pnpm build","watch":"tsc --watch","watch:es":"tsc --watch -m ES6 --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":"@blooo/hw-app-everscale@1.0.0","gitHead":"c33cf3e3c9cfbcaf347451c49c3dbd4fe4e27e80","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-BZWvUC5fk6eNAggLSEF/gXFVmMiAzq8RKNytW7zC+lX7y8tTfq62T6QVUPx9CbvLjp3HxHg/hXVbrm+7vqOd7w==","shasum":"c26c9df30c7e3586e737ad3edd5a283312dbb133","tarball":"https://registry.npmjs.org/@blooo/hw-app-everscale/-/hw-app-everscale-1.0.0.tgz","fileCount":16,"unpackedSize":74029,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD4e4ok8s4eqO4n10EPoP2lwuesXUN7WVCM4adLHDN8BAIgaUDvmqim53mBhQ7376iSU2Ux/7VeVMG1TquPWPPZmas="}]},"_npmUser":{"name":"n4l5u0r","email":"rouslan@blooo.io"},"directories":{},"maintainers":[{"name":"n4l5u0r","email":"rouslan@blooo.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hw-app-everscale_1.0.0_1744018832050_0.4833697624237925"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-07T09:40:31.951Z","1.0.0":"2025-04-07T09:40:32.258Z","modified":"2025-04-07T09:40:32.536Z"},"maintainers":[{"name":"n4l5u0r","email":"rouslan@blooo.io"}],"description":"Ledger Hardware Wallet Everscale Application API","homepage":"https://github.com/blooo-io/hw-app-everscale","keywords":["Ledger","LedgerWallet","EVER","Everscale","NanoS+","NanoX","Flex","Stax","Blue","Hardware Wallet"],"repository":{"type":"git","url":"git+https://github.com/blooo-io/hw-app-everscale.git"},"bugs":{"url":"https://github.com/blooo-io/hw-app-everscale/issues"},"license":"Apache-2.0","readme":"# Ledger Wallet Everscale JavaScript SDK\n\nThis repository contains JavaScript bindings for interacting with the Everscale Ledger App.\n\n## Installation\n\nTo use this SDK, install it via npm:\n\n```bash\nnpm install @blooo/hw-app-everscale\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*   [Everscale](#everscale)\n    *   [Parameters](#parameters)\n    *   [Examples](#examples)\n    *   [getAppConfiguration](#getappconfiguration)\n        *   [Examples](#examples-1)\n    *   [getAddress](#getaddress)\n        *   [Parameters](#parameters-1)\n        *   [Examples](#examples-2)\n    *   [getPublicKey](#getpublickey)\n        *   [Parameters](#parameters-2)\n        *   [Examples](#examples-3)\n    *   [signMessage](#signmessage)\n        *   [Parameters](#parameters-3)\n        *   [Examples](#examples-4)\n    *   [signTransaction](#signtransaction)\n        *   [Parameters](#parameters-4)\n        *   [Examples](#examples-5)\n\n### Everscale\n\nEverscale API\n\n#### Parameters\n\n*   `transport` **Transport** a transport for sending commands to a device\n*   `scrambleKey`  a scramble key (optional, default `\"everscale_default_scramble_key\"`)\n\n#### Examples\n\n```javascript\nimport Everscale from \"@blooo/hw-app-everscale\";\nconst Everscale = new Everscale(transport);\n```\n\n#### getAppConfiguration\n\nGet the application configuration from the device.\n\n##### Examples\n\n```javascript\nconst version = await everscale.getAppConfiguration();\nconsole.log(version); // \"1.1.0\"\n```\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)>** A promise that resolves to the application version as a string in the format \"major.minor.patch\".\n\n#### getAddress\n\nGet the Everscale address for a given account number and wallet type.\n\n##### Parameters\n\n*   `accountNumber` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The account number to derive the address from.\n*   `walletType` **WalletType** The type of wallet to use (e.g., WALLET\\_V3).\n*   `display` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether to display the address on the device for confirmation (default: true). (optional, default `true`)\n\n##### Examples\n\n```javascript\nconst address = await everscale.getAddress(0, WalletType.WALLET_V3, true);\nconsole.log(address); // \"0x7571b498e3fed7a0fffbe21377e50548c92da4a04842e1b163547d3e8980cf64\"\n```\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)>** A promise that resolves to the Everscale address as a hexadecimal string prefixed with \"0x\".\n\n#### getPublicKey\n\nGet the public key for a given account number.\n\n##### Parameters\n\n*   `accountNumber` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The account number to derive the public key from.\n*   `display` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether to display the public key on the device for confirmation (default: true). (optional, default `true`)\n\n##### Examples\n\n```javascript\nconst publicKey = await everscale.getPublicKey(0, false);\nconsole.log(publicKey); // \"0x3099f14eccaa0542d2d60e92eb66495f6ecf01a114e12f9db8d9cb827a87bf84\"\n```\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)>** A promise that resolves to the public key as a hexadecimal string prefixed with \"0x\".\n\n#### signMessage\n\nSign a message with the private key derived from the given account number.\n\n##### Parameters\n\n*   `accountNumber` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The account number to derive the signing key from.\n*   `messageHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The hash of the message to sign, as a hexadecimal string with or without \"0x\" prefix.\n\n##### Examples\n\n```javascript\nconst signature = await everscale.signMessage(0, \"1111111111111111111111111111111111111111111111111111111111111111\");\nconsole.log(signature); // \"0x40d4883fb9095f3610dfc0888917c8b5548c7074f0f010966c94a5c405ccabe8d320c90334786dbf2b34f10e75c5370ae151b0b11cb190a16d7509983964d6dd00\"\n```\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)>** A promise that resolves to the signature as a hexadecimal string prefixed with \"0x\".\n\n#### signTransaction\n\nSign a transaction with the device.\n\n##### Parameters\n\n*   `inputData` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The payload to sign, as a hexadecimal string with or without \"0x\" prefix.\n    The data is composed of:\n    \\- Account number (4 bytes): The account number to retrieve\n    \\- Wallet Type (1 byte): To derive address\n    \\- Decimals (1 byte): Token decimals\n    \\- Ticker length (1 byte): Length of the ticker string\n    \\- Ticker (variable): Token ticker\n    \\- Metadata (1 byte): Flags for optional fields\n    \\- Current wallet number (1 byte, optional): To parse transaction ABI (if metadata & 0x01)\n    \\- Workchain ID (1 byte, optional): Network workchain (if metadata & 0x02)\n    \\- Deploy contract address (32 bytes, optional): Contract address (if metadata & 0x04)\n    \\- Chain ID (4 bytes, optional): Network chain ID (if metadata & 0x08)\n    \\- Serialized transaction (variable): The transaction data\n\n##### Examples\n\n```javascript\nconst inputData = \"0000000001090455534454000101040100C9002161B3BADB535D1B88D0E4D60D316567B1448568EFAFDF21846ECD0BA02E3ADABF97000000CA7E2C951FB3D692B2A677323640012165801BE2256B3D704F24C46AEA3298C1A5EA8F8D1AA86CCC89474BC0570265E7898AC0000000000000000036D36956F8B969D03802216B562548AD00000000000000000000000049504F808015E4256B3D704F24C46AEA3298C1A5EA8F8D1AA86CCC89474BC0570265E7898AD00328480101C03BF4894E22CDD500E450CBE5838B9938FDA1E4D3727FE3B5385C5114B0293F0001\";\nconst signature = await everscale.signTransaction(inputData);\nconsole.log(signature); // \"0xa8b3ee327f6a64945e875d59ec49b12bea553b30170be65c541176f052156035428f8a0180e9f8802622b4f3339f2161076790b822e55c0d46f01b919f6de005\"\n```\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)>** A promise that resolves to the signature as a hexadecimal string prefixed with \"0x\".\n","readmeFilename":"README.md","_rev":"1-0f46d745da4b49992d003e5b44464a80"}