{"_id":"@acc-toppings/api-postgres-plugin","_rev":"1-82be8355727642ee9a0349cbad82eddc","name":"@acc-toppings/api-postgres-plugin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@acc-toppings/api-postgres-plugin","version":"0.1.2","license":"MIT","author":{"name":"acctoken"},"main":"index.js","repository":{"type":"git","url":"https://github.com/ACCToken/acc-toppings/tree/master/packages/api-ship-plugin"},"contributors":[],"description":"A module to serve the data from PostgresDB which is filled by fill-pg tool from Nodeos","publishConfig":{"access":"public"},"dependencies":{"@acc-toppings/api-rpc":"^0.1.2-alpha.0","pg":"^7.11.0"},"gitHead":"bfb7b0193a2cccb93c759d5a2971b9eb1b0e80cc","_id":"@acc-toppings/api-postgres-plugin@0.1.2","_nodeVersion":"11.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-DcmwhWtnjJQtMoD1tv+c6Buu2gAXd26RXa8c1ggmlECL8SAcd+XLSTiHIcwYMXOoKialntLboOxao7AP+BVzqA==","shasum":"5e22f613c771292d64d54791bcbb14d25c6cc428","tarball":"https://registry.npmjs.org/@acc-toppings/api-postgres-plugin/-/api-postgres-plugin-0.1.2.tgz","fileCount":18,"unpackedSize":25042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd36wgCRA9TVsSAnZWagAAt7MP/3yUoVT5m8k5jLvmXTSB\nmfh8LTnCcKZuk4q9QetfF7Cl1ubcK081FSqccDiLxyn84tVxjgtB4ASLZKJu\nMF4OaUdjekoSlYk9w+hegJda9K6wskJVCTVN2anEU/NfGILTkusv6Tz9qZAn\nJC0AskP+Ej9TL4iceySLt7IgtAyag7sdfXdumsVhE3eg3xZiis5Cu7xGV4Qu\n+y3oNT3/aed/Pk6khspSWQ2dgVVFQyQqDo1zTUx4KFmoHZArU99tK5wCrLJr\nipFvw2Tdfan038cQRkibrbew14ggXwM897O0jMI/KRhUmRQHqi1FLufyv+nq\nU+ZUXurU2DOQypmnWhKRmFxjQFCTeQ/ZrjCMCGzjrBUKOX6cz0I6g8s9LvD/\naxedn8ZbAlpxmgqFGQhC1XE3zPI1DvBsG6FKLRKUGjT9XavsRlDgfZRJcY/f\nLqdWclGm+Jb4lvodl/NW7qEy042h2BJlKGGelogY7ZqTPbj0Ccf/QL22gO58\nKaayZaE01uvvy1Mxpe1ySIfsLdItyJuY3eVp7IXtmGKfOIyzu5FJT9aSc4TG\nDp8JWshJf3sb+bP0pg5zMEAIbddds+aMb13bx8Ta+wpnl6II83lfQ8+DBJpA\n86OQ0mcmwkkLSAyIWZXSc+c6ElleUTaF9WhoDgX6MbQyl2HvxIRolFw+90cm\nvwL4\r\n=Fzzm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICR6wgirz6sbCSvHwG2uNlD3B8p+kGWFuobXV4otuaThAiBvB6gUwjZu5vDn/8QbEBBpAm2SIsxCmG+RuJivLpKWQw=="}]},"maintainers":[{"name":"acctoken","email":"acctoken1234@hotmail.com"}],"_npmUser":{"name":"acctoken","email":"acctoken1234@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api-postgres-plugin_0.1.2_1574939679842_0.2726580326263144"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-28T11:14:39.615Z","0.1.2":"2019-11-28T11:14:39.970Z","modified":"2022-04-04T11:06:25.975Z"},"maintainers":[{"name":"acctoken","email":"acctoken1234@hotmail.com"}],"description":"A module to serve the data from PostgresDB which is filled by fill-pg tool from Nodeos","repository":{"type":"git","url":"https://github.com/ACCToken/acc-toppings/tree/master/packages/api-ship-plugin"},"contributors":[],"author":{"name":"acctoken"},"license":"MIT","readme":"# api-postgres-plugin <a href=\"https://www.npmjs.com/package/@acc-toppings/api-postgres-plugin\"><img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/@acc-toppings/api-postgres-plugin.svg\"></a>\nRESTful API service making use of `pg` obtain data from POstgresDB which written by (history-tools)fill-pg with SHiP-plugin.\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 query the database.\n\n### `get_action_details`\n\nGet the details of a particular action based on its `block_num` (block number), `id` (transaction id) and `action_ordinal`.\n\n* `block_num` - string or number\n* `id` - string\n* `action_ordinal` - number\n\n### `get_actions`\n\nGet the list of actions based on certain criteria:\n\n* `account_name` - string - if this value is passed then it fetches latest 100 transactions for smart contract `account_name`\n* `records_count` - string - Number of actions to fetch (default is 100)\n\n### `get_all_permissions`\n\nGet the list of all last permissions based on the number of `records_count` to show.\n\n* `records_count` - string\n* `account_name` - if this is passed then fetches the permission for only that `account_name`\n\n### `get_block_details`\n\nGet the details of the block based on its ID or number as indicated by `id_or_num` and RPC `endpoint` to fetch action payload.\n\n* `endpoint` - string\n* `id_or_num` - string\n\n### `get_blocks`\n\nGet the list of blocks based on certain criteria:\n\n* `show_empty` - string - Whether to show empty blocks or not\n* `records_count` - string - Number of blocks to show\n\n### get_permissions_by_public_key\n\nGet the list of permissions based on its public_key\n\n* `public_key` - string\n\n### `get_smart_contracts`\n\nGet the list of all available smart contracts based on the number of `records_count` to show.\n\n* `records_count` - string\n\n### `get_transaction_details`\n\nGet the details for a particular transaction based on its `id` and RPC `endpoint` to fetch action payload.\n\n* `id` - string\n* `endpoint` - string \n\n### `get_transactions`\n\nGet the list of transactions based on certain criteria:\n\n* `records_count` - string - Number of transactions to show\n","readmeFilename":"README.md"}