Comparing version 2.2.0 to 2.3.0
@@ -15,2 +15,3 @@ /// <reference types="node" /> | ||
equals(src: Address): boolean; | ||
toBuffer: () => Buffer; | ||
toFriendlyBuffer: (args?: { | ||
@@ -17,0 +18,0 @@ bounceable?: boolean | undefined; |
@@ -106,2 +106,12 @@ "use strict"; | ||
} | ||
toBuffer = () => { | ||
const addr = Buffer.alloc(34); | ||
addr[0] = 0; | ||
addr[1] = this.workChain; | ||
addr.set(this.hash, 2); | ||
const addressWithChecksum = Buffer.alloc(36); | ||
addressWithChecksum.set(addr); | ||
addressWithChecksum.set(crc16(addr), 34); | ||
return addressWithChecksum; | ||
}; | ||
toFriendlyBuffer = (args) => { | ||
@@ -108,0 +118,0 @@ let testOnly = (args && args.testOnly !== undefined) ? args.testOnly : false; |
{ | ||
"name": "ton", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"repository": "https://github.com/ex3ndr/ton.git", | ||
@@ -5,0 +5,0 @@ "author": "Steve Korshakov <steve@korshakov.com>", |
123595
3262