@ecadlabs/tezos-parser
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -41,3 +41,6 @@ "use strict"; | ||
AddressToken.prototype.ToKey = function (_a) { | ||
var bytes = _a.bytes; | ||
var bytes = _a.bytes, string = _a.string; | ||
if (string) { | ||
return string; | ||
} | ||
return encoding_1.encodePubKey(bytes); | ||
@@ -44,0 +47,0 @@ }; |
@@ -13,2 +13,3 @@ "use strict"; | ||
var list_1 = require("./list"); | ||
var mutez_1 = require("./mutez"); | ||
exports.tokens = [ | ||
@@ -24,4 +25,5 @@ pair_1.PairToken, | ||
contract_1.ContractToken, | ||
list_1.ListToken | ||
list_1.ListToken, | ||
mutez_1.MutezToken | ||
]; | ||
//# sourceMappingURL=tokens.js.map |
@@ -254,3 +254,6 @@ import { Buffer } from 'buffer'; | ||
AddressToken.prototype.ToKey = function (_a) { | ||
var bytes = _a.bytes; | ||
var bytes = _a.bytes, string = _a.string; | ||
if (string) { | ||
return string; | ||
} | ||
return encodePubKey(bytes); | ||
@@ -405,2 +408,21 @@ }; | ||
var MutezToken = /** @class */ (function (_super) { | ||
__extends(MutezToken, _super); | ||
function MutezToken(val, idx, fac) { | ||
var _this = _super.call(this, val, idx, fac) || this; | ||
_this.val = val; | ||
_this.idx = idx; | ||
_this.fac = fac; | ||
return _this; | ||
} | ||
MutezToken.prototype.Execute = function (val) { | ||
return val.int; | ||
}; | ||
MutezToken.prototype.ExtractSchema = function () { | ||
return MutezToken.prim; | ||
}; | ||
MutezToken.prim = 'mutez'; | ||
return MutezToken; | ||
}(Token)); | ||
var tokens = [ | ||
@@ -416,3 +438,4 @@ PairToken, | ||
ContractToken, | ||
ListToken | ||
ListToken, | ||
MutezToken | ||
]; | ||
@@ -419,0 +442,0 @@ |
@@ -258,3 +258,6 @@ (function (global, factory) { | ||
AddressToken.prototype.ToKey = function (_a) { | ||
var bytes = _a.bytes; | ||
var bytes = _a.bytes, string = _a.string; | ||
if (string) { | ||
return string; | ||
} | ||
return encodePubKey(bytes); | ||
@@ -409,2 +412,21 @@ }; | ||
var MutezToken = /** @class */ (function (_super) { | ||
__extends(MutezToken, _super); | ||
function MutezToken(val, idx, fac) { | ||
var _this = _super.call(this, val, idx, fac) || this; | ||
_this.val = val; | ||
_this.idx = idx; | ||
_this.fac = fac; | ||
return _this; | ||
} | ||
MutezToken.prototype.Execute = function (val) { | ||
return val.int; | ||
}; | ||
MutezToken.prototype.ExtractSchema = function () { | ||
return MutezToken.prim; | ||
}; | ||
MutezToken.prim = 'mutez'; | ||
return MutezToken; | ||
}(Token)); | ||
var tokens = [ | ||
@@ -420,3 +442,4 @@ PairToken, | ||
ContractToken, | ||
ListToken | ||
ListToken, | ||
MutezToken | ||
]; | ||
@@ -423,0 +446,0 @@ |
@@ -28,5 +28,6 @@ import { Token, TokenFactory } from './token'; | ||
ExtractSchema(): string; | ||
ToKey({ bytes }: { | ||
ToKey({ bytes, string }: { | ||
bytes: any; | ||
string: any; | ||
}): any; | ||
} |
@@ -11,2 +11,3 @@ import { PairToken } from './pair'; | ||
import { ListToken } from './list'; | ||
export declare const tokens: (typeof PairToken | typeof NatToken | typeof StringToken | typeof BigMapToken | typeof AddressToken | typeof MapToken | typeof BoolToken | typeof OrToken | typeof ContractToken | typeof ListToken)[]; | ||
import { MutezToken } from './mutez'; | ||
export declare const tokens: (typeof PairToken | typeof NatToken | typeof StringToken | typeof BigMapToken | typeof AddressToken | typeof MapToken | typeof BoolToken | typeof OrToken | typeof ContractToken | typeof ListToken | typeof MutezToken)[]; |
{ | ||
"name": "@ecadlabs/tezos-parser", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"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
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
141736
62
2068