{"_id":"@acc-toppings/api-rpc","_rev":"1-40abbf8bb46a8b812f26bbdf8668c91b","name":"@acc-toppings/api-rpc","dist-tags":{"latest":"0.1.2-alpha.0"},"versions":{"0.1.2-alpha.0":{"name":"@acc-toppings/api-rpc","version":"0.1.2-alpha.0","main":"dist/index.js","license":"MIT","author":{"name":"acctoken"},"repository":{"type":"git","url":"https://github.com/ACCToken/acc-toppings/tree/master/packages/api-rpc"},"contributors":[],"description":"RESTful API service making use of the nodeacc RPC API wrapper `@acctoken/accjs` to obtain data from nodeacc","publishConfig":{"access":"public"},"dependencies":{"@acctoken/accjs":"1.0.0","node-fetch":"^2.6.0","text-encoding":"^0.7.0"},"devDependencies":{"@types/text-encoding":"^0.0.35"},"gitHead":"bfb7b0193a2cccb93c759d5a2971b9eb1b0e80cc","_id":"@acc-toppings/api-rpc@0.1.2-alpha.0","_nodeVersion":"11.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-QYLOn17SAIEhEJY9WcJmm6U+wBlsq4+2WFtaq7/jbYVUt+o20kkJBG1QGLaikP9ltD4H0m6AgmdbQVL5l8HzoQ==","shasum":"c6927f43110b4dc0463bd18e310faf7f8dd603c2","tarball":"https://registry.npmjs.org/@acc-toppings/api-rpc/-/api-rpc-0.1.2-alpha.0.tgz","fileCount":22,"unpackedSize":94657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd36wwCRA9TVsSAnZWagAAhowP/3ZJHND1jkSh5kRabaw3\nih04B1BjkpF6iykazANW61LOS1LiSI4i0XmGuvQ/t0PVNDozsNFs/PbzntMf\nIXYiOF3s+bqfuy82fZPX8sJ76aNX5McL2LhQ+5kep8KYwGTiS6NbjHCvpAEI\n8SOFqA4wmMdmMkDA8Jje8/bCoa4ajf80E01C3yVajTdKnwrYtHHsNZs5nnhp\n/V6YskbakYT9iSH2q/9fZcMZWPty2/awb1ssOtYeE9VdzOo4Un0YIDxBqgNM\neB16a1y9LI17fXKAtjp8kwVPY9220DgPjrYEEwbOUAAbKzYc3zQRL9yZb03q\nSn2tll9+XtMwTtc1zRHScaBPxCcsH6KZfFjOO+MXiixHp0U7OrXdgoBbUaSD\n69WxaELRwwZcHUavmQYYj8Y7EMRNrliCfABKUrmabLTYJ0gvqfDj3BGPS0hf\nexwXXzWAa8OUk//gCCH9mEfn7BHFVd1MUgqUQfzYBrXn4MW8iZNhKZtB0JTV\nKfGJkM9oJ1+1kTT8y2bMN7z3Qb2+Q4M1QU6owecUfGRawEMSYzIeqVygO+mZ\nzTTbGuPtAbHyZHlf7+9DFYKKpNhQZjiUnWILlpovZwbXlfmYjYs30KAdc7Cw\nYL+Wgcmjkkr4jM9y9q/xzx1bp25U07ryUrqyfrzqqx8HG1K22qKktyISnBx/\n2Wei\r\n=M8lL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9nBC7ZCO5JKxmxqV8KRx88QAxBO1SvVWShFTSDFgMrwIhAJguRcsx4fuSn6Otyic+acrREsUiFdsU9bnIcSZskeBA"}]},"maintainers":[{"name":"acctoken","email":"acctoken1234@hotmail.com"}],"_npmUser":{"name":"acctoken","email":"acctoken1234@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api-rpc_0.1.2-alpha.0_1574939695894_0.1669551439924577"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-28T11:14:55.667Z","0.1.2-alpha.0":"2019-11-28T11:14:56.104Z","modified":"2022-04-04T11:06:26.150Z"},"maintainers":[{"name":"acctoken","email":"acctoken1234@hotmail.com"}],"description":"RESTful API service making use of the nodeacc RPC API wrapper `@acctoken/accjs` to obtain data from nodeacc","repository":{"type":"git","url":"https://github.com/ACCToken/acc-toppings/tree/master/packages/api-rpc"},"contributors":[],"author":{"name":"acctoken"},"license":"MIT","readme":"# api-rpc <a href=\"https://www.npmjs.com/package/@acc-toppings/api-rpc\"><img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/@acc-toppings/api-rpc.svg\"></a>\nRESTful API service making use of the nodeacc RPC API wrapper `@acctoken/accjs` to obtain data from nodeacc.\n\n## Manual Usage\nInstall TypeScript and `tsc` (TypeScript Compiler) globally with\n```\nyarn global add typescript\n```\n\n## Compile and Watch\nCompile the source into `js` and watch for changes into `./dist` with the following command:\n```\nrm -rf dist && tsc -w\n```\n\n## Currently Available API Functions\n\nThe following API functions all accept a single parameter, a query which is basically an object containing several keys composed of the necessary values to make the RPC API call.\n\n### `buy_ram`\n\nGiven a connected `endpoint` with `private_key, actor, permission, quantity` details, buys ram for the account `actor`.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `quantity` - number \n\n### `create_account`\n\nGiven a connected `endpoint` with `private_key, actor, permission` credentials, make an account consisting of `new_account_name` with the public `new_account_owner_key` and public `new_account_active_key`.\nIf you want to stake cpu, stake net and buy ram, pass the required parameters.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `new_account_name` - string\n* `new_account_owner_key` - string\n* `new_account_active_key` - string\n* `delagate` - boolean (If the delagate is true then buy ram, stake cpu, and stake net actions are executed)\n* `ram_bytes_buy_quantity` - number (default to 8192)\n* `stake_net_quantity` - string (default to '1.0000 SYS')\n* `stake_cpu_quantity` - string (default to '1.0000 SYS')\n\n### `deploy_contract`\n\nGiven a connected `endpoint` with `private_key, account_name, permission, payload ` details, deploys contract to the `account_name` \n\n* `endpoint` - string\n* `private_key` - string\n* `account_name` - string\n* `permission` - string\n* `payload` - {\n                `abi`: '<abi_file_content>',\n                `wasm`: '<wasm_file_content>'\n              }\n\n### `get_abi`\n\nGiven a connected `endpoint`, try to get the abi details of `account_name` directly from the RPC API\n\n* `endpoint` - string\n* `account_name` - string\n\n### `get_account_details`\n\nGiven a connected `endpoint`, try to get the account details of `account_name` directly with the RPC API\n\n* `endpoint` - string\n* `account_name` - string\n\n### `get_block`\n\nGiven a connected `endpoint`, try to get the block details of `id_or_num` directly from the RPC API\n\n* `endpoint` - string\n* `id_or_num` - string (it can accept either block ID or block number)\n\n### `get_info`\n\nGiven a connected `endpoint`, try to get basic information about the blockchain at `endpoint`\n\n* `endpoint` - string\n\n### `get_producer_schedule`\n\nGiven a connected `endpoint`, try to get producer schedule in the blockchain at `endpoint`\n\n* `endpoint` - string\n\n### `get_producers`\n\nGiven a connected `endpoint`, try to get producers details in the blockchain at `endpoint`\n\n* `endpoint` - string\n\n### `get_table_rows`\n\nGiven a connected `endpoint`, try to get the rows of multi-index table `table_name` of `contract_name`, if present\n\n* `endpoint` - string\n* `contract_name` - string\n* `table_name` - string\n\n### `push_action`\n\nGiven a connected `endpoint` with `private_key, actor, permission` credentials, push an action of `action_name` of the `account_name` smart contract with parameters contained in `payload`\n\n* `endpoint` - string\n* `account_name` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `action_name` - string\n* `payload` - object\n\n### `sell_ram`\n\nGiven a connected `endpoint` with `private_key, actor, permission, quantity` details, sell ram from the account `actor`.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `quantity` - number \n\n### stake_cpu\n\nGiven a connected `endpoint` with `private_key, actor, permission, quantity` details, stake cpu for the account `actor`.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `quantity` - number \n\n### stake_net\n\nGiven a connected `endpoint` with `private_key, actor, permission, quantity` details, stake net for the account `actor`.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `quantity` - number \n\n### unstake_cpu \n\nGiven a connected `endpoint` with `private_key, actor, permission, quantity` details, unstake cpu for the account `actor`.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `quantity` - number \n\n### unstake_net\n\nGiven a connected `endpoint` with `private_key, actor, permission, quantity` details, unstake net for the account `actor`.\n\n* `endpoint` - string\n* `private_key` - string\n* `actor` - string\n* `permission` - string\n* `quantity` - number \n\n### `update_auth`\n\nGiven a connected `endpoint` with `private_key, account_name` credentials, push one or two `updateauth` actions in a single transaction in order to update the public key(s) of `account_name`\nThe `new_active_key` and `new_owner_key` denote public keys, and can either be passed at the same time or passed one at a time.\n\n* `endpoint` - string\n* `account_name` - string\n* `private_key` - string\n* `new_active_key` - string\n* `new_owner_key` - string\n","readmeFilename":"README.md"}