@leofcoin/codec-format-interface 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/exports/codec.js +12 -0
  2. package/package.json +1 -1
package/exports/codec.js CHANGED
@@ -75,6 +75,12 @@ class Codec extends BasicInterface {
75
75
  this.hashAlg = this.getHashAlg(this.name);
76
76
  this.codec = this.getCodec(this.name);
77
77
  this.codecBuffer = varint.encode(this.codec);
78
+ this.decoded = {
79
+ name: this.name,
80
+ hashAlg: this.hashAlg,
81
+ codec: this.codec,
82
+ codecBuffer: this.codecBuffer
83
+ };
78
84
  }
79
85
  fromName(name) {
80
86
  const codec = this.getCodec(name);
@@ -82,6 +88,12 @@ class Codec extends BasicInterface {
82
88
  this.codec = codec;
83
89
  this.hashAlg = this.getHashAlg(name);
84
90
  this.codecBuffer = varint.encode(this.codec);
91
+ this.decoded = {
92
+ name: this.name,
93
+ hashAlg: this.hashAlg,
94
+ codec: this.codec,
95
+ codecBuffer: this.codecBuffer
96
+ };
85
97
  }
86
98
  decode(encoded) {
87
99
  encoded = encoded || this.encoded;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/codec-format-interface",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {