{"_id":"@burner-factory/token-exchange-pairs","_rev":"1-9ad51a21298d2a723b8f62265ceadff6","name":"@burner-factory/token-exchange-pairs","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@burner-factory/token-exchange-pairs","version":"0.1.0","author":{"name":"David Mihal","email":"david@dmihal.com"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"dependencies":{"@burner-wallet/exchange":"^1.0.0"},"description":"Exchange pairs for the Exchange plugin (`@burner-wallet/exchange`). Allows backed tokens created by the Burner Factory to be exchanged to and from the native asset.","_id":"@burner-factory/token-exchange-pairs@0.1.0","dist":{"shasum":"7dacf7871b9e1fd25711f59f3404b6f3446fd86c","integrity":"sha512-vBIECkVQmJPH/cFbblDMoQ3Ux6d2FP3ykACtN7segrIH5u/HQTPh+duMcCWq3gZ33DZqwcbkcQJ1YH464sX2Mg==","tarball":"https://registry.npmjs.org/@burner-factory/token-exchange-pairs/-/token-exchange-pairs-0.1.0.tgz","fileCount":14,"unpackedSize":7663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeB6ArCRA9TVsSAnZWagAATtwQAINgaNc4WXU4KNdBlY0W\n4TAhmlqd+QNOt4TB54x7BSqjBwLTMpHkVFeMruP0CUN3PExiqcYf4ho7WjM5\nH4OYnkMlhQuFcXSIKV5bhkBskuLEcSsaswx1trv2u+6NHVi9LoWp2JA2gxVP\n6yKk9bw2VHHEg/pIlsc02zebd87+NjdlHH68LX9zhJuTuxVVKKVKJOeX1V4N\nPVIF78tkiw5p4zLEupfsQCzewJ2L8Ok8+l4g7Yg/Rz0HBWeVWsVaxuDbd6V/\nziTlZFPLPYikQwc9AXuUZNJ648R/tAKFtDDNeRorKVYFQbSZoYuNVrG5rj4f\nQl11T9hFbCnWsyQl/NTl0xvmfe0KXy3Cfb9r2R9xQbhTbH0gYsAZ/SZm2sFB\nQWcTtmbf3GXJpvqQ+vMv/UDVVdG2AmYEshWn6L6DR5wPmOrdWh0vnezbfBR9\nZYPr/Z6ArHgnyBGZ1JyF/2DSvjYIvBTMjxCA8TG8gVW61mauwG+SPCtYzuNt\nTltlHgAaibunHuU5S1fqSTDb8RdLFyirMs15kP7cZSzClMvpDF8PmFv0ysch\nzJQAaZyUGGoxo9jPHIudqOht2a/60WlREnkWIGQ3bDvzFVIuQYt7/8lsfP47\n0N7JkLfvVA22c6bFWsHrCGh5zbl6j75uh4uSI1sf22kMJYsM5sunldgodpRc\nUOMt\r\n=iV60\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTKktGEcMkyYarP87UYlWzsFlkQJYIwY0lgmMbFNjx9AIgUm5mHgPNAnPzzvP3+ujN+fqsJMLG7Ej8KgMAAhbZFVc="}]},"maintainers":[{"name":"dmihal","email":"david@dmihal.com"}],"_npmUser":{"name":"dmihal","email":"david@dmihal.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/token-exchange-pairs_0.1.0_1577558058887_0.7488616190156854"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-28T18:34:18.652Z","0.1.0":"2019-12-28T18:34:19.016Z","modified":"2022-04-04T21:07:35.885Z"},"maintainers":[{"name":"dmihal","email":"david@dmihal.com"}],"description":"Exchange pairs for the Exchange plugin (`@burner-wallet/exchange`). Allows backed tokens created by the Burner Factory to be exchanged to and from the native asset.","author":{"name":"David Mihal","email":"david@dmihal.com"},"license":"MIT","readme":"# Token Exchange Pairs (`@burner-factory/token-exchange-pairs`)\n\nExchange pairs for the Exchange plugin (`@burner-wallet/exchange`). Allows backed tokens created by\nthe Burner Factory to be exchanged to and from the native asset.\n\n## Example\n\n```JSX\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { xdai, ERC777Asset } from '@burner-wallet/assets';\nimport BurnerCore from '@burner-wallet/core';\nimport { InjectedSigner, LocalSigner } from '@burner-wallet/core/signers';\nimport { XDaiGateway } from '@burner-wallet/core/gateways';\nimport ModernUI from '@burner-wallet/modern-ui';\nimport Exchange from '@burner-wallet/exchange';\nimport { BackedTokenPair } from '@burner-factory/token-exchange-pairs';\n\nconst token = new ERC777Asset({\n  id: 'vend',\n  name: 'Test Vendable',\n  network: '100',\n  address: '0xCcDc8B0A05edB13170706A5621Cb60cC8c4C363D',\n});\n\nconst core = new BurnerCore({\n  signers: [new InjectedSigner(), new LocalSigner()],\n  gateways: [new XDaiGateway()],\n  assets: [xdai, token],\n});\n\nconst exchange = new Exchange({\n  pairs: [new BackedTokenPair('vend', 'xdai')],\n});\n\nconst BurnerWallet = () =>\n  <ModernUI core={core} plugins={[exchange]} />\n\nReactDOM.render(<BurnerWallet />, document.getElementById('root'));\n```\n","readmeFilename":"README.md"}