Comparing version 1.0.0 to 1.1.0
/// <reference types="node" /> | ||
import { TonWallet } from "./TonWallet"; | ||
import { Address } from "../address/Address"; | ||
export declare type TonClientParameters = { | ||
@@ -15,3 +16,3 @@ endpoint: string; | ||
*/ | ||
getBalance(address: string): Promise<number>; | ||
getBalance(address: string | Address): Promise<number>; | ||
/** | ||
@@ -18,0 +19,0 @@ * Open Wallet |
@@ -12,3 +12,3 @@ "use strict"; | ||
this.parameters = parameters; | ||
this.#client = new TonWeb(parameters.endpoint); | ||
this.#client = new TonWeb(new TonWeb.HttpProvider(parameters.endpoint)); | ||
} | ||
@@ -21,3 +21,8 @@ /** | ||
getBalance(address) { | ||
return this.#client.getBalance(address); | ||
if (typeof address === 'string') { | ||
return this.#client.getBalance(address); | ||
} | ||
else { | ||
return this.#client.getBalance(address.toString()); | ||
} | ||
} | ||
@@ -24,0 +29,0 @@ /** |
@@ -18,2 +18,6 @@ /// <reference types="node" /> | ||
/** | ||
* Deploy Wallet Contract | ||
*/ | ||
deploy(): Promise<void>; | ||
/** | ||
* Transfer TON Coins | ||
@@ -20,0 +24,0 @@ */ |
@@ -29,2 +29,8 @@ "use strict"; | ||
/** | ||
* Deploy Wallet Contract | ||
*/ | ||
async deploy() { | ||
await this.#contract.methods.deploy().send(); | ||
} | ||
/** | ||
* Transfer TON Coins | ||
@@ -31,0 +37,0 @@ */ |
@@ -0,2 +1,4 @@ | ||
export { BitString } from './boc/BitString'; | ||
export { TonClient } from './client/TonClient'; | ||
export { TonWallet } from './client/TonWallet'; | ||
export { Address } from './address/Address'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TonWallet = exports.TonClient = void 0; | ||
exports.Address = exports.TonWallet = exports.TonClient = exports.BitString = void 0; | ||
var BitString_1 = require("./boc/BitString"); | ||
Object.defineProperty(exports, "BitString", { enumerable: true, get: function () { return BitString_1.BitString; } }); | ||
var TonClient_1 = require("./client/TonClient"); | ||
@@ -8,1 +10,3 @@ Object.defineProperty(exports, "TonClient", { enumerable: true, get: function () { return TonClient_1.TonClient; } }); | ||
Object.defineProperty(exports, "TonWallet", { enumerable: true, get: function () { return TonWallet_1.TonWallet; } }); | ||
var Address_1 = require("./address/Address"); | ||
Object.defineProperty(exports, "Address", { enumerable: true, get: function () { return Address_1.Address; } }); |
{ | ||
"name": "ton", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"repository": "https://github.com/ex3ndr/ton.git", | ||
@@ -13,5 +13,7 @@ "author": "Steve Korshakov <steve@korshakov.com>", | ||
"build": "rm -fr build && tsc --declaration", | ||
"test": "jest && karma start --single-run" | ||
"test": "jest && karma start --single-run", | ||
"release": "yarn build && yarn publish" | ||
}, | ||
"devDependencies": { | ||
"@types/bn.js": "^5.1.0", | ||
"@types/jest": "^27.0.1", | ||
@@ -34,2 +36,3 @@ "@types/node": "^16.7.10", | ||
"dependencies": { | ||
"bn.js": "^5.2.0", | ||
"ton-crypto": "^1.1.0", | ||
@@ -36,0 +39,0 @@ "tonweb": "^0.0.18" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22598
19
568
1
3
16
+ Addedbn.js@^5.2.0