{"id":13485519,"url":"https://github.com/icon-project/icon-sdk-js","last_synced_at":"2026-04-04T03:09:04.184Z","repository":{"id":33226507,"uuid":"155358942","full_name":"icon-project/icon-sdk-js","owner":"icon-project","description":"ICON SDK for JavaScript","archived":false,"fork":false,"pushed_at":"2026-01-22T01:09:26.000Z","size":4023,"stargazers_count":37,"open_issues_count":1,"forks_count":30,"subscribers_count":15,"default_branch":"master","last_synced_at":"2026-01-22T14:54:25.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icon-project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-10-30T09:33:32.000Z","updated_at":"2026-01-22T01:09:24.000Z","dependencies_parsed_at":"2023-02-10T19:46:14.454Z","dependency_job_id":"4778a5fe-577e-427c-abce-2c46de12e9d5","html_url":"https://github.com/icon-project/icon-sdk-js","commit_stats":{"total_commits":228,"total_committers":15,"mean_commits":15.2,"dds":0.6403508771929824,"last_synced_commit":"3773a04ccc1a3f57ca7a5286cb64ec1625965eaa"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/icon-project/icon-sdk-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-project%2Ficon-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-project%2Ficon-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-project%2Ficon-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-project%2Ficon-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icon-project","download_url":"https://codeload.github.com/icon-project/icon-sdk-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-project%2Ficon-sdk-js/sbom","scorecard":{"id":480547,"data":{"date":"2025-08-11","repo":{"name":"github.com/icon-project/icon-sdk-js","commit":"688ebc0d44ac6569393701f2dda43da50cba2217"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":3,"reason":"Found 1/3 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish.yml:12","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/publish.yml:13","Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: quickstart/resource/irc2-token.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/icon-project/icon-sdk-js/publish.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:29:50.433Z","repository_id":33226507,"created_at":"2025-08-19T16:29:50.433Z","updated_at":"2025-08-19T16:29:50.433Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31385984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-31T18:00:24.894Z","updated_at":"2026-04-04T03:09:04.165Z","avatar_url":"https://github.com/icon-project.png","language":"TypeScript","readme":"[![unittest](https://img.shields.io/github/actions/workflow/status/icon-project/icon-sdk-js/lint.yml?branch=master\u0026label=unittest\u0026logo=github)](https://github.com/icon-project/icon-sdk-js/actions/workflows/lint.yml)\n[![npm - package](https://img.shields.io/github/package-json/v/icon-project/icon-sdk-js)](https://www.npmjs.com/package/icon-sdk-js)\n![node-current](https://img.shields.io/node/v/icon-sdk-js)\n---\nICON SDK for JavaScript\n---\n\nICON supports JavaScript SDK for 3rd party or user services development. You can integrate ICON JavaScript SDK into your project and utilize ICON’s functionality. This document provides you with an information of installation and API specification.\n\n## Table of Contents\n* [Installation](#installation)\n* [API Specification - Introduction](#api-specification---introduction)\n* [IconService][IconService]\n* [IconService.IconWallet][IconWallet]\n* [IconService.IconBuilder][IconBuilder]\n* [IconService.IconBuilder.IcxTransactionBuilder][IcxTransactionBuilder]\n* [IconService.IconBuilder.MessageTransactionBuilder][MessageTransactionBuilder]\n* [IconService.IconBuilder.DeployTransactionBuilder][DeployTransactionBuilder]\n* [IconService.IconBuilder.CallTransactionBuilder][CallTransactionBuilder]\n* [IconService.IconBuilder.DepositTransactionBuilder][DepositTransactionBuilder]\n* [IconService.IconBuilder.CallBuilder][CallBuilder]\n* [IconService.SignedTransaction][SignedTransaction]\n* [IconService.HttpProvider][HttpProvider]\n* [IconService.IconAmount][IconAmount]\n* [IconService.IconConverter][IconConverter]\n* [IconService.IconHexadecimal][IconHexadecimal]\n* [IconService.IconValidator][IconValidator]\n* [Error cases][Error cases]\n* [References][References]\n\n## Installation\n\n### Usage in Node.js\n\nInstall `icon-sdk-js` module using `yarn`.\n\n```bash\nyarn add icon-sdk-js\n```\n\nImport `icon-sdk-js` module.\n\n```javascript\nconst IconService = require('icon-sdk-js');\n```\n\n### Usage in browser\n\nInstall `icon-sdk-js` module using `yarn`,\n\n```bash\nyarn add icon-sdk-js\n```\n\nor using CDN.\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/icon-sdk-js@latest/build/icon-sdk-js.web.min.js\"\u003e\u003c/script\u003e\n```\n\nThen, import `icon-sdk-js` module.\nThis module uses fetch internally. So if you use this in old browser, You should import [whatwg-fetch](https://github.com/github/fetch).\n\n```javascript\nimport IconService from 'icon-sdk-js';\n```\n\n### Usage in react-native environment\n\nInstall `icon-sdk-js` module using `yarn`,\n\n```bash\nyarn add icon-sdk-js\n```\n\nThen, import `icon-sdk-js/build/icon-sdk-js.web.min.js` module.\n```javascript\nimport IconService from 'icon-sdk-js/build/icon-sdk-js.web.min.js';\n```\n\n## API Specification - Introduction\n\n`IconService` is a root class of `icon-sdk-js`, which provides APIs to communicate with ICON nodes and contains different type of modules. Details of modules are as below:\n\n| Module       | Description |\n| ------------- | ----------- |\n| [IconService] | Class which provides APIs to communicate with ICON nodes |\n| [IconService.IconWallet] | Class which provides EOA functions. |\n| [IconService.IconBuilder] | Builder class for transaction object. |\n| [IconService.SignedTransaction] | Class representing the signed transaction object. |\n| [IconService.HttpProvider] | Class representing HTTP-based provider |\n| [IconService.IconAmount] | Class which provides unit conversion functions. |\n| [IconService.IconConverter] | Util module contains conversion functions. |\n| [IconService.IconHexadecimal] | Util module contains hex-prefix functions. |\n| [IconService.IconValidator] | Util module contains validator functions. |\n\n## IconService\n\n`IconService` is a class which provides APIs to communicate with ICON nodes. It enables you to easily use ICON JSON-RPC APIs (version 3). All instance methods of `IconService` returns a `HttpCall` instance. To execute the request and get the result value, you need to run `execute()` function of `HttpCall` instance. All requests will be executed **asynchronously**. Synchronous request is not available.\n\n### Constructor\n\nCreates an instance of IconService.\n\n```javascript\nnew IconService(provider: HttpProvider)\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| provider | `HttpProvider` | [HttpProvider] instance. |\n\n#### Example\n```javascript\nconst httpProvider = new HttpProvider('https://ctz.solidwallet.io/api/v3');\nconst iconService = new IconService(httpProvider);\n```\n\n### getTotalSupply()\n\nGet the total number of issued coins.\n\n```javascript\n.getTotalSupply(height: string|BigNumber|number) =\u003e HttpCall // .execute() =\u003e BigNumber\n```\n\n#### Parameters\n\n| Parameter | Type | Description |\n| ------------- | ----------- | ----------- |\n| height | `string\\|BigNumber\\|number` | block height. |\n\n#### Returns\n\n`HttpCall` - The HttpCall instance for `icx_getTotalSupply` JSON-RPC API request. If `execute()` successfully, it returns a `BigNumber` value of total issued coins.\n\n#### Example\n```javascript\n/* Returns the total number of issued coins. */\nconst totalSupply = await iconService.getTotalSupply().execute();\n```\n\n\n### getBalance()\n\nGet the balance of the address.\n\n```javascript\n.getBalance(address: string, height?: string|BigNumber|number) =\u003e HttpCall // .execute() =\u003e BigNumber\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| address | `string` | an EOA address. |\n| height | `string\\|BigNumber\\|number` | block height. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getBalance` JSON-RPC API request. If `execute()` successfully, it returns a `BigNumber` value of ICX balance.\n\n#### Example\n```javascript\n/* Returns the balance of a EOA address */\nconst balance = await iconService.getBalance('hx9d8a8376e7db9f00478feb9a46f44f0d051aab57').execute();\n```\n\n### getBlockByHeight()\n\nGet the block information by block height.\n\n```javascript\n.getBlockByHeight(value: number|BigNumber) =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\n| Parameter | Type                  | Description                |\n|-----------|-----------------------|----------------------------|\n| value     | `number`, `BigNumber` | the height value of block. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getBlockByHeight` JSON-RPC API request. If `execute()` successfully, it returns a block `object`.\n\n#### Example\n```javascript\n// Returns block information\nconst block = await iconService.getBlockByHeight(1000).execute();\n```\n\n### getBlockByHash()\n\nGet the block information by block hash.\n\n```javascript\n.getBlockByHash(value: string) =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\n| Parameter | Type     | Description   |\n|-----------|----------|---------------|\n| value     | `string` | a block hash. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getBlockByHash` JSON-RPC API request. If `execute()` successfully, it returns a block `object`.\n\n#### Example\n```javascript\n// Returns block information\nconst block = await iconService.getBlockByHash('0xdb310dd653b2573fd673ccc7489477a0b697333f77b3cb34a940db67b994fd95').execute();\n```\n\n### getLastBlock()\n\nGet the latest block information.\n\n```javascript\n.getLastBlock() =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\nNone\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getLastBlock` JSON-RPC API request. If `execute()` successfully, it returns a block `object`.\n\n#### Example\n```javascript\n// Returns block information\nconst block = await iconService.getLastBlock().execute();\n```\n\n\n### getScoreApi()\n\nGet the SCORE API list.\n\n```javascript\n.getScoreApi(address: string, height?: Hash) =\u003e HttpCall // .execute() =\u003e array\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| address | `string` | a SCORE address. |\n| height | `string\\|BigNumber\\|number` | block height. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getScoreApi` JSON-RPC API request. If `execute()` successfully, it returns a `ScoreApiList` instance, the API list of SCORE address.\n\n`ScoreApiList` provides two instance methods, `getList()` and `getMethod()`.\n\n* getList() - Returns `array` of API list.\n\n* getMethod(*method: `string`*) - Returns `object` of method information.\n\n\n#### Example\n```javascript\n// Returns the SCORE API list\nconst apiList = await iconService.getScoreApi('cx0000000000000000000000000000000000000001').execute();\n\n// [ { type: 'function', name: 'acceptScore', inputs: [ [Object] ] outputs: [] }, ··· { type: 'eventlog', name: 'UpdateServiceConfigLog', inputs: [ [Object] ] }]\nconsole.log(apiList.getList());\n\n// { type: 'function', name: 'getStepCosts', inputs: [], outputs: [ { type: 'dict' } ], readonly: '0x1' }\nconsole.log(apiList.getMethod('getStepCosts'));\n```\n\n### getScoreStatus()\n\nGet the SCORE status\n\n```javascript\n.getScoreStatus(address: string, height?: Hash) =\u003e HttpCall\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| address | `string` | a SCORE address. |\n| height | `string\\|BigNumber\\|number` | block height. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getScoreStatus` JSON-RPC API request. If `execute()` successfully, it returns a status of SCORE.\n\n#### Example\n```javascript\n// Returns Score Status\nconst status = await iconService.getScoreStatus('cxb903239f8543d04b5dc1ba6579132b143087c68d').execute();\n```\n\n### getTransaction()\n\nGet the transaction information.\n\n```javascript\n.getTransaction(hash: string) =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` | a transaction hash. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getTransactionByHash` JSON-RPC API request. If `execute()` successfully, it returns a transaction `object`. For details of returned object, see [here][icx_getTransactionByHash].\n\n#### Example\n```javascript\n// Returns the transaction object.\nconst txObject = await iconService.getTransaction('0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238').execute();\n```\n\n### getTransactionResult()\n\nGet the result of transaction by transaction hash.\n\n```javascript\n.getTransactionResult(hash: string) =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` | a transaction hash. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getTransactionResult` JSON-RPC API request. If `execute()` successfully, it returns a transaction result `object`. For details of returned object, see [here][icx_getTransactionResult].\n\n#### Example\n```javascript\n// Returns the transaction result object.\nconst txObject = await iconService.getTransactionResult('0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238').execute();\n```\n\n### getTrace()\n\nGet the transaction trace. newly added from ICON2\n\n```javascript\n.getTrace(hash: string) =\u003e HttpCall // .execute() =\u003e any\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` |  |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `debug_getTrace` JSON-RPC API request. If `execute()` successfully, it returns a `BigNumber` value of estimated step.\n\n#### Example\n```javascript\n// Returns the transaction trace.\nconst trace = await iconService.getTrace(hash).execute();\n```\n\n### sendTransaction()\n\nSend a transaction that changes the states of address.\n\n```javascript\n.sendTransaction(signedTransaction: SignedTransaction) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| signedTransaction | `SignedTransaction` | an instance of [SignedTransaction] class. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_sendTransaction` JSON-RPC API request. If `execute()` successfully, it returns a `string` value of transaction hash.\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst txHash = await iconService.sendTransaction(signedTransaction).execute();\n```\n\n### estimateStep()\n\nReturns an estimated step of how much step is necessary to allow the transaction to complete.\n\n```javascript\n.estimateStep(transaction:IcxTransaction | MessageTransaction | DepositTransaction | DeployTransaction | CallTransaction) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| transaction | `IcxTransaction` | an instance of [IcxTransaction | MessageTransaction | DepositTransaction | DeployTransaction | CallTransaction] class. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `debug_estimateStep` JSON-RPC API request. If `execute()` successfully, it returns a `BigNumber` value of estimated step.\n\n#### Example\n```javascript\n// Returns the estimated step to execute transaction.\nconst step = await iconService.estimateStep(transaction).execute();\n```\n\n### sendTransactionAndWait()\n\nIt sends a transaction like `icx_sendTransaction`, then it will wait for the\nresult.\n\n```javascript\n.sendTransactionAndWait(signedTransaction: SignedTransaction) =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| signedTransaction | `SignedTransaction` | an instance of [SignedTransaction] class. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_sendTransactionAndWait` JSON-RPC API request. If `execute()` successfully, it returns a `object` value of transaction result.\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst result = await iconService.sendTransactionAndWait(signedTransaction).execute();\n```\n\n### waitTransactionResult()\n\nIt will wait for the result of the transaction for specified time.\n\n```javascript\n.waitTransactionResult(hash: string) =\u003e HttpCall // .execute() =\u003e object\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` | transaction hash |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_waitTransactionResult` JSON-RPC API request. If `execute()` successfully, it returns a transaction result `object`. For details of returned object, see [here][icx_getTransactionResult].\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst result = await iconService.waitTransactionResult(hash).execute();\n```\n\n### getDataByHash()\n\nGet data by hash.\n\nIt can be used to retrieve data based on the hash algorithm (SHA3-256).\n\nFollowing data can be retrieved by a hash.\n\n* BlockHeader with the hash of the block\n* Validators with BlockHeader.NextValidatorsHash\n* Votes with BlockHeader.VotesHash\n* etc…\n\n```javascript\n.getDataByHash(hash: string) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` | The hash value of the data to retrieve |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getDataByHash` JSON-RPC API request. If `execute()` successfully, it returns base64 encoded data\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst data = await iconService.getDataByHash(hash).execute();\n```\n\n### getBlockHeaderByHeight()\n\nGet block header for specified height.\n\n```javascript\n.getBlockHeaderByHeight(height: string | BigNumber) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| height | `string\\|BigNumber` | The height of the block in hex string |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getBlockHeaderByHeight` JSON-RPC API request. If `execute()` successfully, it returns base64 encoded data\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst data = await iconService.getBlockHeaderByHeight(height).execute();\n```\n\n### getVotesByHeight()\n\nGet votes for the block specified by height.\n\n```javascript\n.getVotesByHeight(height: string | BigNumber) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| height | `string\\|BigNumber` | The height of the block in hex string |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getVotesByHeight` JSON-RPC API request. If `execute()` successfully, it returns base64 encoded votes data\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst data = await iconService.getVotesByHeight(height).execute();\n```\n\n### getProofForResult()\n\nGet proof for the receipt. Proof, itself, may include the receipt.\n\n```javascript\n.getProofForResult(hash: string | BigNumber, index: string | BigNumber) =\u003e HttpCall // .execute() =\u003e Array\u003cstring\u003e\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` | The hash value of the block including the result. |\n| index | `string\\|BigNumber` | Index of the receipt in the block.\u003cbr/\u003e 0 for the first. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getProofForResult` JSON-RPC API request. If `execute()` successfully, it returns List of base64 encoded proof including the receipt\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst data = await iconService.getProofForResult(hash, index).execute();\n```\n\n### getProofForEvents()\n\nGet proof for the receipt and the events in it. The proof may include the data itself.\n\n```javascript\n.getProofForEvents(hash: string | BigNumber, index: string | BigNumber, events: Array\u003cstring | BigNumber\u003e) =\u003e HttpCall // .execute() =\u003e Array\u003cstring\u003e\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| hash | `string` | The hash value of the block including the result. |\n| index | `string \\| BigNumber` | Index of the receipt in the block.\u003cbr/\u003e 0 for the first. |\n| events | Array | List of indexes of the events in the receipt.            |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getProofForEvents` JSON-RPC API request. If `execute()` successfully, it returns List of List of base64 encoded proof including the receipt and the events\n\n#### Example\n```javascript\n// Returns the tx hash of transaction.\nconst data = await iconService.getProofForEvents(hash, index, events).execute();\n```\n\n### getBTPNetworkInfo()\n\nGet BTP network information.\n\n```javascript\n.getBTPNetworkInfo(id: string | BigNumber, height?: string | BigNumber) =\u003e HttpCall // .execute() =\u003e BTPNetworkInfo\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| id | `string` | BigNumber | Network ID |\n| height | `string\\|BigNumber`    | Main block height(Optional) |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `btp_getNetworkInfo` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getBTPNetworkInfo(id, height).execute();\n```\n\n### getBTPNetworkTypeInfo()\n\nGet BTP network type information.\n\n```javascript\n.getBTPNetworkTypeInfo(id: string | BigNumber, height?: string | BigNumber) =\u003e HttpCall // .execute() =\u003e BTPNetworkTypeInfo\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| id | `string` | BigNumber | Network ID |\n| height | `string\\|BigNumber`    | Main block height(Optional) |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `btp_getNetworkTypeInfo` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getBTPNetworkTypeInfo(id, height).execute();\n```\n\n### getBTPMessages()\n\nGet BTP messages.\n\n```javascript\n.getBTPMessages(id: string | BigNumber, height: string | BigNumber) =\u003e HttpCall // .execute() =\u003e Array\u003cstring\u003e\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| networkID | `string` | BigNumber | BTP network ID |\n| height | `string\\|BigNumber`    | Main block height |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `btp_getMessages` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getBTPMessages(networkID, height).execute();\n```\n\n### getBTPHeader()\n\nGet BTP block header\n\n```javascript\n.getBTPHeader(networkID: string | BigNumber, height: string | BigNumber) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| networkID | `string` | BigNumber | BTP network ID |\n| height | `string\\|BigNumber`    | Main block height |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `btp_getHeader` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getBTPHeader(networkID, height).execute();\n```\n\n### getBTPProof()\n\nGet BTP block proof\n\n```javascript\n.getBTPProof(networkID: string | BigNumber, height: string | BigNumber) =\u003e HttpCall // .execute() =\u003e string\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| networkID | `string` | BigNumber | BTP network ID |\n| height | `string\\|BigNumber`    | Main block height |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `btp_getProof` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getBTPProof(networkID, height).execute();\n```\n\n### getBTPSourceInformation()\n\nGet source network information\n\n```javascript\n.getBTPSourceInformation() =\u003e HttpCall // .execute() =\u003e BTPSourceInformation\n```\n\n#### Parameters\nNone\n\n#### Returns\n`HttpCall` - The HttpCall instance for `btp_getSourceInformation` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getBTPSourceInformation().execute();\n```\n\n### getNetworkInfo()\n\nGet basic network Information\n\n```javascript\n.getNetworkInfo() =\u003e HttpCall // .execute() =\u003e NetworkInfo\n```\n\n#### Parameters\nNone\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_getNetworkInfo` JSON-RPC API request.\n\n#### Example\n```javascript\nconst data = await iconService.getNetworkInfo().execute();\n```\n\n### call()\n\nCalls external function of SCORE.\n\n```javascript\n.call(call: Call) =\u003e HttpCall // .execute() =\u003e any\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| call | `Call` | an instance of Call class builded by [CallBuilder]. |\n\n#### Returns\n`HttpCall` - The HttpCall instance for `icx_call` JSON-RPC API request. If `execute()` successfully, it returns a `any` type of value returned by the executed SCORE function.\n\n#### Example\n```javascript\n// Returns the value returned by the executed SCORE function.\nconst result = await iconService.call(call).execute();\n```\n\n### monitorBlock()\n\nMonitor events for every blocks.\n\n```javascript\n.monitorBlock(\n  monitorSpec: BlockMonitorSpec,\n  ondata: (notification: EventNotification) =\u003e void,\n  onerror: (error: any) =\u003e void,\n  onprogress?: (height: BigNumber) =\u003e void\n): Monitor\u003cBlockNotification\u003e\n```\n\n#### Parameters\n\n| Parameter   | Type                                | Description                         |\n|:------------|:------------------------------------|:------------------------------------|\n| monitorSpec | `BlockMonitorSpec`                  | Specification for monitoring events |\n| ondata      | `function(event:BlockNotification)` | Callback for receiving events       |  \n| onerror     | `function(err:any)`                 | Callback for receiving the error    |\n| onprogress  | `function(height:BigInteger)`       | Callback for receiving the progress |\n\n* [BlockMonitorSpec](#blockmonitorspec)\n* [BlockNotification]\n\n#### Returns\n`Monitor` - Monitor instance for websocket monitoring. It can be used to call `close()` for stopping monitoring\n* [Monitor](#monitor)\n\n### monitorEvent()\n\nMonitor events from the SCORE.\n\n```javascript\n.monitorEvent(\n  monitorSpec: EventMonitorSpec,\n  ondata: (notification: EventNotification) =\u003e void,\n  onerror: (error: any) =\u003e void,\n  onprogress?: (height: BigNumber) =\u003e void\n): Monitor\u003cEventNotification\u003e\n```\n\n#### Parameters\n\n| Parameter   | Type                                | Description                         |\n|:------------|:------------------------------------|:------------------------------------|\n| monitorSpec | `EventMonitorSpec`                  | Specification for monitoring events |\n| ondata      | `function(event:EventNotification)` | Callback for receiving events       |  \n| onerror     | `function(err:any)`                 | Callback for receiving the error    |\n| onprogress  | `function(height:BigInteger)`       | Callback for receiving the progress |\n\n* [EventMonitorSpec](#eventmonitorspec)\n* [EventNotification]\n\n#### Returns\n`Monitor` - Monitor instance for websocket monitoring. It can be used to call `close()` for stopping monitoring\n\n#### Example\n\n```javascript\nspec = new EventMonitorSpec(\n  BigNumber(\"0xabc\"),\n  new EventFilter(\n    \"BTPEvent(str,int,str,str)\",\n    \"cxf1b0808f09138fffdb890772315aeabb37072a8a\",\n  ),\n  true,\n  20,\n)\non_data(ev) {\n  console.log(\"Event\", ev)\n}\non_error(err) {\n  console.log(\"Error\", err)\n}\non_progress(height) {\n  console.log(\"Progress\", height)\n}\nconst monitor = iconservice.monitorEvent(spec,on_data,on_error,on_progress);\n\nmonitor.close();\n```\n\n### monitorBTP()\n\nMonitor BTP events related with the network\n\n```javascript\n.monitorBTP(\n  monitorSpec: BTPMonitorSpec,\n  ondata: (notification: BTPNotification) =\u003e void\n  onerror: (error: any) =\u003e void,\n  onprogress?: (height: BigNumber) =\u003e void\n): Monitor\u003cBTPNotification\u003e\n```\n\n#### Parameters\n\n| Parameter   | Type                              | Description                         |\n|:------------|:----------------------------------|:------------------------------------|\n| monitorSpec | `BTPMonitorSpec`                  | Specification for monitoring events |\n| ondata      | `function(event:BTPNotification)` | Callback for receiving events       |  \n| onerror     | `function(err:any)`               | Callback for receiving the error    |\n| onprogress  | `function(height:BigInteger)`     | Callback for receiving the progress |\n\n* [BTPMonitorSpec](#btpmonitorspec)\n* [BTPNotification]\n\n#### Returns\n`Monitor` - Monitor instance for websocket monitoring. It can be used to call `close()` for stopping monitoring\n\n#### Example\n\n```javascript\nspec = new BTPMonitorSpec(\n  BigNumber(\"0xabc\"),\n  BigNumber(\"0x1\"),\n  false,\n  20\n);\non_data(ev) {\n  console.log(\"Event\", ev)\n}\non_error(err) {\n  console.log(\"Error\", err)\n}\non_progress(height) {\n  console.log(\"Progress\", height)\n}\nconst monitor = iconservice.monitorBTP(spec,on_data,on_error,on_progress);\n\nmonitor.close();\n```\n\n## IconService.IconWallet (Wallet)\n\n`IconWallet` is a class which provides EOA functions. It enables you to create, load, and store `Wallet` object.\n\n### Constructor\n\nCreates an instance of `Wallet` class. To create wallet, please use `create()` static function instead of instantiating this class directly.\n\n```javascript\nnew Wallet(privKey: string, pubKey: string)\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| privKey | `string` | a private key. |\n| pubKey | `string` | a public key. |\n\n### static create()\n\nCreates an instance of `Wallet` class.\n\n```javascript\nIconWallet.create() =\u003e Wallet\n```\n#### Parameters\n\nNone\n\n#### Returns\n`Wallet` - Wallet instance. It contains a public key and a private key randomly generated by `create()` function.\n\n#### Example\n```javascript\n// Creates an instance of Wallet.\nconst wallet = IconWallet.create();\n```\n\n### static loadPrivateKey()\n\nImport existing wallet using private key.\n\n```javascript\nIconWallet.loadPrivateKey(privKey: string) =\u003e Wallet\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| privKey | `string` | a private key. |\n\n#### Returns\n`Wallet` - a Wallet instance.\n\n#### Example\n```javascript\n// Load wallet object\nconst wallet = IconWallet.loadPrivateKey('2ab···e4c');\n```\n\n### static loadKeystore()\n\nImport existing wallet using keystore object.\n\n```javascript\nIconWallet.loadKeystore(keystore: object|string, password: string, nonStrict?: boolean) =\u003e Wallet\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| keystore | `object`, `string` | the keystore object (or stringified object.) |\n| password | `string` | the password of keystore object. |\n| nonStrict (optional) | `boolean` | set whether checking keystore file case-insensitive or not. _(affects when `keystore` param is string.)_ |\n\n#### Returns\n`Wallet` - a Wallet instance.\n\n#### Example\n```javascript\nconst testKeystore = { \"version\": 3, \"id\": \"41fc1ddb-4faf-4c88-b494-8fe82a4bab63\", \"address\": \"hxd008c05cbc0e689f04a5bb729a66b42377a9a497\", \"crypto\": { \"ciphertext\": \"c4046f5a735403a963110d24f39120a102ad7bc462bf2a14ae334ba4a8c485f6\", \"cipherparams\": { \"iv\": \"441b5a5de3dd33de6f7838b6075702d2\" }, \"cipher\": \"aes-128-ctr\", \"kdf\": \"scrypt\", \"kdfparams\": { \"dklen\": 32, \"salt\": \"39d45ffead82d554e35a55efcc7a1f64afe73e9a8ab6b750d959f904e32294ba\", \"n\": 16384, \"r\": 8, \"p\": 1 }, \"mac\": \"9bca1f2e8750efb27b7357e1a6a727c596cb812f7a4c45792494a8b0890774d7\" }, \"coinType\": \"icx\" }\nconst testPassword = 'qwer1234!'\n\n// Load wallet object\nconst wallet = IconWallet.loadKeystore(testKeystore, testPassword)\n```\n\n### store()\n\nGet keystore object of an instance of a `Wallet` class.\n\n```javascript\n.store(password: string, opts?: object) =\u003e object\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| password | `string` | a new password for encryption. |\n| opts (optional) | `object` | the custom options for encryption. |\n\n#### Returns\n`object` - a keystore object.\n\n#### Example\n```javascript\nconst wallet = IconWallet.create()\n// Get keystore object of an instance of a `Wallet` class.\nconst keystore = wallet.store(\"qwer1234!\")\n```\n\n### sign()\n\nGenerate signature string by signing transaction object.\n\n```javascript\n.sign(data: Buffer) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| data | `Buffer` | the serialized transaction object. |\n\n#### Returns\n`string` - a signature string.\n\n#### Example\n```javascript\nconst wallet = IconWallet.create()\n// Get keystore object of an instance of a `Wallet` class.\nconst signature = wallet.sign('ba4···f64')\n```\n\n### getPrivateKey()\n\nGet a private key of `Wallet` instance.\n\n```javascript\n.getPrivateKey() =\u003e string\n```\n#### Parameters\n\nNone\n\n#### Returns\n`string` - a private key.\n\n#### Example\n```javascript\nconst wallet = IconWallet.create()\n// Get private key of `Wallet` instance.\nconst pk = wallet.getPrivateKey()\n```\n\n### getPublicKey()\n\nGet a public key of `Wallet` instance.\n\n```typescript\ngetPublicKey(compressed = false): string\n```\n#### Parameters\n\n| Parameter  | Type      | Description   |\n|------------|-----------|---------------|\n| compressed | `boolean` | compressed flag |\n\n#### Returns\n`string` - a public key.\n\n#### Example\n```javascript\nconst wallet = IconWallet.create()\n// Get public key of `Wallet` instance.\nconst pk = wallet.getPublicKey()\n```\n\n### getAddress()\n\nGet an address of `Wallet` instance.\n\n```javascript\n.getAddress() =\u003e string\n```\n#### Parameters\n\nNone\n\n#### Returns\n`string` - an EOA address.\n\n#### Example\n```javascript\nconst wallet = IconWallet.create()\n// Get address of `Wallet` instance.\nconst pk = wallet.getAddress()\n```\n\n## IconService.IconBuilder\n\n`IconBuilder` is an object containing builder class for transaction object. Builder class enables you to make transaction object easily. There are 5 types of builder class as follows:\n\n| Module       | Description |\n| ------------- | ----------- |\n| [IcxTransactionBuilder] | Builder class for `IcxTransaction` instance, which is for sending ICX.  |\n| [MessageTransactionBuilder] | Builder class for `MessageTransaction` instance, which is for sending message data. Extends `IcxTransactionBuilder` class. |\n| [DeployTransactionBuilder] | Builder class for `DeployTransaction` instance, which is for deploying SCORE. Extends `IcxTransactionBuilder` class.  |\n| [CallTransactionBuilder] | Builder class for `CallTransaction` instance, which is for invoking a *state-transition* function of SCORE. Extends `IcxTransactionBuilder` class. |\n| [DepositTransactionBuilder] | Builder class for `DepositTransaction` instance, which is for depositing to SCORE(or withdrawing from SCORE). Extends `IcxTransactionBuilder` class. |\n| [CallBuilder] | Builder class for `Call` instance, which is for invoking a *read-only* function of SCORE. |\n\n## IconService.IconBuilder.IcxTransactionBuilder\n\nBuilder class for `IcxTransaction` instance. `IcxTransaction` is an object representing a transaction object used for sending ICX. The parameter details are as follows:\n\n| Parameter       | Description |\n| ------------- | ----------- |\n| `to` | An EOA address to receive coins, or SCORE address to execute the transaction. |\n| `from` | An EOA address that created the transaction |\n| `value` (optional) | Amount of ICX coins in loop to transfer. When ommitted, assumes 0. (1 icx = 10 ^ 18 loop) |\n| `stepLimit` | Maximum step allowance that can be used by the transaction. |\n| `nid` | Network ID (\"0x1\" for Mainnet, \"0x2\" for Testnet, etc) |\n| `nonce` | An arbitrary number used to prevent transaction hash collision. |\n| `version` | Protocol version (\"0x3\" for V3) |\n| `timestamp` | Transaction creation time. timestamp is in microsecond. |\n\n### Constructor\n\nCreates an instance of `IcxTransactionBuilder` class.\n\n```javascript\nnew IcxTransactionBuilder()\n```\n#### Parameters\n\nNone\n\n### to()\n\nSetter method of 'to' property.\n\n```javascript\n.to(to: string) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| to | `string` | an EOA or SCORE address. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `to` property.\nconst txObj = new IcxTransactionBuilder()\n    .to('hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a')\n```\n\n### from()\n\nSetter method of 'from' property.\n\n```javascript\n.from(from: string) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| from | `string` | an EOA address. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `from` property.\nconst txObj = new IcxTransactionBuilder()\n    .from('hx46293d558d3bd489c3715e7e3648de0e35086bfd')\n```\n\n### value()\n\nSetter method of 'value' property.\n\n```javascript\n.value(value: string|BigNumber|number) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string`, `BigNumber`, `number` | the sending amount of ICX in loop unit. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `value` property.\nconst txObj = new IcxTransactionBuilder()\n    .value(IconAmount.of(1, IconAmount.Unit.ICX).toLoop())\n```\n\n### stepLimit()\n\nSetter method of 'stepLimit' property.\n\n```javascript\n.stepLimit(stepLimit: string|BigNumber|number) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| stepLimit | `string`, `BigNumber`, `number` | the amount of step limit. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `value` property.\nconst txObj = new IcxTransactionBuilder()\n    .stepLimit(IconConverter.toBigNumber(100000))\n```\n\n### nid()\n\nSetter method of 'nid' property.\n\n```javascript\n.nid(nid: string|BigNumber|number) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| nid | `string`, `BigNumber`, `number` | a network ID. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `nid` property.\nconst txObj = new IcxTransactionBuilder()\n    .nid(IconConverter.toBigNumber(1))\n```\n\n### nonce()\n\nSetter method of 'nonce' property.\n\n```javascript\n.nonce(nonce: string|BigNumber|number) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| nonce | `string`, `BigNumber`, `number` | a nonce value. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `nonce` property.\nconst txObj = new IcxTransactionBuilder()\n    .nonce(IconConverter.toBigNumber(1))\n```\n\n### version()\n\nSetter method of 'version' property.\n\n```javascript\n.version(version: string|BigNumber|number) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| version | `string`, `BigNumber`, `number` | the version value. |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `version` property.\nconst txObj = new IcxTransactionBuilder()\n    .version(IconConverter.toBigNumber(3))\n```\n\n### timestamp()\n\nSetter method of 'timestamp' property.\n\n```javascript\n.timestamp(version: string|BigNumber|number) =\u003e IcxTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| timestamp | `string`, `BigNumber`, `number` | timestamp value. (microsecond) |\n\n#### Returns\n`IcxTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `timestamp` property.\nconst txObj = new IcxTransactionBuilder()\n    .timestamp(1544596599371000)\n```\n\n### build()\n\nReturns an `IcxTransaction` instance which contains parameter you set.\n\n```javascript\n.build() =\u003e IcxTransaction\n```\n#### Parameters\n\nNone\n\n#### Returns\n`IcxTransaction` - Returns an `IcxTransaction` instance.\n\n#### Example\n```javascript\n// Build `IcxTransaction` instance.\nconst txObj = new IcxTransactionBuilder()\n    .from('hx46293d558d3bd489c3715e7e3648de0e35086bfd')\n    .to('hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a')\n    .value(IconAmount.of(7, IconAmount.Unit.ICX).toLoop())\n    .stepLimit(IconConverter.toBigNumber(100000))\n    .nid(IconConverter.toBigNumber(3))\n    .nonce(IconConverter.toBigNumber(1))\n    .version(IconConverter.toBigNumber(3))\n    .timestamp(1544596599371000)\n    .build()\n```\n\n## IconService.IconBuilder.MessageTransactionBuilder\n\nBuilder class for `MessageTransaction` instance. `MessageTransaction` is an object representing a transaction object used for sending message data. It extends `IcxTransaction` class, so instance parameters and methods of builder class are mostly identical to `IcxTransaction` class, except for the following:\n\n| Parameter       | Description |\n| ------------- | ----------- |\n| `data` | A message data. Data type of the data should be **lowercase hex string prefixed with '0x'.** |\n| `dataType` | Data type of `data`. Fixed string `message` is in value. |\n\nFor details of extended parameters and methods, see [IcxTransactionBuilder] section.\n\n### Constructor\n\nCreates an instance of `MessageTransactionBuilder` class.\n\n```javascript\nnew MessageTransactionBuilder()\n```\n#### Parameters\n\nNone\n\n### data()\n\nSetter method of 'data' property.\n\n```javascript\n.data(data: string) =\u003e MessageTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| data | `string` | the data (hex string) to send. |\n\n#### Returns\n`MessageTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `data` property.\nconst txObj = new MessageTransactionBuilder()\n    .data(IconConverter.fromUtf8('Hello'))\n```\n\n### build()\n\nReturns an `MessageTransaction` instance which contains parameter you set.\n\n```javascript\n.build() =\u003e MessageTransaction\n```\n#### Parameters\n\nNone\n\n#### Returns\n`MessageTransaction` - Returns an `MessageTransaction` instance.\n\n#### Example\n```javascript\n// Build `MessageTransaction` instance.\nconst txObj = new MessageTransactionBuilder()\n    .from('hx46293d558d3bd489c3715e7e3648de0e35086bfd')\n    .to('hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a')\n    .stepLimit(IconConverter.toBigNumber(100000))\n    .nid(IconConverter.toBigNumber(3))\n    .nonce(IconConverter.toBigNumber(1))\n    .version(IconConverter.toBigNumber(3))\n    .timestamp(1544596599371000)\n    .data(IconConverter.fromUtf8('Hello'))\n    .build()\n```\n\n## IconService.IconBuilder.DeployTransactionBuilder\n\nBuilder class for `DeployTransaction` instance. `DeployTransaction` is an object representing a transaction object used for deploying SCORE. It extends `IcxTransaction` class, so instance parameters and methods of builder class are mostly identical to `IcxTransaction` class, except for the following:\n\n| Parameter       | Description |\n| ------------- | ----------- |\n| `data` | A deploy object data. It contains 3 parameters: 1) `contentType` - Mime-type of the content. 2) `content` - Compressed SCORE data. 3) `params` (optional) - Function parameters delivered to on_install() or on_update() |\n| `dataType` | Data type of `data`. Fixed string `deploy` is in value. |\n\nFor details of extended parameters and methods, see [IcxTransactionBuilder] section.\n\n### Constructor\n\nCreates an instance of `DeployTransactionBuilder` class.\n\n```javascript\nnew DeployTransactionBuilder()\n```\n#### Parameters\n\nNone\n\n### contentType()\n\nSetter method of 'contentType' property in 'data'.\n\n```javascript\n.contentType(contentType: string) =\u003e DeployTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| contentType | `string` | the content type of content |\n\n#### Returns\n`DeployTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `contentType` property.\nconst txObj = new DeployTransactionBuilder()\n    .contentType('application/zip')\n```\n\n### content()\n\nSetter method of 'content' property in 'data'.\n\n```javascript\n.content(content: string) =\u003e DeployTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| content | `string` | the content to deploy. |\n\n#### Returns\n`DeployTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `content` property.\nconst txObj = new DeployTransactionBuilder()\n    .content('0x504b03040a0000000000d3a68e4d000000000000000...')\n```\n\n### params()\n\nSetter method of 'params' property in 'data'.\n\n```javascript\n.params(params: object) =\u003e DeployTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| params | `object` | Function parameters delivered to on_install() or on_update(). |\n\n#### Returns\n`DeployTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `params` property.\nconst txObj = new DeployTransactionBuilder()\n    .params({\n        initialSupply: IconConverter.toHex('100000000000'),\n        decimals: IconConverter.toHex(18),\n        name: 'StandardToken',\n        symbol: 'ST',\n    })\n```\n\n### build()\n\nReturns an `DeployTransaction` instance which contains parameter you set.\n\n```javascript\n.build() =\u003e DeployTransaction\n```\n#### Parameters\n\nNone\n\n#### Returns\n`DeployTransaction` - Returns an `DeployTransaction` instance.\n\n#### Example\n```javascript\n// Build `DeployTransaction` instance.\nconst txObj = new DeployTransactionBuilder()\n    .from('hx46293d558d3bd489c3715e7e3648de0e35086bfd')\n    .to('cx0000000000000000000000000000000000000000')\n    .stepLimit(IconConverter.toBigNumber(2500000))\n    .nid(IconConverter.toBigNumber(3))\n    .nonce(IconConverter.toBigNumber(1))\n    .version(IconConverter.toBigNumber(3))\n    .timestamp(1544596599371000)\n    .contentType('application/zip')\n    .content('0x504b03040a0000000000d3a68e4d000000000000000...')\n    .params({\n        initialSupply: IconConverter.toHex('100000000000'),\n        decimals: IconConverter.toHex(18),\n        name: 'StandardToken',\n        symbol: 'ST',\n    })\n    .build()\n```\n\n\n## IconService.IconBuilder.CallTransactionBuilder\n\nBuilder class for `CallTransaction` instance. `CallTransaction` is an object representing a transaction object used for invoking a *state-transition* function of SCORE. It extends `IcxTransaction` class, so instance parameters and methods are mostly identical to `IcxTransaction` class, except for the following:\n\n| Parameter       | Description |\n| ------------- | ----------- |\n| `data` | An object data for calling method. It contains 2 parameters: 1) `method` - The method name of SCORE API. 2) `params` (optional) - The input params for method |\n| `dataType` | Data type of `data`. Fixed string `call` is in value. |\n\nFor details of extended parameters and methods, see [IcxTransactionBuilder] section.\n\n### Constructor\n\nCreates an instance of `CallTransactionBuilder` class.\n\n```javascript\nnew CallTransactionBuilder()\n```\n#### Parameters\n\nNone\n\n\n\n### method()\n\nSetter method of 'method' property in 'data'.\n\n```javascript\n.method(method: string) =\u003e CallTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| method | `string` | the method name of SCORE API. |\n\n#### Returns\n`CallTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `method` property.\nconst txObj = new CallTransactionBuilder()\n    .method('transfer')\n```\n\n\n### params()\n\nSetter method of 'params' property in 'data'.\n\n```javascript\n.params(params: object) =\u003e CallTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| params | `object` | the input params for method. |\n\n#### Returns\n`CallTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `params` property.\nconst txObj = new CallTransactionBuilder()\n    .params({\n        _to: 'hxd008c05cbc0e689f04a5bb729a66b42377a9a497',\n        _value: IconConverter.toHex(IconAmount.of(1, IconAmount.Unit.ICX).toLoop()),\n    })\n```\n\n\n### build()\n\nReturns an `CallTransaction` instance which contains parameter you set.\n\n```javascript\n.build() =\u003e CallTransaction\n```\n#### Parameters\n\nNone\n\n#### Returns\n`CallTransaction` - Returns an `CallTransaction` instance.\n\n#### Example\n```javascript\n// Build `CallTransaction` instance.\nconst txObj = new CallTransactionBuilder()\n    .from('hx902ecb51c109183ace539f247b4ea1347fbf23b5')\n    .to('cx3502b4dadbfcd654d26d53d8463f2929c2c3948d')\n    .stepLimit(IconConverter.toBigNumber('2000000'))\n    .nid(IconConverter.toBigNumber('3'))\n    .nonce(IconConverter.toBigNumber('1'))\n    .version(IconConverter.toBigNumber('3'))\n    .timestamp((new Date()).getTime() * 1000)\n    .method('transfer')\n    .params({\n        _to: 'hxd008c05cbc0e689f04a5bb729a66b42377a9a497',\n        _value: IconConverter.toHex(IconAmount.of(1, IconAmount.Unit.ICX).toLoop()),\n    })\n    .build()\n```\n\n## IconService.IconBuilder.DepositTransactionBuilder\n\nBuilder class for `DepositTransaction` instance. `DepositTransaction` is an object representing a transaction object used for depositing/withdrawing SCORE. It extends `IcxTransaction` class, so instance parameters and methods are mostly identical to `IcxTransaction` class, except for the following:\n\n| Parameter       | Description |\n| ------------- | ----------- |\n| `data` | An object data for depositing to SCORE. It contains 2 parameters: 1) `action` - Whether to deposit or withdraw. When making a withdrawal, id is required. 2) `id` (optional) - deposit id to withdraw. needed when withdraw deposit |\n| `dataType` | Data type of `data`. Fixed string `deposit` is in value. |\n\nFor details of extended parameters and methods, see [IcxTransactionBuilder] section.\n\n### Constructor\n\nCreates an instance of `DepositTransactionBuilder` class.\n\n```javascript\nnew DepositTransactionBuilder()\n```\n#### Parameters\n\nNone\n\n\n\n### action()\n\nSetter method of 'action' property in 'data'.\n\n```javascript\n.action(action: string) =\u003e DepositTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| action | `string` | Whether to deposit or withdraw. (`add` or `withdraw`) |\n\n#### Returns\n`DepositTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `action` property.\nconst txObj = new DepositTransactionBuilder()\n    .action('add')\n```\n\n\n### id()\n\nSetter method of 'id' property in 'data'.\n\n```javascript\n.id(params: string) =\u003e DepositTransactionBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| id | `string` | Deposit id to withdraw |\n\n#### Returns\n`DepositTransactionBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `id` property.\nconst txObj = new DepositTransactionBuilder()\n    .id(\"0x8ed676ca8aeef92159f5bb1223db1e8bcf65ea8ea3d6ae9ed23e006407aa9fda\")\n```\n\n\n### build()\n\nReturns an `DepositTransaction` instance which contains parameter you set.\n\n```javascript\n.build() =\u003e DepositTransaction\n```\n#### Parameters\n\nNone\n\n#### Returns\n`DepositTransaction` - Returns an `DepositTransaction` instance.\n\n#### Example\n```javascript\n// Build `DepositTransaction` instance.\nconst txObj = new DepositTransactionBuilder()\n    .from('hx902ecb51c109183ace539f247b4ea1347fbf23b5')\n    .to('cx3502b4dadbfcd654d26d53d8463f2929c2c3948d')\n    .stepLimit(IconConverter.toBigNumber('2000000'))\n    .nid(IconConverter.toBigNumber('3'))\n    .nonce(IconConverter.toBigNumber('1'))\n    .version(IconConverter.toBigNumber('3'))\n    .timestamp((new Date()).getTime() * 1000)\n    .action('withdraw')\n    .id(\"0x8ed676ca8aeef92159f5bb1223db1e8bcf65ea8ea3d6ae9ed23e006407aa9fda\")\n    .build()\n```\n\n\n## IconService.IconBuilder.CallBuilder\n\nBuilder class for `Call` instance. `Call` is an object representing a transaction object used for invoking a *read-only* function of SCORE. The parameter details are as follows:\n\n| Parameter       | Description |\n| ------------- | ----------- |\n| `to` | a SCORE address to execute the call. |\n| `data` | an object data for calling method. It contains 2 parameters: 1) `method` - The method name of SCORE API. 2) `params` (optional) - The input params for method |\n| `dataType` | Data type of `data`. Fixed string `call` is in value. |\n\n### Constructor\n\nCreates an instance of `CallBuilder` class.\n\n```javascript\nnew CallBuilder()\n```\n#### Parameters\n\nNone\n\n### to()\n\nSetter method of 'to' property.\n\n```javascript\n.to(to: string) =\u003e CallBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| to | `string` | a SCORE address. |\n\n#### Returns\n`CallBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `to` property.\nconst txObj = new CallBuilder()\n    .to('cxc248ee72f58f7ec0e9a382379d67399f45b596c7')\n```\n\n\n### method()\n\nSetter method of 'method' property in 'data'.\n\n```javascript\n.method(method: string) =\u003e CallBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| method | `string` | the method name of SCORE API. |\n\n#### Returns\n`CallBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `method` property.\nconst txObj = new CallBuilder()\n    .method('balanceOf')\n```\n\n\n### params()\n\nSetter method of 'params' property in 'data'.\n\n```javascript\n.params(params: object) =\u003e CallBuilder\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| params | `object` | the input params for method. |\n\n#### Returns\n`CallBuilder` - Returns an instance of itself\n\n#### Example\n```javascript\n// Set `params` property.\nconst txObj = new CallBuilder()\n    .params({ \n        _owner: 'hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a' \n    })\n```\n\n\n### build()\n\nReturns an `Call` instance which contains parameter you set.\n\n```javascript\n.build() =\u003e Call\n```\n#### Parameters\n\nNone\n\n#### Returns\n`Call` - Returns an `Call` instance.\n\n#### Example\n```javascript\n// Build `Call` instance.\nconst txObj = new CallBuilder()\n    .to('cxc248ee72f58f7ec0e9a382379d67399f45b596c7')\n    .method('balanceOf')\n    .params({ _owner: 'hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a' })\n    .build()\n```\n\n\n## IconService.SignedTransaction\n\n`SignedTransaction` is a class for signing transaction object. It enables you to make signature, and signed transaction object by calling instance methods. Also, by passing `SignedTransaction` instance to [sendTransaction()], it will automatically generate transaction object including signature, and send to ICON node.\n\n### Constructor\n\nCreates an instance of `SignedTransaction` class.\n\n```javascript\nnew SignedTransaction(transaction: IcxTransaction|MessageTransaction|CallTransaction|DeployTransaction, wallet: Wallet)\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| transaction | `IcxTransaction`, `MessageTransaction`, `CallTransaction`, `DeployTransaction` | a transaction object. |\n| wallet | `Wallet` | wallet instance used for signing. |\n\n### getSignature()\n\nGet a signature string.\n\n```javascript\n.getSignature() =\u003e string\n```\n\n#### Parameters\n\nNone\n\n#### Returns\n\n`string` - a signature string.\n\n#### Example\n```javascript\n/* Returns the signature */\nconst signature = new SignedTransaction(icxTransaction, wallet).getSignature() \n// 'YV3eNgVjLFwXS65Bk...+lC90KgRBh7FtwE='\n```\n\n### getProperties()\n\nGet a raw signed transaction object.\n\n```javascript\n.getProperties() =\u003e object\n```\n\n#### Parameters\n\nNone\n\n#### Returns\n\n`object` - the raw signed transaction object.\n\n#### Example\n```javascript\n/* Returns the raw signed transaction object */\nconst signature = new SignedTransaction(icxTransaction, wallet).getProperties()\n// {\n// \tto: 'hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a',\n// \tfrom: 'hx46293d558d3bd489c3715e7e3648de0e35086bfd',\n// \tstepLimit: '0x186a0',\n// \tnid: '0x3',\n// \tversion: '0x3',\n// \ttimestamp: '0x57ccd6ba074f8',\n// \tvalue: '0x7',\n// \tnonce: '0x1',\n// \tsignature: 'YV3eNgVjLFwXS65Bk...+lC90KgRBh7FtwE=',\n// };\n```\n\n\n### getRawTransaction()\n\nGet a raw transaction object of `transaction` property.\n\n```javascript\n.getRawTransaction() =\u003e object\n```\n\n#### Parameters\n\nNone\n\n#### Returns\n\n`object` - the raw transaction object of `transaction` property.\n\n#### Example\n```javascript\n/* Returns the signed transaction object */\nconst signature = new SignedTransaction(icxTransaction, wallet).getRawTransaction()\n// {\n// \tto: 'hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a',\n// \tfrom: 'hx46293d558d3bd489c3715e7e3648de0e35086bfd',\n// \tstepLimit: '0x186a0',\n// \tnid: '0x3',\n// \tversion: '0x3',\n// \ttimestamp: '0x57ccd6ba074f8',\n// \tvalue: '0x7',\n// \tnonce: '0x1'\n// };\n```\n\n\n## IconService.HttpProvider\n\n`HttpProvider` is a class representing HTTP-based provider. It is commonly used for setting provider url of `IconService` instance. For details of network and node url, see [ICON Networks] document.\n\n\n### Constructor\n\nCreates an instance of `HttpProvider` class.\n\n```javascript\nnew HttpProvider(url: string)\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| url | `string` | ICON node url |\n\n\n## IconService.IconAmount\n\n`IconAmount` is a class representing BigNumber value and unit data. It also provides unit conversion static functions. It enables you to manage different types of numeric data easily.\n\n(`IconAmount` contains static class property called `Unit`, which has constant `number` value of different types of unit digit. `IconAmount.Unit.LOOP` is `0`, and `IconAmount.Unit.ICX` is `18`.)\n\n### Constructor\n\nCreates an instance of `IconAmount` class.\n\n```javascript\nnew IconAmount(value: string|BigNumber|number, digit: string|BigNumber|number)\n```\n\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string`, `BigNumber`, `number` | the value of amount. |\n| digit | `string`, `BigNumber`, `number` | the digit of unit. |\n\n\u003e Note: According to official document of [BigNumber.js](https://mikemcl.github.io/bignumber.js/#bignumber), it is recommended to create BigNumbers from `string` values rather than `number` values to avoid a potential loss of precision.\n\n### static of()\n\nCreates an instance of `IconAmount` class.\n\n```javascript\nIconAmount.of(value: string|BigNumber|number, digit: string|BigNumber|number) =\u003e IconAmount\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string`, `BigNumber`, `number` | the value of amount. |\n| digit | `string`, `BigNumber`, `number` | the digit of unit. |\n\n\u003e Note: According to official document of [BigNumber.js](https://mikemcl.github.io/bignumber.js/#bignumber), it is recommended to create BigNumbers from `string` values rather than `number` values to avoid a potential loss of precision.\n\n#### Returns\n`IconAmount` - IconAmount instance.\n\n#### Example\n```javascript\n// Returns IconAmount instance\nconst iconAmount = IconAmount.of('2', IconAmount.Unit.ICX);\n```\n\n\n### toString()\n\nConverts value property into string\n\n```javascript\n.toString() =\u003e string\n```\n#### Parameters\n\nNone\n\n#### Returns\n`string` - The stringified value property of IconAmount instance.\n\n#### Example\n```javascript\n// Returns stringified value property\nconst value = IconAmount.of('2', IconAmount.Unit.ICX).toString();\n```\n\n\n### getDigit()\n\nGet digit property.\n\n```javascript\n.getDigit() =\u003e number\n```\n#### Parameters\n\nNone\n\n#### Returns\n`number` - The digit property of IconAmount instance.\n\n#### Example\n```javascript\n// Returns digit property\nconst digit = IconAmount.of('2', IconAmount.Unit.ICX).getDigit();\n```\n\n\n### toLoop()\n\nGet value property converted into loop unit.\n\n```javascript\n.toLoop() =\u003e BigNumber\n```\n#### Parameters\n\nNone\n\n#### Returns\n`BigNumber` - The value property converted into loop unit.\n\n#### Example\n```javascript\n// Returns value property converted into loop unit.\nconst value = IconAmount.of('2', IconAmount.Unit.ICX).toLoop();\n```\n\n\n### convertUnit()\n\nConverts value property into custom digit\n\n```javascript\n.convertUnit(digit: string|BigNumber|number) =\u003e IconAmount\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| digit | `string`, `BigNumber`, `number` | the digit of unit. |\n\n#### Returns\n`IconAmount` - The IconAmount instance converted into custom digit.\n\n#### Example\n```javascript\n// Returns IconAmount instance converted into custom digit.\nconst value = IconAmount.of('2', IconAmount.Unit.ICX).convertUnit(IconAmount.Unit.LOOP);\n```\n\n## IconService.IconConverter\n\n`IconConverter` is a utility module which contains conversion functions.\n\n### static fromUtf8()\n\nConverts UTF-8 text to hex string with '0x' prefix.\n\n```javascript\nIconConverter.fromUtf8(value: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string` | an UTF-8 text string. |\n\n#### Returns\n`string` - a hex string with '0x' prefix\n\n#### Example\n```javascript\n// Returns hex string\nconst value = IconConverter.fromUtf8('hello')\n```\n\n\n### static toNumber()\n\nConverts string, hex string or BigNumber value to number.\n\n```javascript\nIconConverter.toNumber(value: string|BigNumber) =\u003e number\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string`, `BigNumber` | a string, hex string or BigNumber type value |\n\n#### Returns\n`number` - a value converted to number type.\n\n#### Example\n```javascript\n// Returns number value\nconst value = IconConverter.toNumber('123')\n```\n\n### static toBigNumber()\n\nConverts string, hex string or number value to BigNumber.\n\n```javascript\nIconConverter.toBigNumber(value: string|number) =\u003e BigNumber\n\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string`, `number` | a string, hex string or number type value |\n\n#### Returns\n`BigNumber` - a value converted to BigNumber type.\n\n#### Example\n```javascript\n// Returns BigNumber value\nconst value = IconConverter.toBigNumber('123')\n```\n\n### static toHex()\n\nConverts string, number or BigNumber value to hex string.\n\n```javascript\nIconConverter.toHex(value: string|number|BigNumber) =\u003e string\n\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| value | `string`, `number`, `BigNumber` | a string, number or BigNumber type value |\n\n#### Returns\n`string` - a value converted to hex string with '0x' prefix.\n\n#### Example\n```javascript\n// Returns hex string\nconst value = IconConverter.toHex('123')\n```\n\n### static toRawTransaction()\n\nConverts transaction object to raw transaction object.\n\n```javascript\nIconConverter.toRawTransaction(transaction: IcxTransaction|MessageTransaction|CallTransaction|DeployTransaction) =\u003e object\n\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| transaction | `IcxTransaction`, `MessageTransaction`, `CallTransaction`, `DeployTransaction` | a transaction object |\n\n#### Returns\n`object` - a raw transaction object.\n\n#### Example\n```javascript\nconst txObj = new IcxTransactionBuilder()\n    .from('hx46293d558d3bd489c3715e7e3648de0e35086bfd')\n    .to('hx87a90bfe8ed49e1a25184ce77fa0d9c4b0484d6a')\n    .value(IconAmount.of(7, IconAmount.Unit.ICX).toLoop())\n    .stepLimit(IconConverter.toBigNumber(100000))\n    .nid(IconConverter.toBigNumber(3))\n    .nonce(IconConverter.toBigNumber(1))\n    .version(IconConverter.toBigNumber(3))\n    .timestamp(1544596599371000)\n    .build()\n// Returns raw transaction object\nconst rawTxObj = IconConverter.toRawTransaction(txObj)\n```\n\n\n## IconService.IconHexadecimal\n\n`IconHexadecimal` is a utility module which contains functions related to hex prefix.\n\n### static is0xPrefix()\n\nCheck whether string starts with '0x' prefix.\n\n```javascript\nIconHexadecimal.is0xPrefix(str: string) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`boolean` - returns true if string starts with '0x' prefix.\n\n#### Example\n```javascript\n// Returns true if string starts with '0x' prefix\nconst value = IconHexadecimal.is0xPrefix('0x61')\n```\n\n### static isHxPrefix()\n\nCheck whether string starts with 'hx' prefix.\n\n```javascript\nIconHexadecimal.isHxPrefix(str: string) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`boolean` - returns true if string starts with 'hx' prefix.\n\n#### Example\n```javascript\n// Returns true if string starts with 'hx' prefix\nconst value = IconHexadecimal.isHxPrefix('hx902ecb51c109183ace539f247b4ea1347fbf23b5')\n```\n\n### static isCxPrefix()\n\nCheck whether string starts with 'cx' prefix.\n\n```javascript\nIconHexadecimal.isCxPrefix(str: string) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`boolean` - returns true if string starts with 'cx' prefix.\n\n#### Example\n```javascript\n// Returns true if string starts with 'cx' prefix\nconst value = IconHexadecimal.isCxPrefix('cxc248ee72f58f7ec0e9a382379d67399f45b596c7')\n```\n\n### static add0xPrefix()\n\nAdd '0x' prefix to string.\n\n```javascript\nIconHexadecimal.add0xPrefix(str: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`string` - a string with '0x' prefix.\n\n#### Example\n```javascript\n// Returns a string with '0x' prefix.\nconst value = IconHexadecimal.add0xPrefix('1234')\n```\n\n### static addHxPrefix()\n\nAdd 'hx' prefix to string.\n\n```javascript\nIconHexadecimal.addHxPrefix(str: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`string` - a string with 'hx' prefix.\n\n#### Example\n```javascript\n// Returns a string with 'hx' prefix.\nconst value = IconHexadecimal.addHxPrefix('902ecb51c109183ace539f247b4ea1347fbf23b5')\n```\n\n### static addCxPrefix()\n\nAdd 'cx' prefix to string.\n\n```javascript\nIconHexadecimal.addCxPrefix(str: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`string` - a string with 'cx' prefix.\n\n#### Example\n```javascript\n// Returns a string with 'cx' prefix.\nconst value = IconHexadecimal.addCxPrefix('c248ee72f58f7ec0e9a382379d67399f45b596c7')\n```\n\n### static remove0xPrefix()\n\nRemove '0x' prefix from string.\n\n```javascript\nIconHexadecimal.remove0xPrefix(str: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`string` - a string without '0x' prefix.\n\n#### Example\n```javascript\n// Returns a string without '0x' prefix.\nconst value = IconHexadecimal.remove0xPrefix('0x61')\n```\n\n### static removeHxPrefix()\n\nRemove 'hx' prefix from string.\n\n```javascript\nIconHexadecimal.removeHxPrefix(str: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`string` - a string without 'hx' prefix.\n\n#### Example\n```javascript\n// Returns a string without 'hx' prefix.\nconst value = IconHexadecimal.removeHxPrefix('hx902ecb51c109183ace539f247b4ea1347fbf23b5')\n```\n\n### static removeCxPrefix()\n\nRemove 'cx' prefix from string.\n\n```javascript\nIconHexadecimal.removeCxPrefix(str: string) =\u003e string\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| str | `string` | a string |\n\n#### Returns\n`string` - a string without 'cx' prefix.\n\n#### Example\n```javascript\n// Returns a string without 'cx' prefix.\nconst value = IconHexadecimal.removeCxPrefix('cxc248ee72f58f7ec0e9a382379d67399f45b596c7')\n```\n\n## IconService.IconValidator\n\n`IconValidator` is a utility module which contains validation functions.\n\n### static isPrivateKey()\n\nCheck if input value is a private key type string.\n\n```javascript\nIconValidator.isPrivateKey(privKey: any) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| privKey | `any` | an input value |\n\n#### Returns\n`boolean` - Returns true if the input value is a private key type string.\n\n#### Example\n```javascript\n// Returns true if the input value is a private key type string.\nconst isPrivateKey = IconValidator.isPrivateKey('7abca1...20a9f1')\n```\n\n### static isEoaAddress()\n\nCheck if input value is a EOA address type string.\n\n```javascript\nIconValidator.isEoaAddress(address: any) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| address | `any` | an input value |\n\n#### Returns\n`boolean` - Returns true if the input value is a EOA address type string.\n\n#### Example\n```javascript\n// Returns true if the input value is a EOA address type string.\nconst isEoaAddress = IconValidator.isEoaAddress('hxca12a...209f1')\n```\n\n### static isScoreAddress()\n\nCheck if input value is a SCORE address type string.\n\n```javascript\nIconValidator.isScoreAddress(address: any) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| address | `any` | a input value |\n\n#### Returns\n`boolean` - Returns true if the input value is a SCORE address type string.\n\n#### Example\n```javascript\n// Returns true if the input value is a SCORE address type string.\nconst isScoreAddress = IconValidator.isScoreAddress('cx1b32a...99f01')\n```\n\n### static isAddress()\n\nCheck if input value is a EOA or SCORE address type string.\n\n```javascript\nIconValidator.isAddress(address: any) =\u003e boolean\n```\n#### Parameters\n\n| Parameter       | Type | Description |\n| ------------- | ----------- | ----------- |\n| address | `any` | an input value |\n\n#### Returns\n`boolean` - Returns true if the input value is a EOA or SCORE address type string.\n\n#### Example\n```javascript\n// Returns true if the input value is a EOA or SCORE address type string.\nconst isAddress = IconValidator.isAddress('cx1b32a...99f01')\n```\n\n## BlockMonitorSpec\n\nIt's used in [IconService.monitorBlock()](#monitorblock)\n\n### Constructor\n\nCreate BlockMonitorSpec for monitoring events of the contracts.\n\n```javascript\nnew BlockMonitorSpec(\n  height: BigNumber,\n  eventFilters?: EventFilter[]\n)\n```\n\n#### Parameters\n\n| Parameter    | Type            | Description                   |\n|:-------------|:----------------|:------------------------------|\n| height       | `BigNumber`     | Block Height to start monitor |\n| eventFilters | `EventFilter[]` | Event filters to monitor      |\n\n* [EventFilter](#eventfilter)\n\n## EventMonitorSpec\n\nIt's used in [IconService.monitorEvent()](#monitorevent)\n\n### Constructor\n\nCreate EventMonitorSpec for monitoring events of the contract.\n\n```javascript\nnew EventMonitorSpec(\n  height: BigNumber,\n  eventFilter: EventFilter|EventFilter[],\n  logs?: boolean,\n  progressInterval?: number,\n);\n```\n\n#### Parameters\n\n| Parameter        | Type                           | Description                                    |\n|:-----------------|:-------------------------------|:-----------------------------------------------|\n| height           | `BigNumber`                    | Block Height to start monitor                  |\n| eventFilter      | `EventFilter`, `EventFilter[]` | Event filters to monitor                       |\n| logs             | `boolean`                      | Whether the notifications includes actual logs |\n| progressInterval | `number`                       | Block intervals to report progress             |\n\n## BTPMonitorSpec\n\nIt's used in [IconService.monitorBTP()](#monitorbtp)\n\n### Constructor\n\nCreate BTPMonitorSpec for monitoring events of the BTP blocks\n\n```javascript\nnew BTPMonitorSpec(\n  height: BigNumber,\n  networkID: BigNumber,\n  proofFlag: boolean,\n  progressInterval: number\n);\n```\n\n#### Parameters\n\n| Parameter        | Type        | Description                                    |\n|:-----------------|:------------|:-----------------------------------------------|\n| height           | `BigNumber` | Block Height to start monitor                  |\n| networkID        | `BigNumber` | BTP Block Network ID                           |\n| proofFlag        | `boolean`   | Whether the notifications includes block proof |\n| progressInterval | `number`    | Block intervals to report progress             |\n\n## EventFilter\n\n### Constructor\n\nCreate EventFilter for monitoring events from the contract.\n\n```javascript\nnew EventFilter(\n  event: string,\n  addr?: string,\n  indexed?: string[],\n  data?: string[]\n);\n```\n\n#### Parameters\n\n| Parameter | Type       | Description                              |\n|:----------|:-----------|:-----------------------------------------|\n| event     | `string`   | Event signature including name and types |\n| addr      | `string`   | Address of the contract                  |\n| indexed   | `string[]` | List of indexed data in string           |\n| data      | `string[]` | List of extra data in string             |\n\nIf the `addr` is omitted(as `undefined`) then events of all contracts will be monitored.\nYou may use `null` for ignoring values for `indexed` and `data` parameters.\n\n#### Example\n\n```javascript\nconst filter = new EventFilter(\n  \"BTPEvent(str,int,str,str)\",\n  undefined,\n  [ null, 0x1 ]\n)\n```\n\n## Monitor\n\nHandle to the monitor returned by some APIs\n* [IconService.monitorEvent](#monitorevent)\n* [IconService.monitorBlock](#monitorblock)\n* [IconService.monitorBTP](#monitorbtp)\n\n### close()\n\nIt closes opened monitor.\nThen, it stops sending notifications and reporting progress.\n\n## Error cases\n\nThere are 6 types of error cases. Details are as below:\n\n| Error code       | Description |\n| ------------- | ----------- |\n| `DATA ERROR` | Exception class related to data type. |\n| `FORMAT ERROR` | Exception class related to data format. |\n| `WALLET ERROR` | Exception class related to wallet errors.   |\n| `RPC ERROR` | Exception class related to network errors. |\n| `SCORE ERROR` | Exception class related to SCORE call error. |\n| `NETWORK ERROR` | Exception class related to network errors. |\n\n## References\n\n- [ICON JSON-RPC API v3](https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md)\n- [IRC2 Specification](https://github.com/icon-project/IIPs/blob/master/IIPS/iip-2.md)\n\n\n\u003c!-- \nLink: \n--\u003e\n\n[getBlockByHeight()]: #getblockbyheight\n[getBlockByHash()]: #getblockbyhash\n[getLastBlock()]: #getlastblock\n[sendTransaction()]: #sendtransaction\n[estimateStep()]: #estimateStep\n[getTrace()]: #getTrace\n\n[icx_getBlockByHeight]: https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_getblockbyheight\n[icx_getBlockByHash]: https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_getblockbyhash\n[icx_getLastBlock]: https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_getlastblock\n[icx_getScoreApi]: https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_getscoreapi\n[icx_getTransactionByHash]: https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_gettransactionbyhash\n[icx_getTransactionResult]: https://github.com/icon-project/goloop/blob/master/doc/jsonrpc_v3.md#icx_gettransactionresult\n[ICON Networks]: https://docs.icon.community/icon-stack/icon-networks\n\n[IconService]: #iconservice\n[IconService.IconWallet]: #iconserviceiconwallet-wallet\n[IconWallet]: #iconserviceiconwallet-wallet\n[IconService.IconBuilder]: #iconserviceiconbuilder\n[IconBuilder]: #iconserviceiconbuilder\n[IcxTransactionBuilder]: #iconserviceiconbuildericxtransactionbuilder\n[MessageTransactionBuilder]: #iconserviceiconbuildermessagetransactionbuilder\n[DeployTransactionBuilder]: #iconserviceiconbuilderdeploytransactionbuilder\n[CallTransactionBuilder]: #iconserviceiconbuildercalltransactionbuilder\n[DepositTransactionBuilder]: #iconserviceiconbuilderdeposittransactionbuilder\n[CallBuilder]: #iconserviceiconbuildercallbuilder\n[IconService.SignedTransaction]: #iconservicesignedtransaction\n[SignedTransaction]: #iconservicesignedtransaction\n[IconService.HttpProvider]: #iconservicehttpprovider\n[HttpProvider]: #iconservicehttpprovider\n[IconService.IconAmount]: #iconserviceiconamount\n[IconAmount]: #iconserviceiconamount\n[IconService.IconConverter]: #iconserviceiconconverter\n[IconConverter]: #iconserviceiconconverter\n[IconService.IconHexadecimal]: #iconserviceiconhexadecimal\n[IconHexadecimal]: #iconserviceiconhexadecimal\n[IconService.IconValidator]: #iconserviceiconvalidator\n[IconValidator]: #iconserviceiconvalidator\n[Error Cases]: #error-cases\n[References]: #references\n[BTPNotification]: https://github.com/icon-project/goloop/blob/master/doc/btp2_extension.md#block\n[BlockNotification]: https://github.com/icon-project/goloop/blob/master/doc/btp_extension.md#block\n[EventNotification]: https://github.com/icon-project/goloop/blob/master/doc/btp_extension.md#events\n","funding_links":[],"categories":["RPC API"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficon-project%2Ficon-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficon-project%2Ficon-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficon-project%2Ficon-sdk-js/lists"}