Comparing version 0.0.9 to 0.0.10
import { AddressDto } from './AddressDto'; | ||
import { ReceiptSourceBuilder } from './ReceiptSourceBuilder'; | ||
export declare class AddressResolutionEntryBuilder { | ||
resolved: AddressDto; | ||
source: ReceiptSourceBuilder; | ||
resolved: AddressDto; | ||
constructor(source: ReceiptSourceBuilder, resolved: AddressDto); | ||
constructor(resolved: AddressDto, source: ReceiptSourceBuilder); | ||
static loadFromBinary(payload: Uint8Array): AddressResolutionEntryBuilder; | ||
getResolved(): AddressDto; | ||
getSource(): ReceiptSourceBuilder; | ||
getResolved(): AddressDto; | ||
getSize(): number; | ||
serialize(): Uint8Array; | ||
} |
@@ -7,24 +7,24 @@ "use strict"; | ||
var AddressResolutionEntryBuilder = (function () { | ||
function AddressResolutionEntryBuilder(source, resolved) { | ||
function AddressResolutionEntryBuilder(resolved, source) { | ||
this.resolved = resolved; | ||
this.source = source; | ||
this.resolved = resolved; | ||
} | ||
AddressResolutionEntryBuilder.loadFromBinary = function (payload) { | ||
var byteArray = Array.from(payload); | ||
var resolved = AddressDto_1.AddressDto.loadFromBinary(Uint8Array.from(byteArray)); | ||
byteArray.splice(0, resolved.getSize()); | ||
var source = ReceiptSourceBuilder_1.ReceiptSourceBuilder.loadFromBinary(Uint8Array.from(byteArray)); | ||
byteArray.splice(0, source.getSize()); | ||
var resolved = AddressDto_1.AddressDto.loadFromBinary(Uint8Array.from(byteArray)); | ||
byteArray.splice(0, resolved.getSize()); | ||
return new AddressResolutionEntryBuilder(source, resolved); | ||
return new AddressResolutionEntryBuilder(resolved, source); | ||
}; | ||
AddressResolutionEntryBuilder.prototype.getResolved = function () { | ||
return this.resolved; | ||
}; | ||
AddressResolutionEntryBuilder.prototype.getSource = function () { | ||
return this.source; | ||
}; | ||
AddressResolutionEntryBuilder.prototype.getResolved = function () { | ||
return this.resolved; | ||
}; | ||
AddressResolutionEntryBuilder.prototype.getSize = function () { | ||
var size = 0; | ||
size += this.resolved.getSize(); | ||
size += this.source.getSize(); | ||
size += this.resolved.getSize(); | ||
return size; | ||
@@ -34,6 +34,6 @@ }; | ||
var newArray = Uint8Array.from([]); | ||
var resolvedBytes = this.resolved.serialize(); | ||
newArray = GeneratorUtils_1.GeneratorUtils.concatTypedArrays(newArray, resolvedBytes); | ||
var sourceBytes = this.source.serialize(); | ||
newArray = GeneratorUtils_1.GeneratorUtils.concatTypedArrays(newArray, sourceBytes); | ||
var resolvedBytes = this.resolved.serialize(); | ||
newArray = GeneratorUtils_1.GeneratorUtils.concatTypedArrays(newArray, resolvedBytes); | ||
return newArray; | ||
@@ -40,0 +40,0 @@ }; |
import { MosaicIdDto } from './MosaicIdDto'; | ||
import { ReceiptSourceBuilder } from './ReceiptSourceBuilder'; | ||
export declare class MosaicResolutionEntryBuilder { | ||
resolved: MosaicIdDto; | ||
source: ReceiptSourceBuilder; | ||
resolved: MosaicIdDto; | ||
constructor(source: ReceiptSourceBuilder, resolved: MosaicIdDto); | ||
constructor(resolved: MosaicIdDto, source: ReceiptSourceBuilder); | ||
static loadFromBinary(payload: Uint8Array): MosaicResolutionEntryBuilder; | ||
getResolved(): MosaicIdDto; | ||
getSource(): ReceiptSourceBuilder; | ||
getResolved(): MosaicIdDto; | ||
getSize(): number; | ||
serialize(): Uint8Array; | ||
} |
@@ -7,24 +7,24 @@ "use strict"; | ||
var MosaicResolutionEntryBuilder = (function () { | ||
function MosaicResolutionEntryBuilder(source, resolved) { | ||
function MosaicResolutionEntryBuilder(resolved, source) { | ||
this.resolved = resolved; | ||
this.source = source; | ||
this.resolved = resolved; | ||
} | ||
MosaicResolutionEntryBuilder.loadFromBinary = function (payload) { | ||
var byteArray = Array.from(payload); | ||
var resolved = MosaicIdDto_1.MosaicIdDto.loadFromBinary(Uint8Array.from(byteArray)); | ||
byteArray.splice(0, resolved.getSize()); | ||
var source = ReceiptSourceBuilder_1.ReceiptSourceBuilder.loadFromBinary(Uint8Array.from(byteArray)); | ||
byteArray.splice(0, source.getSize()); | ||
var resolved = MosaicIdDto_1.MosaicIdDto.loadFromBinary(Uint8Array.from(byteArray)); | ||
byteArray.splice(0, resolved.getSize()); | ||
return new MosaicResolutionEntryBuilder(source, resolved); | ||
return new MosaicResolutionEntryBuilder(resolved, source); | ||
}; | ||
MosaicResolutionEntryBuilder.prototype.getResolved = function () { | ||
return this.resolved; | ||
}; | ||
MosaicResolutionEntryBuilder.prototype.getSource = function () { | ||
return this.source; | ||
}; | ||
MosaicResolutionEntryBuilder.prototype.getResolved = function () { | ||
return this.resolved; | ||
}; | ||
MosaicResolutionEntryBuilder.prototype.getSize = function () { | ||
var size = 0; | ||
size += this.resolved.getSize(); | ||
size += this.source.getSize(); | ||
size += this.resolved.getSize(); | ||
return size; | ||
@@ -34,6 +34,6 @@ }; | ||
var newArray = Uint8Array.from([]); | ||
var resolvedBytes = this.resolved.serialize(); | ||
newArray = GeneratorUtils_1.GeneratorUtils.concatTypedArrays(newArray, resolvedBytes); | ||
var sourceBytes = this.source.serialize(); | ||
newArray = GeneratorUtils_1.GeneratorUtils.concatTypedArrays(newArray, sourceBytes); | ||
var resolvedBytes = this.resolved.serialize(); | ||
newArray = GeneratorUtils_1.GeneratorUtils.concatTypedArrays(newArray, resolvedBytes); | ||
return newArray; | ||
@@ -40,0 +40,0 @@ }; |
{ | ||
"name": "catbuffer", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "NEM Catbuffer builders", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
866756