Skip to content

Commit

Permalink
Merge pull request #190 from MickWang/master
Browse files Browse the repository at this point in the history
update version
  • Loading branch information
MickWang authored Jun 4, 2020
2 parents 25c0890 + 28e0c7e commit c23eb03
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<h1 align="center">Ontology TypeScript SDK </h1>
<h4 align="center">Version V1.1.1 </h4>
<h4 align="center">Version V1.1.2 </h4>

- [Overview](#overview)
- [Getting Started](#getting-started)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ontology-ts-sdk",
"version": "1.1.1",
"version": "1.1.2",
"description": "Comprehensive TypeScript library for the Ontology blockchain.",
"main": "./lib/index.js",
"types": "./lib/types/index.d.ts",
Expand Down
2 changes: 0 additions & 2 deletions src/network/websocket/websocketClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export class WebsocketClient {
const sendResult = await this.send(raw, this.autoClose && !waitNotify);

if (sendResult.Error !== 0) {
// tslint:disable-next-line:no-console
console.log(sendResult);
throw new Error(JSON.stringify(sendResult));
}

Expand Down
23 changes: 22 additions & 1 deletion src/smartcontract/nativevm/ontidContractTxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* You should have received a copy of the GNU Lesser General Public License
* along with The ontology. If not, see <http://www.gnu.org/licenses/>.
*/
import { RestClient } from '../..';
import { Address, PublicKey } from '../../crypto';
import RestClient from '../../network/rest/restClient';
import { DDOAttribute } from '../../transaction/ddo';
import { Transaction } from '../../transaction/transaction';
import { makeNativeContractTx } from '../../transaction/transactionUtils';
Expand Down Expand Up @@ -123,6 +123,27 @@ export function buildRegIDWithPublicKeyTx(
return tx;
}

/**
* Registers Identity.
*
* Register ontid with public key
*
* @param ontid User's ONT ID
* @param publicKey Public key
* @param gasPrice Gas price
* @param gasLimit Gas limit
* @param payer Payer
*/
export function buildRegisterOntidTx(
ontid: string,
publicKey: PublicKey,
gasPrice: string,
gasLimit: string,
payer?: Address
) {
return buildRegIDWithPublicKeyTx(ontid, publicKey, gasPrice, gasLimit, payer);
}

/**
* Register with multi controller
*
Expand Down

0 comments on commit c23eb03

Please sign in to comment.