{"id":21268857,"url":"https://github.com/squeezerio/squeezer-chainkit","last_synced_at":"2026-02-28T19:01:28.970Z","repository":{"id":51758345,"uuid":"178668127","full_name":"SqueezerIO/squeezer-chainkit","owner":"SqueezerIO","description":"Squeezer ChainKit - Agnostic blockchain integration","archived":false,"fork":false,"pushed_at":"2022-12-08T22:17:00.000Z","size":101,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T07:06:54.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SqueezerIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-31T09:36:23.000Z","updated_at":"2021-03-07T20:56:06.000Z","dependencies_parsed_at":"2023-01-25T18:16:19.726Z","dependency_job_id":null,"html_url":"https://github.com/SqueezerIO/squeezer-chainkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqueezerIO%2Fsqueezer-chainkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqueezerIO%2Fsqueezer-chainkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqueezerIO%2Fsqueezer-chainkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqueezerIO%2Fsqueezer-chainkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SqueezerIO","download_url":"https://codeload.github.com/SqueezerIO/squeezer-chainkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225693825,"owners_count":17509227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T08:06:36.296Z","updated_at":"2026-02-28T19:01:28.937Z","avatar_url":"https://github.com/SqueezerIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### squeezer-chainkit\nAgnostic blockchain integration\n\nThe main usage of the ChainKit is to unify top blockchains interfaces into a single normalized API interface , therefore you can build blockchain apps easily without digging into blockchain infrastructure\n\nCheck the Squeezer ChainKit Gateway API Documentation:\n\n\n\u003ca name=\"table\" /\u003e\n\nTable of contents\n=================\n\n* [Install](#install)\n* [ITN ( Instant Transaction Notification )](#itn)\n* [Initialize](#init)\n* [Wallet types](#walletTypes)\n* [Create Wallet](#createWallet)\n* [Send transaction](#sendTransaction)\n* [Transactions](#transactions)\n* [Get balance](#getBalance)\n* [Smart contract](#smartContract)\n\n\u003ca name=\"install\" /\u003e\n\n### Install\n\n`npm install squeezer-chainkit --save`\n\n[back to top](#table)\n\n\u003ca name=\"init\" /\u003e\n\n### Initialize\n\nYou will need a Squeezer access key in order to use the chainkit. You can get one [here](https://squeezer.io/docs/development/deployment-key/)\n\n```javascript\nconst ChainKit = require('squeezer-chainkit');\nconst chainKit = new ChainKit(options); \n```\n- ``options`` ***required***\n- ``options.accessKey`` - ***required*** Squeezer access key \n- ``options.environment`` - ***required*** use ``test`` for sandbox or ``live`` for production\n\n\u003ca name=\"itn\" /\u003e\n\n## ITN ( Instant Transaction Notification )\n----\nThe ITN system will notify your server when you receive a transaction and when a transaction status changes. This is a quick and useful way to integrate blockchain transactions processing.\n\nPlease check the ``Squeezer Blockchain Gateway API Documentation``-\u003e``\nConfigure ITN callback url``\n\n```javascript\nchainKit.configureItnUrl(options, callback)\n```\n- ``options`` - ***required***.\n- ``options.url`` - ***required***. ITN callback url (``http://example.org/itn/callback``).\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.configureItnUrl({\n  url: 'http://example.org/itn/callback'\n}, (err, response) =\u003e {\n  console.log(response)\n});\n```\n\nExample response from server\n```json\n{\n  \"walletId\": \"8193d025-6430-496e-abf3-88f06b51889c\",\n  \"address\": \"0xbd61ef790C3eaf4D0c4D4bE3558F8a501863525f\",\n  \"token\": \"41dbecfb0454183a4c7a9be8b874e1785b5...\"\n}\n```\n\nITN JSON object:\n\n```JSON\n{\n  \"from\": \"0xc03f7B9bddF8aeeBCbA2f818E5f873f71b85EB5c\",\n  \"to\": \"0x903f7B9bddF8aeeBCbA2f818E5f873f71b85EB5c\",\n  \"amount\": \"0.99999999\",\n  \"type\": \"in\",\n  \"currency\": \"ETH\",\n  \"accessKeyHash\": \"accessKeyHash\",\n  \"hash\": \"0xcf387e8d1a95bd3a5b54269aa0a228...\",\n  \"block\": \"891093\",\n  \"status\": 1,\n  \"itnStatus\": 1,\n  \"createdAt\": \"2018-05-13 18:09:18\",\n  \"updateAt\": \"2018-05-13 18:09:18\"\n}\n```\n\nNOTE: As a security measure please make sure that you validate `accessKeyHash` is the same at with your default `access key`\n\nValidate `accessKeyHash` example:\n\n```javascript\nif (accessKeyHash === crypto.createHmac('SHA256', accessKey).update(accessKey).digest('hex')) {\n  console.log('valid access key hash') \n} else {\n  console.log('invalid access key hash')\n}\n```\n\n[back to top](#table)\n\n\u003ca name=\"walletTypes\" /\u003e\n\n## Wallet types\n\nGet current available blockchain wallet types\n\n```javascript\nchainKit.walletTypes(callback)\n```\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.walletTypes((err, response) =\u003e {\n  console.log(response)\n});\n```\n\nExample response from server\n```json\n{\n  \"message\":\"success\",\n  \"data\":[\n    {\n      \"type\":\"ethereum\",\n      \"info\":\"Ethereum wallet.\"\n    },\n    {\n      \"type\":\"stellar\",\n      \"info\":\"Stellar wallet.\"\n    },\n    {\n      \"type\":\"wavesplatform\",\n      \"info\":\"Waves platform wallet.\"\n    }\n  ]\n}\n```\n\n[back to top](#table)x\n\n\u003ca name=\"createWallet\" /\u003e\n\n## Create wallet\n\nCreate a new blockchain wallet.\n\n```javascript\nchainKit.createWallet(options, callback)\n```\n- ``options`` - ***required***.\n- ``options.type`` - ***required***. Wallet type (``ETH``).\n- ``options.secret`` - ***required***. Secret (``secret123``).\n- ``options.options`` - ***required***. Options object.\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.createWallet({\n  type: 'ethereum',\n  options: {\n    asset: 'ETH',\n    assetType: 'native'\n  }\n}, (err, response) =\u003e {\n  console.log(response)\n});\n```\n\nExample response from server\n```json\n{\n  \"walletId\": \"8193d025-6430-496e-abf3-88f06b51889c\",\n  \"address\": \"0xbd61ef790C3eaf4D0c4D4bE3558F8a501863525f\",\n  \"token\": \"41dbecfb0454183a4c7a9be8b874e1785b5...\"\n}\n```\n\nNOTE: Squeezer will not store any sensitive data similar to `token`. For later usage please store the wallet details on a secure \u0026 safe environment.\n\n\n[back to top](#table)\n\n\u003ca name=\"sendTransaction\" /\u003e\n\n## Send transaction\n\nInitiate a new blockchain transaction.\n\n```javascript\nchainKit.sendTransaction(options, callback)\n```\n- ``options`` - ***required***.\n- ``options.amount`` - ***required***. Amount to send, 8 decimal max. (``0.01``).\n- ``options.walltId`` - ***required***. wallet id. (``ETH``).\n- ``options.to`` - ***required***. Receiver's address\n- ``options.token`` - ***required***. Wallet token\n- ``options.secret`` - ***required***. Secret (``secret123``).\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.sendTransaction({\n  amount: 0.01,\n  walletId: '1dd2e289-8f80-4b4a-8592-xxxxxxxxxxx',\n  to: '0x207E1a4F3Ab910D2164bC3646CFD0aF697f86713',\n  token: \"41dbecfb04541........\"\n}, (err, response) =\u003e {\n  console.log(response)\n});\n```\n\nExample response from server\n```json\n{\n  \"hash\" : \"0x4b9c1358fcbeb5434457355e3e8e44e10ebc6bec02d40c7a28046b1cfef99476\"\n}\n```\n\n[back to top](#table)\n\n## Get transactions\n\nGet transactions for a specific wallet\n\n```javascript\nchainKit.getTransactions(options, callback)\n```\n- ``options`` - ***required***.\n- ``options.walletId`` - ***required***. Wallet ID\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.getTransactions({\n  walletId: \"0dbeb851-b9e7-42e4-a448-71f8520f1ea3\",\n}, (err, response) =\u003e {\n  console.log(response)\n});\n```\n\nExample response from server\n```json\n{\n  \"message\": \"success\",\n  \"data\": [\n    {\n      \"from\": \"0xc03f7B9bddF8aeeBCbA2f818E5f873f71b85EB5c\",\n      \"to\": \"0x903f7B9bddF8aeeBCbA2f818E5f873f71b85EB5c\",\n      \"amount\": 0.99999999,\n      \"type\": \"in\",\n      \"hash\": \"0xcf387e8d1a95bd3a5b54269aa0a228f159d3cd33fa9e946617c532c5cb8c77bb\",\n      \"block\": 891093,\n      \"status\": 0,\n      \"itnStatus\": 0,\n      \"createdAt\": \"2018-05-13 18:09:18\",\n      \"updateAt\": \"2018-05-13 18:09:18\"\n    }\n  ]\n}\n```\n\n[back to top](#table)\n\n\u003ca name=\"getBalance\" /\u003e\n\n## Get balance\n\nGet balance for a specific wallet\n\n```javascript\nchainKit.getBalance(options, callback)\n```\n- ``options`` - ***required***.\n- ``options.walletId`` - ***required***. Wallet ID\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.getBalance({\n  walletId: \"0dbeb851-b9e7-42e4-a448-71f8520f1ea3\",\n}, (err, response) =\u003e {\n  console.log(response)\n});\n```\n\nExample response from server\n```json\n{\n  \"message\":\"success\",\n  \"data\": {\n    \"balance\":0\n  }\n}\n```\n\n[back to top](#table)\n\n## Smart contract ( In development feature )\n\nAccess a smart contract\n\n```javascript\nchainKit.smartContract(options, callback)\n```\n- ``options`` - ***required***.\n- ``options.address`` - ***required***. Smart contract address.\n- ``options.type`` - ***required***. Smart contract type. (``ETH``)\n- ``options.abi`` - ***required***. Abi code.\n- ``options.methods`` - ***required***. Smart contract methods.\n- ``options.token`` - ***required***. Wallet token\n- ``callback`` - ***required*** callback function, accepts 2 values (``error``,``result``)\n\nExample request\n```javascript\nchainKit.smartContract({\n  type: 'ETH',\n  abi : '',\n  address: '0x207E1a4F3Ab910D2164bC3646CFD0aF697f86713',\n  token: '348nagfgf45tgtg....',\n  methods: [{\n    listVotes: ['arg1', 'arg2'],\n    votesType: ['positive']\n  }]\n}, (err, response) =\u003e {\n  console.log(response)\n});\n```\n\n[back to top](#table)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqueezerio%2Fsqueezer-chainkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqueezerio%2Fsqueezer-chainkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqueezerio%2Fsqueezer-chainkit/lists"}