@ecadlabs/tezos-parser
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -40,2 +40,6 @@ "use strict"; | ||
}; | ||
AddressToken.prototype.ToKey = function (_a) { | ||
var bytes = _a.bytes; | ||
return encoding_1.encodePubKey(bytes); | ||
}; | ||
AddressToken.prim = 'address'; | ||
@@ -42,0 +46,0 @@ return AddressToken; |
@@ -28,3 +28,2 @@ "use strict"; | ||
var token_1 = require("./token"); | ||
var encoding_1 = require("../encoding"); | ||
var MapToken = /** @class */ (function (_super) { | ||
@@ -57,3 +56,3 @@ __extends(MapToken, _super); | ||
var _a; | ||
return __assign({}, prev, (_a = {}, _a[encoding_1.encodePubKey(current.args[0].bytes)] = _this.ValueSchema.Execute(current.args[1]), _a)); | ||
return __assign({}, prev, (_a = {}, _a[_this.KeySchema.ToKey(current.args[0])] = _this.ValueSchema.Execute(current.args[1]), _a)); | ||
}, {}); | ||
@@ -60,0 +59,0 @@ }; |
@@ -32,2 +32,6 @@ "use strict"; | ||
}; | ||
StringToken.prototype.ToKey = function (_a) { | ||
var string = _a.string; | ||
return string; | ||
}; | ||
StringToken.prim = 'string'; | ||
@@ -34,0 +38,0 @@ return StringToken; |
@@ -223,2 +223,6 @@ import { Buffer } from 'buffer'; | ||
}; | ||
StringToken.prototype.ToKey = function (_a) { | ||
var string = _a.string; | ||
return string; | ||
}; | ||
StringToken.prim = 'string'; | ||
@@ -250,2 +254,6 @@ return StringToken; | ||
}; | ||
AddressToken.prototype.ToKey = function (_a) { | ||
var bytes = _a.bytes; | ||
return encodePubKey(bytes); | ||
}; | ||
AddressToken.prim = 'address'; | ||
@@ -282,3 +290,3 @@ return AddressToken; | ||
var _a; | ||
return __assign({}, prev, (_a = {}, _a[encodePubKey(current.args[0].bytes)] = _this.ValueSchema.Execute(current.args[1]), _a)); | ||
return __assign({}, prev, (_a = {}, _a[_this.KeySchema.ToKey(current.args[0])] = _this.ValueSchema.Execute(current.args[1]), _a)); | ||
}, {}); | ||
@@ -285,0 +293,0 @@ }; |
@@ -227,2 +227,6 @@ (function (global, factory) { | ||
}; | ||
StringToken.prototype.ToKey = function (_a) { | ||
var string = _a.string; | ||
return string; | ||
}; | ||
StringToken.prim = 'string'; | ||
@@ -254,2 +258,6 @@ return StringToken; | ||
}; | ||
AddressToken.prototype.ToKey = function (_a) { | ||
var bytes = _a.bytes; | ||
return encodePubKey(bytes); | ||
}; | ||
AddressToken.prim = 'address'; | ||
@@ -286,3 +294,3 @@ return AddressToken; | ||
var _a; | ||
return __assign({}, prev, (_a = {}, _a[encodePubKey(current.args[0].bytes)] = _this.ValueSchema.Execute(current.args[1]), _a)); | ||
return __assign({}, prev, (_a = {}, _a[_this.KeySchema.ToKey(current.args[0])] = _this.ValueSchema.Execute(current.args[1]), _a)); | ||
}, {}); | ||
@@ -289,0 +297,0 @@ }; |
@@ -28,2 +28,5 @@ import { Token, TokenFactory } from './token'; | ||
ExtractSchema(): string; | ||
ToKey({ bytes }: { | ||
bytes: any; | ||
}): any; | ||
} |
@@ -17,3 +17,5 @@ import { Token, TokenFactory } from './token'; | ||
readonly ValueSchema: Token; | ||
readonly KeySchema: Token; | ||
readonly KeySchema: Token & { | ||
ToKey: (any: any) => string; | ||
}; | ||
Execute(val: any[]): { | ||
@@ -20,0 +22,0 @@ [key: string]: any; |
@@ -20,2 +20,5 @@ import { Token, TokenFactory } from './token'; | ||
ExtractSchema(): string; | ||
ToKey({ string }: { | ||
string: any; | ||
}): any; | ||
} |
{ | ||
"name": "@ecadlabs/tezos-parser", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
135613
1962