From 28e0c7e8df3e0b5bb9137564eed59dced2c5a2a0 Mon Sep 17 00:00:00 2001 From: MickWang <1244134672@qq.com> Date: Thu, 4 Jun 2020 15:02:21 +0800 Subject: [PATCH] update version --- README.md | 2 +- package.json | 2 +- src/network/websocket/websocketClient.ts | 2 -- .../nativevm/ontidContractTxBuilder.ts | 23 ++++++++++++++++++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d974575b..c2d5baad 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Ontology TypeScript SDK

-

Version V1.1.1

+

Version V1.1.2

- [Overview](#overview) - [Getting Started](#getting-started) diff --git a/package.json b/package.json index 2d086978..7665daa1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/network/websocket/websocketClient.ts b/src/network/websocket/websocketClient.ts index c7edb75e..accccdf8 100644 --- a/src/network/websocket/websocketClient.ts +++ b/src/network/websocket/websocketClient.ts @@ -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)); } diff --git a/src/smartcontract/nativevm/ontidContractTxBuilder.ts b/src/smartcontract/nativevm/ontidContractTxBuilder.ts index e7e77f38..314857d5 100644 --- a/src/smartcontract/nativevm/ontidContractTxBuilder.ts +++ b/src/smartcontract/nativevm/ontidContractTxBuilder.ts @@ -15,8 +15,8 @@ * You should have received a copy of the GNU Lesser General Public License * along with The ontology. If not, see . */ -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'; @@ -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 *