{"id":44319045,"url":"https://github.com/ontio/ontology-go-sdk","last_synced_at":"2026-02-11T06:06:16.762Z","repository":{"id":31482572,"uuid":"128026784","full_name":"ontio/ontology-go-sdk","owner":"ontio","description":"SDK for Ontology","archived":false,"fork":false,"pushed_at":"2023-07-17T06:52:00.000Z","size":634,"stargazers_count":24,"open_issues_count":17,"forks_count":44,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-17T12:40:58.035Z","etag":null,"topics":["golang","ontology","restful-api","rpc","sdk","wallet"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ontio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-04-04T07:47:13.000Z","updated_at":"2024-07-09T09:50:40.000Z","dependencies_parsed_at":"2023-11-27T13:08:46.639Z","dependency_job_id":"1cca62c0-772c-418e-a65b-1cedc746f8d8","html_url":"https://github.com/ontio/ontology-go-sdk","commit_stats":{"total_commits":124,"total_committers":23,"mean_commits":5.391304347826087,"dds":0.6209677419354839,"last_synced_commit":"83d34f3f46abbc8310a6420dbb702fb868696f78"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/ontio/ontology-go-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontio%2Fontology-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontio%2Fontology-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontio%2Fontology-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontio%2Fontology-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ontio","download_url":"https://codeload.github.com/ontio/ontology-go-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontio%2Fontology-go-sdk/sbom","scorecard":{"id":707746,"data":{"date":"2025-08-11","repo":{"name":"github.com/ontio/ontology-go-sdk","commit":"83d34f3f46abbc8310a6420dbb702fb868696f78"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pr.yml:1","Info: no jobLevel write permissions found"],"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":"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":7,"reason":"Found 22/30 approved changesets -- score normalized to 7","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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: OEP4.wasm: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/pr.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ontio/ontology-go-sdk/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ontio/ontology-go-sdk/pr.yml/master?enable=pin","Warn: goCommand not pinned by hash: .gha.gofmt.sh:3","Warn: downloadThenRun not pinned by hash: .gha.gotest.sh:9","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned","Info:   0 out of   1 downloadThenRun 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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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"}}]},"last_synced_at":"2025-08-22T07:12:22.668Z","repository_id":31482572,"created_at":"2025-08-22T07:12:22.668Z","updated_at":"2025-08-22T07:12:22.668Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29327973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["golang","ontology","restful-api","rpc","sdk","wallet"],"created_at":"2026-02-11T06:06:16.639Z","updated_at":"2026-02-11T06:06:16.755Z","avatar_url":"https://github.com/ontio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go SDK For Ontology\n\n* [Go SDK For Ontology](#go-sdk-for-ontology)\n\t* [1. Overview](#1-overview)\n\t* [2. How to use?](#2-how-to-use)\n\t\t* [2.1 Block Chain API](#21-block-chain-api)\n\t\t\t* [2.1.1 Get current block height](#211-get-current-block-height)\n\t\t\t* [2.1.2 Get current block hash](#212-get-current-block-hash)\n\t\t\t* [2.1.3 Get block by height](#213-get-block-by-height)\n\t\t\t* [2.1.4 Get block by hash](#214-get-block-by-hash)\n\t\t\t* [2.1.5 Get transaction by transaction hash](#215-get-transaction-by-transaction-hash)\n\t\t\t* [2.1.6 Get block hash by block height](#216-get-block-hash-by-block-height)\n\t\t\t* [2.1.7 Get block height by transaction hash](#217-get-block-height-by-transaction-hash)\n\t\t\t* [2.1.8 Get transaction hashes of block by block height](#218-get-transaction-hashes-of-block-by-block-height)\n\t\t\t* [2.1.9 Get storage value of smart contract key](#219-get-storage-value-of-smart-contract-key)\n\t\t\t* [2.1.10 Get smart contract by contract address](#2110-get-smart-contract-by-contract-address)\n\t\t\t* [2.1.11 Get smart contract event by transaction hash](#2111-get-smart-contract-event-by-transaction-hash)\n\t\t\t* [2.1.12 Get all of smart contract events of block by block height](#2112-get-all-of-smart-contract-events-of-block-by-block-height)\n\t\t\t* [2.1.13 Get block merkle proof by transaction hash](#2113-get-block-merkle-proof-by-transaction-hash)\n\t\t\t* [2.1.14 Get transaction state of transaction pool](#2114-get-transaction-state-of-transaction-pool)\n\t\t\t* [2.1.15 Get transaction count in transaction pool](#2115-get-transaction-count-in-transaction-pool)\n\t\t\t* [2.1.16 Get version of Ontology](#2116-get-version-of-ontology)\n\t\t\t* [2.1.17 Get network id of Ontology](#2117-get-network-id-of-ontology)\n\t\t\t* [2.1.18 Send transaction to Ontology](#2118-send-transaction-to-ontology)\n\t\t\t* [2.19 Prepare execute transaction](#219-prepare-execute-transaction)\n\t\t* [2.2 Wallet API](#22-wallet-api)\n\t\t\t* [2.2.1 Create or Open Wallet](#221-create-or-open-wallet)\n\t\t\t* [2.2.2 Save Wallet](#222-save-wallet)\n\t\t\t* [2.2.3 New account](#223-new-account)\n\t\t\t* [2.2.4 New default setting account](#224-new-default-setting-account)\n\t\t\t* [2.2.5 New account from wif private key](#225-new-account-from-wif-private-key)\n\t\t\t* [2.2.5 Delete account](#225-delete-account)\n\t\t\t* [2.2.5 Get default account](#225-get-default-account)\n\t\t\t* [2.2.6 Set default account](#226-set-default-account)\n\t\t\t* [2.2.7 Get account by address](#227-get-account-by-address)\n\t\t\t* [2.2.8 Get account by label](#228-get-account-by-label)\n\t\t\t* [2.2.9 Get account by index](#229-get-account-by-index)\n\t\t\t* [2.2.10 Get account count of wallet](#2210-get-account-count-of-wallet)\n\t\t\t* [2.2.11 Get default account data](#2211-get-default-account-data)\n\t\t\t* [2.2.12 Get account data by address](#2212-get-account-data-by-address)\n\t\t\t* [2.2.13 Get account data by label](#2213-get-account-data-by-label)\n\t\t\t* [2.2.14 Get account data by index](#2214-get-account-data-by-index)\n\t\t\t* [2.2.15 Set account label](#2215-set-account-label)\n\t\t\t* [2.2.16 Set signature scheme of account](#2216-set-signature-scheme-of-account)\n\t\t\t* [2.2.17 Change account password](#2217-change-account-password)\n\t\t\t* [2.2.18 Import account to wallet](#2218-import-account-to-wallet)\n\t\t\t* [2.2.19 Export account to a new wallet](#2219-export-account-to-a-new-wallet)\n\t\t* [2.3 ONT Contract API](#23-ont-contract-api)\n\t\t\t* [2.3.1 Get balance](#231-get-balance)\n\t\t\t* [2.3.2 Transfer](#232-transfer)\n\t\t\t* [2.3.3 Multiple Transfer](#233-multiple-transfer)\n\t\t\t* [2.3.4 Approve](#234-approve)\n\t\t\t* [2.3.5 Approve Balance](#235-approve-balance)\n\t\t\t* [2.3.6 TransferFrom](#236-transferfrom)\n\t\t\t* [2.3.7 Get balance V2](#237-get-balance-v2)\n\t\t\t* [2.3.8 Transfer V2](#238-transfer-v2)\n\t\t\t* [2.3.9 Multiple Transfer V2](#239-multiple-transfer-v2)\n\t\t\t* [2.3.10 Approve V2](#2310-approve-v2)\n\t\t\t* [2.3.11 Allowance V2](#2311-allowance-v2)\n\t\t\t* [2.3.12 Transfer From V2](#2312-transfer-from-v2)\n\t\t* [2.4 ONG Contract API](#24-ong-contract-api)\n\t\t\t* [2.4.1 Get balance](#241-get-balance)\n\t\t\t* [2.4.2 Transfer](#242-transfer)\n\t\t\t* [2.4.3 Multiple Transfer](#243-multiple-transfer)\n\t\t\t* [2.4.4 Approve](#244-approve)\n\t\t\t* [2.4.5 Approve Balance](#245-approve-balance)\n\t\t\t* [2.4.6 TransferFrom](#246-transferfrom)\n\t\t\t* [2.4.7 Withdraw ONG](#247-withdraw-ong)\n\t\t\t* [2.4.8 Get unbound ONG](#248-get-unbound-ong)\n\t\t\t* [2.4.9 Get balance V2](#249-get-balance-v2)\n\t\t\t* [2.4.10 Transfer V2](#2410-transfer-v2)\n\t\t\t* [2.4.11 Multiple Transfer V2](#2411-multiple-transfer-v2)\n\t\t\t* [2.4.12 Approve V2](#2412-approve-v2)\n\t\t\t* [2.4.13 Approve Balance V2](#2413-approve-balance-v2)\n\t\t\t* [2.4.14 TransferFrom V2](#2414-transferfrom-v2)\n\t\t\t* [2.4.15 Withdraw ONG V2](#2415-withdraw-ong-v2)\n\t\t\t* [2.4.16 Get unbound ONG V2](#2416-get-unbound-ong-v2)\n        * [2.5 ONT ID API](#25-ont-id-api)\n\t\t\t* [2.5.1 RegID With PublicKey](#251-regid-with-publickey)\n            * [2.5.2 RegID With Controller](#252-regid-with-controller)\n            * [2.5.3 Revoke ID](#253-revoke-id)\n            * [2.5.4 Revoke ID By Controller](#254-revoke-id-by-controller)\n            * [2.5.5 Remove Controller](#255-remove-controller)\n            * [2.5.6 RegID With Attributes](#256-regid-with-attributes)\n            * [2.5.7 Add Key](#257-add-key)\n            * [2.5.8 Add Key By Index](#258-add-key-by-index)\n            * [2.5.9 Remove Key](#259-remove-key)\n            * [2.5.10 Remove Key By Index](#2510-remove-key-by-index)\n            * [2.5.11 Set Recovery](#2511-set-recovery)\n            * [2.5.12 Update Recovery](#2512-update-recovery)\n            * [2.5.13 Remove Recovery](#2513-remove-recovery)\n            * [2.5.14 AddKey By Controller](#2514-addkey-by-controller)\n            * [2.5.15 RemoveKey By Controller](#2515-removekey-by-controller)\n            * [2.5.16 AddKey By Recovery](#2516-addkey-by-recovery)\n            * [2.5.17 RemoveKey By Recovery](#2517-removekey-by-recovery)\n            * [2.5.18 Add Attributes](#2518-add-attributes)\n            * [2.5.19 Add Attributes By Index](#2519-add-attributes-by-index)\n            * [2.5.20 Remove Attribute](#2520-remove-attribute)\n            * [2.5.21 Remove Attribute By Index](#2521-remove-attribute-by-index)\n            * [2.5.22 Add Attributes By Controller](#2522-add-attributes-by-controller)\n            * [2.5.23 Remove Attributes By Controller](#2523-remove-attributes-by-controller)\n            * [2.5.24 Add New AuthKey](#2524-add-new-authkey)\n            * [2.5.25 Add NewAuth Key By Recovery](#2525-add-newauth-key-by-recovery)\n            * [2.5.26 Add New AuthKey By Controller](#2526-add-new-authkey-by-controller)\n            * [2.5.27 Set AuthKey](#2527-set-authkey)\n            * [2.5.28 Set AuthKey By Recovery](#2528-set-authkey-by-recovery)\n            * [2.5.29 Set AuthKey By Controller](#2529-set-authkey-by-controller)\n            * [2.5.30 Remove AuthKey](#2530-remove-authkey)\n            * [2.5.31 Remove AuthKey By Recovery](#2531-remove-authkey-by-recovery)\n            * [2.5.32 Remove AuthKey By Controller](#2532-remove-authkey-by-controller)\n            * [2.5.33 Add Service](#2533-add-service)\n            * [2.5.34 Update Service](#2534-update-service)\n            * [2.5.35 Remove Service](#2535-remove-service)\n            * [2.5.36 Add Context](#2536-add-context)\n            * [2.5.37 Remove Context](#2537-remove-context)\n            * [2.5.38 Verify Signature](#2538-verify-signature)\n            * [2.5.39 Verify Controller](#2539-verify-controller)\n            * [2.5.40 Get PublicKeys Json](#2540-get-publickeys-json)\n            * [2.5.41 Get Attributes Json](#2541-get-attributes-json)\n            * [2.5.42 Get Attributes](#2542-get-attributes)\n            * [2.5.43 Get Attribute ByKey](#2543-get-attribute-bykey)\n            * [2.5.44 Get Service Json](#2544-get-service-json)\n            * [2.5.45 Get KeyState](#2545-get-keystate)\n            * [2.5.46 Get Controller Json](#2546-get-controller-json)\n            * [2.5.47 Get Document Json](#2547-get-document-json)\n\t\t* [2.6 Credential API](#26-credential-api)\n\t\t\t* [2.6.1 Gen Sign Req](#261-gen-sign-req)\n\t\t\t* [2.6.2 Verify Sign Req](#262-verify-sign-req)\n\t\t\t* [2.6.3 Create Credential](#263-create-credential)\n\t\t\t* [2.6.4 Commit Credential](#264-commit-credential)\n\t\t\t* [2.6.5 Verify Credible OntId](#265-verify-credible-ontid)\n\t\t\t* [2.6.6 Verify Not Expired](#266-verify-not-expired)\n\t\t\t* [2.6.7 Verify Issuer Signature](#267-verify-issuer-signature)\n\t\t\t* [2.6.8 Verify Status](#268-verify-status)\n\t\t\t* [2.6.9 Create Presentation](#269-create-presentation)\n\t\t\t* [2.6.10 Verify Presentation](#2610-verify-presentation)\n* [Contributing](#contributing)\n\t* [Website](#website)\n\t* [License](#license)\n\n## 1. Overview\nThis is a comprehensive Go library for the Ontology blockchain. Currently, it supports local wallet management, digital asset management,  deployment/invoking of smart contracts and communication with the Ontology Blockchain. In the future it will also support more rich functions and applications.\n\n## 2. How to use?\n\nFirst, create an `OntologySDK` instance with the `NewOntologySdk` method.\n\n```\nontSdk := NewOntologySdk()\n```\n\nNext, create an rpc, rest or websocket client.\n\n```\nontSdk.NewRpcClient().SetAddress(\"http://localhost:20336\")\n```\n\nThen, call the rpc server through the sdk instance.\n\n\n### 2.1 Block Chain API\n\n#### 2.1.1 Get current block height\n\n```\nontSdk.GetCurrentBlockHeight() (uint32, error)\n```\n\n#### 2.1.2 Get current block hash\n\n```\nontSdk.GetCurrentBlockHash() (common.Uint256, error)\n```\n\n#### 2.1.3 Get block by height\n\n```\nontSdk.GetBlockByHeight(height uint32) (*types.Block, error)\n```\n\n#### 2.1.4 Get block by hash\n\n```\nontSdk.GetBlockByHash(blockHash string) (*types.Block, error)\n```\n\n#### 2.1.5 Get transaction by transaction hash\n\n```\nontSdk.GetTransaction(txHash string) (*types.Transaction, error)\n```\n\n#### 2.1.6 Get block hash by block height\n\n```\nontSdk.GetBlockHash(height uint32) (common.Uint256, error)\n```\n\n#### 2.1.7 Get block height by transaction hash\n\n```\nontSdk.GetBlockHeightByTxHash(txHash string) (uint32, error)\n```\n\n#### 2.1.8 Get transaction hashes of block by block height\n\n```\nontSdk.GetBlockTxHashesByHeight(height uint32) (*sdkcom.BlockTxHashes, error)\n```\n\n#### 2.1.9 Get storage value of smart contract key\n\n```\nontSdk.GetStorage(contractAddress string, key []byte) ([]byte, error)\n```\n\n#### 2.1.10 Get smart contract by contract address\n\n```\nontSdk.GetSmartContract(contractAddress string) (*sdkcom.SmartContract, error)\n```\n\n#### 2.1.11 Get smart contract event by transaction hash\n\n```\nontSdk.GetSmartContractEvent(txHash string) (*sdkcom.SmartContactEvent, error)\n```\n\n#### 2.1.12 Get all of smart contract events of block by block height\n\n```\nontSdk.GetSmartContractEventByHeight(height uint32) ([]*sdkcom.SmartContactEvent, error)\n```\n\n#### 2.1.13 Get block merkle proof by transaction hash\n\n```\nontSdk.GetMerkleProof(txHash string) (*sdkcom.MerkleProof, error)\n```\n\n#### 2.1.14 Get transaction state of transaction pool\n\n```\nontSdk.GetMemPoolTxState(txHash string) (*sdkcom.MemPoolTxState, error)\n```\n\n#### 2.1.15 Get transaction count in transaction pool\n\n```\nontSdk.GetMemPoolTxCount() (*sdkcom.MemPoolTxCount, error)\n```\n\n#### 2.1.16 Get version of Ontology\n\n```\nontSdk.GetVersion() (string, error)\n```\n\n#### 2.1.17 Get network id of Ontology\n\n```\nontSdk.GetNetworkId() (uint32, error)\n```\n\n#### 2.1.18 Send transaction to Ontology\n\n```\nontSdk.SendTransaction(mutTx *types.MutableTransaction) (common.Uint256, error)\n```\n\n#### 2.19 Prepare execute transaction\n\n```\nontSdk.PreExecTransaction(mutTx *types.MutableTransaction) (*sdkcom.PreExecResult, error)\n```\n\n### 2.2 Wallet API\n\n#### 2.2.1 Create or Open Wallet\n\n```\nwa, err := OpenWallet(path string) (*Wallet, error)\n```\n\nIf the path is for an existing wallet file, then open the wallet, otherwise return error.\n\n#### 2.2.2 Save Wallet\n\n```\nwa.Save() error\n```\nNote that any modifications of the wallet require calling `Save()` in order for the changes to persist.\n\n#### 2.2.3 New account\n\n```\nwa.NewAccount(keyType keypair.KeyType, curveCode byte, sigScheme s.SignatureScheme, passwd []byte) (*Account, error)\n```\n\nOntology supports three type of keys: ecdsa, sm2 and ed25519, and support 224, 256, 384, 521 bits length of key in ecdsa, but only support 256 bits length of key in sm2 and ed25519.\n\nOntology support multiple signature scheme.\n\nFor ECDSA support SHA224withECDSA, SHA256withECDSA, SHA384withECDSA, SHA512withEdDSA, SHA3-224withECDSA, SHA3-256withECDSA, SHA3-384withECDSA, SHA3-512withECDSA, RIPEMD160withECDSA;\n\nFor SM2 support SM3withSM2, and for SHA512withEdDSA.\n\n#### 2.2.4 New default setting account\n\n```\nwa.NewDefaultSettingAccount(passwd []byte) (*Account, error)\n```\n\nThe default settings for an account uses ECDSA with SHA256withECDSA as signature scheme.\n\n#### 2.2.5 New account from wif private key\n\n```\nwa.NewAccountFromWIF(wif, passwd []byte) (*Account, error)\n```\n\n#### 2.2.5 Delete account\n\n```\nwa.DeleteAccount(address string) error\n```\n\n#### 2.2.5 Get default account\n\n```\nwa.GetDefaultAccount(passwd []byte) (*Account, error)\n```\n\n#### 2.2.6 Set default account\n\n```\nwa.SetDefaultAccount(address string) error\n```\n\n#### 2.2.7 Get account by address\n\n```\nwa.GetAccountByAddress(address string, passwd []byte) (*Account, error)\n```\n\n#### 2.2.8 Get account by label\n\n```\nwa.GetAccountByLabel(label string, passwd []byte) (*Account, error)\n```\n\n#### 2.2.9 Get account by index\n\n```\nwa.GetAccountByIndex(index int, passwd []byte) (*Account, error)\n```\nNote that indexes start from 1.\n\n#### 2.2.10 Get account count of wallet\n\n```\nwa.GetAccountCount() int\n```\n\n#### 2.2.11 Get default account data\n\n```\nwa.GetDefaultAccountData() (*AccountData, error)\n```\n\n#### 2.2.12 Get account data by address\n\n```\nwa.GetAccountDataByAddress(address string) (*AccountData, error)\n```\n\n#### 2.2.13 Get account data by label\n\n```\nwa.GetAccountDataByLabel(label string) (*AccountData, error)\n```\n\n#### 2.2.14 Get account data by index\n\n```\nwa.GetAccountDataByIndex(index int) (*AccountData, error)\n```\nNote that indexes start from 1.\n\n#### 2.2.15 Set account label\n\n```\nwa.SetLabel(address, newLabel string) error\n```\n\nNote that label cannot duplicate.\n\n#### 2.2.16 Set signature scheme of account\n\n```\nwa.SetSigScheme(address string, sigScheme s.SignatureScheme) error\n```\n\n#### 2.2.17 Change account password\n\n```\nwa.ChangeAccountPassword(address string, oldPassword, newPassword []byte) error\n```\n\n#### 2.2.18 Import account to wallet\n\n```\nwa.ImportAccounts(accountDatas []*AccountData, passwds [][]byte) error\n```\n\n#### 2.2.19 Export account to a new wallet\n\n```\nwa.ExportAccounts(path string, accountDatas []*AccountData, passwds [][]byte, newScrypts ...*keypair.ScryptParam) (*Wallet, error)\n```\n\n### 2.3 ONT Contract API\n\n#### 2.3.1 Get balance\n\n```\nontSdk.Native.Ont.BalanceOf(address common.Address) (uint64, error)\n```\n\n#### 2.3.2 Transfer\n\n```\nontSdk.Native.Ont.Transfer(gasPrice, gasLimit uint64, from *Account, to common.Address, amount uint64) (common.Uint256, error)\n```\n\n#### 2.3.3 Multiple Transfer\n\n```\nontSdk.Native.Ont.MultiTransfer(gasPrice, gasLimit uint64, states []*ont.State, signer *Account) (common.Uint256, error)\n```\n\nA multi transfer does more than one transfer of ONT in one transaction.\n\n#### 2.3.4 Approve\n\n```\nontSdk.Native.Ont.Approve(gasPrice, gasLimit uint64, from *Account, to common.Address, amount uint64) (common.Uint256, error)\n```\n\n#### 2.3.5 Approve Balance\n\n```\nontSdk.Native.Ont.Allowance(from, to common.Address) (uint64, error)\n```\n\n#### 2.3.6 TransferFrom\n\n```\nontSdk.Native.Ont.TransferFrom(gasPrice, gasLimit uint64, sender *Account, from, to common.Address, amount uint64) (common.Uint256, error)\n```\n#### 2.3.7 Get balance V2\n\n```\nontSdk.Native.Ont.BalanceOfV2(address common.Address) (*big.Int, error)\n```\n\n#### 2.3.8 Transfer V2\n\n```\nontSdk.Native.Ont.TransferV2(gasPrice, gasLimit uint64, from *Account, to common.Address, amount *big.Int) (common.Uint256, error)\n```\n\n#### 2.3.9 Multiple Transfer V2\n\n```\nontSdk.Native.Ont.MultiTransferV2(gasPrice, gasLimit uint64, states []*ont.State, signer *Account) (common.Uint256, error)\n```\n\nA multi transfer does more than one transfer of ONT in one transaction.\n\n#### 2.3.10 Approve V2\n\n```\nontSdk.Native.Ont.ApproveV2(gasPrice, gasLimit uint64, from *Account, to common.Address, amount *big.Int) (common.Uint256, error)\n```\n\n#### 2.3.11 Allowance V2\n\n```\nontSdk.Native.Ont.AllowanceV2(from, to common.Address) (*big.Int, error)\n```\n\n#### 2.3.12 Transfer From V2\n\n```\nontSdk.Native.Ont.TransferFromV2(gasPrice, gasLimit uint64, sender *Account, from, to common.Address, amount *big.Int) (common.Uint256, error)\n```\n\n### 2.4 ONG Contract API\n\n\n#### 2.4.1 Get balance\n\n```\nontSdk.Native.Ong.BalanceOf(address common.Address) (uint64, error)\n```\n\n#### 2.4.2 Transfer\n\n```\nontSdk.Native.Ong.Transfer(gasPrice, gasLimit uint64, from *Account, to common.Address, amount uint64) (common.Uint256, error)\n```\n\n#### 2.4.3 Multiple Transfer\n\n```\nontSdk.Native.Ong.MultiTransfer(gasPrice, gasLimit uint64, states []*ont.State, signer *Account) (common.Uint256, error)\n```\n\nA multi transfer does more than one transfer of ONG in one transaction.\n\n#### 2.4.4 Approve\n\n```\nontSdk.Native.Ong.Approve(gasPrice, gasLimit uint64, from *Account, to common.Address, amount uint64) (common.Uint256, error)\n```\n\n#### 2.4.5 Approve Balance\n\n```\nontSdk.Native.Ong.Allowance(from, to common.Address) (uint64, error)\n```\n\n#### 2.4.6 TransferFrom\n\n```\nontSdk.Native.Ong.TransferFrom(gasPrice, gasLimit uint64, sender *Account, from, to common.Address, amount uint64) (common.Uint256, error)\n```\n\n#### 2.4.7 Withdraw ONG\n\n```\nontSdk.Native.Ong.WithdrawONG(gasPrice, gasLimit uint64, address *Account, amount uint64) (common.Uint256, error)\n```\n\n#### 2.4.8 Get unbound ONG\n\n```\nontSdk.Native.Ong.UnboundONG(address common.Address) (uint64, error)\n```\n\n#### 2.4.9 Get balance V2\n\n```\nontSdk.Native.Ong.BalanceOfV2(address common.Address) (*big.Int, error)\n```\n\n#### 2.4.10 Transfer V2\n\n```\nontSdk.Native.Ong.TransferV2(gasPrice, gasLimit uint64, from *Account, to common.Address, amount *big.Int) (common.Uint256, error)\n```\n\n#### 2.4.11 Multiple Transfer V2\n\n```\nontSdk.Native.Ong.MultiTransferV2(gasPrice, gasLimit uint64, states []*ont.State, signer *Account) (common.Uint256, error)\n```\n\nA multi transfer does more than one transfer of ONG in one transaction.\n\n#### 2.4.12 Approve V2\n\n```\nontSdk.Native.Ong.ApproveV2(gasPrice, gasLimit uint64, from *Account, to common.Address, amount *big.Int) (common.Uint256, error)\n```\n\n#### 2.4.13 Approve Balance V2\n\n```\nontSdk.Native.Ong.AllowanceV2(from, to common.Address) (*big.Int, error)\n```\n\n#### 2.4.14 TransferFrom V2\n\n```\nontSdk.Native.Ong.TransferFrom(gasPrice, gasLimit uint64, sender *Account, from, to common.Address, amount *big.Int) (common.Uint256, error)\n```\n\n#### 2.4.15 Withdraw ONG V2\n\n```\nontSdk.Native.Ong.WithdrawONG(gasPrice, gasLimit uint64, address *Account, amount *big.Int) (common.Uint256, error)\n```\n\n#### 2.4.16 Get unbound ONG V2\n\n```\nontSdk.Native.Ong.UnboundONGV2(address common.Address) (*big.Int, error)\n```\n### 2.5 ONT ID API\n\n#### 2.5.1 RegID With PublicKey\n\n```\nontSdk.Native.OntId.RegIDWithPublicKey(gasPrice, gasLimit uint64, payer *Account, ontId string, signer *Account) (common.Uint256, error)\n```\n`ontId`: registered ONT ID\n\n`signer`: public key of ONT ID and signer account\n\n#### 2.5.2 RegID With Controller\n\n```\nontSdk.Native.OntId.RegIDWithController(gasPrice, gasLimit uint64, payer *Account, ontId string, controller *ontid.Group, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: registered ONT ID\n\n`controller`:a group of ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.3 Revoke ID\n\n```\nontSdk.Native.OntId.RevokeID(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: revoked ONT ID\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.4 Revoke ID By Controller\n\n```\nontSdk.Native.OntId.RevokeIDByController(gasPrice, gasLimit uint64, payer *Account, ontId string, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: revoked ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts \n\n#### 2.5.5 Remove Controller\n\n```\nontSdk.Native.OntId.RemoveController(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.6 RegID With Attributes\n\n```\nontSdk.Native.OntId.RegIDWithAttributes(gasPrice, gasLimit uint64, payer *Account, ontId string, attributes []*DDOAttribute, signer *Account) (common.Uint256, error)\n```\n`ontId`: registered ONT ID\n\n`attributes`: attributes of ONT ID\n\n`signer`: public key of ONT ID and signer account\n\n#### 2.5.7 Add Key\n\n```\nontSdk.Native.OntId.AddKey(gasPrice, gasLimit uint64, payer *Account, ontId string, newPubKey []byte, controller string, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`newPubKey`: new public key added\n\n`controller`: controller ONT ID of this public key\n\n`signer`: public key of ONT ID and signer account\n\n#### 2.5.8 Add Key By Index\n\n```\nontSdk.Native.OntId.AddKeyByIndex(gasPrice, gasLimit uint64, payer *Account, ontId string, newPubKey []byte, index uint32, controller string, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`newPubKey`: new public key added\n\n`index`: key index of ONT ID\n\n`controller`: controller ONT ID of this public key\n\n`signer`: signer account\n\n#### 2.5.9 Remove Key\n\n```\nontSdk.Native.OntId.RemoveKey(gasPrice, gasLimit uint64, payer *Account, ontId string, removedPubKey []byte, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`removedPubKey`: public key removed\n\n`signer`: public key of ONT ID and signer account\n\n#### 2.5.10 Remove Key By Index\n\n```\nontSdk.Native.OntId.RemoveKeyByIndex(gasPrice, gasLimit uint64, payer *Account, ontId string, removedPubKey []byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`removedPubKey`: public key removed\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.11 Set Recovery\n\n```\nontSdk.Native.OntId.SetRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, recovery *ontid.Group, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`recovery`: group of recovery of ONT ID\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.12 Update Recovery\n\n```\nontSdk.Native.OntId.UpdateRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, newRecovery *ontid.Group, signers []ontid.Signer, recoverySigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`newRecovery`: new group of recovery of ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`recoverySigners`: signer accounts\n\n#### 2.5.13 Remove Recovery\n\n```\nontSdk.Native.OntId.RemoveRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.14 AddKey By Controller\n\n```\nontSdk.Native.OntId.AddKeyByController(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKey []byte, signers []ontid.Signer, controller string, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`publicKey`: new public key of ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`controller`: controller ONT ID of this public key\n\n`controllerSigners`: signer accounts\n\n#### 2.5.15 RemoveKey By Controller\n\n```\nontSdk.Native.OntId.RemoveKeyByController(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKeyIndex []byte, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`publicKeyIndex`: public key index of ONT ID removed\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.16 AddKey By Recovery\n\n```\nontSdk.Native.OntId.AddKeyByRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKey []byte, signers []ontid.Signer, controller string, recoverySigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`publicKey`: new public key of ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`controller`: controller ONT ID of this public key\n\n`recoverySigners`: signer accounts\n\n#### 2.5.17 RemoveKey By Recovery\n\n```\nontSdk.Native.OntId.RemoveKeyByRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKeyIndex uint32, signers []ontid.Signer, recoverySigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`publicKeyIndex`: public key index of ONT ID removed\n\n`signers`: signer ONT IDs and its key index\n\n`recoverySigners`: signer accounts\n\n#### 2.5.18 Add Attributes\n\n```\nontSdk.Native.OntId.AddAttributes(gasPrice, gasLimit uint64, payer *Account, ontId string, attributes []*DDOAttribute, signer *Account) (common.Uint256, error)\n``` \n`ontId`: ONT ID\n\n`attributes`: attributes of ONT ID\n\n`signer`: public key of ONT ID and signer account\n\n#### 2.5.19 Add Attributes By Index\n\n```\nontSdk.Native.OntId.AddAttributesByIndex(gasPrice, gasLimit uint64, payer *Account, ontId string, attributes []*DDOAttribute, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`attributes`: attributes of ONT ID\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.20 Remove Attribute\n\n```\nontSdk.Native.OntId.RemoveAttribute(gasPrice, gasLimit uint64, payer *Account, ontId string, removeKey []byte, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`removeKey`: key of attribute want to remove\n\n`signer`: public key of ONT ID and signer account\n\n#### 2.5.21 Remove Attribute By Index\n\n```\nontSdk.Native.OntId.RemoveAttributeByIndex(gasPrice, gasLimit uint64, payer *Account, ontId, removeKey []byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`removeKey`: key of attribute want to remove\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.22 Add Attributes By Controller\n\n```\nontSdk.Native.OntId.AddAttributesByController(gasPrice, gasLimit uint64, payer *Account, ontId string, attributes []*DDOAttribute, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`attributes`: attributes of ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.23 Remove Attributes By Controller\n\n```\nontSdk.Native.OntId.RemoveAttributesByController(gasPrice, gasLimit uint64, payer *Account, ontId string, key []byte, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`key`: key of attribute want to remove\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.24 Add New AuthKey\n\n```\nontSdk.Native.OntId.AddNewAuthKey(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKey []byte, controller string, signIndex uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`publicKey`:  public key of ONT ID\n\n`controller`: controller ONT ID of this public key\n\n`signIndex`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.25 Add NewAuth Key By Recovery\n\n```\nontSdk.Native.OntId.AddNewAuthKeyByRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKey []byte, controller string, signers []ontid.Signer, recoverySigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`publicKey`:  public key of ONT ID\n\n`controller`: controller ONT ID of this public key\n\n`signers`: signer ONT IDs and its key index\n\n`recoverySigners`: signer accounts\n\n#### 2.5.26 Add New AuthKey By Controller\n\n```\nontSdk.Native.OntId.AddNewAuthKeyByController(gasPrice, gasLimit uint64, payer *Account, ontId string, publicKey []byte, controller string, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n\n```\n`ontId`: ONT ID\n\n`publicKey`:  public key of ONT ID\n\n`controller`: controller ONT ID of this public key\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.27 Set AuthKey\n\n```\nontSdk.Native.OntId.SetAuthKey(gasPrice, gasLimit uint64, payer *Account, ontId string, index, signIndex uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`:  key index of public key want to set to auth\n\n`signIndex`: key index of ONT ID of signer\n\n`signer`: signer account\n\n#### 2.5.28 Set AuthKey By Recovery\n\n```\nontSdk.Native.OntId.SetAuthKeyByRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signers []ontid.Signer, recoverySigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`:  key index of public key want to set to auth\n\n`signers`: signer ONT IDs and its key index\n\n`recoverySigners`: signer accounts\n\n#### 2.5.29 Set AuthKey By Controller\n\n```\nontSdk.Native.OntId.SetAuthKeyByController(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`:  key index of public key want to set to auth\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.30 Remove AuthKey\n\n```\nontSdk.Native.OntId.RemoveAuthKey(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signIndex uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`:  key index of public key want to remove from auth\n\n`signIndex`: key index of ONT ID of signer\n\n`signer`: signer account\n\n#### 2.5.31 Remove AuthKey By Recovery\n\n```\nontSdk.Native.OntId.RemoveAuthKeyByRecovery(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signers []ontid.Signer, recoverySigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`:  key index of public key want to remove from auth\n\n`signers`: signer ONT IDs and its key index\n\n`recoverySigners`: signer accounts\n\n#### 2.5.32 Remove AuthKey By Controller\n\n```\nontSdk.Native.OntId.RemoveAuthKeyByController(gasPrice, gasLimit uint64, payer *Account, ontId string, index uint32, signers []ontid.Signer, controllerSigners []*Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`index`:  key index of public key want to remove from auth\n\n`signers`: signer ONT IDs and its key index\n\n`controllerSigners`: signer accounts\n\n#### 2.5.33 Add Service\n\n```\nontSdk.Native.OntId.AddService(gasPrice, gasLimit uint64, payer *Account, ontId string, serviceId, type_, serviceEndpint []byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`serviceId`:  service Id\n\n`type_`: service type\n\n`serviceEndpint`: service endpint\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.34 Update Service\n\n```\nontSdk.Native.OntId.UpdateService(gasPrice, gasLimit uint64, payer *Account, ontId string, serviceId, type_, serviceEndpint []byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`serviceId`:  service Id\n\n`type_`: service type\n\n`serviceEndpint`: service endpint\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.35 Remove Service\n\n```\nontSdk.Native.OntId.RemoveService(gasPrice, gasLimit uint64, payer *Account, ontId string, serviceId []byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`serviceId`:  service Id want to remove\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.36 Add Context\n\n```\nontSdk.Native.OntId.AddContext(gasPrice, gasLimit uint64, payer *Account, ontId string, contexts [][]byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`contexts`:  contexts want to add\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.37 Remove Context\n\n```\nontSdk.Native.OntId.RemoveContext(gasPrice, gasLimit uint64, payer *Account, ontId string, contexts [][]byte, index uint32, signer *Account) (common.Uint256, error)\n```\n`ontId`: ONT ID\n\n`contexts`:  contexts want to remove\n\n`index`: key index of ONT ID\n\n`signer`: signer account\n\n#### 2.5.38 Verify Signature\n\n```\nontSdk.Native.OntId.VerifySignature(ontId string, keyIndex uint64, account *Account) (bool, error)\n```\n`ontId`: ONT ID\n\n`keyIndex`: key index of ONT ID\n\n`account`: signer account\n\n#### 2.5.39 Verify Controller\n\n```\nontSdk.Native.OntId.VerifyController(ontId string, signers []ontid.Signer, accounts []*Account) (bool, error)\n```\n`ontId`: ONT ID\n\n`signers`: signer ONT IDs and its key index\n\n`accounts`: signer accounts\n\n#### 2.5.40 Get PublicKeys Json\n\n```\nontSdk.Native.OntId.GetPublicKeysJson(ontId string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n#### 2.5.41 Get Attributes Json\n\n```\nontSdk.Native.OntId.GetAttributesJson(ontId string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n#### 2.5.42 Get Attributes\n\n```\nontSdk.Native.OntId.GetAttributes(ontId string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n#### 2.5.43 Get Attribute ByKey\n\n```\nontSdk.Native.OntId.GetAttributeByKey(ontId, key string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n`key`: key of attribute want to query\n\n#### 2.5.44 Get Service Json\n\n```\nontSdk.Native.OntId.GetServiceJson(ontId string, serviceId string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n`serviceId`: service Id want to query\n\n#### 2.5.45 Get KeyState\n\n```\nontSdk.Native.OntId.GetKeyState(ontId string, keyIndex int) (string, error)\n```\n`ontId`: ONT ID\n\n`keyIndex`: key index of ONT ID\n\n#### 2.5.46 Get Controller Json\n\n```\nontSdk.Native.OntId.GetControllerJson(ontId string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n#### 2.5.47 Get Document Json\n\n```\nontSdk.Native.OntId.GetDocumentJson(ontId string) ([]byte, error)\n```\n`ontId`: ONT ID\n\n### 2.6 Credential API\n\n#### 2.6.1 Gen Sign Req\n\n```\nontSdk.Credential.GenSignReq(credentialSubject interface{}, ontId string, signer *Account) (*Request, error)\n```\n`credentialSubject`: [credentialSubject of Credential](https://www.w3.org/TR/vc-data-model/#credential-subject)\n\n`ontId`: holder ONT ID\n\n`signer`: signer account\n\n#### 2.6.2 Verify Sign Req\n\n```\nontSdk.Credential.VerifySignReq(request *Request) error\n```\n`request`: result of GenSignReq\n\n#### 2.6.3 Create Credential\n\n```\nontSdk.Credential.CreateCredential(contexts []string, types []string, credentialSubject interface{}, issuerId string, expirationDateTimestamp int64, signer *Account) (*VerifiableCredential, uint32, error)\n```\n`contexts`: [definition](https://www.w3.org/TR/vc-data-model/#contexts)\n\n`types`: [definition](https://www.w3.org/TR/vc-data-model/#types)\n\n`credentialSubject`: [credentialSubject of Credential](https://www.w3.org/TR/vc-data-model/#credential-subject)\n\n`issuerId`: ONT ID of issuer\n\n`expirationDateTimestamp`: unix of expiration date timestamp\n\n`signer`: signer account\n\n#### 2.6.4 Commit Credential\n\n```\nontSdk.Credential.CommitCredential(gasPrice, gasLimit uint64, credentialId, issuerId, holderId string, index uint32, signer, payer *Account) (common.Uint256, error)\n```\n`credentialId`: Id of credential\n\n`issuerId`: ONT ID of issuer\n\n`holderId`: ONT ID of holder\n\n`index`: key index of issuer used to sign tx\n\n`signer`: signer account\n\n#### 2.6.5 Verify Credible OntId\n\n```\nontSdk.Credential.VerifyCredibleOntId(credibleOntIds []string, credential *VerifiableCredential) error\n```\n`credibleOntIds`: credible ONT ID list\n\n`credential`: [definition](https://www.w3.org/TR/vc-data-model/)\n\n#### 2.6.6 Verify Not Expired\n\n```\nontSdk.Credential.VerifyNotExpired(credential *VerifiableCredential) error\n```\n`credential`: [definition](https://www.w3.org/TR/vc-data-model/)\n\n#### 2.6.7 Verify Issuer Signature\n\n```\nontSdk.Credential.VerifyIssuerSignature(credential *VerifiableCredential) error\n```\n`credential`: [definition](https://www.w3.org/TR/vc-data-model/)\n\n#### 2.6.8 Verify Status\n\n```\nontSdk.Credential.VerifyStatus(credential *VerifiableCredential) error\n```\n`credential`: [definition](https://www.w3.org/TR/vc-data-model/)\n\n#### 2.6.9 Create Presentation\n\n```\nontSdk.Credential.CreatePresentation(credentials []*VerifiableCredential, contexts, types []string, holder string, signers []*Account) (*Presentation, error)\n```\n`credentials`: credential list\n\n`contexts`: [definition](https://www.w3.org/TR/vc-data-model/#contexts)\n\n`types`: [definition](https://www.w3.org/TR/vc-data-model/#types)\n\n`holder`: ONTID of holder\n\n`signers`: signer accounts\n\n#### 2.6.10 Verify Presentation\n\n```\nontSdk.Credential.VerifyPresentation(presentation *Presentation, credibleOntIds []string) error\n```\n`presentation`: [definition](https://www.w3.org/TR/vc-data-model/#presentations-0)\n\n`credibleOntIds`: credible ONT ID list\n\n# Contributing\n\nCan I contribute patches to the Ontology project?\n\nYes! We appreciate your help!\n\nPlease open a pull request with signed-off commits. This means adding a line that\nsays \"Signed-off-by: Name \u003cemail\u003e\" at the end of each commit, indicating that you\nwrote the code and have the right to pass it on as an open source patch.\nIf you don't sign off your patches, we will not accept them.\n\nYou can also send your patches as emails to the developer mailing list.\nPlease join the Ontology mailing list or forum and talk to us about it.\n\nAlso, please write good git commit messages. A good commit message\nlooks like this:\n\n  Header line: explain the commit in one line\n\n  The body of the commit message should be a few lines of text, explaining things\n  in more detail, possibly giving some background about the issue\n  being fixed, etc.\n\n  The body of the commit message can be several paragraphs long, and\n  should use proper word-wrapping and keep the columns shorter than about\n  74 characters or so. That way \"git log\" will show things\n  nicely even when it's indented.\n\n  Make sure you explain your solution and why you're doing what you're\n  doing, and not just what you're doing. Reviewers (and your\n  future self) can read the patch, but might not understand why a\n  particular solution was implemented.\n\n  Reported-by: whoever-reported-it\n  Signed-off-by: Your Name \u003cyouremail@yourhost.com\u003e\n\n## Website\n\n* https://ont.io/\n\n## License\n\nThe Ontology library (i.e. all of the code outside of the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the License file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontio%2Fontology-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fontio%2Fontology-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontio%2Fontology-go-sdk/lists"}