{"_id":"@amax/amaxjs-v2","_rev":"2-212d09eafc9084e5ba691ba147594900","name":"@amax/amaxjs-v2","dist-tags":{"latest":"22.1.2"},"versions":{"22.1.0":{"name":"@amax/amaxjs-v2","version":"22.1.0","author":{"name":"block.one"},"license":"MIT","_id":"@amax/amaxjs-v2@22.1.0","maintainers":[{"name":"armoniametachain","email":"aplink2022@gmail.com"}],"homepage":"https://github.com/EOSIO/eosjs#readme","bugs":{"url":"https://github.com/EOSIO/eosjs/issues"},"dist":{"shasum":"f1d9e0cf50a7199746d021be926dffbd7f83c691","tarball":"https://registry.npmjs.org/@amax/amaxjs-v2/-/amaxjs-v2-22.1.0.tgz","fileCount":53,"integrity":"sha512-/PZFcHngxSz2YqdVfTeg0dzeU+XX476rsOeojeJaaxSYT0HnkmnV+TnidsW28Ct7fbX7Ai9YdK4J+ncCW4B9vw==","signatures":[{"sig":"MEQCIAiqeacokT7liKxQjIohADnPxsU54UpHvXpXRWo3GKjAAiBCoXDzX4+fAH7Zf5ZwrXn1VS+RbMDa+90JhVn4yK7kbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":421546},"jest":{"globals":{"ts-jest":{"tsconfig":"tsconfig.json"}},"automock":false,"testRegex":"(/src/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.(tsx?)$":"ts-jest"},"setupFiles":["./src/tests/setupJest.js"],"testEnvironment":"node","setupFilesAfterEnv":["jest-extended"],"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","gitHead":"d6e6976866664f0cf9aa79d2dbd70313c59c655e","scripts":{"lint":"eslint --ext .js,.jsx,.ts,.tsx src","test":"jest src/tests/*eosjs*","build":"rimraf dist && tsc -p ./tsconfig.json && node scripts/copy-ripe-md.js","cypress":"cypress run --spec 'cypress/integration/index.spec.js'","prepare":"npm run build","test-all":"yarn test && yarn test-node && yarn test-types && yarn cypress","build-web":"webpack --config webpack.prod.js && webpack --config webpack.debug.js","docs-init":"sh .docs/scripts/init.sh","test-node":"jest src/tests/*node*","cypress-ui":"cypress open","docs-build":"sh .docs/scripts/build.sh","docs-serve":"python -m SimpleHTTPServer","test-types":"jest src/tests/type-checks.test.ts","docs-publish":"sh .docs/scripts/publish.sh","build-production":"yarn build && yarn build-web && yarn test-all"},"_npmUser":{"name":"armoniametachain","email":"aplink2022@gmail.com"},"repository":{"url":"git+https://github.com/EOSIO/eosjs.git","type":"git"},"_npmVersion":"6.14.17","description":"Talk to eos API","directories":{},"_nodeVersion":"14.20.0","dependencies":{"pako":"2.0.3","bn.js":"5.2.0","hash.js":"1.1.7","elliptic":"6.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","buffer":"^6.0.3","eslint":"^7.30.0","rimraf":"^3.0.2","cypress":"^7.7.0","ts-jest":"^26.5.6","webpack":"^5.44.0","eosjs-ecc":"^4.0.7","ts-loader":"^9.2.3","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/node":"^14.17.5","@types/pako":"^1.0.2","webpack-cli":"^4.7.2","jest-extended":"^0.11.5","@types/elliptic":"^6.4.13","jest-fetch-mock":"^3.0.3","@types/node-fetch":"^2.5.11","crypto-browserify":"^3.12.0","@cypress/skip-test":"^2.6.1","clean-webpack-plugin":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amaxjs-v2_22.1.0_1691566955532_0.5301906604323556","host":"s3://npm-registry-packages"}},"22.1.1":{"name":"@amax/amaxjs-v2","version":"22.1.1","author":{"name":"block.one"},"license":"MIT","_id":"@amax/amaxjs-v2@22.1.1","maintainers":[{"name":"armoniametachain","email":"aplink2022@gmail.com"}],"homepage":"https://github.com/EOSIO/eosjs#readme","bugs":{"url":"https://github.com/EOSIO/eosjs/issues"},"dist":{"shasum":"803b4ad6cca3556650fd1ecc1fb16902298d2dde","tarball":"https://registry.npmjs.org/@amax/amaxjs-v2/-/amaxjs-v2-22.1.1.tgz","fileCount":84,"integrity":"sha512-Jr45KI2oJRd++UhdAYV5AW76S3wNqBWkGa92P1GFSaXMvaWR49IKToPbdeL2bNxIVLKHpGdn/mtavYxvM6Wi2A==","signatures":[{"sig":"MEQCIF9UbOT9qNK4geB0T9YP4NE6G33fWx2jUrRDeVMpCZpHAiBH7R5eHRVWAD5gCYGKzRsyrZRlPpsEkAkvUO8HwmCHyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":808220},"jest":{"globals":{"ts-jest":{"tsconfig":"tsconfig.json"}},"automock":false,"testRegex":"(/src/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$","transform":{"^.+\\.(tsx?)$":"ts-jest"},"setupFiles":["./src/tests/setupJest.js"],"testEnvironment":"node","setupFilesAfterEnv":["jest-extended"],"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","gitHead":"d6e6976866664f0cf9aa79d2dbd70313c59c655e","scripts":{"lint":"eslint --ext .js,.jsx,.ts,.tsx src","test":"jest src/tests/*eosjs*","build":"rimraf dist && tsc -p ./tsconfig.json && node scripts/copy-ripe-md.js","cypress":"cypress run --spec 'cypress/integration/index.spec.js'","prepare":"npm run build","test-all":"yarn test && yarn test-node && yarn test-types && yarn cypress","build-web":"webpack --config webpack.prod.js && webpack --config webpack.debug.js","docs-init":"sh .docs/scripts/init.sh","test-node":"jest src/tests/*node*","cypress-ui":"cypress open","docs-build":"sh .docs/scripts/build.sh","docs-serve":"python -m SimpleHTTPServer","test-types":"jest src/tests/type-checks.test.ts","docs-publish":"sh .docs/scripts/publish.sh","build-production":"yarn build && yarn build-web && yarn test-all"},"_npmUser":{"name":"armoniametachain","email":"aplink2022@gmail.com"},"repository":{"url":"git+https://github.com/EOSIO/eosjs.git","type":"git"},"_npmVersion":"6.14.17","description":"Talk to eos API","directories":{},"_nodeVersion":"14.20.0","dependencies":{"pako":"2.0.3","bn.js":"5.2.0","hash.js":"1.1.7","elliptic":"6.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","buffer":"^6.0.3","eslint":"^7.30.0","rimraf":"^3.0.2","cypress":"^7.7.0","ts-jest":"^26.5.6","webpack":"^5.44.0","eosjs-ecc":"^4.0.7","ts-loader":"^9.2.3","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/node":"^14.17.5","@types/pako":"^1.0.2","webpack-cli":"^4.7.2","jest-extended":"^0.11.5","@types/elliptic":"^6.4.13","jest-fetch-mock":"^3.0.3","@types/node-fetch":"^2.5.11","crypto-browserify":"^3.12.0","@cypress/skip-test":"^2.6.1","clean-webpack-plugin":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amaxjs-v2_22.1.1_1691994474101_0.9663599573295902","host":"s3://npm-registry-packages"}},"22.1.2":{"name":"@amax/amaxjs-v2","version":"22.1.2","description":"Talk to eos API","main":"dist/index.js","scripts":{"cypress":"cypress run --spec 'cypress/integration/index.spec.js'","cypress-ui":"cypress open","prepare":"npm run build","lint":"eslint --ext .js,.jsx,.ts,.tsx src","test":"jest src/tests/*eosjs*","test-node":"jest src/tests/*node*","test-types":"jest src/tests/type-checks.test.ts","test-all":"yarn test && yarn test-node && yarn test-types && yarn cypress","build":"rimraf dist && tsc -p ./tsconfig.json && node scripts/copy-ripe-md.js","build-web":"webpack --config webpack.prod.js && webpack --config webpack.debug.js","build-production":"yarn build && yarn build-web && yarn test-all","docs-init":"sh .docs/scripts/init.sh","docs-build":"sh .docs/scripts/build.sh","docs-serve":"python -m SimpleHTTPServer","docs-publish":"sh .docs/scripts/publish.sh"},"author":{"name":"block.one"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/EOSIO/eosjs.git"},"dependencies":{"bn.js":"5.2.0","elliptic":"6.5.4","hash.js":"1.1.7","pako":"2.0.3"},"devDependencies":{"@cypress/skip-test":"^2.6.1","@types/elliptic":"^6.4.13","@types/jest":"^26.0.24","@types/node":"^14.17.5","@types/node-fetch":"^2.5.11","@types/pako":"^1.0.2","buffer":"^6.0.3","clean-webpack-plugin":"^3.0.0","crypto-browserify":"^3.12.0","cypress":"^7.7.0","eosjs-ecc":"^4.0.7","eslint":"^7.30.0","jest":"^26.6.3","jest-extended":"^0.11.5","jest-fetch-mock":"^3.0.3","rimraf":"^3.0.2","ts-jest":"^26.5.6","ts-loader":"^9.2.3","typescript":"^4.3.5","webpack":"^5.44.0","webpack-cli":"^4.7.2"},"jest":{"automock":false,"setupFiles":["./src/tests/setupJest.js"],"setupFilesAfterEnv":["jest-extended"],"moduleFileExtensions":["ts","tsx","js"],"transform":{"^.+\\.(tsx?)$":"ts-jest"},"globals":{"ts-jest":{"tsconfig":"tsconfig.json"}},"testRegex":"(/src/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$","testEnvironment":"node"},"types":"./dist/index.d.ts","gitHead":"d6e6976866664f0cf9aa79d2dbd70313c59c655e","bugs":{"url":"https://github.com/EOSIO/eosjs/issues"},"homepage":"https://github.com/EOSIO/eosjs#readme","_id":"@amax/amaxjs-v2@22.1.2","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-KuCTDp9SFdOJiIZEPwO63fZJhtZM1056cIX2LvyrasnpeX3FLoNxTGOqj41AAoy0HR/mE9bgRMQyw5hAomICjA==","shasum":"49cc904b89759567f09432a7d85b77b30720465c","tarball":"https://registry.npmjs.org/@amax/amaxjs-v2/-/amaxjs-v2-22.1.2.tgz","fileCount":84,"unpackedSize":808103,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS0+Kwkm5HYa7zjr+30MdYmvw+3hULoJnV9/yIZ/w4wQIgBzLTy9pgQKHUz2DfQvKhMBwCdUR3H0ooCd23AMO8hlQ="}]},"_npmUser":{"name":"armoniametachain","email":"aplink2022@gmail.com"},"directories":{},"maintainers":[{"name":"armoniametachain","email":"aplink2022@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/amaxjs-v2_22.1.2_1734592131013_0.2375207835225004"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-09T07:42:35.398Z","modified":"2024-12-19T07:08:51.498Z","22.1.0":"2023-08-09T07:42:35.805Z","22.1.1":"2023-08-14T06:27:54.320Z","22.1.2":"2024-12-19T07:08:51.297Z"},"bugs":{"url":"https://github.com/EOSIO/eosjs/issues"},"author":{"name":"block.one"},"license":"MIT","homepage":"https://github.com/EOSIO/eosjs#readme","repository":{"type":"git","url":"git+https://github.com/EOSIO/eosjs.git"},"description":"Talk to eos API","maintainers":[{"name":"armoniametachain","email":"aplink2022@gmail.com"}],"readme":"# @amax/amaxjs-v2\n[![Build Status](https://github.com/eosio/eosjs/workflows/CI/badge.svg?branch=master)](https://github.com/EOSIO/eosjs/actions)  [![npm version](https://badge.fury.io/js/eosjs.svg)](https://badge.fury.io/js/eosjs)  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)  ![npm](https://img.shields.io/npm/dw/eosjs.svg)\n\nJavascript API for integration with EOSIO-based blockchains using [EOSIO RPC API](https://developers.eos.io/eosio-nodeos/reference).\n\nDocumentation can be found [here](https://eosio.github.io/eosjs)\n\n## Installation\n\n### NPM\n\nThe official distribution package can be found at [npm](https://www.npmjs.com/package/eosjs).\n\n### Add dependency to your project\n\n`yarn add @amax/amaxjs-v2`\n\n### Using with Typescript\n\nIn order to get access to the `TextEncoding` and `TextDecoding` types, you need to add `@types/text-encoding` as a dev dependency:\n`yarn add --dev @types/text-encoding`\n\nIf you're using Node (not a browser) then you'll also need to make sure the `dom` lib is referenced in your `tsconfig.json`:\n\n```\n{\n\t\"compilerOptions\": {\n\t\t\"lib\": [..., \"dom\"]\n\t}\n}\n```\n\n### Browser Distribution\n\nClone this repository locally then run `yarn build-web`.  The browser distribution will be located in `dist-web` and can be directly copied into your project repository. The `dist-web` folder contains minified bundles ready for production, along with source mapped versions of the library for debugging.  For full browser usage examples, [see the documentation](https://eosio.github.io/eosjs/guides/1.-Browsers.html).\n\n## Import\n\n### ES Modules\n\nImporting using ESM syntax is supported using TypeScript, [webpack](https://webpack.js.org/api/module-methods), or  [Node.js with `--experimental-modules` flag](https://nodejs.org/api/esm.html)\n```js\nimport { Api, JsonRpc, RpcError } from '@amax/amaxjs-v2';\nimport { JsSignatureProvider } from '@amax/amaxjs-v2/dist/eosjs-jssig';           // development only\n```\n\n### CommonJS\n\nImporting using commonJS syntax is supported by Node.js out of the box.\n```js\nconst { Api, JsonRpc, RpcError } = require('@amax/amaxjs-v2');\nconst { JsSignatureProvider } = require('@amax/amaxjs-v2/dist/eosjs-jssig');      // development only\nconst fetch = require('node-fetch');                                    // node only; not needed in browsers\nconst { TextEncoder, TextDecoder } = require('util');                   // node only; native TextEncoder/Decoder\n```\n\n## Basic Usage\n\n### Signature Provider\n\nThe Signature Provider holds private keys and is responsible for signing transactions.\n\n***Using the JsSignatureProvider in the browser is not secure and should only be used for development purposes. Use a secure vault outside of the context of the webpage to ensure security when signing transactions in production***\n\n```js\nconst defaultPrivateKey = \"5JtUScZK2XEp3g9gh7F8bwtPTRAkASmNrrftmx4AxDKD5K4zDnr\"; // bob\nconst signatureProvider = new JsSignatureProvider([defaultPrivateKey]);\n```\n\n### JSON-RPC\n\nOpen a connection to JSON-RPC, include `fetch` when on Node.js.\n```js\nconst rpc = new JsonRpc('http://127.0.0.1:8888', { fetch });\n```\n\n### API\n\nInclude textDecoder and textEncoder when using in Node. You may exclude these when running in a browser since most modern browsers now natively support these. If your browser does not support these (https://caniuse.com/#feat=textencoder), then you can import them as a dependency through the following deprecated npm package: https://www.npmjs.com/package/text-encoding\n```js\nconst api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });\n```\n\n### Sending a transaction\n\n`transact()` is used to sign and push transactions onto the blockchain with an optional configuration object parameter.  This parameter can override the default value of `broadcast: true`, and can be used to fill TAPOS fields given `expireSeconds` and either `blocksBehind` or `useLastIrreversible`.  Given no configuration options, transactions are expected to be unpacked with TAPOS fields (`expiration`, `ref_block_num`, `ref_block_prefix`) and will automatically be broadcast onto the chain.\n\n```js\n(async () => {\n  const result = await api.transact({\n    actions: [{\n      account: 'eosio.token',\n      name: 'transfer',\n      authorization: [{\n        actor: 'useraaaaaaaa',\n        permission: 'active',\n      }],\n      data: {\n        from: 'useraaaaaaaa',\n        to: 'useraaaaaaab',\n        quantity: '0.0001 SYS',\n        memo: '',\n      },\n    }]\n  }, {\n    blocksBehind: 3,\n    expireSeconds: 30,\n  });\n  console.dir(result);\n})();\n```\n\n### Error handling\n\nuse `RpcError` for handling RPC Errors\n```js\n...\ntry {\n  const result = await api.transact({\n  ...\n} catch (e) {\n  console.log('\\nCaught exception: ' + e);\n  if (e instanceof RpcError)\n    console.log(JSON.stringify(e.json, null, 2));\n}\n...\n```\n\n## Contributing\n\n[Contributing Guide](./CONTRIBUTING.md)\n\n[Code of Conduct](./CONTRIBUTING.md#conduct)\n\n## License\n\n[MIT](./LICENSE)\n\n## Important\n\nSee [LICENSE](./LICENSE) for copyright and license terms.\n\nAll repositories and other materials are provided subject to the terms of this [IMPORTANT](./IMPORTANT.md) notice and you must familiarize yourself with its terms.  The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements.  By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.\n","readmeFilename":"README.md"}