@fintekkers/ledger-models 0.4.34 → 0.4.35

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.
@@ -9,6 +9,12 @@ import * as jspb from "google-protobuf";
9
9
  export class DecimalValueProto extends jspb.Message {
10
10
  getArbitraryPrecisionValue(): string;
11
11
  setArbitraryPrecisionValue(value: string): DecimalValueProto;
12
+ getUnscaledValue(): Uint8Array | string;
13
+ getUnscaledValue_asU8(): Uint8Array;
14
+ getUnscaledValue_asB64(): string;
15
+ setUnscaledValue(value: Uint8Array | string): DecimalValueProto;
16
+ getScale(): number;
17
+ setScale(value: number): DecimalValueProto;
12
18
 
13
19
  serializeBinary(): Uint8Array;
14
20
  toObject(includeInstance?: boolean): DecimalValueProto.AsObject;
@@ -23,5 +29,7 @@ export class DecimalValueProto extends jspb.Message {
23
29
  export namespace DecimalValueProto {
24
30
  export type AsObject = {
25
31
  arbitraryPrecisionValue: string,
32
+ unscaledValue: Uint8Array | string,
33
+ scale: number,
26
34
  }
27
35
  }
@@ -75,7 +75,9 @@ proto.fintekkers.models.util.DecimalValueProto.prototype.toObject = function(opt
75
75
  */
76
76
  proto.fintekkers.models.util.DecimalValueProto.toObject = function(includeInstance, msg) {
77
77
  var f, obj = {
78
- arbitraryPrecisionValue: jspb.Message.getFieldWithDefault(msg, 10, "")
78
+ arbitraryPrecisionValue: jspb.Message.getFieldWithDefault(msg, 10, ""),
79
+ unscaledValue: msg.getUnscaledValue_asB64(),
80
+ scale: jspb.Message.getFieldWithDefault(msg, 12, 0)
79
81
  };
80
82
 
81
83
  if (includeInstance) {
@@ -116,6 +118,14 @@ proto.fintekkers.models.util.DecimalValueProto.deserializeBinaryFromReader = fun
116
118
  var value = /** @type {string} */ (reader.readString());
117
119
  msg.setArbitraryPrecisionValue(value);
118
120
  break;
121
+ case 11:
122
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
123
+ msg.setUnscaledValue(value);
124
+ break;
125
+ case 12:
126
+ var value = /** @type {number} */ (reader.readUint32());
127
+ msg.setScale(value);
128
+ break;
119
129
  default:
120
130
  reader.skipField();
121
131
  break;
@@ -152,6 +162,20 @@ proto.fintekkers.models.util.DecimalValueProto.serializeBinaryToWriter = functio
152
162
  f
153
163
  );
154
164
  }
165
+ f = message.getUnscaledValue_asU8();
166
+ if (f.length > 0) {
167
+ writer.writeBytes(
168
+ 11,
169
+ f
170
+ );
171
+ }
172
+ f = message.getScale();
173
+ if (f !== 0) {
174
+ writer.writeUint32(
175
+ 12,
176
+ f
177
+ );
178
+ }
155
179
  };
156
180
 
157
181
 
@@ -173,4 +197,64 @@ proto.fintekkers.models.util.DecimalValueProto.prototype.setArbitraryPrecisionVa
173
197
  };
174
198
 
175
199
 
200
+ /**
201
+ * optional bytes unscaled_value = 11;
202
+ * @return {!(string|Uint8Array)}
203
+ */
204
+ proto.fintekkers.models.util.DecimalValueProto.prototype.getUnscaledValue = function() {
205
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
206
+ };
207
+
208
+
209
+ /**
210
+ * optional bytes unscaled_value = 11;
211
+ * This is a type-conversion wrapper around `getUnscaledValue()`
212
+ * @return {string}
213
+ */
214
+ proto.fintekkers.models.util.DecimalValueProto.prototype.getUnscaledValue_asB64 = function() {
215
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
216
+ this.getUnscaledValue()));
217
+ };
218
+
219
+
220
+ /**
221
+ * optional bytes unscaled_value = 11;
222
+ * Note that Uint8Array is not supported on all browsers.
223
+ * @see http://caniuse.com/Uint8Array
224
+ * This is a type-conversion wrapper around `getUnscaledValue()`
225
+ * @return {!Uint8Array}
226
+ */
227
+ proto.fintekkers.models.util.DecimalValueProto.prototype.getUnscaledValue_asU8 = function() {
228
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
229
+ this.getUnscaledValue()));
230
+ };
231
+
232
+
233
+ /**
234
+ * @param {!(string|Uint8Array)} value
235
+ * @return {!proto.fintekkers.models.util.DecimalValueProto} returns this
236
+ */
237
+ proto.fintekkers.models.util.DecimalValueProto.prototype.setUnscaledValue = function(value) {
238
+ return jspb.Message.setProto3BytesField(this, 11, value);
239
+ };
240
+
241
+
242
+ /**
243
+ * optional uint32 scale = 12;
244
+ * @return {number}
245
+ */
246
+ proto.fintekkers.models.util.DecimalValueProto.prototype.getScale = function() {
247
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
248
+ };
249
+
250
+
251
+ /**
252
+ * @param {number} value
253
+ * @return {!proto.fintekkers.models.util.DecimalValueProto} returns this
254
+ */
255
+ proto.fintekkers.models.util.DecimalValueProto.prototype.setScale = function(value) {
256
+ return jspb.Message.setProto3IntField(this, 12, value);
257
+ };
258
+
259
+
176
260
  goog.object.extend(exports, proto.fintekkers.models.util);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fintekkers/ledger-models",
3
3
  "todo": "Replace the version with build script version number",
4
- "version": "0.4.34",
4
+ "version": "0.4.35",
5
5
  "description": "ledger model protos ",
6
6
  "authors": [
7
7
  "David Doherty",