@taquito/local-forging
Advanced tools
Comparing version 14.2.0 to 15.0.0-beta-RC.0
@@ -53,2 +53,4 @@ "use strict"; | ||
CODEC["OP_INCREASE_PAID_STORAGE"] = "increase_paid_storage"; | ||
CODEC["OP_UPDATE_CONSENSUS_KEY"] = "update_consensus_key"; | ||
CODEC["OP_DRAIN_DELEGATE"] = "drain_delegate"; | ||
})(CODEC = exports.CODEC || (exports.CODEC = {})); | ||
@@ -193,3 +195,3 @@ // See https://tezos.gitlab.io/whitedoc/michelson.html#full-grammar | ||
'87': 'ticket', | ||
'88': 'TICKET', | ||
'88': 'TICKET_DEPRECATED', | ||
'89': 'READ_TICKET', | ||
@@ -210,2 +212,5 @@ '8a': 'SPLIT_TICKET', | ||
'97': 'EMIT', | ||
'98': 'Lambda_rec', | ||
'99': 'LAMBDA_REC', | ||
'9a': 'TICKET', | ||
}; | ||
@@ -219,3 +224,3 @@ exports.opMappingReverse = (() => { | ||
})(); | ||
// See https://tezos.gitlab.io/api/p2p.html | ||
// See https://tezos.gitlab.io/shell/p2p_api.html?highlight=p2p | ||
exports.kindMapping = { | ||
@@ -236,2 +241,4 @@ 0x04: 'activate_account', | ||
0x71: 'increase_paid_storage', | ||
0x72: 'update_consensus_key', | ||
0x09: 'drain_delegate', | ||
}; | ||
@@ -253,2 +260,3 @@ exports.kindMappingReverse = (() => { | ||
'04': 'remove_delegate', | ||
'05': 'deposit', | ||
}; | ||
@@ -255,0 +263,0 @@ exports.entrypointMappingReverse = (() => { |
@@ -50,3 +50,5 @@ "use strict"; | ||
exports.decoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.IncreasePaidStorageSchema)(val); | ||
exports.decoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.UpdateConsensusKeySchema)(val); | ||
exports.decoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.DrainDelegateSchema)(val); | ||
exports.decoders[constants_1.CODEC.MANAGER] = operation_1.schemaDecoder(exports.decoders)(operation_1.ManagerOperationSchema); | ||
//# sourceMappingURL=decoder.js.map |
@@ -49,3 +49,5 @@ "use strict"; | ||
exports.encoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.IncreasePaidStorageSchema)(val); | ||
exports.encoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.UpdateConsensusKeySchema)(val); | ||
exports.encoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.DrainDelegateSchema)(val); | ||
exports.encoders[constants_1.CODEC.MANAGER] = operation_1.schemaEncoder(exports.encoders)(operation_1.ManagerOperationSchema); | ||
//# sourceMappingURL=encoder.js.map |
@@ -172,3 +172,3 @@ "use strict"; | ||
const encodedAnnots = Array.isArray(value.annots) ? exports.encodeAnnots(value.annots) : ''; | ||
if (value.prim === 'LAMBDA' && argsCount) { | ||
if ((value.prim === 'LAMBDA' || value.prim === 'LAMBDA_REC') && argsCount) { | ||
encodedArgs = utils_1.pad(encodedArgs.length / 2) + encodedArgs + utils_1.pad(0); | ||
@@ -195,3 +195,3 @@ } | ||
}; | ||
if (constants_1.opMapping[op] === 'LAMBDA') { | ||
if (constants_1.opMapping[op] === 'LAMBDA' || constants_1.opMapping[op] === 'LAMBDA_REC') { | ||
value.consume(4); | ||
@@ -215,3 +215,3 @@ } | ||
const args = new Array(argsCount).fill(0).map(() => exports.valueDecoder(value)); | ||
if (constants_1.opMapping[op] === 'LAMBDA') { | ||
if (constants_1.opMapping[op] === 'LAMBDA' || constants_1.opMapping[op] === 'LAMBDA_REC') { | ||
value.consume(4); | ||
@@ -218,0 +218,0 @@ } |
@@ -18,2 +18,3 @@ "use strict"; | ||
ProtocolsHash["PtKathman"] = "PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg"; | ||
ProtocolsHash["PtLimaPtL"] = "PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW"; | ||
ProtocolsHash["ProtoALpha"] = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"; | ||
@@ -34,3 +35,4 @@ })(ProtocolsHash = exports.ProtocolsHash || (exports.ProtocolsHash = {})); | ||
PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg: 14, | ||
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 15, | ||
PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW: 15, | ||
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 16, | ||
}; | ||
@@ -37,0 +39,0 @@ function ProtoInferiorTo(a, b) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.schemaDecoder = exports.schemaEncoder = exports.operationDecoder = exports.operationEncoder = exports.IncreasePaidStorageSchema = exports.TxRollupSubmitBatchSchema = exports.TxRollupOriginationSchema = exports.TransferTicketSchema = exports.RegisterGlobalConstantSchema = exports.ProposalsSchema = exports.SeedNonceRevelationSchema = exports.EndorsementSchema = exports.BallotSchema = exports.OriginationSchema = exports.TransactionSchema = exports.DelegationSchema = exports.RevealSchema = exports.ActivationSchema = exports.ManagerOperationSchema = void 0; | ||
exports.schemaDecoder = exports.schemaEncoder = exports.operationDecoder = exports.operationEncoder = exports.DrainDelegateSchema = exports.UpdateConsensusKeySchema = exports.IncreasePaidStorageSchema = exports.TxRollupSubmitBatchSchema = exports.TxRollupOriginationSchema = exports.TransferTicketSchema = exports.RegisterGlobalConstantSchema = exports.ProposalsSchema = exports.SeedNonceRevelationSchema = exports.EndorsementSchema = exports.BallotSchema = exports.OriginationSchema = exports.TransactionSchema = exports.DelegationSchema = exports.RevealSchema = exports.ActivationSchema = exports.ManagerOperationSchema = void 0; | ||
const constants_1 = require("../constants"); | ||
@@ -120,2 +120,15 @@ const utils_1 = require("@taquito/utils"); | ||
}; | ||
exports.UpdateConsensusKeySchema = { | ||
source: constants_1.CODEC.PKH, | ||
fee: constants_1.CODEC.ZARITH, | ||
counter: constants_1.CODEC.ZARITH, | ||
gas_limit: constants_1.CODEC.ZARITH, | ||
storage_limit: constants_1.CODEC.ZARITH, | ||
pk: constants_1.CODEC.PUBLIC_KEY, | ||
}; | ||
exports.DrainDelegateSchema = { | ||
consensus_key: constants_1.CODEC.PKH, | ||
delegate: constants_1.CODEC.PKH, | ||
destination: constants_1.CODEC.PKH, | ||
}; | ||
const operationEncoder = (encoders) => (operation) => { | ||
@@ -122,0 +135,0 @@ if (!(operation.kind in encoders) || !(operation.kind in constants_1.kindMappingReverse)) { |
@@ -26,2 +26,4 @@ "use strict"; | ||
const protocols_1 = require("./protocols"); | ||
const decoder_proto14_1 = require("./proto14-kathmandu/decoder-proto14"); | ||
const encoder_proto14_1 = require("./proto14-kathmandu/encoder-proto14"); | ||
var constants_2 = require("./constants"); | ||
@@ -39,11 +41,23 @@ Object.defineProperty(exports, "CODEC", { enumerable: true, get: function () { return constants_2.CODEC; } }); | ||
Object.defineProperty(exports, "ProtocolsHash", { enumerable: true, get: function () { return protocols_2.ProtocolsHash; } }); | ||
const PROTOCOL_CURRENT = protocols_1.ProtocolsHash.Psithaca2; | ||
const PROTOCOL_CURRENT = protocols_1.ProtocolsHash.PtKathman; | ||
function getCodec(codec, _proto) { | ||
return { | ||
encoder: encoder_1.encoders[codec], | ||
decoder: (hex) => { | ||
const consumer = uint8array_consumer_1.Uint8ArrayConsumer.fromHexString(hex); | ||
return decoder_1.decoders[codec](consumer); | ||
}, | ||
}; | ||
// use proto14 encoders & decoders if it's kathmandu or prior | ||
if (_proto === protocols_1.ProtocolsHash.PtKathman || protocols_1.ProtoInferiorTo(_proto, PROTOCOL_CURRENT)) { | ||
return { | ||
encoder: encoder_proto14_1.encodersProto14[codec], | ||
decoder: (hex) => { | ||
const consumer = uint8array_consumer_1.Uint8ArrayConsumer.fromHexString(hex); | ||
return decoder_proto14_1.decodersProto14[codec](consumer); | ||
}, | ||
}; | ||
} | ||
else { | ||
return { | ||
encoder: encoder_1.encoders[codec], | ||
decoder: (hex) => { | ||
const consumer = uint8array_consumer_1.Uint8ArrayConsumer.fromHexString(hex); | ||
return decoder_1.decoders[codec](consumer); | ||
}, | ||
}; | ||
} | ||
} | ||
@@ -50,0 +64,0 @@ exports.getCodec = getCodec; |
@@ -20,2 +20,4 @@ "use strict"; | ||
increase_paid_storage: operation_1.IncreasePaidStorageSchema, | ||
update_consensus_key: operation_1.UpdateConsensusKeySchema, | ||
drain_delegate: operation_1.DrainDelegateSchema, | ||
}; | ||
@@ -22,0 +24,0 @@ // Asymmetric difference: only account for things in arr2 that are not present in arr1, not vice versa |
@@ -6,5 +6,5 @@ "use strict"; | ||
exports.VERSION = { | ||
"commitHash": "22fd810dcadf5272cb7a57d65165caa0eddbc57e", | ||
"version": "14.2.0" | ||
"commitHash": "91c00d2ab471e4fbb4c654fc45435919ad9e0675", | ||
"version": "15.0.0-beta-RC.0" | ||
}; | ||
//# sourceMappingURL=version.js.map |
@@ -42,3 +42,5 @@ export declare const ENTRYPOINT_MAX_LENGTH = 31; | ||
TX_ROLLUP_BATCH_CONTENT = "tx_rollup_batch_content", | ||
OP_INCREASE_PAID_STORAGE = "increase_paid_storage" | ||
OP_INCREASE_PAID_STORAGE = "increase_paid_storage", | ||
OP_UPDATE_CONSENSUS_KEY = "update_consensus_key", | ||
OP_DRAIN_DELEGATE = "drain_delegate" | ||
} | ||
@@ -45,0 +47,0 @@ export declare const opMapping: { |
@@ -14,4 +14,5 @@ export declare enum ProtocolsHash { | ||
PtKathman = "PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg", | ||
PtLimaPtL = "PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW", | ||
ProtoALpha = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" | ||
} | ||
export declare function ProtoInferiorTo(a: ProtocolsHash, b: ProtocolsHash): boolean; |
@@ -117,2 +117,15 @@ import { Decoder } from '../decoder'; | ||
}; | ||
export declare const UpdateConsensusKeySchema: { | ||
source: CODEC; | ||
fee: CODEC; | ||
counter: CODEC; | ||
gas_limit: CODEC; | ||
storage_limit: CODEC; | ||
pk: CODEC; | ||
}; | ||
export declare const DrainDelegateSchema: { | ||
consensus_key: CODEC; | ||
delegate: CODEC; | ||
destination: CODEC; | ||
}; | ||
export declare const operationEncoder: (encoders: { | ||
@@ -119,0 +132,0 @@ [key: string]: (val: object) => string; |
@@ -16,3 +16,3 @@ /** | ||
export declare function getCodec(codec: CODEC, _proto: ProtocolsHash): { | ||
encoder: import("./encoder").Encoder<any>; | ||
encoder: import("./proto14-kathmandu/encoder-proto14").Encoder<any>; | ||
decoder: (hex: string) => any; | ||
@@ -19,0 +19,0 @@ }; |
{ | ||
"name": "@taquito/local-forging", | ||
"version": "14.2.0", | ||
"version": "15.0.0-beta-RC.0", | ||
"description": "Provide local forging functionality to be with taquito", | ||
@@ -71,7 +71,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@taquito/utils": "*", | ||
"@taquito/utils": "^15.0.0-beta-RC.0", | ||
"bignumber.js": "^9.1.0" | ||
}, | ||
"devDependencies": { | ||
"@taquito/rpc": "*", | ||
"@taquito/rpc": "^15.0.0-beta-RC.0", | ||
"@types/bluebird": "^3.5.36", | ||
@@ -109,3 +109,3 @@ "@types/estree": "^1.0.0", | ||
}, | ||
"gitHead": "01924663dda2aa0d4d49a5e43c27146b498ad40b" | ||
"gitHead": "29c1cf0f95cb2e817d01260959a83d625a8fe38d" | ||
} |
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
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
639040
65
6672
0
2
+ Added@taquito/utils@15.1.0(transitive)
+ Addedbase-x@3.0.10(transitive)
+ Addedbs58@4.0.1(transitive)
+ Addedbs58check@2.1.2(transitive)
+ Addedcipher-base@1.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedhash-base@3.1.0(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removed@noble/hashes@1.5.0(transitive)
- Removed@taquito/core@20.0.1(transitive)
- Removed@taquito/utils@20.0.1(transitive)
- Removedbase-x@4.0.0(transitive)
- Removedbs58@5.0.0(transitive)
- Removedbs58check@3.0.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)