{"_id":"@0bsnetwork/zbs-api","_rev":"1-f17ba7ba94247cb18aeca66f46d680ee","name":"@0bsnetwork/zbs-api","dist-tags":{"latest":"1.5.1"},"versions":{"1.5.1":{"name":"@0bsnetwork/zbs-api","version":"1.5.1","description":"Zbs client-side API library","keywords":["cryptocurrency","zbs","api","seed","transactions","cryptography","signature"],"author":{"name":"Phil Filippak","email":"xenohunter@yandex.ru","url":"https://github.com/xenohunter"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/0bsplatform/zbs-api.git"},"main":"dist/zbs-api.min.js","types":"raw/src/ZbsAPI.d.ts","devDependencies":{"@types/chai":"4.1.5","@types/mocha":"5.2.5","browserify":"16.2.3","chai":"4.1.2","karma":"3.0.0","karma-chai":"0.1.0","karma-chrome-launcher":"2.2.0","karma-commonjs":"1.0.0","karma-mocha":"1.3.0","karma-requirejs":"1.1.0","karma-typescript":"3.0.13","mocha":"5.2.0","mock-require":"3.0.2","requirejs":"2.3.6","typescript":"2.5.3","uglify-es":"3.3.9"},"dependencies":{"@waves/signature-generator":"1.0.2","bignumber.js":"7.2.1","crypto-js":"3.1.9-1","node-fetch":"2.2.0","parse-json-bignumber":"^0.1.2","ts-api-validator":"2.1.3","ts-utils":"6.0.4"},"scripts":{"_build-partial":"browserify raw/src/ZbsAPI.js --node -s ZbsAPI -u parse-json-bignumber -u bignumber.js -u crypto -u node-fetch -u ts-utils -u @waves/signature-generator -u ts-api-validator > ./dist/zbs-api.partial.js","_build-full":"browserify raw/src/ZbsAPI.js --node -s ZbsAPI -u crypto -u node-fetch > ./dist/zbs-api.js","build":"npm run compile && mkdir -p dist && npm run _build-partial && npm run _build-full && npm run uglifyjs && cp ./interfaces.d.ts ./raw/interfaces.d.ts","compile":"mkdir -p raw && ./node_modules/.bin/tsc -p ./tsconfig.json --declaration --outDir raw","uglifyjs":"uglifyjs ./dist/zbs-api.js -o ./dist/zbs-api.min.js && node_modules/.bin/uglifyjs ./dist/zbs-api.partial.js -o ./dist/zbs-api.partial.min.js","prepublishOnly":"npm run build && npm run test && npm run test-browser","test":"npm run build && ./node_modules/.bin/tsc -p ./test/tsconfig.json && ./node_modules/.bin/mocha $(find ./tmp-node/test -name '*.spec.js')","test-browser":"npm run build && ./node_modules/.bin/tsc -p ./test/tsconfig.browser.json && ./node_modules/.bin/karma start karma.conf.js"},"bugs":{"url":"https://github.com/0bsplatform/zbs-api/issues"},"homepage":"https://github.com/0bsplatform/zbs-api#readme","_id":"@0bsnetwork/zbs-api@1.5.1","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"0bsnetwork","email":"dev@vienna-node.eu"},"dist":{"integrity":"sha512-V3sBPJ/0mbcavZAFXJPvOZ/hpPOTU4fIYMv3qokdi3hFJUXHHaGE0yLkJAf8v7NmdBmnXPEm/cbw4V+kM/yqhA==","shasum":"01cfb38deafbc583bb2f424eb958f635e70bf8e0","tarball":"https://registry.npmjs.org/@0bsnetwork/zbs-api/-/zbs-api-1.5.1.tgz","fileCount":185,"unpackedSize":1235740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbz3uJCRA9TVsSAnZWagAAQSYP/RgvsMalZi7KnWieZ/H2\nj+tyUsB4lJHXxxynNOIEJc/a7g3oydjH3DmxuXazkQwhuVnU4lgtVOQsNQdm\niBbEeZPdF6yC85NhKyg3ItaRmxcAlEwm0VetUpRyttM9yn/qMss7eSlD5Up2\n3KgbUARwV6RZqi3vvxhqpIH0271DFScJyG+fh8c3QJUGiUuX+tYChls2GIuX\nWf4k13aQmVhkq7VVUhJOonZILB8uDGiPGNTYnnic8iFrc+3UWVt1eDQV50KC\nTZtmTSbEsWTMN8NY7He3NZDmaE3xI9ZECRwyI/HRV2xeLmtQK2L6gp8IBDBm\niefvC4+LjcCx8VQx8DMEISsLe/P88YCPG/Nij4+uw21vpi2uAfj8aSDtYSrA\nOb8OE7heExlWbqitFX6wzOVouKotashdwYjX0YdUex2QixFC5FgWdQvoXToM\nOxqZhvRgD6RkjLIhcSIs+7uogiJqSnneFUr+w9sZVQR4aDwGjOHOAs2kKD+/\nSYyl1fVfKY4hjMspepJfZ0r+ytJ6P8wQxqtMUR/lxP9IuoV35qcpnPEe8adO\nI8xChXEOkod9l4mibaluPMoXDfdHKKMyc4F5UdiLQ9vDki7zb8ggsaRa+ZDU\n01T/RZql9THF5C3vAt6rafJPWAod3C9zvAl+gvw1ApMZm8bs7Qfo5sY+zgiK\njQbM\r\n=gx7/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5cF7cSA9JjcOd4GUW6MhfJO/Bcwl0+IU0ikzpj2olMAiAsbR182bYK2sDG1+Wshv+qATAwVMY5zCJUt4olRwr3Kg=="}]},"maintainers":[{"name":"0bsnetwork","email":"dev@vienna-node.eu"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zbs-api_1.5.1_1540324232027_0.0052353352275724685"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-23T19:50:31.880Z","1.5.1":"2018-10-23T19:50:32.313Z","modified":"2022-04-04T10:26:01.336Z"},"maintainers":[{"name":"0bsnetwork","email":"dev@vienna-node.eu"}],"description":"Zbs client-side API library","homepage":"https://github.com/0bsplatform/zbs-api#readme","keywords":["cryptocurrency","zbs","api","seed","transactions","cryptography","signature"],"repository":{"type":"git","url":"git+https://github.com/0bsplatform/zbs-api.git"},"author":{"name":"Phil Filippak","email":"xenohunter@yandex.ru","url":"https://github.com/xenohunter"},"bugs":{"url":"https://github.com/0bsplatform/zbs-api/issues"},"license":"MIT","readme":"# Zbs API [![npm version](https://badge.fury.io/js/%40zbs%2Fzbs-api.svg)](https://www.npmjs.com/package/@0bsnetwork/zbs-api) [![downloads/month](https://img.shields.io/npm/dm/%40zbs%2Fzbs-api.svg)](https://www.npmjs.com/package/@0bsnetwork/zbs-api)\n\nZbs Platform core features and Zbs API library for both Node.js and browser.\n\nThe latest and most actual version of this documentation [is hosted on GitHub](https://github.com/0bsplatform/zbs-api/blob/master/README.md).\n\n## Installation\n\n```\nnpm install @0bsnetwork/zbs-api --save\n```\n\nIn Node.js:\n\n```\nconst ZbsAPI = require('@0bsnetwork/zbs-api');\n```\n\nIn browser:\n\n```\n<script src=\"./node_modules/@0bsnetwork/zbs-api/dist/zbs-api.min.js\"></script>\n```\n\nYou can use `@0bsnetwork/zbs-api` even within Web Workers.\n\n## Usage\n\n```\nconst Zbs = ZbsAPI.create(ZbsAPI.TESTNET_CONFIG);\n```\n\n### Seed\n\nYou can create a new random seed:\n\n```\nconst seed = Zbs.Seed.create();\n\nconsole.log(seed.phrase); // 'hole law front bottom then mobile fabric under horse drink other member work twenty boss'\nconsole.log(seed.address); // '3Mr5af3Y7r7gQej3tRtugYbKaPr5qYps2ei'\nconsole.log(seed.keyPair); // { privateKey: 'HkFCbtBHX1ZUF42aNE4av52JvdDPWth2jbP88HPTDyp4', publicKey: 'AF9HLq2Rsv2fVfLPtsWxT7Y3S9ZTv6Mw4ZTp8K8LNdEp' }\n```\n\nThat seed may be encrypted with a password:\n\n```\nconst password = '0123456789';\nconst encrypted = seed.encrypt(password);\n\nconsole.log(encrypted); // 'U2FsdGVkX1+5TpaxcK/eJyjht7bSpjLYlSU8gVXNapU3MG8xgWm3uavW37aPz/KTcROK7OjOA3dpCLXfZ4YjCV3OW2r1CCaUhOMPBCX64QA/iAlgPJNtfMvjLKTHZko/JDgrxBHgQkz76apORWdKEQ=='\n```\n\nAnd decrypted (with the same password, of course):\n\n```\nconst restoredPhrase = Zbs.Seed.decryptSeedPhrase(encrypted, password);\n\nconsole.log(restoredPhrase); // 'hole law front bottom then mobile fabric under horse drink other member work twenty boss'\n```\n\nBeing called with a wrong password `Zbs.Seed.decryptSeedPhrase()` throws an exception.\n\nYou also can create a `Seed` object from an existing seed:\n\n```\nconst anotherSeed = Zbs.Seed.fromExistingPhrase('a seed which was backed up some time ago');\n\nconsole.log(seed.phrase); // 'a seed which was backed up some time ago'\nconsole.log(seed.address); // '3N3dy1P8Dccup5WnYsrC6VmaGHF6wMxdLn4'\nconsole.log(seed.keyPair); // { privateKey: '2gSboTPsiQfi1i3zNtFppVJVgjoCA9P4HE9K95y8yCMm', publicKey: 'CFr94paUnDSTRk8jz6Ep3bzhXb9LKarNmLYXW6gqw6Y3' }\n```\n\n### Node API\n\nAlthough the structure and naming of this API may seem strange, they reflect those of the backend Node API.\n\nFirst, a quick introduction into the structure:\n\n* addresses\n    * balance — your regular ZBS balance\n    * balanceDetails — the details on your ZBS balance ([see below](#different-types-of-zbs-balance))\n* aliases\n    * byAlias — Zbs address related to a given alias\n    * byAddress — a list of aliases related to a given Zbs address\n* assets\n    * balances — your token balances\n    * balance — your balance for a given token\n    * distribution — the distribution of a given token between addresses\n* blocks\n    * get — get a block by its signature (ID)\n    * at — get the block at a certain height\n    * first — get the first block\n    * last — get the last block\n    * height — get the current height of the blockchain\n* leasing\n    * getAllActiveLeases — get all your active Lease transactions\n* transactions\n    * get — get a transaction by its signature (ID)\n    * getList — get the list of last N transactions for a given Zbs address\n    * utxSize — get the current size of the unconfirmed transactions pool\n    * utxGet — get an unconfirmed transaction by its signature (ID)\n    * utxGetList — get the list of unconfirmed transactions for a given Zbs address\n    * broadcast — POST-methods to send the following transaction types\n        * [issue](#issue-transaction)\n        * [transfer](#transfer-transaction)\n        * [reissue](#reissue-transaction)\n        * [burn](#burn-transaction)\n        * [lease](#lease-transaction)\n        * [cancelLeasing](#cancel-leasing-transaction)\n        * [createAlias](#create-alias-transaction)\n        * massTransfer\n        * data\n        * setScript\n        * sponsorship\n    * rawBroadcast — POST-method to send any JSON to the `/transactions/broadcast` path\n* utils\n    * time — get the current Node timestamp\n\n#### Sending transactions\n\nYou will need a pair of keys from an account with a balance to send transactions:\n\n```\nconst seed = Zbs.Seed.fromExistingPhrase('a seed from an account with some funds');\n```\n\n##### Issue transaction\n\nThis is the way to create your own token which can be traded, distributed amongst users and used for your business purposes.\n\n```\nconst issueData = {\n\n    name: 'Your token name',\n    description: 'Some words about it',\n\n    // With given options you'll have 100000.00000 tokens\n    quantity: 10000000000,\n    precision: 5,\n\n    // This flag defines whether additional emission is possible\n    reissuable: false,\n\n    fee: 100000000,\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('issue', issueData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n##### Transfer transaction\n\nThe Transfer transaction allows you to send ZBS or any token you possess to another Zbs address. \n\n```\nconst transferData = {\n\n    // An arbitrary address; mine, in this example\n    recipient: '3PMgh8ra7v9USWUJxUCxKQKr6PM3MgqNVR8',\n\n    // ID of a token, or ZBS\n    assetId: 'ZBS',\n\n    // The real amount is the given number divided by 10^(precision of the token)\n    amount: 10000000,\n\n    // The same rules for these two fields\n    feeAssetId: 'ZBS',\n    fee: 100000,\n\n    // 140 bytes of data (it's allowed to use Uint8Array here)\n    attachment: '',\n\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('transfer', transferData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n##### Reissue transaction\n\nDespite this transaction name, it allows you to issue an additional amount of a token which was initially issued by you.\n\n```\nconst reissueData = {\n\n    // Asset ID which is to be additionnaly emitted\n    assetId: '5xN8XPkKi7RoYUAT5hNKC26FKCcX6Rj6epASpgFEYZss',\n\n    // Additional quantity is the given number divided by 10^(precision of the token)\n    quantity: 100000000,\n\n    reissuable: false,\n    fee: 100000000,\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('reissue', reissueData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n##### Burn transaction\n\nHere you can burn any amount of token which was issued by you *and is still on your balance*.\n\n```\nconst burnData = {\n\n    // Asset ID and its quantity to be burned\n    assetId: '5xN8XPkKi7RoYUAT5hNKC26FKCcX6Rj6epASpgFEYZss',\n    quantity: 20000000000,\n\n    fee: 100000,\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('burn', burnData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n##### Lease transaction\n\nThis is the way you can lease your ZBS to a different address.\n\n```\nconst leaseData = {\n\n    recipient: '5xN8XPkKi7RoYUAT5hNKC26FKCcX6Rj6epASpgFEYZss',\n\n    // Both amount and fee may be presented as divided by 10^8 (8 is Zbs precision)\n    amount: 1000000000, // 10 Zbs\n    fee: 100000, // 0.001 Zbs\n\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('lease', leaseData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n##### Cancel Leasing transaction\n\nThis transaction gives you a mean to cancel previously sent Lease transactions.\n\n```\nconst cancelLeasingData = {\n\n    // Related Lease transaction ID\n    transactionId: '2kPvxtAit2nsumxBL7xYjvaWYmvmMfDL5oPgs4nZsHvZ',\n\n    fee: 100000,\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('cancelLeasing', cancelLeasingData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n##### Create Alias transaction\n\nA Zbs address can have aliases — short readable names which can be used instead of address. This transaction creates an alias. \n\n```\nconst createAliasData = {\n\n    // That's a kind of a nickname you attach to your address\n    alias: 'xenohunter',\n\n    fee: 100000,\n    timestamp: Date.now()\n\n};\n\nZbs.API.Node.transactions.broadcast('createAlias', createAliasData, seed.keyPair).then((responseData) => {\n    console.log(responseData);\n});\n```\n\n#### Getting the information from Node\n\nThe most used GET requests are those related to balances and transactions history.\n\n##### Zbs balance\n\nThere are two types of Zbs balance: simple, with optional `confirmations` parameter, and detailed, showing different types of Zbs balance.\n\nWith the first type, without additional arguments, you get the current balance on an address:\n\n```\nZbs.API.Node.addresses.balance('3PMgh8ra7v9USWUJxUCxKQKr6PM3MgqNVR8').then((balance) => {\n    console.log(balance);\n});\n```\n\nIf you pass an optional `confirmations` argument, you get the balance with N confirmations, i.e. the balance as it was N blocks ago from the moment:\n\n```\nZbs.API.Node.addresses.balance('3PMgh8ra7v9USWUJxUCxKQKr6PM3MgqNVR8', 100).then((balance) => {\n    console.log(balance);\n});\n```\n\nFor the second type, there is a separate method:\n\n```\nZbs.API.Node.addresses.balanceDetails('3PMgh8ra7v9USWUJxUCxKQKr6PM3MgqNVR8').then((balanceDetails) => {\n   console.log(balanceDetails);\n});\n```\n\n##### Token balances\n\nYou can get the list of all balances on an address:\n\n```\nZbs.API.Node.assets.balances(address).then((balancesList) => {\n   console.log(balancesList);\n});\n```\n\nYou also can get the balance of a given token:\n\n```\nZbs.API.Node.assets.balance(address, assetId).then((balance) => {\n   console.log(balance);\n});\n```\n\n##### Token distribution\n\nA very useful method allowing you to get a map with balances of all addresses in possession of a token:\n\n```\nZbs.API.Node.assets.distribution(assetId).then((distributionMap) => {\n   console.log(distributionMap);\n});\n```\n\n##### Transactions\n\nEvery transaction in the blockchain has its own ID. You can both get one by ID, or get a list of all recent transactions.\n\n```\nZbs.API.Node.transactions.get('Bn2opYvcmYAMCaJHKP1uXYCHFGnAyrzGoiboBLT8RALt').then((tx) => {\n    console.log(tx);\n});\n```\n\nTo get the list you need to provide an address which is either the sender or the recipient of the transactions in the resulting list:\n\n```\nZbs.API.Node.transactions.getList('3PMgh8ra7v9USWUJxUCxKQKr6PM3MgqNVR8').then((txList) => {\n    console.log(txList);\n}):\n```\n\nOne of the concepts in most blockchains is UTX, unconfirmed transactions pool. During the time between blocks appearance, transactions from users are stored in it.\n\nThere are methods to get the size of UTX pool and UTX pool itself (note that the address is not needed here):\n\n```\nZbs.API.Node.transactions.utxSize().then((utxSize) => {\n    console.log(utxSize);\n});\n\nZbs.API.Node.transactions.utxGetList().then((utxList) => {\n    console.log(utxList);\n});\n```\n\nAlso if a transaction is still in UTX pool and you know its ID, you can get only it from UTX:\n\n```\nZbs.API.Node.transactions.utxGet('Bn2opYvcmYAMCaJHKP1uXYCHFGnAyrzGoiboBLT8RALt').then((tx) => {\n    console.log(tx);\n});\n```\n\n##### Aliases\n\nAside from creating an alias, you also can get the list of aliases bound to an address, or get the address related to the given alias.\n\n```\nZbs.API.Node.aliases.byAddress('3PMgh8ra7v9USWUJxUCxKQKr6PM3MgqNVR8').then((aliasesList) => {\n    console.log(aliasesList);\n});\n\nZbs.API.Node.aliases.byAlias('xenohunter').then((address) => {\n    console.log(address);\n});\n```\n\n##### Blocks\n\nEverything is simple here. You can get the whole block by its signature (`get()`) or height (`at()`). Method `height()` returns the current height of the Zbs blockchain. The names of the remaining methods speak for themselves.\n\n```\nZbs.API.Node.blocks.get(signature).then((block) => console.log(block));\n\nZbs.API.Node.blocks.at(height).then((block) => console.log(block));\n\nZbs.API.Node.blocks.height().then((currentHeight) => console.log(currentHeight));\n\nZbs.API.Node.blocks.first().then((firstBlock) => console.log(firstBlock));\n\nZbs.API.Node.blocks.last().then((lastBlock) => console.log(lastBlock));\n```\n\n### Configuration\n\nThe configuration is changeable even during the runtime. The structure of the config is following:\n\n```\nconst newConfig = {\n\n    // The byte allowing to distinguish networks (mainnet, testnet, devnet, etc)\n    networkByte: Zbs.constants.MAINNET_BYTE,\n\n    // Node and Matcher addresses, no comments here\n    nodeAddress: 'https://nodes.zbsnodes.com',\n    matcherAddress: 'https://nodes.zbsnodes.com/matcher',\n\n    // If a seed phrase length falls below that value an error will be thrown\n    minimumSeedLength: 50\n\n};\n```\n\nAll fields are optional, only filled ones will be replaced.\n\nYou can change the config like that:\n\n```\nZbs.config.set(newConfig);\n```\n\n### Tools\n\n#### Get address from public key\n\n```\nconst address = Zbs.tools.getAddressFromPublicKey('GL6Cbk3JnD9XiBRK5ntCavSrGGD5JT9pXSRkukcEcaSW');\nconsole.log(address); // '3N1JKsPcQ5x49utR79Maey4tbjssfrn2RYp'\n```\n\n## Common pitfalls\n\n### Precision and coins-to-tokens transformation\n\nIn Zbs blockchain different tokens have different precision, i.e. number of decimal digits. For example, it would be 10.00 USD and 10.00000000 BTC. That distinction allows to create tokens for various purposes but also makes things harder to understand sometimes.\n\nTwo words have emerged: _token_ and _coin_. Token is used to refer to the whole part of the amount. Coin describes the smallest value which is possible for a given token. For USD _token_ would be one dollar, and _coin_ would be one cent. If you are familiar with Bitcoin you could have encountered the word _Satoshi_ which refers to one hundred millionth of a single Bitcoin.\n\nIn the blockchain every token is stored with its explicitly specified precision and amount of coins. Every transaction is signed and stored in the blockchain in its coin representation. So if you send 2 USD tokens to someone, you really send 200 USD token coins instead.\n\nThe same goes for the fees, and issue transactions, and leasing amounts, and so on.\n\nZbs precision equals 8. Therefore there are `100000000 * 10^8` of Zbs coins (Wavelets) in Zbs blockchain.\n\n### Reissuability and the additive nature of it\n\nThe amount in reissue transactions refer not to the final amount of asset after reissuing but to the amount which will be added to the current token amount.\n\n### Zbs ID in the library and in the blockchain\n\nOne of the trickiest things about Zbs blockchain is that Zbs ID equals empty string. In the first version on Node API it also equals to empty string. That is an unobvious and potentially dangerous behavior. Therefore in this library Zbs ID strictly equals string `ZBS`. Please mind that fact.\n\n### Fee asset choice for transfer transactions\n\nThere is only one type of transactions (currently) in which we can use arbitrary tokens as fees. The only limitation is that the Node to which you connect must support the token you use as fees. Please note that transactions with the Zbs fee will be prior over transactions with fees in other tokens.\n\n### Impossibility of transactions with the absolutely same data\n\nTransaction IDs are built from all the data in a transaction except the signature. That process is deterministic. So there cannot be two transactions with the absolutely same data.\n\n### Delays in the leasing process\n\nFor the security reasons all leased Zbs take effect only after 1000 blocks. Don't worry when your generating balance isn't updated right away.\n\n### Mess with balances in the first version of API\n\nIt happened so that Zbs balance and token balances are served through different API methods in the first version of Zbs API. That's not very useful and we designed the new version otherwise.\n\n### Different types of Zbs balance\n\nThere is the most understandable type of Zbs balance. It is the regular balance. It is served through `Zbs.API.Node.addresses.balance()`. There are also several types of Zbs balance related to leasing and the delays in its processing.\n\n1. *Regular* — that's how much Zbs you have, including those you leased;\n2. *Available* — the same as _regular_ only without Zbs you leased;\n3. *Effective* — _available_ plus those Zbs which is leased to you;\n4. *Generating* — the minimal _effective_ for last 1000 blocks;\n5. *Leased* — the amount you leased to other addresses.\n\nAvailable balance you can lease and spend.\n\nGenerating balance gives you mining power.\n\n## Tests\n\n```\ncd ./node_modules/@0bsnetwork/zbs-api/\nnpm install\nnpm run test # to run tests in Node.js\nnpm run test-browser # to run test in Chrome browser\n```\n\nTest configuration may be changed in the _./node_modules/@0bsnetwork/zbs-api/karma.conf.js_ file.\n\n## Authors\n\n* [**Phil Filippak**](https://github.com/xenohunter) - *Initial work*\n* [**Daniil Tsigelnitskiy**](https://github.com/tsigel) - *TypeScript expertise*\n\nSee also the list of [contributors](https://github.com/0bsplatform/zbs-api/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","readmeFilename":"README.md"}