{"_id":"@bobtheshoplifter/node-waxjs","_rev":"1-0c605838e8791bcb9e784e31d2f0202a","name":"@bobtheshoplifter/node-waxjs","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.4":{"name":"@bobtheshoplifter/node-waxjs","version":"0.0.4","description":"Javascript API for integration with the WAX Cloud Wallet.","scripts":{"build":"tsc","build-web":"webpack --config webpack.prod.js","prettier":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"tslint -p tsconfig.json","test":"npm run lint && mocha -r ts-node/register test/**/*.test.ts","docs":"typedoc --excludePrivate --exclude src/waxEventSource.ts --out docs src","serve":"serve -s dist-web","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run prettier && git add -A src","postversion":"git push && git push --tags"},"author":{"name":"WAX"},"homepage":"https://github.com/worldwide-asset-exchange/waxjs#readme","license":"ISC","devDependencies":{"@types/chai":"^4.2.3","@types/mocha":"^5.2.7","@types/node":"^12.7.5","chai":"^4.2.0","mocha":"^6.2.0","prettier":"^1.18.2","ts-loader":"^6.1.0","ts-node":"^8.4.1","tslint":"^5.20.0","tslint-config-prettier":"^1.18.0","typedoc":"^0.15.0","typescript":"^3.6.3","webpack":"^4.40.2","webpack-cli":"^3.3.9","serve":"^11.1.0"},"dependencies":{"eosjs":"^20.0.0","node-fetch":"^2.6.0"},"main":"webpack.prod.js","directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/BobTheShoplifter/waxjs.git"},"bugs":{"url":"https://github.com/BobTheShoplifter/waxjs/issues"},"gitHead":"b47b393e881cde9c2099e402924f1af6e4472613","_id":"@bobtheshoplifter/node-waxjs@0.0.4","_nodeVersion":"10.16.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-H7d+1b9TRZEkoy53umqdNh53tuWhFHXShetX/Uwbmh9X4cyJy1vKKU3A3qClnC6iGNx6Ad5Lr/Q2ta5xiuyTuw==","shasum":"e43e49f8f152312de47e1a2fa57161bcf11e8fc7","tarball":"https://registry.npmjs.org/@bobtheshoplifter/node-waxjs/-/node-waxjs-0.0.4.tgz","fileCount":9,"unpackedSize":13644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0roRCRA9TVsSAnZWagAAkb8QAJBMxBo9i2srhYYERrCd\nKNIEvhyBwTmjCqLL07ICG39NWU6qOx1UObYpGAQgHyohC5nw1Lk48CBDh993\nlkwoEvLC2nsbEL5spg7lXVgHRbjN3mqU2GKvyh0w838H33c5guDNAuhQ59v4\npjYW+Ph0+KQfrVnZlY/Ww4/SUUmdtBm7YZxHaDL8r116YaaoKO3984o6ZI6P\nYhJHWfQkrv5kG/INSTplQ7ZHQSLxyvRieEQCERibQ43Gs2i1eh1nvHNKdcCk\nDSoWgnjawe0ktJqYSHYmZfyrDdgSq7lR3r9R7TkeAs3pZgzcY1COwJsiDcRL\n8b2jg+1Jw6oaSafuYs5j6vD3ufGuWbWblkltjDrSLDDtQ0bDmCfdWRxDy4sy\n3PJoKKmqzK/1Ju8XmmeeT0UH/lUcM7leuUq2hSccaSFDOMsQuD3KUoPzImQt\nsHjhrZLVn3uXbVOXUnHLBEq652x6h5AxPYlNGTUymeStFS/IC+25o47I7X+b\nLOID4IXqsfCg1IR97dSG69Rj2wiOp0eFvHQaywFM+CQf5pI4gg3idlbGfhCC\not2mEGxeUnF9AD4vgkUR3Rs4af86W7+MLahQts3HhWC4atIs/qm8oXENWQ6R\nuDU/7OgngQ/W1K0EHnAEHy8TvMjBgw+orY44AMmtj2flJLUR3d/FCERuNTS3\nPnwv\r\n=xGhE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGC/3nEldx2OdDyeeuIEG2cu+Q9cECD/M6O15MjxM9SHAiBYkIsNc5X2SEHIAQX9Do85j3x7CMalHENwEYEm/DD/cQ=="}]},"maintainers":[{"name":"bobtheshoplifter","email":"tata112spiller@gmail.com"}],"_npmUser":{"name":"bobtheshoplifter","email":"tata112spiller@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-waxjs_0.0.4_1574091281277_0.7188096440356029"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-18T15:34:41.037Z","0.0.4":"2019-11-18T15:34:41.439Z","modified":"2022-04-04T19:55:32.970Z"},"maintainers":[{"name":"bobtheshoplifter","email":"tata112spiller@gmail.com"}],"description":"Javascript API for integration with the WAX Cloud Wallet.","homepage":"https://github.com/worldwide-asset-exchange/waxjs#readme","repository":{"type":"git","url":"git+https://github.com/BobTheShoplifter/waxjs.git"},"author":{"name":"WAX"},"bugs":{"url":"https://github.com/BobTheShoplifter/waxjs/issues"},"license":"ISC","readme":"# waxjs\r\n\r\nJavascript API for integration with the WAX Cloud Wallet.\r\n\r\n## Documentation\r\n\r\n[Check the WAX developer portal for full instructions](https://developer.wax.io/waa/waxjs-overview/)\r\n\r\n## Installation\r\n\r\n### Browser\r\n\r\nGrab the waxjs.js minified bundle in the dist-web folder of this repo, or build it yourself (see below). [Check the example code](https://github.com/worldwide-asset-exchange/waxjs/blob/develop/dist-web/index.html) to see how to use it.\r\n\r\n### NPM\r\n\r\n```bash\r\nnpm install @waxio/waxjs\r\n```\r\n\r\n### YARN\r\n\r\n```bash\r\nyarn add @waxio/waxjs\r\n```\r\n\r\n## Usage\r\n\r\n### 0. Import (for NPM and Yarn installations)\r\n\r\nReact style apps using npm or yarn can import the library via:\r\n\r\n```js\r\nimport * as waxjs from \"@waxio/waxjs/dist\";\r\n```\r\n\r\n### 1. Instantiate\r\n\r\nInstantiate the waxjs object with the RPC server you wish to connect to.\r\n\r\n```js\r\nconst wax = new waxjs.WaxJS('https://wax.greymass.com');\r\n```\r\n\r\n### 2. Login\r\n\r\nLog your user in so as to access their wax account name for creating transactions.\r\n\r\n```js\r\nconst userAccount = await wax.login();\r\n```\r\n\r\nSuccessful login will return the userAccount. It will also be available as the ```userAccount``` member on the ```wax``` instance. You can now use the eosjs ```api``` member...\r\n\r\n\r\n### 3. Use the eosjs Objects As Usual\r\n\r\nUtilize the eosjs ```api``` and ```rpc``` members available on the ```wax``` instance. They are instances of the regular eosjs objects, Api, and JsonRpc, so you can do anything with them that eosjs already provides. [Check the eosjs docs and repo](https://github.com/EOSIO/eosjs) for more info.\r\n\r\nThe api method will not be initialized until you login your user, and remember that the user's account name is available as the ```userAccount``` member on the ```wax``` instance.\r\n\r\n```js\r\nconst result = await wax.api.transact({\r\n  actions: [{\r\n    account: 'eosio.token',\r\n    name: 'transfer',\r\n    authorization: [{\r\n      actor: wax.userAccount,\r\n      permission: 'active',\r\n    }],\r\n    data: {\r\n      from: wax.userAccount,\r\n      to: 'eosio',\r\n      quantity: '0.00000001 WAX',\r\n      memo: '',\r\n    },\r\n  }]\r\n}, {\r\n  blocksBehind: 3,\r\n  expireSeconds: 1200,\r\n});\r\n```\r\n\r\n## Development\r\n\r\n### Generate docs\r\n\r\n``` npm run docs```\r\n\r\n### Run tests\r\n\r\n``` npm run test```\r\n\r\n### Build lib\r\n\r\n``` npm run build```\r\n\r\n### Build for web \r\n\r\n``` npm run build-web```\r\n","readmeFilename":"README.md"}