{"_id":"@alextuturescu/ergo-tss","_rev":"1-f936f283ee660c955ed7237069791f53","name":"@alextuturescu/ergo-tss","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@alextuturescu/ergo-tss","version":"0.3.0","description":"The library for Ergo platform written in TypeScript and compiled to JavaScript","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prepare":"yarn build","prepublishOnly":"npm test && npm run lint","publishPublic":"yarn build && npm publish --access public","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push origin master && git push --tags","test":"jest","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","flowgen":"for i in $(find dist -type f -name '*.d.ts'); do sh -c \"flowgen $i -o ${i%.*.*}.js.flow\"; done;","lint":"tslint -p tsconfig.json --fix"},"repository":{"type":"git","url":"git+https://github.com/alextuturescu/verse.git"},"keywords":["ergo","blockchain","cryptocurrency"],"author":{"name":"Coinbarn"},"license":"MIT","bugs":{"url":"https://github.com/alextuturescu/verse/issues"},"homepage":"https://github.com/alextuturescu/verse","dependencies":{"@root/encoding":"^1.0.1","array.prototype.flat":"^1.2.2","axios":"^0.24.0","blakejs":"^1.1.0","bn.js":"^4.11.8","bs58":"^4.0.1","elliptic":"^6.4.1","secure-random":"1.1.2"},"devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.4","@babel/node":"^7.2.2","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-proposal-pipeline-operator":"^7.3.2","@babel/plugin-transform-async-to-generator":"^7.4.4","@babel/polyfill":"^7.4.4","@babel/preset-env":"^7.4.4","@types/jest":"^24.0.22","@types/node":"^12.12.18","@typescript-eslint/eslint-plugin":"^5.9.0","@typescript-eslint/parser":"^5.9.0","axios-mock-adapter":"^1.16.0","babel-jest":"^24.8.0","babel-loader":"^8.0.6","codecov":"^3.5.0","core-js":"^3.1.4","eslint":"^8.6.0","jest":"^27.4.7","node-loader":"^0.6.0","prettier":"^1.19.1","ts-jest":"^27.1.2","ts-loader":"^6.2.1","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","typescript":"^3.7.2"},"majestic":{"jestScriptPath":"../node_modules/jest/bin/jest.js","args":["--config=./jest.config.js"],"env":{"CI":"true"}},"_id":"@alextuturescu/ergo-tss@0.3.0","_nodeVersion":"16.13.1","_npmVersion":"8.3.0","dist":{"integrity":"sha512-7lMoKHh6f0Qjj5I18sq8sUHNcvNHU3htVx9Ofsm2V4CruK9hFA818Gk6YBfTQSPeJs/QV++ilsbBkGJw1WyKvw==","shasum":"f4e0a03e9ee9b7907fa47c20e6716031c76a621e","tarball":"https://registry.npmjs.org/@alextuturescu/ergo-tss/-/ergo-tss-0.3.0.tgz","fileCount":42,"unpackedSize":76887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2IP5CRA9TVsSAnZWagAA1NQP/3hESzy54rbrRkaQSM73\n5MgueOILCxjzuA0A7h0vtFDlhi3Zz4NAopU3qfG/W1EflmiFqOR3qPmLpSMr\n8vCpwneXrb41MSi/Wc9tWJzVpiO+KJospW6YF9cwRiSdKNbgM3T//PNxWJ0D\nvk2hizl00l6pOwigXhnCmMFt65Pq0HFSQjRPwuWE05MyxcLYWk/Eu/Yd8VOQ\nwb8wXTi24TbHGprI4y4zMc7vR3puH/dOZ/J/pX0LWB0cA3NgZO3a2O84OIyS\nRm4fgeZd2+nL2+ILG2FTeTMxlGRzrSqudQNS6Svykot2O++pTEwgbW2bU0SC\nYyztzZvMHNzJz6LD+orLhEMOLvz7xEvHc2MeJCEV4TUoUnDOv2Xh5IJhkiIL\noy7LthDKy5/IJvMxsibw9FEfsHZiaidkquFHhbcckZWbdeKKZFI0WO37lAAc\nGjQEw3xtC73kknQ31SywTOHb2pS2VapeNM6WTDOnWO7UKfa0kxbqV0WVlW9L\nG/7UER0Pl50alVutX+S3BiiipSCT4iLCS33BOGho4Lc7ATBMe6bz3jjfXRHv\nfJWq0psq4jot34Du3/Y1uVXl6W7OjVQ0l6j0VScvt7IgGrEFx5k+HbvLPRC6\nDwDoBjQkdLg/uBwFpAtiHQHWgcNub8f3lNvtjYNiCvBgacd6awSYC7yLj1z6\nLfE/\r\n=7I+T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkSklQDnpU956sB71ehhJChfBEn7Bv3vLDXgtym9FGRwIhAOrQO8/YLVxuKit6GEiXQOiSP8R3raYl9WPLqUIewFTR"}]},"_npmUser":{"name":"alextuturescu","email":"alexandrututurescufilms@gmail.com"},"directories":{},"maintainers":[{"name":"alextuturescu","email":"alexandrututurescufilms@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ergo-tss_0.3.0_1641579513462_0.809164423424892"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-07T18:18:33.405Z","0.3.0":"2022-01-07T18:18:33.878Z","modified":"2022-04-04T12:41:56.231Z"},"maintainers":[{"name":"alextuturescu","email":"alexandrututurescufilms@gmail.com"}],"description":"The library for Ergo platform written in TypeScript and compiled to JavaScript","homepage":"https://github.com/alextuturescu/verse","keywords":["ergo","blockchain","cryptocurrency"],"repository":{"type":"git","url":"git+https://github.com/alextuturescu/verse.git"},"author":{"name":"Coinbarn"},"bugs":{"url":"https://github.com/alextuturescu/verse/issues"},"license":"MIT","readme":"# Ergo-ts\n\n[![codecov](https://codecov.io/gh/coinbarn/ergo-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/coinbarn/ergo-ts)\n[![Build Status](https://travis-ci.org/coinbarn/ergo-ts.svg?branch=master)](https://travis-ci.org/coinbarn/ergo-ts)\n\n## About\n\nThe library for Ergo platform, written in TypeScript, and compiled to JavaScript.\nIt uses block explorer as the backend and allows you to transfer crypto tokens without long full node synchronization. Besides native token transfer, it supports custom tokens and more complicated features like additional registers in outputs.\n\n## Installing\n\nImport in body\n\n```html\n<script src='path_to/dist/ergo-ts.js'></script> \n```\n\nWith npm:\n\n```sh\nnpm install @coinbarn/ergo-ts\n```\n\nOr yarn:\n```sh\nyarn add @coinbarn/ergo-ts\n```\n\n## Examples\n\n\nExplore current blockchain status:\n\n```typescript\nimport {Address, Explorer, Transaction, ErgoBox} from \"@coinbarn/ergo-ts\";\n\nconst explorer = Explorer.mainnet;\nconst address = new Address('9euTPp193ESjEefX7xD4Li9CQvqzReemccBFq6AAEmABDSFWaTR');\nconst tokenId = '13d24a67432d447e53118d920100c747abb52da8da646bc193f03b47b64a8ac5';\n\n// Current blockchain height\nconst height: Promise<number> = explorer.getCurrentHeight();\n\n// All unconfirmed transactions\nconst mempoolTxs: Promise<Transaction[]> = explorer.getUnconfirmed();\n\n// Unconfirmed transactions by address\nconst myMempoolTxs: Promise<Transaction[]> = explorer.getUnconfirmed(address);\n\n// Confirmed transactions by address\nconst myTxs: Promise<Transaction[]> = explorer.getTransactions(address);\n\n// Unspent outputs by address\nconst myBoxes: Promise<ErgoBox[]> = explorer.getUnspentOutputs(address);\n\n// The box where the token was issued\nconst tokenInfo: Promise<ErgoBox> = explorer.getTokenInfo(tokenId);\n\n```\n\n\nSending transactions :\n\n```typescript\nimport {Client} from \"@coinbarn/ergo-ts\";\n\nconst client = new Client('https://new-explorer.ergoplatform.com');\nconst sk = '8e6993a4999f009c03d9457ffcf8ff3d840ae78332c959c8e806a53fbafbbee1';\nconst recipient = '9euTPp193ESjEefX7xD4Li9CQvqzReemccBFq6AAEmABDSFWaTR';\n\n// send 0.019 ERG to the recipient\nclient.transfer(sk, recipient, 0.019);\n\n// Issue 123456.789 Coinbarn tokens with 3 decimals each\nclient.tokenIssue(sk, 'Coinbarn', 123456.789, 3, 'Description of this token');\n\n// Transfer 1.23 tokens with id 13d24a67432d447e53118d920100c747abb52da8da646bc193f03b47b64a8ac5 to the recipient\nclient.transfer(sk, recipient, 1.23, '13d24a67432d447e53118d920100c747abb52da8da646bc193f03b47b64a8ac5');\n```\n","readmeFilename":"Readme.md"}