{"id":13796370,"url":"https://github.com/broxus/everscale-inpage-provider","last_synced_at":"2025-04-06T06:07:09.028Z","repository":{"id":37912482,"uuid":"363270857","full_name":"broxus/everscale-inpage-provider","owner":"broxus","description":"Web3-like interface to the Everscale blockchain.","archived":false,"fork":false,"pushed_at":"2025-03-11T14:57:10.000Z","size":4815,"stargazers_count":28,"open_issues_count":8,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T05:03:54.213Z","etag":null,"topics":["blockchain","everscale","venom-blockchain","venom-developer-program","venom-sdk","web3"],"latest_commit_sha":null,"homepage":"https://broxus.github.io/everscale-inpage-provider/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/broxus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T22:13:35.000Z","updated_at":"2025-03-11T14:56:49.000Z","dependencies_parsed_at":"2023-02-16T08:01:52.481Z","dependency_job_id":"1e5f2a3b-2dcc-4005-9d52-28d1fa8e710b","html_url":"https://github.com/broxus/everscale-inpage-provider","commit_stats":null,"previous_names":["broxus/ton-inpage-provider"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Feverscale-inpage-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Feverscale-inpage-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Feverscale-inpage-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Feverscale-inpage-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/broxus","download_url":"https://codeload.github.com/broxus/everscale-inpage-provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441046,"owners_count":20939239,"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":["blockchain","everscale","venom-blockchain","venom-developer-program","venom-sdk","web3"],"created_at":"2024-08-03T23:01:09.486Z","updated_at":"2025-04-06T06:07:09.002Z","avatar_url":"https://github.com/broxus.png","language":"TypeScript","funding_links":[],"categories":["Programming"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/venom-blockchain/developer-program\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/venom-blockchain/developer-program/main/vf-dev-program.png\" alt=\"Logo\" width=\"366.8\" height=\"146.4\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Everscale inpage provider \u0026emsp;  [![Latest Version]][npmjs.com] [![Docs badge]][docs]\n\n## About\n\nWeb3-like interface to the Everscale blockchain.\n\n## Usage\n\n### How to install\n\n```shell\nnpm install --save everscale-inpage-provider\n```\n\n\u003e NOTE: this repo was originally used for `ton-inpage-provider` package which is DEPRECATED now.\n\n### Contents\n\n- [`src/api.ts`](./src/api.ts) - RPC interface description\n- [`src/models.ts`](./src/models.ts) - general models, used in RPC interface\n- [`src/contract.ts`](./src/contract.ts) - typed contracts wrapper\n- [`src/stream.ts`](./src/stream.ts) - user-friendly api for streams\n- [`src/utils.ts`](./src/utils.ts) - some useful stuff\n\n### Example\n\n```typescript\nimport {\n  Address,\n  ProviderRpcClient,\n  TvmException\n} from 'everscale-inpage-provider';\n\nconst ever = new ProviderRpcClient();\n\nasync function myApp() {\n  if (!(await ever.hasProvider())) {\n    throw new Error('Extension is not installed');\n  }\n\n  const { accountInteraction } = await ever.requestPermissions({\n    permissions: ['basic', 'accountInteraction'],\n  });\n  if (accountInteraction == null) {\n    throw new Error('Insufficient permissions');\n  }\n\n  const selectedAddress = accountInteraction.address;\n  const dePoolAddress = new Address('0:bbcbf7eb4b6f1203ba2d4ff5375de30a5408a8130bf79f870efbcfd49ec164e9');\n\n  const dePool = new ever.Contract(DePoolAbi, dePoolAddress);\n\n  const transaction = await dePool\n    .methods\n    .addOrdinaryStake({\n      stake: '10000000000',\n    }).send({\n      from: selectedAddress,\n      amount: '10500000000',\n      bounce: true,\n    });\n  console.log(transaction);\n\n  try {\n    const output = await dePool\n      .methods\n      .getParticipantInfo({\n        addr: selectedAddress,\n      })\n      .call();\n    console.log(output);\n  } catch (e) {\n    if (e instanceof TvmException) {\n      console.error(e.code);\n    }\n  }\n}\n\nconst DePoolAbi = {\n  'ABI version': 2,\n  'header': ['time', 'expire'],\n  'functions': [{\n    'name': 'addOrdinaryStake',\n    'inputs': [\n      { 'name': 'stake', 'type': 'uint64' },\n    ],\n    'outputs': [],\n  }, {\n    'name': 'getParticipantInfo',\n    'inputs': [\n      { 'name': 'addr', 'type': 'address' },\n    ],\n    'outputs': [\n      { 'name': 'total', 'type': 'uint64' },\n      { 'name': 'withdrawValue', 'type': 'uint64' },\n      { 'name': 'reinvest', 'type': 'bool' },\n      { 'name': 'reward', 'type': 'uint64' },\n      { 'name': 'stakes', 'type': 'map(uint64,uint64)' },\n      {\n        'components': [\n          { 'name': 'remainingAmount', 'type': 'uint64' },\n          { 'name': 'lastWithdrawalTime', 'type': 'uint64' },\n          { 'name': 'withdrawalPeriod', 'type': 'uint32' },\n          { 'name': 'withdrawalValue', 'type': 'uint64' },\n          { 'name': 'owner', 'type': 'address',\n        }],\n        'name': 'vestings', 'type': 'map(uint64,tuple)',\n      },\n      {\n        'components': [\n          { 'name': 'remainingAmount', 'type': 'uint64' },\n          { 'name': 'lastWithdrawalTime', 'type': 'uint64' },\n          { 'name': 'withdrawalPeriod', 'type': 'uint32' },\n          { 'name': 'withdrawalValue', 'type': 'uint64' },\n          { 'name': 'owner', 'type': 'address',\n        }],\n        'name': 'locks', 'type': 'map(uint64,tuple)',\n      },\n      { 'name': 'vestingDonor', 'type': 'address' },\n      { 'name': 'lockDonor', 'type': 'address' },\n    ],\n  }],\n  'data': [],\n  'events': [],\n} as const; // NOTE: `as const` is very important here\n\nmyApp().catch(console.error);\n```\n\n### Build\n\n```shell\nnpm install\n\n# Build as ts library\n# (output will be in the `dist` folder)\nnpm run build\n\n# Build as js library to use directly in \u003cscript\u003e tags\n# (output will be in the `vanilla` folder)\nnpm run build:vanilla\n```\n\n## Contributing\n\nWe welcome contributions to the project! If you notice any issues or errors, feel free to open an issue or submit a pull request.\n\n## License\n\nLicensed under GPL-3.0 license ([LICENSE](/LICENSE) or https://opensource.org/license/gpl-3-0/).\n\n[latest version]: https://img.shields.io/npm/v/everscale-inpage-provider\n[npmjs.com]: https://www.npmjs.com/package/everscale-inpage-provider\n[docs badge]: https://img.shields.io/badge/docs-latest-brightgreen\n[docs]: https://broxus.github.io/everscale-inpage-provider/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroxus%2Feverscale-inpage-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbroxus%2Feverscale-inpage-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroxus%2Feverscale-inpage-provider/lists"}