@fintekkers/ledger-models 0.2.3 → 0.2.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.
- package/node/fintekkers/models/security/identifier/identifier_type_pb.d.ts +1 -0
- package/node/fintekkers/models/security/identifier/identifier_type_pb.js +1 -0
- package/node/fintekkers/models/security/security_pb.d.ts +9 -5
- package/node/fintekkers/models/security/security_pb.js +74 -16
- package/node/fintekkers/requests/security/query_security_request_pb.d.ts +3 -0
- package/node/fintekkers/requests/security/query_security_request_pb.js +31 -1
- package/node/fintekkers/requests/valuation/curve_request_pb.d.ts +3 -0
- package/node/fintekkers/requests/valuation/curve_request_pb.js +31 -1
- package/node/wrappers/models/security/identifier.test.js +2 -0
- package/node/wrappers/models/security/identifier.test.js.map +1 -1
- package/node/wrappers/models/security/identifier.test.ts +2 -0
- package/node/wrappers/models/security/security-roundtrip.test.js +96 -12
- package/node/wrappers/models/security/security-roundtrip.test.js.map +1 -1
- package/node/wrappers/models/security/security-roundtrip.test.ts +97 -0
- package/node/wrappers/models/security/security.d.ts +25 -0
- package/node/wrappers/models/security/security.js +60 -0
- package/node/wrappers/models/security/security.js.map +1 -1
- package/node/wrappers/models/security/security.ts +65 -0
- package/package.json +1 -1
- package/node/fintekkers/models/security/security_id_pb.d.ts +0 -31
- package/node/fintekkers/models/security/security_id_pb.js +0 -199
|
@@ -13,7 +13,6 @@ import * as fintekkers_models_security_identifier_identifier_pb from "../../../f
|
|
|
13
13
|
import * as fintekkers_models_security_bond_issuance_pb from "../../../fintekkers/models/security/bond/issuance_pb";
|
|
14
14
|
import * as fintekkers_models_security_product_type_pb from "../../../fintekkers/models/security/product_type_pb";
|
|
15
15
|
import * as fintekkers_models_security_instrument_type_pb from "../../../fintekkers/models/security/instrument_type_pb";
|
|
16
|
-
import * as fintekkers_models_security_security_id_pb from "../../../fintekkers/models/security/security_id_pb";
|
|
17
16
|
import * as fintekkers_models_security_security_quantity_type_pb from "../../../fintekkers/models/security/security_quantity_type_pb";
|
|
18
17
|
import * as fintekkers_models_security_coupon_frequency_pb from "../../../fintekkers/models/security/coupon_frequency_pb";
|
|
19
18
|
import * as fintekkers_models_security_coupon_type_pb from "../../../fintekkers/models/security/coupon_type_pb";
|
|
@@ -51,9 +50,9 @@ export class SecurityProto extends jspb.Message {
|
|
|
51
50
|
getInstrumentType(): fintekkers_models_security_instrument_type_pb.InstrumentTypeProto;
|
|
52
51
|
setInstrumentType(value: fintekkers_models_security_instrument_type_pb.InstrumentTypeProto): SecurityProto;
|
|
53
52
|
clearLegsList(): void;
|
|
54
|
-
getLegsList(): Array<
|
|
55
|
-
setLegsList(value: Array<
|
|
56
|
-
addLegs(value?:
|
|
53
|
+
getLegsList(): Array<SecurityProto>;
|
|
54
|
+
setLegsList(value: Array<SecurityProto>): SecurityProto;
|
|
55
|
+
addLegs(value?: SecurityProto, index?: number): SecurityProto;
|
|
57
56
|
|
|
58
57
|
hasDeletedAt(): boolean;
|
|
59
58
|
clearDeletedAt(): void;
|
|
@@ -198,7 +197,7 @@ export namespace SecurityProto {
|
|
|
198
197
|
validTo?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.AsObject,
|
|
199
198
|
productType: fintekkers_models_security_product_type_pb.ProductTypeProto,
|
|
200
199
|
instrumentType: fintekkers_models_security_instrument_type_pb.InstrumentTypeProto,
|
|
201
|
-
legsList: Array<
|
|
200
|
+
legsList: Array<SecurityProto.AsObject>,
|
|
202
201
|
deletedAt?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.AsObject,
|
|
203
202
|
assetClass: string,
|
|
204
203
|
issuerName: string,
|
|
@@ -449,6 +448,10 @@ export namespace FrnDetailsProto {
|
|
|
449
448
|
export class IndexDetailsProto extends jspb.Message {
|
|
450
449
|
getIndexType(): fintekkers_models_security_index_index_type_pb.IndexTypeProto;
|
|
451
450
|
setIndexType(value: fintekkers_models_security_index_index_type_pb.IndexTypeProto): IndexDetailsProto;
|
|
451
|
+
clearConstituentsList(): void;
|
|
452
|
+
getConstituentsList(): Array<SecurityProto>;
|
|
453
|
+
setConstituentsList(value: Array<SecurityProto>): IndexDetailsProto;
|
|
454
|
+
addConstituents(value?: SecurityProto, index?: number): SecurityProto;
|
|
452
455
|
|
|
453
456
|
serializeBinary(): Uint8Array;
|
|
454
457
|
toObject(includeInstance?: boolean): IndexDetailsProto.AsObject;
|
|
@@ -463,6 +466,7 @@ export class IndexDetailsProto extends jspb.Message {
|
|
|
463
466
|
export namespace IndexDetailsProto {
|
|
464
467
|
export type AsObject = {
|
|
465
468
|
indexType: fintekkers_models_security_index_index_type_pb.IndexTypeProto,
|
|
469
|
+
constituentsList: Array<SecurityProto.AsObject>,
|
|
466
470
|
}
|
|
467
471
|
}
|
|
468
472
|
|
|
@@ -37,8 +37,6 @@ var fintekkers_models_security_product_type_pb = require('../../../fintekkers/mo
|
|
|
37
37
|
goog.object.extend(proto, fintekkers_models_security_product_type_pb);
|
|
38
38
|
var fintekkers_models_security_instrument_type_pb = require('../../../fintekkers/models/security/instrument_type_pb.js');
|
|
39
39
|
goog.object.extend(proto, fintekkers_models_security_instrument_type_pb);
|
|
40
|
-
var fintekkers_models_security_security_id_pb = require('../../../fintekkers/models/security/security_id_pb.js');
|
|
41
|
-
goog.object.extend(proto, fintekkers_models_security_security_id_pb);
|
|
42
40
|
var fintekkers_models_security_security_quantity_type_pb = require('../../../fintekkers/models/security/security_quantity_type_pb.js');
|
|
43
41
|
goog.object.extend(proto, fintekkers_models_security_security_quantity_type_pb);
|
|
44
42
|
var fintekkers_models_security_coupon_frequency_pb = require('../../../fintekkers/models/security/coupon_frequency_pb.js');
|
|
@@ -151,7 +149,7 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
151
149
|
* @constructor
|
|
152
150
|
*/
|
|
153
151
|
proto.fintekkers.models.security.IndexDetailsProto = function(opt_data) {
|
|
154
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
152
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.fintekkers.models.security.IndexDetailsProto.repeatedFields_, null);
|
|
155
153
|
};
|
|
156
154
|
goog.inherits(proto.fintekkers.models.security.IndexDetailsProto, jspb.Message);
|
|
157
155
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -304,7 +302,7 @@ proto.fintekkers.models.security.SecurityProto.toObject = function(includeInstan
|
|
|
304
302
|
productType: jspb.Message.getFieldWithDefault(msg, 10, 0),
|
|
305
303
|
instrumentType: jspb.Message.getFieldWithDefault(msg, 16, 0),
|
|
306
304
|
legsList: jspb.Message.toObjectList(msg.getLegsList(),
|
|
307
|
-
|
|
305
|
+
proto.fintekkers.models.security.SecurityProto.toObject, includeInstance),
|
|
308
306
|
deletedAt: (f = msg.getDeletedAt()) && fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.toObject(includeInstance, f),
|
|
309
307
|
assetClass: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
|
310
308
|
issuerName: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
|
@@ -415,8 +413,8 @@ proto.fintekkers.models.security.SecurityProto.deserializeBinaryFromReader = fun
|
|
|
415
413
|
msg.setInstrumentType(value);
|
|
416
414
|
break;
|
|
417
415
|
case 17:
|
|
418
|
-
var value = new
|
|
419
|
-
reader.readMessage(value,
|
|
416
|
+
var value = new proto.fintekkers.models.security.SecurityProto;
|
|
417
|
+
reader.readMessage(value,proto.fintekkers.models.security.SecurityProto.deserializeBinaryFromReader);
|
|
420
418
|
msg.addLegs(value);
|
|
421
419
|
break;
|
|
422
420
|
case 15:
|
|
@@ -664,7 +662,7 @@ proto.fintekkers.models.security.SecurityProto.serializeBinaryToWriter = functio
|
|
|
664
662
|
writer.writeRepeatedMessage(
|
|
665
663
|
17,
|
|
666
664
|
f,
|
|
667
|
-
|
|
665
|
+
proto.fintekkers.models.security.SecurityProto.serializeBinaryToWriter
|
|
668
666
|
);
|
|
669
667
|
}
|
|
670
668
|
f = message.getDeletedAt();
|
|
@@ -1146,17 +1144,17 @@ proto.fintekkers.models.security.SecurityProto.prototype.setInstrumentType = fun
|
|
|
1146
1144
|
|
|
1147
1145
|
|
|
1148
1146
|
/**
|
|
1149
|
-
* repeated
|
|
1150
|
-
* @return {!Array<!proto.fintekkers.models.security.
|
|
1147
|
+
* repeated SecurityProto legs = 17;
|
|
1148
|
+
* @return {!Array<!proto.fintekkers.models.security.SecurityProto>}
|
|
1151
1149
|
*/
|
|
1152
1150
|
proto.fintekkers.models.security.SecurityProto.prototype.getLegsList = function() {
|
|
1153
|
-
return /** @type{!Array<!proto.fintekkers.models.security.
|
|
1154
|
-
jspb.Message.getRepeatedWrapperField(this,
|
|
1151
|
+
return /** @type{!Array<!proto.fintekkers.models.security.SecurityProto>} */ (
|
|
1152
|
+
jspb.Message.getRepeatedWrapperField(this, proto.fintekkers.models.security.SecurityProto, 17));
|
|
1155
1153
|
};
|
|
1156
1154
|
|
|
1157
1155
|
|
|
1158
1156
|
/**
|
|
1159
|
-
* @param {!Array<!proto.fintekkers.models.security.
|
|
1157
|
+
* @param {!Array<!proto.fintekkers.models.security.SecurityProto>} value
|
|
1160
1158
|
* @return {!proto.fintekkers.models.security.SecurityProto} returns this
|
|
1161
1159
|
*/
|
|
1162
1160
|
proto.fintekkers.models.security.SecurityProto.prototype.setLegsList = function(value) {
|
|
@@ -1165,12 +1163,12 @@ proto.fintekkers.models.security.SecurityProto.prototype.setLegsList = function(
|
|
|
1165
1163
|
|
|
1166
1164
|
|
|
1167
1165
|
/**
|
|
1168
|
-
* @param {!proto.fintekkers.models.security.
|
|
1166
|
+
* @param {!proto.fintekkers.models.security.SecurityProto=} opt_value
|
|
1169
1167
|
* @param {number=} opt_index
|
|
1170
|
-
* @return {!proto.fintekkers.models.security.
|
|
1168
|
+
* @return {!proto.fintekkers.models.security.SecurityProto}
|
|
1171
1169
|
*/
|
|
1172
1170
|
proto.fintekkers.models.security.SecurityProto.prototype.addLegs = function(opt_value, opt_index) {
|
|
1173
|
-
return jspb.Message.addToRepeatedWrapperField(this, 17, opt_value, proto.fintekkers.models.security.
|
|
1171
|
+
return jspb.Message.addToRepeatedWrapperField(this, 17, opt_value, proto.fintekkers.models.security.SecurityProto, opt_index);
|
|
1174
1172
|
};
|
|
1175
1173
|
|
|
1176
1174
|
|
|
@@ -3792,6 +3790,13 @@ proto.fintekkers.models.security.FrnDetailsProto.prototype.setResetFrequency = f
|
|
|
3792
3790
|
|
|
3793
3791
|
|
|
3794
3792
|
|
|
3793
|
+
/**
|
|
3794
|
+
* List of repeated fields within this message type.
|
|
3795
|
+
* @private {!Array<number>}
|
|
3796
|
+
* @const
|
|
3797
|
+
*/
|
|
3798
|
+
proto.fintekkers.models.security.IndexDetailsProto.repeatedFields_ = [2];
|
|
3799
|
+
|
|
3795
3800
|
|
|
3796
3801
|
|
|
3797
3802
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -3823,7 +3828,9 @@ proto.fintekkers.models.security.IndexDetailsProto.prototype.toObject = function
|
|
|
3823
3828
|
*/
|
|
3824
3829
|
proto.fintekkers.models.security.IndexDetailsProto.toObject = function(includeInstance, msg) {
|
|
3825
3830
|
var f, obj = {
|
|
3826
|
-
indexType: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
|
3831
|
+
indexType: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
3832
|
+
constituentsList: jspb.Message.toObjectList(msg.getConstituentsList(),
|
|
3833
|
+
proto.fintekkers.models.security.SecurityProto.toObject, includeInstance)
|
|
3827
3834
|
};
|
|
3828
3835
|
|
|
3829
3836
|
if (includeInstance) {
|
|
@@ -3864,6 +3871,11 @@ proto.fintekkers.models.security.IndexDetailsProto.deserializeBinaryFromReader =
|
|
|
3864
3871
|
var value = /** @type {!proto.fintekkers.models.security.index.IndexTypeProto} */ (reader.readEnum());
|
|
3865
3872
|
msg.setIndexType(value);
|
|
3866
3873
|
break;
|
|
3874
|
+
case 2:
|
|
3875
|
+
var value = new proto.fintekkers.models.security.SecurityProto;
|
|
3876
|
+
reader.readMessage(value,proto.fintekkers.models.security.SecurityProto.deserializeBinaryFromReader);
|
|
3877
|
+
msg.addConstituents(value);
|
|
3878
|
+
break;
|
|
3867
3879
|
default:
|
|
3868
3880
|
reader.skipField();
|
|
3869
3881
|
break;
|
|
@@ -3900,6 +3912,14 @@ proto.fintekkers.models.security.IndexDetailsProto.serializeBinaryToWriter = fun
|
|
|
3900
3912
|
f
|
|
3901
3913
|
);
|
|
3902
3914
|
}
|
|
3915
|
+
f = message.getConstituentsList();
|
|
3916
|
+
if (f.length > 0) {
|
|
3917
|
+
writer.writeRepeatedMessage(
|
|
3918
|
+
2,
|
|
3919
|
+
f,
|
|
3920
|
+
proto.fintekkers.models.security.SecurityProto.serializeBinaryToWriter
|
|
3921
|
+
);
|
|
3922
|
+
}
|
|
3903
3923
|
};
|
|
3904
3924
|
|
|
3905
3925
|
|
|
@@ -3921,6 +3941,44 @@ proto.fintekkers.models.security.IndexDetailsProto.prototype.setIndexType = func
|
|
|
3921
3941
|
};
|
|
3922
3942
|
|
|
3923
3943
|
|
|
3944
|
+
/**
|
|
3945
|
+
* repeated SecurityProto constituents = 2;
|
|
3946
|
+
* @return {!Array<!proto.fintekkers.models.security.SecurityProto>}
|
|
3947
|
+
*/
|
|
3948
|
+
proto.fintekkers.models.security.IndexDetailsProto.prototype.getConstituentsList = function() {
|
|
3949
|
+
return /** @type{!Array<!proto.fintekkers.models.security.SecurityProto>} */ (
|
|
3950
|
+
jspb.Message.getRepeatedWrapperField(this, proto.fintekkers.models.security.SecurityProto, 2));
|
|
3951
|
+
};
|
|
3952
|
+
|
|
3953
|
+
|
|
3954
|
+
/**
|
|
3955
|
+
* @param {!Array<!proto.fintekkers.models.security.SecurityProto>} value
|
|
3956
|
+
* @return {!proto.fintekkers.models.security.IndexDetailsProto} returns this
|
|
3957
|
+
*/
|
|
3958
|
+
proto.fintekkers.models.security.IndexDetailsProto.prototype.setConstituentsList = function(value) {
|
|
3959
|
+
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
3960
|
+
};
|
|
3961
|
+
|
|
3962
|
+
|
|
3963
|
+
/**
|
|
3964
|
+
* @param {!proto.fintekkers.models.security.SecurityProto=} opt_value
|
|
3965
|
+
* @param {number=} opt_index
|
|
3966
|
+
* @return {!proto.fintekkers.models.security.SecurityProto}
|
|
3967
|
+
*/
|
|
3968
|
+
proto.fintekkers.models.security.IndexDetailsProto.prototype.addConstituents = function(opt_value, opt_index) {
|
|
3969
|
+
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.fintekkers.models.security.SecurityProto, opt_index);
|
|
3970
|
+
};
|
|
3971
|
+
|
|
3972
|
+
|
|
3973
|
+
/**
|
|
3974
|
+
* Clears the list making it empty but non-null.
|
|
3975
|
+
* @return {!proto.fintekkers.models.security.IndexDetailsProto} returns this
|
|
3976
|
+
*/
|
|
3977
|
+
proto.fintekkers.models.security.IndexDetailsProto.prototype.clearConstituentsList = function() {
|
|
3978
|
+
return this.setConstituentsList([]);
|
|
3979
|
+
};
|
|
3980
|
+
|
|
3981
|
+
|
|
3924
3982
|
|
|
3925
3983
|
|
|
3926
3984
|
|
|
@@ -30,6 +30,8 @@ export class QuerySecurityRequestProto extends jspb.Message {
|
|
|
30
30
|
setAsOf(value?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto): QuerySecurityRequestProto;
|
|
31
31
|
getNameFilter(): string;
|
|
32
32
|
setNameFilter(value: string): QuerySecurityRequestProto;
|
|
33
|
+
getLookthrough(): boolean;
|
|
34
|
+
setLookthrough(value: boolean): QuerySecurityRequestProto;
|
|
33
35
|
|
|
34
36
|
serializeBinary(): Uint8Array;
|
|
35
37
|
toObject(includeInstance?: boolean): QuerySecurityRequestProto.AsObject;
|
|
@@ -49,5 +51,6 @@ export namespace QuerySecurityRequestProto {
|
|
|
49
51
|
searchSecurityInput?: fintekkers_models_position_position_filter_pb.PositionFilterProto.AsObject,
|
|
50
52
|
asOf?: fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.AsObject,
|
|
51
53
|
nameFilter: string,
|
|
54
|
+
lookthrough: boolean,
|
|
52
55
|
}
|
|
53
56
|
}
|
|
@@ -94,7 +94,8 @@ proto.fintekkers.requests.security.QuerySecurityRequestProto.toObject = function
|
|
|
94
94
|
fintekkers_models_util_uuid_pb.UUIDProto.toObject, includeInstance),
|
|
95
95
|
searchSecurityInput: (f = msg.getSearchSecurityInput()) && fintekkers_models_position_position_filter_pb.PositionFilterProto.toObject(includeInstance, f),
|
|
96
96
|
asOf: (f = msg.getAsOf()) && fintekkers_models_util_local_timestamp_pb.LocalTimestampProto.toObject(includeInstance, f),
|
|
97
|
-
nameFilter: jspb.Message.getFieldWithDefault(msg, 24, "")
|
|
97
|
+
nameFilter: jspb.Message.getFieldWithDefault(msg, 24, ""),
|
|
98
|
+
lookthrough: jspb.Message.getBooleanFieldWithDefault(msg, 25, false)
|
|
98
99
|
};
|
|
99
100
|
|
|
100
101
|
if (includeInstance) {
|
|
@@ -158,6 +159,10 @@ proto.fintekkers.requests.security.QuerySecurityRequestProto.deserializeBinaryFr
|
|
|
158
159
|
var value = /** @type {string} */ (reader.readString());
|
|
159
160
|
msg.setNameFilter(value);
|
|
160
161
|
break;
|
|
162
|
+
case 25:
|
|
163
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
164
|
+
msg.setLookthrough(value);
|
|
165
|
+
break;
|
|
161
166
|
default:
|
|
162
167
|
reader.skipField();
|
|
163
168
|
break;
|
|
@@ -232,6 +237,13 @@ proto.fintekkers.requests.security.QuerySecurityRequestProto.serializeBinaryToWr
|
|
|
232
237
|
f
|
|
233
238
|
);
|
|
234
239
|
}
|
|
240
|
+
f = message.getLookthrough();
|
|
241
|
+
if (f) {
|
|
242
|
+
writer.writeBool(
|
|
243
|
+
25,
|
|
244
|
+
f
|
|
245
|
+
);
|
|
246
|
+
}
|
|
235
247
|
};
|
|
236
248
|
|
|
237
249
|
|
|
@@ -401,4 +413,22 @@ proto.fintekkers.requests.security.QuerySecurityRequestProto.prototype.setNameFi
|
|
|
401
413
|
};
|
|
402
414
|
|
|
403
415
|
|
|
416
|
+
/**
|
|
417
|
+
* optional bool lookthrough = 25;
|
|
418
|
+
* @return {boolean}
|
|
419
|
+
*/
|
|
420
|
+
proto.fintekkers.requests.security.QuerySecurityRequestProto.prototype.getLookthrough = function() {
|
|
421
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false));
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @param {boolean} value
|
|
427
|
+
* @return {!proto.fintekkers.requests.security.QuerySecurityRequestProto} returns this
|
|
428
|
+
*/
|
|
429
|
+
proto.fintekkers.requests.security.QuerySecurityRequestProto.prototype.setLookthrough = function(value) {
|
|
430
|
+
return jspb.Message.setProto3BooleanField(this, 25, value);
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
|
|
404
434
|
goog.object.extend(exports, proto.fintekkers.requests.security);
|
|
@@ -74,6 +74,8 @@ export class CurveRequestProto extends jspb.Message {
|
|
|
74
74
|
getTenorPointsList(): Array<fintekkers_models_util_decimal_value_pb.DecimalValueProto>;
|
|
75
75
|
setTenorPointsList(value: Array<fintekkers_models_util_decimal_value_pb.DecimalValueProto>): CurveRequestProto;
|
|
76
76
|
addTenorPoints(value?: fintekkers_models_util_decimal_value_pb.DecimalValueProto, index?: number): fintekkers_models_util_decimal_value_pb.DecimalValueProto;
|
|
77
|
+
getForwardTermYears(): number;
|
|
78
|
+
setForwardTermYears(value: number): CurveRequestProto;
|
|
77
79
|
|
|
78
80
|
serializeBinary(): Uint8Array;
|
|
79
81
|
toObject(includeInstance?: boolean): CurveRequestProto.AsObject;
|
|
@@ -93,5 +95,6 @@ export namespace CurveRequestProto {
|
|
|
93
95
|
curveTypesList: Array<fintekkers_models_position_measure_pb.MeasureProto>,
|
|
94
96
|
curveInputsList: Array<CurveInputProto.AsObject>,
|
|
95
97
|
tenorPointsList: Array<fintekkers_models_util_decimal_value_pb.DecimalValueProto.AsObject>,
|
|
98
|
+
forwardTermYears: number,
|
|
96
99
|
}
|
|
97
100
|
}
|
|
@@ -425,7 +425,8 @@ proto.fintekkers.requests.valuation.CurveRequestProto.toObject = function(includ
|
|
|
425
425
|
curveInputsList: jspb.Message.toObjectList(msg.getCurveInputsList(),
|
|
426
426
|
proto.fintekkers.requests.valuation.CurveInputProto.toObject, includeInstance),
|
|
427
427
|
tenorPointsList: jspb.Message.toObjectList(msg.getTenorPointsList(),
|
|
428
|
-
fintekkers_models_util_decimal_value_pb.DecimalValueProto.toObject, includeInstance)
|
|
428
|
+
fintekkers_models_util_decimal_value_pb.DecimalValueProto.toObject, includeInstance),
|
|
429
|
+
forwardTermYears: jspb.Message.getFieldWithDefault(msg, 50, 0)
|
|
429
430
|
};
|
|
430
431
|
|
|
431
432
|
if (includeInstance) {
|
|
@@ -491,6 +492,10 @@ proto.fintekkers.requests.valuation.CurveRequestProto.deserializeBinaryFromReade
|
|
|
491
492
|
reader.readMessage(value,fintekkers_models_util_decimal_value_pb.DecimalValueProto.deserializeBinaryFromReader);
|
|
492
493
|
msg.addTenorPoints(value);
|
|
493
494
|
break;
|
|
495
|
+
case 50:
|
|
496
|
+
var value = /** @type {number} */ (reader.readUint32());
|
|
497
|
+
msg.setForwardTermYears(value);
|
|
498
|
+
break;
|
|
494
499
|
default:
|
|
495
500
|
reader.skipField();
|
|
496
501
|
break;
|
|
@@ -565,6 +570,13 @@ proto.fintekkers.requests.valuation.CurveRequestProto.serializeBinaryToWriter =
|
|
|
565
570
|
fintekkers_models_util_decimal_value_pb.DecimalValueProto.serializeBinaryToWriter
|
|
566
571
|
);
|
|
567
572
|
}
|
|
573
|
+
f = message.getForwardTermYears();
|
|
574
|
+
if (f !== 0) {
|
|
575
|
+
writer.writeUint32(
|
|
576
|
+
50,
|
|
577
|
+
f
|
|
578
|
+
);
|
|
579
|
+
}
|
|
568
580
|
};
|
|
569
581
|
|
|
570
582
|
|
|
@@ -754,4 +766,22 @@ proto.fintekkers.requests.valuation.CurveRequestProto.prototype.clearTenorPoints
|
|
|
754
766
|
};
|
|
755
767
|
|
|
756
768
|
|
|
769
|
+
/**
|
|
770
|
+
* optional uint32 forward_term_years = 50;
|
|
771
|
+
* @return {number}
|
|
772
|
+
*/
|
|
773
|
+
proto.fintekkers.requests.valuation.CurveRequestProto.prototype.getForwardTermYears = function() {
|
|
774
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 50, 0));
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* @param {number} value
|
|
780
|
+
* @return {!proto.fintekkers.requests.valuation.CurveRequestProto} returns this
|
|
781
|
+
*/
|
|
782
|
+
proto.fintekkers.requests.valuation.CurveRequestProto.prototype.setForwardTermYears = function(value) {
|
|
783
|
+
return jspb.Message.setProto3IntField(this, 50, value);
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
|
|
757
787
|
goog.object.extend(exports, proto.fintekkers.requests.valuation);
|
|
@@ -99,6 +99,7 @@ describe('Identifier.getAllTypeNames', () => {
|
|
|
99
99
|
// OSI = 4;
|
|
100
100
|
// FIGI = 5;
|
|
101
101
|
// SERIES_ID = 6;
|
|
102
|
+
// INDEX_NAME = 7;
|
|
102
103
|
// CASH = 50;
|
|
103
104
|
expect(identifier_1.Identifier.getAllTypeNames()).toEqual([
|
|
104
105
|
'EXCH_TICKER',
|
|
@@ -107,6 +108,7 @@ describe('Identifier.getAllTypeNames', () => {
|
|
|
107
108
|
'OSI',
|
|
108
109
|
'FIGI',
|
|
109
110
|
'SERIES_ID',
|
|
111
|
+
'INDEX_NAME',
|
|
110
112
|
'CASH',
|
|
111
113
|
]);
|
|
112
114
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier.test.js","sourceRoot":"","sources":["identifier.test.ts"],"names":[],"mappings":";;AAAA,iCAAkC;AAClC,6CAA0C;AAC1C,gGAA+F;AAC/F,0GAAwG;AAExG,IAAI,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,CAAC,uBAAuB,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,IAAI,CAAC,wEAAwE,EAAE,GAAG,EAAE;QAChF,iDAAiD;QACjD,6CAA6C;QAC7C,qBAAqB;QACrB,cAAc;QACd,eAAe;QACf,aAAa;QACb,cAAc;QACd,mBAAmB;QACnB,oBAAoB;QACpB,eAAe;QACf,MAAM,CAAC,uBAAU,CAAC,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC;YACzC,aAAa;YACb,MAAM;YACN,OAAO;YACP,KAAK;YACL,MAAM;YACN,WAAW;YACX,YAAY;YACZ,MAAM;SACT,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,CAAC,uBAAU,CAAC,eAAe,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -116,6 +116,7 @@ describe('Identifier.getAllTypeNames', () => {
|
|
|
116
116
|
// OSI = 4;
|
|
117
117
|
// FIGI = 5;
|
|
118
118
|
// SERIES_ID = 6;
|
|
119
|
+
// INDEX_NAME = 7;
|
|
119
120
|
// CASH = 50;
|
|
120
121
|
expect(Identifier.getAllTypeNames()).toEqual([
|
|
121
122
|
'EXCH_TICKER',
|
|
@@ -124,6 +125,7 @@ describe('Identifier.getAllTypeNames', () => {
|
|
|
124
125
|
'OSI',
|
|
125
126
|
'FIGI',
|
|
126
127
|
'SERIES_ID',
|
|
128
|
+
'INDEX_NAME',
|
|
127
129
|
'CASH',
|
|
128
130
|
]);
|
|
129
131
|
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
/**
|
|
4
7
|
* ISSUE #7: SecurityProto round-trip serialization tests for all 6 security types.
|
|
@@ -6,6 +9,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
9
|
* For each type: construct → serialize to bytes → deserialize → verify all fields match.
|
|
7
10
|
*/
|
|
8
11
|
const security_pb_1 = require("../../../fintekkers/models/security/security_pb");
|
|
12
|
+
const security_pb_2 = require("../../../fintekkers/models/security/security_pb");
|
|
13
|
+
const security_1 = __importDefault(require("./security"));
|
|
14
|
+
const uuid_1 = require("../utils/uuid");
|
|
15
|
+
const datetime_1 = require("../utils/datetime");
|
|
9
16
|
const product_type_pb_1 = require("../../../fintekkers/models/security/product_type_pb");
|
|
10
17
|
const coupon_frequency_pb_1 = require("../../../fintekkers/models/security/coupon_frequency_pb");
|
|
11
18
|
const coupon_type_pb_1 = require("../../../fintekkers/models/security/coupon_type_pb");
|
|
@@ -26,7 +33,7 @@ function makeIdentifier(type, value) {
|
|
|
26
33
|
}
|
|
27
34
|
describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () => {
|
|
28
35
|
test('BOND_SECURITY: all bond fields survive round-trip', () => {
|
|
29
|
-
const original = new
|
|
36
|
+
const original = new security_pb_2.SecurityProto();
|
|
30
37
|
original.setObjectClass('Security');
|
|
31
38
|
original.setVersion('0.0.1');
|
|
32
39
|
original.setProductType(product_type_pb_1.ProductTypeProto.TREASURY_NOTE);
|
|
@@ -43,7 +50,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
43
50
|
original.setDatedDate(makeDate(2020, 1, 15));
|
|
44
51
|
original.setMaturityDate(makeDate(2030, 1, 15));
|
|
45
52
|
const bytes = original.serializeBinary();
|
|
46
|
-
const parsed =
|
|
53
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
47
54
|
expect(parsed.getProductType()).toBe(product_type_pb_1.ProductTypeProto.TREASURY_NOTE);
|
|
48
55
|
expect(parsed.getAssetClass()).toBe('Fixed Income');
|
|
49
56
|
expect(parsed.getIssuerName()).toBe('US Treasury');
|
|
@@ -62,7 +69,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
62
69
|
expect(parsed.getIdentifier().getIdentifierType()).toBe(identifier_type_pb_1.IdentifierTypeProto.CUSIP);
|
|
63
70
|
});
|
|
64
71
|
test('TIPS: bond fields + base_cpi + inflation_index_type survive round-trip', () => {
|
|
65
|
-
const original = new
|
|
72
|
+
const original = new security_pb_2.SecurityProto();
|
|
66
73
|
original.setObjectClass('Security');
|
|
67
74
|
original.setVersion('0.0.1');
|
|
68
75
|
original.setProductType(product_type_pb_1.ProductTypeProto.TIPS);
|
|
@@ -76,7 +83,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
76
83
|
original.setBaseCpi(makeDecimal('256.394'));
|
|
77
84
|
original.setInflationIndexType(index_type_pb_1.IndexTypeProto.CPI_U);
|
|
78
85
|
const bytes = original.serializeBinary();
|
|
79
|
-
const parsed =
|
|
86
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
80
87
|
expect(parsed.getProductType()).toBe(product_type_pb_1.ProductTypeProto.TIPS);
|
|
81
88
|
expect(parsed.getCouponRate().getArbitraryPrecisionValue()).toBe('0.625');
|
|
82
89
|
expect(parsed.getCouponType()).toBe(coupon_type_pb_1.CouponTypeProto.FIXED);
|
|
@@ -87,7 +94,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
87
94
|
expect(parsed.getInflationIndexType()).toBe(index_type_pb_1.IndexTypeProto.CPI_U);
|
|
88
95
|
});
|
|
89
96
|
test('FRN: spread + reference_rate_index + reset_frequency survive round-trip', () => {
|
|
90
|
-
const original = new
|
|
97
|
+
const original = new security_pb_2.SecurityProto();
|
|
91
98
|
original.setObjectClass('Security');
|
|
92
99
|
original.setVersion('0.0.1');
|
|
93
100
|
original.setProductType(product_type_pb_1.ProductTypeProto.TREASURY_FRN);
|
|
@@ -101,7 +108,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
101
108
|
original.setReferenceRateIndex(index_type_pb_1.IndexTypeProto.T_BILL_13_WEEK);
|
|
102
109
|
// Note: setResetFrequency (field 92) not yet in generated JS — codegen needs update
|
|
103
110
|
const bytes = original.serializeBinary();
|
|
104
|
-
const parsed =
|
|
111
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
105
112
|
expect(parsed.getProductType()).toBe(product_type_pb_1.ProductTypeProto.TREASURY_FRN);
|
|
106
113
|
expect(parsed.getCouponType()).toBe(coupon_type_pb_1.CouponTypeProto.FLOAT);
|
|
107
114
|
expect(parsed.getCouponFrequency()).toBe(coupon_frequency_pb_1.CouponFrequencyProto.QUARTERLY);
|
|
@@ -111,7 +118,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
111
118
|
expect(parsed.getReferenceRateIndex()).toBe(index_type_pb_1.IndexTypeProto.T_BILL_13_WEEK);
|
|
112
119
|
});
|
|
113
120
|
test('EQUITY_SECURITY: identifier + asset_class survive round-trip', () => {
|
|
114
|
-
const original = new
|
|
121
|
+
const original = new security_pb_2.SecurityProto();
|
|
115
122
|
original.setObjectClass('Security');
|
|
116
123
|
original.setVersion('0.0.1');
|
|
117
124
|
original.setProductType(product_type_pb_1.ProductTypeProto.COMMON_STOCK);
|
|
@@ -121,7 +128,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
121
128
|
original.setIdentifier(makeIdentifier(identifier_type_pb_1.IdentifierTypeProto.EXCH_TICKER, 'AAPL'));
|
|
122
129
|
original.setDescription('Apple Inc. Common Stock');
|
|
123
130
|
const bytes = original.serializeBinary();
|
|
124
|
-
const parsed =
|
|
131
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
125
132
|
expect(parsed.getProductType()).toBe(product_type_pb_1.ProductTypeProto.COMMON_STOCK);
|
|
126
133
|
expect(parsed.getAssetClass()).toBe('Equity');
|
|
127
134
|
expect(parsed.getIssuerName()).toBe('Apple Inc.');
|
|
@@ -131,7 +138,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
131
138
|
expect(parsed.getIdentifier().getIdentifierType()).toBe(identifier_type_pb_1.IdentifierTypeProto.EXCH_TICKER);
|
|
132
139
|
});
|
|
133
140
|
test('CASH_SECURITY: cash_id + settlement fields survive round-trip', () => {
|
|
134
|
-
const original = new
|
|
141
|
+
const original = new security_pb_2.SecurityProto();
|
|
135
142
|
original.setObjectClass('Security');
|
|
136
143
|
original.setVersion('0.0.1');
|
|
137
144
|
original.setProductType(product_type_pb_1.ProductTypeProto.CURRENCY);
|
|
@@ -142,7 +149,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
142
149
|
original.setDescription('US Dollar');
|
|
143
150
|
original.setIdentifier(makeIdentifier(identifier_type_pb_1.IdentifierTypeProto.CASH, 'USD'));
|
|
144
151
|
const bytes = original.serializeBinary();
|
|
145
|
-
const parsed =
|
|
152
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
146
153
|
expect(parsed.getProductType()).toBe(product_type_pb_1.ProductTypeProto.CURRENCY);
|
|
147
154
|
expect(parsed.getAssetClass()).toBe('Cash');
|
|
148
155
|
expect(parsed.getCashId()).toBe('USD');
|
|
@@ -151,7 +158,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
151
158
|
expect(parsed.getIdentifier().getIdentifierType()).toBe(identifier_type_pb_1.IdentifierTypeProto.CASH);
|
|
152
159
|
});
|
|
153
160
|
test('INDEX_SECURITY: index_type + inflation_index_type survive round-trip', () => {
|
|
154
|
-
const original = new
|
|
161
|
+
const original = new security_pb_2.SecurityProto();
|
|
155
162
|
original.setObjectClass('Security');
|
|
156
163
|
original.setVersion('0.0.1');
|
|
157
164
|
original.setProductType(product_type_pb_1.ProductTypeProto.EQUITY_INDEX);
|
|
@@ -161,7 +168,7 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
161
168
|
original.setIndexType(index_type_pb_1.IndexTypeProto.CPI_U);
|
|
162
169
|
original.setIdentifier(makeIdentifier(identifier_type_pb_1.IdentifierTypeProto.CUSIP, 'CPI-U'));
|
|
163
170
|
const bytes = original.serializeBinary();
|
|
164
|
-
const parsed =
|
|
171
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
165
172
|
expect(parsed.getProductType()).toBe(product_type_pb_1.ProductTypeProto.EQUITY_INDEX);
|
|
166
173
|
expect(parsed.getAssetClass()).toBe('Index');
|
|
167
174
|
expect(parsed.getIssuerName()).toBe('Bureau of Labor Statistics');
|
|
@@ -170,4 +177,81 @@ describe('SecurityProto Round-Trip Serialization — All 6 Security Types', () =
|
|
|
170
177
|
expect(parsed.getIdentifier().getIdentifierValue()).toBe('CPI-U');
|
|
171
178
|
});
|
|
172
179
|
});
|
|
180
|
+
describe('v0.2.5: Security link helpers + IndexDetailsProto.constituents', () => {
|
|
181
|
+
test('linkOf populates uuid, as_of and sets is_link=true', () => {
|
|
182
|
+
const uuid = uuid_1.UUID.random();
|
|
183
|
+
const asOf = datetime_1.ZonedDateTime.now();
|
|
184
|
+
const link = security_1.default.linkOf(uuid, asOf);
|
|
185
|
+
expect(link.getIsLink()).toBe(true);
|
|
186
|
+
expect(link.getUuid()).toBeDefined();
|
|
187
|
+
expect(link.getAsOf()).toBeDefined();
|
|
188
|
+
expect(link.getAssetClass()).toBe(''); // no other fields populated
|
|
189
|
+
});
|
|
190
|
+
test('linkOfLatest skips as_of', () => {
|
|
191
|
+
const uuid = uuid_1.UUID.random();
|
|
192
|
+
const link = security_1.default.linkOfLatest(uuid);
|
|
193
|
+
expect(link.getIsLink()).toBe(true);
|
|
194
|
+
expect(link.getUuid()).toBeDefined();
|
|
195
|
+
expect(link.getAsOf()).toBeUndefined();
|
|
196
|
+
});
|
|
197
|
+
test('linkOf requires asOf (throws when called without it)', () => {
|
|
198
|
+
const uuid = uuid_1.UUID.random();
|
|
199
|
+
expect(() => security_1.default.linkOf(uuid, undefined)).toThrow(/asOf is required/);
|
|
200
|
+
});
|
|
201
|
+
test('Security.isLink() reads the proto flag', () => {
|
|
202
|
+
const full = new security_pb_2.SecurityProto();
|
|
203
|
+
const wrapperFull = new security_1.default(full);
|
|
204
|
+
expect(wrapperFull.isLink()).toBe(false);
|
|
205
|
+
const link = security_1.default.linkOf(uuid_1.UUID.random(), datetime_1.ZonedDateTime.now());
|
|
206
|
+
const wrapperLink = new security_1.default(link);
|
|
207
|
+
expect(wrapperLink.isLink()).toBe(true);
|
|
208
|
+
});
|
|
209
|
+
test('Accessors throw on link wrappers', () => {
|
|
210
|
+
const link = security_1.default.linkOf(uuid_1.UUID.random(), datetime_1.ZonedDateTime.now());
|
|
211
|
+
const wrapper = new security_1.default(link);
|
|
212
|
+
expect(() => wrapper.getAssetClass()).toThrow(/link-mode/);
|
|
213
|
+
expect(() => wrapper.getIssuerName()).toThrow(/link-mode/);
|
|
214
|
+
expect(() => wrapper.getProductType()).toThrow(/link-mode/);
|
|
215
|
+
});
|
|
216
|
+
test('Link round-trips via serializeBinary preserving uuid + as_of + is_link', () => {
|
|
217
|
+
const uuid = uuid_1.UUID.random();
|
|
218
|
+
const asOf = datetime_1.ZonedDateTime.now();
|
|
219
|
+
const link = security_1.default.linkOf(uuid, asOf);
|
|
220
|
+
const bytes = link.serializeBinary();
|
|
221
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(bytes);
|
|
222
|
+
expect(parsed.getIsLink()).toBe(true);
|
|
223
|
+
expect(parsed.getUuid()).toBeDefined();
|
|
224
|
+
const parsedBytes = Array.from(parsed.getUuid().getRawUuid_asU8());
|
|
225
|
+
expect(parsedBytes).toEqual(uuid.toBytes());
|
|
226
|
+
expect(parsed.getAsOf().getTimeZone()).toBe(asOf.toProto().getTimeZone());
|
|
227
|
+
});
|
|
228
|
+
test('IndexDetailsProto.constituents round-trip with each constituent in link mode', () => {
|
|
229
|
+
const asOf = datetime_1.ZonedDateTime.now();
|
|
230
|
+
const c1 = security_1.default.linkOf(uuid_1.UUID.random(), asOf);
|
|
231
|
+
const c2 = security_1.default.linkOf(uuid_1.UUID.random(), asOf);
|
|
232
|
+
const details = new security_pb_1.IndexDetailsProto();
|
|
233
|
+
details.setIndexType(index_type_pb_1.IndexTypeProto.CPI_U);
|
|
234
|
+
details.setConstituentsList([c1, c2]);
|
|
235
|
+
const original = new security_pb_2.SecurityProto();
|
|
236
|
+
original.setProductType(product_type_pb_1.ProductTypeProto.EQUITY_INDEX);
|
|
237
|
+
original.setIndexDetails(details);
|
|
238
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(original.serializeBinary());
|
|
239
|
+
const parsedDetails = parsed.getIndexDetails();
|
|
240
|
+
expect(parsedDetails.getConstituentsList().length).toBe(2);
|
|
241
|
+
expect(parsedDetails.getConstituentsList()[0].getIsLink()).toBe(true);
|
|
242
|
+
expect(parsedDetails.getConstituentsList()[0].getAsOf()).toBeDefined();
|
|
243
|
+
});
|
|
244
|
+
test('Wire compat: SecurityIdProto-shaped bytes (uuid at tag 1) parse as SecurityProto', () => {
|
|
245
|
+
// Pre-v0.2.5, legs were SecurityIdProto (uuid at tag 1). We rebuild that
|
|
246
|
+
// wire shape by serializing a SecurityProto with only uuid set — same
|
|
247
|
+
// bytes — and confirm round-trip under the new type.
|
|
248
|
+
const uuid = uuid_1.UUID.random();
|
|
249
|
+
const legacy = new security_pb_2.SecurityProto();
|
|
250
|
+
legacy.setUuid(uuid.toUUIDProto());
|
|
251
|
+
const legacyBytes = legacy.serializeBinary();
|
|
252
|
+
const parsed = security_pb_2.SecurityProto.deserializeBinary(legacyBytes);
|
|
253
|
+
const parsedBytes = Array.from(parsed.getUuid().getRawUuid_asU8());
|
|
254
|
+
expect(parsedBytes).toEqual(uuid.toBytes());
|
|
255
|
+
});
|
|
256
|
+
});
|
|
173
257
|
//# sourceMappingURL=security-roundtrip.test.js.map
|