@metamask/eth-ledger-bridge-keyring
Version:
A MetaMask compatible keyring, for ledger hardware wallets
1 lines • 1.39 kB
Source Map (JSON)
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACxC,YAAY,EAAE,uCAAuC;IACrD,YAAY,EAAE,4BAA4B;IAC1C,YAAY,EAAE,2DAA2D;IACzE,YAAY,EAAE,6BAA6B;IAC3C,YAAY,EAAE,kCAAkC;CACjD,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IAC3C,YAAY,EAAE,4BAA4B;IAC1C,YAAY,EAAE,wCAAwC;IACtD,YAAY,EAAE,2BAA2B;CAC1C,CAAC,CAAC","sourcesContent":["/**\n * Selectors that are used only by NFT standards (ERC721/ERC1155), not by ERC20.\n * When the tx uses one of these, we enable Ledger NFT clear signing.\n * approve(0x095ea7b3) is shared by ERC20 and ERC721 so we do NOT include it here.\n */\nexport const NFT_ONLY_SELECTORS = new Set([\n '0xa22cb465', // setApprovalForAll (ERC721 + ERC1155)\n '0x42842e0e', // safeTransferFrom (ERC721)\n '0xb88d4fde', // safeTransferFrom(address,address,uint256,bytes) (ERC721)\n '0xf242432a', // safeTransferFrom (ERC1155)\n '0x2eb2c2d6', // safeBatchTransferFrom (ERC1155)\n]);\n\n/**\n * Four-byte selectors for the three state-changing functions defined in EIP-20.\n *\n * @see https://eips.ethereum.org/EIPS/eip-20\n */\nexport const ERC20_WRITE_SELECTORS = new Set([\n '0xa9059cbb', // transfer(address,uint256)\n '0x23b872dd', // transferFrom(address,address,uint256)\n '0x095ea7b3', // approve(address,uint256)\n]);\n"]}