@trustwallet/wallet-core 4.0.25 → 4.0.27
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/dist/generated/core_proto.d.ts +902 -11
- package/dist/generated/core_proto.js +3251 -390
- package/dist/lib/wallet-core.js +38 -37
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +4 -0
- package/package.json +1 -1
@@ -1175,6 +1175,7 @@
|
|
1175
1175
|
case 22:
|
1176
1176
|
case 23:
|
1177
1177
|
case 24:
|
1178
|
+
case 25:
|
1178
1179
|
break;
|
1179
1180
|
}
|
1180
1181
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -1306,6 +1307,10 @@
|
|
1306
1307
|
case 24:
|
1307
1308
|
message.error = 24;
|
1308
1309
|
break;
|
1310
|
+
case "Error_dust_amount_requested":
|
1311
|
+
case 25:
|
1312
|
+
message.error = 25;
|
1313
|
+
break;
|
1309
1314
|
}
|
1310
1315
|
if (object.errorMessage != null)
|
1311
1316
|
message.errorMessage = String(object.errorMessage);
|
@@ -1421,6 +1426,7 @@
|
|
1421
1426
|
* @property {number} Error_invalid_params=22 Error_invalid_params value
|
1422
1427
|
* @property {number} Error_invalid_requested_token_amount=23 Error_invalid_requested_token_amount value
|
1423
1428
|
* @property {number} Error_not_supported=24 Error_not_supported value
|
1429
|
+
* @property {number} Error_dust_amount_requested=25 Error_dust_amount_requested value
|
1424
1430
|
*/
|
1425
1431
|
Proto.SigningError = (function() {
|
1426
1432
|
var valuesById = {}, values = Object.create(valuesById);
|
@@ -1449,6 +1455,7 @@
|
|
1449
1455
|
values[valuesById[22] = "Error_invalid_params"] = 22;
|
1450
1456
|
values[valuesById[23] = "Error_invalid_requested_token_amount"] = 23;
|
1451
1457
|
values[valuesById[24] = "Error_not_supported"] = 24;
|
1458
|
+
values[valuesById[25] = "Error_dust_amount_requested"] = 25;
|
1452
1459
|
return values;
|
1453
1460
|
})();
|
1454
1461
|
|
@@ -2758,6 +2765,7 @@
|
|
2758
2765
|
case 22:
|
2759
2766
|
case 23:
|
2760
2767
|
case 24:
|
2768
|
+
case 25:
|
2761
2769
|
break;
|
2762
2770
|
}
|
2763
2771
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -2886,6 +2894,10 @@
|
|
2886
2894
|
case 24:
|
2887
2895
|
message.error = 24;
|
2888
2896
|
break;
|
2897
|
+
case "Error_dust_amount_requested":
|
2898
|
+
case 25:
|
2899
|
+
message.error = 25;
|
2900
|
+
break;
|
2889
2901
|
}
|
2890
2902
|
if (object.errorMessage != null)
|
2891
2903
|
message.errorMessage = String(object.errorMessage);
|
@@ -7029,6 +7041,7 @@
|
|
7029
7041
|
case 22:
|
7030
7042
|
case 23:
|
7031
7043
|
case 24:
|
7044
|
+
case 25:
|
7032
7045
|
break;
|
7033
7046
|
}
|
7034
7047
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -7167,6 +7180,10 @@
|
|
7167
7180
|
case 24:
|
7168
7181
|
message.error = 24;
|
7169
7182
|
break;
|
7183
|
+
case "Error_dust_amount_requested":
|
7184
|
+
case 25:
|
7185
|
+
message.error = 25;
|
7186
|
+
break;
|
7170
7187
|
}
|
7171
7188
|
if (object.errorMessage != null)
|
7172
7189
|
message.errorMessage = String(object.errorMessage);
|
@@ -15399,6 +15416,7 @@
|
|
15399
15416
|
case 22:
|
15400
15417
|
case 23:
|
15401
15418
|
case 24:
|
15419
|
+
case 25:
|
15402
15420
|
break;
|
15403
15421
|
}
|
15404
15422
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -15531,6 +15549,10 @@
|
|
15531
15549
|
case 24:
|
15532
15550
|
message.error = 24;
|
15533
15551
|
break;
|
15552
|
+
case "Error_dust_amount_requested":
|
15553
|
+
case 25:
|
15554
|
+
message.error = 25;
|
15555
|
+
break;
|
15534
15556
|
}
|
15535
15557
|
if (object.errorMessage != null)
|
15536
15558
|
message.errorMessage = String(object.errorMessage);
|
@@ -17135,6 +17157,7 @@
|
|
17135
17157
|
* @property {boolean|null} [isItBrcOperation] SigningInput isItBrcOperation
|
17136
17158
|
* @property {TW.BitcoinV2.Proto.IComposePlan|null} [planningV2] SigningInput planningV2
|
17137
17159
|
* @property {TW.BitcoinV2.Proto.ISigningInput|null} [signingV2] SigningInput signingV2
|
17160
|
+
* @property {Long|null} [fixedDustThreshold] SigningInput fixedDustThreshold
|
17138
17161
|
*/
|
17139
17162
|
|
17140
17163
|
/**
|
@@ -17316,6 +17339,28 @@
|
|
17316
17339
|
*/
|
17317
17340
|
SigningInput.prototype.signingV2 = null;
|
17318
17341
|
|
17342
|
+
/**
|
17343
|
+
* SigningInput fixedDustThreshold.
|
17344
|
+
* @member {Long|null|undefined} fixedDustThreshold
|
17345
|
+
* @memberof TW.Bitcoin.Proto.SigningInput
|
17346
|
+
* @instance
|
17347
|
+
*/
|
17348
|
+
SigningInput.prototype.fixedDustThreshold = null;
|
17349
|
+
|
17350
|
+
// OneOf field names bound to virtual getters and setters
|
17351
|
+
var $oneOfFields;
|
17352
|
+
|
17353
|
+
/**
|
17354
|
+
* SigningInput dustPolicy.
|
17355
|
+
* @member {"fixedDustThreshold"|undefined} dustPolicy
|
17356
|
+
* @memberof TW.Bitcoin.Proto.SigningInput
|
17357
|
+
* @instance
|
17358
|
+
*/
|
17359
|
+
Object.defineProperty(SigningInput.prototype, "dustPolicy", {
|
17360
|
+
get: $util.oneOfGetter($oneOfFields = ["fixedDustThreshold"]),
|
17361
|
+
set: $util.oneOfSetter($oneOfFields)
|
17362
|
+
});
|
17363
|
+
|
17319
17364
|
/**
|
17320
17365
|
* Creates a new SigningInput instance using the specified properties.
|
17321
17366
|
* @function create
|
@@ -17384,6 +17429,8 @@
|
|
17384
17429
|
$root.TW.BitcoinV2.Proto.ComposePlan.encode(message.planningV2, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
|
17385
17430
|
if (message.signingV2 != null && Object.hasOwnProperty.call(message, "signingV2"))
|
17386
17431
|
$root.TW.BitcoinV2.Proto.SigningInput.encode(message.signingV2, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
|
17432
|
+
if (message.fixedDustThreshold != null && Object.hasOwnProperty.call(message, "fixedDustThreshold"))
|
17433
|
+
writer.uint32(/* id 24, wireType 0 =*/192).int64(message.fixedDustThreshold);
|
17387
17434
|
return writer;
|
17388
17435
|
};
|
17389
17436
|
|
@@ -17490,6 +17537,9 @@
|
|
17490
17537
|
case 21:
|
17491
17538
|
message.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.decode(reader, reader.uint32());
|
17492
17539
|
break;
|
17540
|
+
case 24:
|
17541
|
+
message.fixedDustThreshold = reader.int64();
|
17542
|
+
break;
|
17493
17543
|
default:
|
17494
17544
|
reader.skipType(tag & 7);
|
17495
17545
|
break;
|
@@ -17509,6 +17559,7 @@
|
|
17509
17559
|
SigningInput.verify = function verify(message) {
|
17510
17560
|
if (typeof message !== "object" || message === null)
|
17511
17561
|
return "object expected";
|
17562
|
+
var properties = {};
|
17512
17563
|
if (message.hashType != null && message.hasOwnProperty("hashType"))
|
17513
17564
|
if (!$util.isInteger(message.hashType))
|
17514
17565
|
return "hashType: integer expected";
|
@@ -17596,6 +17647,11 @@
|
|
17596
17647
|
if (error)
|
17597
17648
|
return "signingV2." + error;
|
17598
17649
|
}
|
17650
|
+
if (message.fixedDustThreshold != null && message.hasOwnProperty("fixedDustThreshold")) {
|
17651
|
+
properties.dustPolicy = 1;
|
17652
|
+
if (!$util.isInteger(message.fixedDustThreshold) && !(message.fixedDustThreshold && $util.isInteger(message.fixedDustThreshold.low) && $util.isInteger(message.fixedDustThreshold.high)))
|
17653
|
+
return "fixedDustThreshold: integer|Long expected";
|
17654
|
+
}
|
17599
17655
|
return null;
|
17600
17656
|
};
|
17601
17657
|
|
@@ -17709,6 +17765,15 @@
|
|
17709
17765
|
throw TypeError(".TW.Bitcoin.Proto.SigningInput.signingV2: object expected");
|
17710
17766
|
message.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.fromObject(object.signingV2);
|
17711
17767
|
}
|
17768
|
+
if (object.fixedDustThreshold != null)
|
17769
|
+
if ($util.Long)
|
17770
|
+
(message.fixedDustThreshold = $util.Long.fromValue(object.fixedDustThreshold)).unsigned = false;
|
17771
|
+
else if (typeof object.fixedDustThreshold === "string")
|
17772
|
+
message.fixedDustThreshold = parseInt(object.fixedDustThreshold, 10);
|
17773
|
+
else if (typeof object.fixedDustThreshold === "number")
|
17774
|
+
message.fixedDustThreshold = object.fixedDustThreshold;
|
17775
|
+
else if (typeof object.fixedDustThreshold === "object")
|
17776
|
+
message.fixedDustThreshold = new $util.LongBits(object.fixedDustThreshold.low >>> 0, object.fixedDustThreshold.high >>> 0).toNumber();
|
17712
17777
|
return message;
|
17713
17778
|
};
|
17714
17779
|
|
@@ -17823,6 +17888,14 @@
|
|
17823
17888
|
object.planningV2 = $root.TW.BitcoinV2.Proto.ComposePlan.toObject(message.planningV2, options);
|
17824
17889
|
if (message.signingV2 != null && message.hasOwnProperty("signingV2"))
|
17825
17890
|
object.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.toObject(message.signingV2, options);
|
17891
|
+
if (message.fixedDustThreshold != null && message.hasOwnProperty("fixedDustThreshold")) {
|
17892
|
+
if (typeof message.fixedDustThreshold === "number")
|
17893
|
+
object.fixedDustThreshold = options.longs === String ? String(message.fixedDustThreshold) : message.fixedDustThreshold;
|
17894
|
+
else
|
17895
|
+
object.fixedDustThreshold = options.longs === String ? $util.Long.prototype.toString.call(message.fixedDustThreshold) : options.longs === Number ? new $util.LongBits(message.fixedDustThreshold.low >>> 0, message.fixedDustThreshold.high >>> 0).toNumber() : message.fixedDustThreshold;
|
17896
|
+
if (options.oneofs)
|
17897
|
+
object.dustPolicy = "fixedDustThreshold";
|
17898
|
+
}
|
17826
17899
|
return object;
|
17827
17900
|
};
|
17828
17901
|
|
@@ -18138,6 +18211,7 @@
|
|
18138
18211
|
case 22:
|
18139
18212
|
case 23:
|
18140
18213
|
case 24:
|
18214
|
+
case 25:
|
18141
18215
|
break;
|
18142
18216
|
}
|
18143
18217
|
if (message.outputOpReturn != null && message.hasOwnProperty("outputOpReturn"))
|
@@ -18321,6 +18395,10 @@
|
|
18321
18395
|
case 24:
|
18322
18396
|
message.error = 24;
|
18323
18397
|
break;
|
18398
|
+
case "Error_dust_amount_requested":
|
18399
|
+
case 25:
|
18400
|
+
message.error = 25;
|
18401
|
+
break;
|
18324
18402
|
}
|
18325
18403
|
if (object.outputOpReturn != null)
|
18326
18404
|
if (typeof object.outputOpReturn === "string")
|
@@ -18682,6 +18760,7 @@
|
|
18682
18760
|
case 22:
|
18683
18761
|
case 23:
|
18684
18762
|
case 24:
|
18763
|
+
case 25:
|
18685
18764
|
break;
|
18686
18765
|
}
|
18687
18766
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -18820,6 +18899,10 @@
|
|
18820
18899
|
case 24:
|
18821
18900
|
message.error = 24;
|
18822
18901
|
break;
|
18902
|
+
case "Error_dust_amount_requested":
|
18903
|
+
case 25:
|
18904
|
+
message.error = 25;
|
18905
|
+
break;
|
18823
18906
|
}
|
18824
18907
|
if (object.errorMessage != null)
|
18825
18908
|
message.errorMessage = String(object.errorMessage);
|
@@ -19257,6 +19340,7 @@
|
|
19257
19340
|
case 22:
|
19258
19341
|
case 23:
|
19259
19342
|
case 24:
|
19343
|
+
case 25:
|
19260
19344
|
break;
|
19261
19345
|
}
|
19262
19346
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -19388,6 +19472,10 @@
|
|
19388
19472
|
case 24:
|
19389
19473
|
message.error = 24;
|
19390
19474
|
break;
|
19475
|
+
case "Error_dust_amount_requested":
|
19476
|
+
case 25:
|
19477
|
+
message.error = 25;
|
19478
|
+
break;
|
19391
19479
|
}
|
19392
19480
|
if (object.errorMessage != null)
|
19393
19481
|
message.errorMessage = String(object.errorMessage);
|
@@ -33040,6 +33128,7 @@
|
|
33040
33128
|
case 22:
|
33041
33129
|
case 23:
|
33042
33130
|
case 24:
|
33131
|
+
case 25:
|
33043
33132
|
break;
|
33044
33133
|
}
|
33045
33134
|
if (message.extraOutputs != null && message.hasOwnProperty("extraOutputs")) {
|
@@ -33261,6 +33350,10 @@
|
|
33261
33350
|
case 24:
|
33262
33351
|
message.error = 24;
|
33263
33352
|
break;
|
33353
|
+
case "Error_dust_amount_requested":
|
33354
|
+
case 25:
|
33355
|
+
message.error = 25;
|
33356
|
+
break;
|
33264
33357
|
}
|
33265
33358
|
if (object.extraOutputs) {
|
33266
33359
|
if (!Array.isArray(object.extraOutputs))
|
@@ -34044,6 +34137,7 @@
|
|
34044
34137
|
case 22:
|
34045
34138
|
case 23:
|
34046
34139
|
case 24:
|
34140
|
+
case 25:
|
34047
34141
|
break;
|
34048
34142
|
}
|
34049
34143
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -34175,6 +34269,10 @@
|
|
34175
34269
|
case 24:
|
34176
34270
|
message.error = 24;
|
34177
34271
|
break;
|
34272
|
+
case "Error_dust_amount_requested":
|
34273
|
+
case 25:
|
34274
|
+
message.error = 25;
|
34275
|
+
break;
|
34178
34276
|
}
|
34179
34277
|
if (object.errorMessage != null)
|
34180
34278
|
message.errorMessage = String(object.errorMessage);
|
@@ -42996,6 +43094,7 @@
|
|
42996
43094
|
case 22:
|
42997
43095
|
case 23:
|
42998
43096
|
case 24:
|
43097
|
+
case 25:
|
42999
43098
|
break;
|
43000
43099
|
}
|
43001
43100
|
return null;
|
@@ -43127,6 +43226,10 @@
|
|
43127
43226
|
case 24:
|
43128
43227
|
message.error = 24;
|
43129
43228
|
break;
|
43229
|
+
case "Error_dust_amount_requested":
|
43230
|
+
case 25:
|
43231
|
+
message.error = 25;
|
43232
|
+
break;
|
43130
43233
|
}
|
43131
43234
|
return message;
|
43132
43235
|
};
|
@@ -44244,6 +44347,7 @@
|
|
44244
44347
|
case 22:
|
44245
44348
|
case 23:
|
44246
44349
|
case 24:
|
44350
|
+
case 25:
|
44247
44351
|
break;
|
44248
44352
|
}
|
44249
44353
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -44377,6 +44481,10 @@
|
|
44377
44481
|
case 24:
|
44378
44482
|
message.error = 24;
|
44379
44483
|
break;
|
44484
|
+
case "Error_dust_amount_requested":
|
44485
|
+
case 25:
|
44486
|
+
message.error = 25;
|
44487
|
+
break;
|
44380
44488
|
}
|
44381
44489
|
if (object.errorMessage != null)
|
44382
44490
|
message.errorMessage = String(object.errorMessage);
|
@@ -45283,6 +45391,7 @@
|
|
45283
45391
|
case 22:
|
45284
45392
|
case 23:
|
45285
45393
|
case 24:
|
45394
|
+
case 25:
|
45286
45395
|
break;
|
45287
45396
|
}
|
45288
45397
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -45406,6 +45515,10 @@
|
|
45406
45515
|
case 24:
|
45407
45516
|
message.error = 24;
|
45408
45517
|
break;
|
45518
|
+
case "Error_dust_amount_requested":
|
45519
|
+
case 25:
|
45520
|
+
message.error = 25;
|
45521
|
+
break;
|
45409
45522
|
}
|
45410
45523
|
if (object.errorMessage != null)
|
45411
45524
|
message.errorMessage = String(object.errorMessage);
|
@@ -48561,6 +48674,7 @@
|
|
48561
48674
|
case 22:
|
48562
48675
|
case 23:
|
48563
48676
|
case 24:
|
48677
|
+
case 25:
|
48564
48678
|
break;
|
48565
48679
|
}
|
48566
48680
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -48710,6 +48824,10 @@
|
|
48710
48824
|
case 24:
|
48711
48825
|
message.error = 24;
|
48712
48826
|
break;
|
48827
|
+
case "Error_dust_amount_requested":
|
48828
|
+
case 25:
|
48829
|
+
message.error = 25;
|
48830
|
+
break;
|
48713
48831
|
}
|
48714
48832
|
if (object.errorMessage != null)
|
48715
48833
|
message.errorMessage = String(object.errorMessage);
|
@@ -49433,6 +49551,7 @@
|
|
49433
49551
|
case 22:
|
49434
49552
|
case 23:
|
49435
49553
|
case 24:
|
49554
|
+
case 25:
|
49436
49555
|
break;
|
49437
49556
|
}
|
49438
49557
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -49556,6 +49675,10 @@
|
|
49556
49675
|
case 24:
|
49557
49676
|
message.error = 24;
|
49558
49677
|
break;
|
49678
|
+
case "Error_dust_amount_requested":
|
49679
|
+
case 25:
|
49680
|
+
message.error = 25;
|
49681
|
+
break;
|
49559
49682
|
}
|
49560
49683
|
if (object.errorMessage != null)
|
49561
49684
|
message.errorMessage = String(object.errorMessage);
|
@@ -56273,6 +56396,7 @@
|
|
56273
56396
|
case 22:
|
56274
56397
|
case 23:
|
56275
56398
|
case 24:
|
56399
|
+
case 25:
|
56276
56400
|
break;
|
56277
56401
|
}
|
56278
56402
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -56399,6 +56523,10 @@
|
|
56399
56523
|
case 24:
|
56400
56524
|
message.error = 24;
|
56401
56525
|
break;
|
56526
|
+
case "Error_dust_amount_requested":
|
56527
|
+
case 25:
|
56528
|
+
message.error = 25;
|
56529
|
+
break;
|
56402
56530
|
}
|
56403
56531
|
if (object.errorMessage != null)
|
56404
56532
|
message.errorMessage = String(object.errorMessage);
|
@@ -57828,6 +57956,7 @@
|
|
57828
57956
|
case 22:
|
57829
57957
|
case 23:
|
57830
57958
|
case 24:
|
57959
|
+
case 25:
|
57831
57960
|
break;
|
57832
57961
|
}
|
57833
57962
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -57951,6 +58080,10 @@
|
|
57951
58080
|
case 24:
|
57952
58081
|
message.error = 24;
|
57953
58082
|
break;
|
58083
|
+
case "Error_dust_amount_requested":
|
58084
|
+
case 25:
|
58085
|
+
message.error = 25;
|
58086
|
+
break;
|
57954
58087
|
}
|
57955
58088
|
if (object.errorMessage != null)
|
57956
58089
|
message.errorMessage = String(object.errorMessage);
|
@@ -60649,6 +60782,7 @@
|
|
60649
60782
|
case 22:
|
60650
60783
|
case 23:
|
60651
60784
|
case 24:
|
60785
|
+
case 25:
|
60652
60786
|
break;
|
60653
60787
|
}
|
60654
60788
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -60772,6 +60906,10 @@
|
|
60772
60906
|
case 24:
|
60773
60907
|
message.error = 24;
|
60774
60908
|
break;
|
60909
|
+
case "Error_dust_amount_requested":
|
60910
|
+
case 25:
|
60911
|
+
message.error = 25;
|
60912
|
+
break;
|
60775
60913
|
}
|
60776
60914
|
if (object.errorMessage != null)
|
60777
60915
|
message.errorMessage = String(object.errorMessage);
|
@@ -62672,6 +62810,7 @@
|
|
62672
62810
|
case 22:
|
62673
62811
|
case 23:
|
62674
62812
|
case 24:
|
62813
|
+
case 25:
|
62675
62814
|
break;
|
62676
62815
|
}
|
62677
62816
|
return null;
|
@@ -62801,6 +62940,10 @@
|
|
62801
62940
|
case 24:
|
62802
62941
|
message.error = 24;
|
62803
62942
|
break;
|
62943
|
+
case "Error_dust_amount_requested":
|
62944
|
+
case 25:
|
62945
|
+
message.error = 25;
|
62946
|
+
break;
|
62804
62947
|
}
|
62805
62948
|
return message;
|
62806
62949
|
};
|
@@ -63374,6 +63517,7 @@
|
|
63374
63517
|
case 22:
|
63375
63518
|
case 23:
|
63376
63519
|
case 24:
|
63520
|
+
case 25:
|
63377
63521
|
break;
|
63378
63522
|
}
|
63379
63523
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -63515,6 +63659,10 @@
|
|
63515
63659
|
case 24:
|
63516
63660
|
message.error = 24;
|
63517
63661
|
break;
|
63662
|
+
case "Error_dust_amount_requested":
|
63663
|
+
case 25:
|
63664
|
+
message.error = 25;
|
63665
|
+
break;
|
63518
63666
|
}
|
63519
63667
|
if (object.errorMessage != null)
|
63520
63668
|
message.errorMessage = String(object.errorMessage);
|
@@ -68351,6 +68499,7 @@
|
|
68351
68499
|
case 22:
|
68352
68500
|
case 23:
|
68353
68501
|
case 24:
|
68502
|
+
case 25:
|
68354
68503
|
break;
|
68355
68504
|
}
|
68356
68505
|
return null;
|
@@ -68478,6 +68627,10 @@
|
|
68478
68627
|
case 24:
|
68479
68628
|
message.error = 24;
|
68480
68629
|
break;
|
68630
|
+
case "Error_dust_amount_requested":
|
68631
|
+
case 25:
|
68632
|
+
message.error = 25;
|
68633
|
+
break;
|
68481
68634
|
}
|
68482
68635
|
return message;
|
68483
68636
|
};
|
@@ -69361,6 +69514,7 @@
|
|
69361
69514
|
case 22:
|
69362
69515
|
case 23:
|
69363
69516
|
case 24:
|
69517
|
+
case 25:
|
69364
69518
|
break;
|
69365
69519
|
}
|
69366
69520
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -69487,6 +69641,10 @@
|
|
69487
69641
|
case 24:
|
69488
69642
|
message.error = 24;
|
69489
69643
|
break;
|
69644
|
+
case "Error_dust_amount_requested":
|
69645
|
+
case 25:
|
69646
|
+
message.error = 25;
|
69647
|
+
break;
|
69490
69648
|
}
|
69491
69649
|
if (object.errorMessage != null)
|
69492
69650
|
message.errorMessage = String(object.errorMessage);
|
@@ -71406,6 +71564,7 @@
|
|
71406
71564
|
case 22:
|
71407
71565
|
case 23:
|
71408
71566
|
case 24:
|
71567
|
+
case 25:
|
71409
71568
|
break;
|
71410
71569
|
}
|
71411
71570
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -71537,6 +71696,10 @@
|
|
71537
71696
|
case 24:
|
71538
71697
|
message.error = 24;
|
71539
71698
|
break;
|
71699
|
+
case "Error_dust_amount_requested":
|
71700
|
+
case 25:
|
71701
|
+
message.error = 25;
|
71702
|
+
break;
|
71540
71703
|
}
|
71541
71704
|
if (object.errorMessage != null)
|
71542
71705
|
message.errorMessage = String(object.errorMessage);
|
@@ -75238,6 +75401,7 @@
|
|
75238
75401
|
case 22:
|
75239
75402
|
case 23:
|
75240
75403
|
case 24:
|
75404
|
+
case 25:
|
75241
75405
|
break;
|
75242
75406
|
}
|
75243
75407
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -75369,6 +75533,10 @@
|
|
75369
75533
|
case 24:
|
75370
75534
|
message.error = 24;
|
75371
75535
|
break;
|
75536
|
+
case "Error_dust_amount_requested":
|
75537
|
+
case 25:
|
75538
|
+
message.error = 25;
|
75539
|
+
break;
|
75372
75540
|
}
|
75373
75541
|
if (object.errorMessage != null)
|
75374
75542
|
message.errorMessage = String(object.errorMessage);
|
@@ -80035,6 +80203,7 @@
|
|
80035
80203
|
case 22:
|
80036
80204
|
case 23:
|
80037
80205
|
case 24:
|
80206
|
+
case 25:
|
80038
80207
|
break;
|
80039
80208
|
}
|
80040
80209
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -80160,6 +80329,10 @@
|
|
80160
80329
|
case 24:
|
80161
80330
|
message.error = 24;
|
80162
80331
|
break;
|
80332
|
+
case "Error_dust_amount_requested":
|
80333
|
+
case 25:
|
80334
|
+
message.error = 25;
|
80335
|
+
break;
|
80163
80336
|
}
|
80164
80337
|
if (object.errorMessage != null)
|
80165
80338
|
message.errorMessage = String(object.errorMessage);
|
@@ -80797,6 +80970,7 @@
|
|
80797
80970
|
case 22:
|
80798
80971
|
case 23:
|
80799
80972
|
case 24:
|
80973
|
+
case 25:
|
80800
80974
|
break;
|
80801
80975
|
}
|
80802
80976
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -80930,6 +81104,10 @@
|
|
80930
81104
|
case 24:
|
80931
81105
|
message.error = 24;
|
80932
81106
|
break;
|
81107
|
+
case "Error_dust_amount_requested":
|
81108
|
+
case 25:
|
81109
|
+
message.error = 25;
|
81110
|
+
break;
|
80933
81111
|
}
|
80934
81112
|
if (object.errorMessage != null)
|
80935
81113
|
message.errorMessage = String(object.errorMessage);
|
@@ -84482,6 +84660,7 @@
|
|
84482
84660
|
case 22:
|
84483
84661
|
case 23:
|
84484
84662
|
case 24:
|
84663
|
+
case 25:
|
84485
84664
|
break;
|
84486
84665
|
}
|
84487
84666
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -84611,6 +84790,10 @@
|
|
84611
84790
|
case 24:
|
84612
84791
|
message.error = 24;
|
84613
84792
|
break;
|
84793
|
+
case "Error_dust_amount_requested":
|
84794
|
+
case 25:
|
84795
|
+
message.error = 25;
|
84796
|
+
break;
|
84614
84797
|
}
|
84615
84798
|
if (object.errorMessage != null)
|
84616
84799
|
message.errorMessage = String(object.errorMessage);
|
@@ -87998,6 +88181,7 @@
|
|
87998
88181
|
case 22:
|
87999
88182
|
case 23:
|
88000
88183
|
case 24:
|
88184
|
+
case 25:
|
88001
88185
|
break;
|
88002
88186
|
}
|
88003
88187
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -88124,6 +88308,10 @@
|
|
88124
88308
|
case 24:
|
88125
88309
|
message.error = 24;
|
88126
88310
|
break;
|
88311
|
+
case "Error_dust_amount_requested":
|
88312
|
+
case 25:
|
88313
|
+
message.error = 25;
|
88314
|
+
break;
|
88127
88315
|
}
|
88128
88316
|
if (object.errorMessage != null)
|
88129
88317
|
message.errorMessage = String(object.errorMessage);
|
@@ -88941,6 +89129,7 @@
|
|
88941
89129
|
case 22:
|
88942
89130
|
case 23:
|
88943
89131
|
case 24:
|
89132
|
+
case 25:
|
88944
89133
|
break;
|
88945
89134
|
}
|
88946
89135
|
if (message.attributes != null && message.hasOwnProperty("attributes")) {
|
@@ -89097,6 +89286,10 @@
|
|
89097
89286
|
case 24:
|
89098
89287
|
message.error = 24;
|
89099
89288
|
break;
|
89289
|
+
case "Error_dust_amount_requested":
|
89290
|
+
case 25:
|
89291
|
+
message.error = 25;
|
89292
|
+
break;
|
89100
89293
|
}
|
89101
89294
|
if (object.attributes) {
|
89102
89295
|
if (!Array.isArray(object.attributes))
|
@@ -89461,6 +89654,7 @@
|
|
89461
89654
|
case 22:
|
89462
89655
|
case 23:
|
89463
89656
|
case 24:
|
89657
|
+
case 25:
|
89464
89658
|
break;
|
89465
89659
|
}
|
89466
89660
|
return null;
|
@@ -89629,6 +89823,10 @@
|
|
89629
89823
|
case 24:
|
89630
89824
|
message.error = 24;
|
89631
89825
|
break;
|
89826
|
+
case "Error_dust_amount_requested":
|
89827
|
+
case 25:
|
89828
|
+
message.error = 25;
|
89829
|
+
break;
|
89632
89830
|
}
|
89633
89831
|
return message;
|
89634
89832
|
};
|
@@ -92731,6 +92929,7 @@
|
|
92731
92929
|
case 22:
|
92732
92930
|
case 23:
|
92733
92931
|
case 24:
|
92932
|
+
case 25:
|
92734
92933
|
break;
|
92735
92934
|
}
|
92736
92935
|
return null;
|
@@ -92853,6 +93052,10 @@
|
|
92853
93052
|
case 24:
|
92854
93053
|
message.error = 24;
|
92855
93054
|
break;
|
93055
|
+
case "Error_dust_amount_requested":
|
93056
|
+
case 25:
|
93057
|
+
message.error = 25;
|
93058
|
+
break;
|
92856
93059
|
}
|
92857
93060
|
return message;
|
92858
93061
|
};
|
@@ -95223,6 +95426,7 @@
|
|
95223
95426
|
case 22:
|
95224
95427
|
case 23:
|
95225
95428
|
case 24:
|
95429
|
+
case 25:
|
95226
95430
|
break;
|
95227
95431
|
}
|
95228
95432
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -95349,6 +95553,10 @@
|
|
95349
95553
|
case 24:
|
95350
95554
|
message.error = 24;
|
95351
95555
|
break;
|
95556
|
+
case "Error_dust_amount_requested":
|
95557
|
+
case 25:
|
95558
|
+
message.error = 25;
|
95559
|
+
break;
|
95352
95560
|
}
|
95353
95561
|
if (object.errorMessage != null)
|
95354
95562
|
message.errorMessage = String(object.errorMessage);
|
@@ -96760,6 +96968,7 @@
|
|
96760
96968
|
case 22:
|
96761
96969
|
case 23:
|
96762
96970
|
case 24:
|
96971
|
+
case 25:
|
96763
96972
|
break;
|
96764
96973
|
}
|
96765
96974
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -96886,6 +97095,10 @@
|
|
96886
97095
|
case 24:
|
96887
97096
|
message.error = 24;
|
96888
97097
|
break;
|
97098
|
+
case "Error_dust_amount_requested":
|
97099
|
+
case 25:
|
97100
|
+
message.error = 25;
|
97101
|
+
break;
|
96889
97102
|
}
|
96890
97103
|
if (object.errorMessage != null)
|
96891
97104
|
message.errorMessage = String(object.errorMessage);
|
@@ -97585,6 +97798,7 @@
|
|
97585
97798
|
case 22:
|
97586
97799
|
case 23:
|
97587
97800
|
case 24:
|
97801
|
+
case 25:
|
97588
97802
|
break;
|
97589
97803
|
}
|
97590
97804
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -97711,6 +97925,10 @@
|
|
97711
97925
|
case 24:
|
97712
97926
|
message.error = 24;
|
97713
97927
|
break;
|
97928
|
+
case "Error_dust_amount_requested":
|
97929
|
+
case 25:
|
97930
|
+
message.error = 25;
|
97931
|
+
break;
|
97714
97932
|
}
|
97715
97933
|
if (object.errorMessage != null)
|
97716
97934
|
message.errorMessage = String(object.errorMessage);
|
@@ -103855,6 +104073,7 @@
|
|
103855
104073
|
case 22:
|
103856
104074
|
case 23:
|
103857
104075
|
case 24:
|
104076
|
+
case 25:
|
103858
104077
|
break;
|
103859
104078
|
}
|
103860
104079
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -103981,6 +104200,10 @@
|
|
103981
104200
|
case 24:
|
103982
104201
|
message.error = 24;
|
103983
104202
|
break;
|
104203
|
+
case "Error_dust_amount_requested":
|
104204
|
+
case 25:
|
104205
|
+
message.error = 25;
|
104206
|
+
break;
|
103984
104207
|
}
|
103985
104208
|
if (object.errorMessage != null)
|
103986
104209
|
message.errorMessage = String(object.errorMessage);
|
@@ -106953,6 +107176,7 @@
|
|
106953
107176
|
case 22:
|
106954
107177
|
case 23:
|
106955
107178
|
case 24:
|
107179
|
+
case 25:
|
106956
107180
|
break;
|
106957
107181
|
}
|
106958
107182
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -107079,6 +107303,10 @@
|
|
107079
107303
|
case 24:
|
107080
107304
|
message.error = 24;
|
107081
107305
|
break;
|
107306
|
+
case "Error_dust_amount_requested":
|
107307
|
+
case 25:
|
107308
|
+
message.error = 25;
|
107309
|
+
break;
|
107082
107310
|
}
|
107083
107311
|
if (object.errorMessage != null)
|
107084
107312
|
message.errorMessage = String(object.errorMessage);
|
@@ -110000,6 +110228,2405 @@
|
|
110000
110228
|
return AdvanceNonceAccount;
|
110001
110229
|
})();
|
110002
110230
|
|
110231
|
+
Proto.PubkeySignature = (function() {
|
110232
|
+
|
110233
|
+
/**
|
110234
|
+
* Properties of a PubkeySignature.
|
110235
|
+
* @memberof TW.Solana.Proto
|
110236
|
+
* @interface IPubkeySignature
|
110237
|
+
* @property {string|null} [pubkey] PubkeySignature pubkey
|
110238
|
+
* @property {string|null} [signature] PubkeySignature signature
|
110239
|
+
*/
|
110240
|
+
|
110241
|
+
/**
|
110242
|
+
* Constructs a new PubkeySignature.
|
110243
|
+
* @memberof TW.Solana.Proto
|
110244
|
+
* @classdesc Represents a PubkeySignature.
|
110245
|
+
* @implements IPubkeySignature
|
110246
|
+
* @constructor
|
110247
|
+
* @param {TW.Solana.Proto.IPubkeySignature=} [properties] Properties to set
|
110248
|
+
*/
|
110249
|
+
function PubkeySignature(properties) {
|
110250
|
+
if (properties)
|
110251
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
110252
|
+
if (properties[keys[i]] != null)
|
110253
|
+
this[keys[i]] = properties[keys[i]];
|
110254
|
+
}
|
110255
|
+
|
110256
|
+
/**
|
110257
|
+
* PubkeySignature pubkey.
|
110258
|
+
* @member {string} pubkey
|
110259
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110260
|
+
* @instance
|
110261
|
+
*/
|
110262
|
+
PubkeySignature.prototype.pubkey = "";
|
110263
|
+
|
110264
|
+
/**
|
110265
|
+
* PubkeySignature signature.
|
110266
|
+
* @member {string} signature
|
110267
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110268
|
+
* @instance
|
110269
|
+
*/
|
110270
|
+
PubkeySignature.prototype.signature = "";
|
110271
|
+
|
110272
|
+
/**
|
110273
|
+
* Creates a new PubkeySignature instance using the specified properties.
|
110274
|
+
* @function create
|
110275
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110276
|
+
* @static
|
110277
|
+
* @param {TW.Solana.Proto.IPubkeySignature=} [properties] Properties to set
|
110278
|
+
* @returns {TW.Solana.Proto.PubkeySignature} PubkeySignature instance
|
110279
|
+
*/
|
110280
|
+
PubkeySignature.create = function create(properties) {
|
110281
|
+
return new PubkeySignature(properties);
|
110282
|
+
};
|
110283
|
+
|
110284
|
+
/**
|
110285
|
+
* Encodes the specified PubkeySignature message. Does not implicitly {@link TW.Solana.Proto.PubkeySignature.verify|verify} messages.
|
110286
|
+
* @function encode
|
110287
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110288
|
+
* @static
|
110289
|
+
* @param {TW.Solana.Proto.IPubkeySignature} message PubkeySignature message or plain object to encode
|
110290
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
110291
|
+
* @returns {$protobuf.Writer} Writer
|
110292
|
+
*/
|
110293
|
+
PubkeySignature.encode = function encode(message, writer) {
|
110294
|
+
if (!writer)
|
110295
|
+
writer = $Writer.create();
|
110296
|
+
if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey"))
|
110297
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubkey);
|
110298
|
+
if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
|
110299
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.signature);
|
110300
|
+
return writer;
|
110301
|
+
};
|
110302
|
+
|
110303
|
+
/**
|
110304
|
+
* Decodes a PubkeySignature message from the specified reader or buffer.
|
110305
|
+
* @function decode
|
110306
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110307
|
+
* @static
|
110308
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
110309
|
+
* @param {number} [length] Message length if known beforehand
|
110310
|
+
* @returns {TW.Solana.Proto.PubkeySignature} PubkeySignature
|
110311
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
110312
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
110313
|
+
*/
|
110314
|
+
PubkeySignature.decode = function decode(reader, length) {
|
110315
|
+
if (!(reader instanceof $Reader))
|
110316
|
+
reader = $Reader.create(reader);
|
110317
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PubkeySignature();
|
110318
|
+
while (reader.pos < end) {
|
110319
|
+
var tag = reader.uint32();
|
110320
|
+
switch (tag >>> 3) {
|
110321
|
+
case 1:
|
110322
|
+
message.pubkey = reader.string();
|
110323
|
+
break;
|
110324
|
+
case 2:
|
110325
|
+
message.signature = reader.string();
|
110326
|
+
break;
|
110327
|
+
default:
|
110328
|
+
reader.skipType(tag & 7);
|
110329
|
+
break;
|
110330
|
+
}
|
110331
|
+
}
|
110332
|
+
return message;
|
110333
|
+
};
|
110334
|
+
|
110335
|
+
/**
|
110336
|
+
* Verifies a PubkeySignature message.
|
110337
|
+
* @function verify
|
110338
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110339
|
+
* @static
|
110340
|
+
* @param {Object.<string,*>} message Plain object to verify
|
110341
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
110342
|
+
*/
|
110343
|
+
PubkeySignature.verify = function verify(message) {
|
110344
|
+
if (typeof message !== "object" || message === null)
|
110345
|
+
return "object expected";
|
110346
|
+
if (message.pubkey != null && message.hasOwnProperty("pubkey"))
|
110347
|
+
if (!$util.isString(message.pubkey))
|
110348
|
+
return "pubkey: string expected";
|
110349
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
110350
|
+
if (!$util.isString(message.signature))
|
110351
|
+
return "signature: string expected";
|
110352
|
+
return null;
|
110353
|
+
};
|
110354
|
+
|
110355
|
+
/**
|
110356
|
+
* Creates a PubkeySignature message from a plain object. Also converts values to their respective internal types.
|
110357
|
+
* @function fromObject
|
110358
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110359
|
+
* @static
|
110360
|
+
* @param {Object.<string,*>} object Plain object
|
110361
|
+
* @returns {TW.Solana.Proto.PubkeySignature} PubkeySignature
|
110362
|
+
*/
|
110363
|
+
PubkeySignature.fromObject = function fromObject(object) {
|
110364
|
+
if (object instanceof $root.TW.Solana.Proto.PubkeySignature)
|
110365
|
+
return object;
|
110366
|
+
var message = new $root.TW.Solana.Proto.PubkeySignature();
|
110367
|
+
if (object.pubkey != null)
|
110368
|
+
message.pubkey = String(object.pubkey);
|
110369
|
+
if (object.signature != null)
|
110370
|
+
message.signature = String(object.signature);
|
110371
|
+
return message;
|
110372
|
+
};
|
110373
|
+
|
110374
|
+
/**
|
110375
|
+
* Creates a plain object from a PubkeySignature message. Also converts values to other types if specified.
|
110376
|
+
* @function toObject
|
110377
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110378
|
+
* @static
|
110379
|
+
* @param {TW.Solana.Proto.PubkeySignature} message PubkeySignature
|
110380
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
110381
|
+
* @returns {Object.<string,*>} Plain object
|
110382
|
+
*/
|
110383
|
+
PubkeySignature.toObject = function toObject(message, options) {
|
110384
|
+
if (!options)
|
110385
|
+
options = {};
|
110386
|
+
var object = {};
|
110387
|
+
if (options.defaults) {
|
110388
|
+
object.pubkey = "";
|
110389
|
+
object.signature = "";
|
110390
|
+
}
|
110391
|
+
if (message.pubkey != null && message.hasOwnProperty("pubkey"))
|
110392
|
+
object.pubkey = message.pubkey;
|
110393
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
110394
|
+
object.signature = message.signature;
|
110395
|
+
return object;
|
110396
|
+
};
|
110397
|
+
|
110398
|
+
/**
|
110399
|
+
* Converts this PubkeySignature to JSON.
|
110400
|
+
* @function toJSON
|
110401
|
+
* @memberof TW.Solana.Proto.PubkeySignature
|
110402
|
+
* @instance
|
110403
|
+
* @returns {Object.<string,*>} JSON object
|
110404
|
+
*/
|
110405
|
+
PubkeySignature.prototype.toJSON = function toJSON() {
|
110406
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
110407
|
+
};
|
110408
|
+
|
110409
|
+
return PubkeySignature;
|
110410
|
+
})();
|
110411
|
+
|
110412
|
+
Proto.RawMessage = (function() {
|
110413
|
+
|
110414
|
+
/**
|
110415
|
+
* Properties of a RawMessage.
|
110416
|
+
* @memberof TW.Solana.Proto
|
110417
|
+
* @interface IRawMessage
|
110418
|
+
* @property {Array.<TW.Solana.Proto.IPubkeySignature>|null} [signatures] RawMessage signatures
|
110419
|
+
* @property {TW.Solana.Proto.RawMessage.IMessageLegacy|null} [legacy] RawMessage legacy
|
110420
|
+
* @property {TW.Solana.Proto.RawMessage.IMessageV0|null} [v0] RawMessage v0
|
110421
|
+
*/
|
110422
|
+
|
110423
|
+
/**
|
110424
|
+
* Constructs a new RawMessage.
|
110425
|
+
* @memberof TW.Solana.Proto
|
110426
|
+
* @classdesc Represents a RawMessage.
|
110427
|
+
* @implements IRawMessage
|
110428
|
+
* @constructor
|
110429
|
+
* @param {TW.Solana.Proto.IRawMessage=} [properties] Properties to set
|
110430
|
+
*/
|
110431
|
+
function RawMessage(properties) {
|
110432
|
+
this.signatures = [];
|
110433
|
+
if (properties)
|
110434
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
110435
|
+
if (properties[keys[i]] != null)
|
110436
|
+
this[keys[i]] = properties[keys[i]];
|
110437
|
+
}
|
110438
|
+
|
110439
|
+
/**
|
110440
|
+
* RawMessage signatures.
|
110441
|
+
* @member {Array.<TW.Solana.Proto.IPubkeySignature>} signatures
|
110442
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110443
|
+
* @instance
|
110444
|
+
*/
|
110445
|
+
RawMessage.prototype.signatures = $util.emptyArray;
|
110446
|
+
|
110447
|
+
/**
|
110448
|
+
* RawMessage legacy.
|
110449
|
+
* @member {TW.Solana.Proto.RawMessage.IMessageLegacy|null|undefined} legacy
|
110450
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110451
|
+
* @instance
|
110452
|
+
*/
|
110453
|
+
RawMessage.prototype.legacy = null;
|
110454
|
+
|
110455
|
+
/**
|
110456
|
+
* RawMessage v0.
|
110457
|
+
* @member {TW.Solana.Proto.RawMessage.IMessageV0|null|undefined} v0
|
110458
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110459
|
+
* @instance
|
110460
|
+
*/
|
110461
|
+
RawMessage.prototype.v0 = null;
|
110462
|
+
|
110463
|
+
// OneOf field names bound to virtual getters and setters
|
110464
|
+
var $oneOfFields;
|
110465
|
+
|
110466
|
+
/**
|
110467
|
+
* RawMessage message.
|
110468
|
+
* @member {"legacy"|"v0"|undefined} message
|
110469
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110470
|
+
* @instance
|
110471
|
+
*/
|
110472
|
+
Object.defineProperty(RawMessage.prototype, "message", {
|
110473
|
+
get: $util.oneOfGetter($oneOfFields = ["legacy", "v0"]),
|
110474
|
+
set: $util.oneOfSetter($oneOfFields)
|
110475
|
+
});
|
110476
|
+
|
110477
|
+
/**
|
110478
|
+
* Creates a new RawMessage instance using the specified properties.
|
110479
|
+
* @function create
|
110480
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110481
|
+
* @static
|
110482
|
+
* @param {TW.Solana.Proto.IRawMessage=} [properties] Properties to set
|
110483
|
+
* @returns {TW.Solana.Proto.RawMessage} RawMessage instance
|
110484
|
+
*/
|
110485
|
+
RawMessage.create = function create(properties) {
|
110486
|
+
return new RawMessage(properties);
|
110487
|
+
};
|
110488
|
+
|
110489
|
+
/**
|
110490
|
+
* Encodes the specified RawMessage message. Does not implicitly {@link TW.Solana.Proto.RawMessage.verify|verify} messages.
|
110491
|
+
* @function encode
|
110492
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110493
|
+
* @static
|
110494
|
+
* @param {TW.Solana.Proto.IRawMessage} message RawMessage message or plain object to encode
|
110495
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
110496
|
+
* @returns {$protobuf.Writer} Writer
|
110497
|
+
*/
|
110498
|
+
RawMessage.encode = function encode(message, writer) {
|
110499
|
+
if (!writer)
|
110500
|
+
writer = $Writer.create();
|
110501
|
+
if (message.signatures != null && message.signatures.length)
|
110502
|
+
for (var i = 0; i < message.signatures.length; ++i)
|
110503
|
+
$root.TW.Solana.Proto.PubkeySignature.encode(message.signatures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
110504
|
+
if (message.legacy != null && Object.hasOwnProperty.call(message, "legacy"))
|
110505
|
+
$root.TW.Solana.Proto.RawMessage.MessageLegacy.encode(message.legacy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
110506
|
+
if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
|
110507
|
+
$root.TW.Solana.Proto.RawMessage.MessageV0.encode(message.v0, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
110508
|
+
return writer;
|
110509
|
+
};
|
110510
|
+
|
110511
|
+
/**
|
110512
|
+
* Decodes a RawMessage message from the specified reader or buffer.
|
110513
|
+
* @function decode
|
110514
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110515
|
+
* @static
|
110516
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
110517
|
+
* @param {number} [length] Message length if known beforehand
|
110518
|
+
* @returns {TW.Solana.Proto.RawMessage} RawMessage
|
110519
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
110520
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
110521
|
+
*/
|
110522
|
+
RawMessage.decode = function decode(reader, length) {
|
110523
|
+
if (!(reader instanceof $Reader))
|
110524
|
+
reader = $Reader.create(reader);
|
110525
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage();
|
110526
|
+
while (reader.pos < end) {
|
110527
|
+
var tag = reader.uint32();
|
110528
|
+
switch (tag >>> 3) {
|
110529
|
+
case 1:
|
110530
|
+
if (!(message.signatures && message.signatures.length))
|
110531
|
+
message.signatures = [];
|
110532
|
+
message.signatures.push($root.TW.Solana.Proto.PubkeySignature.decode(reader, reader.uint32()));
|
110533
|
+
break;
|
110534
|
+
case 2:
|
110535
|
+
message.legacy = $root.TW.Solana.Proto.RawMessage.MessageLegacy.decode(reader, reader.uint32());
|
110536
|
+
break;
|
110537
|
+
case 3:
|
110538
|
+
message.v0 = $root.TW.Solana.Proto.RawMessage.MessageV0.decode(reader, reader.uint32());
|
110539
|
+
break;
|
110540
|
+
default:
|
110541
|
+
reader.skipType(tag & 7);
|
110542
|
+
break;
|
110543
|
+
}
|
110544
|
+
}
|
110545
|
+
return message;
|
110546
|
+
};
|
110547
|
+
|
110548
|
+
/**
|
110549
|
+
* Verifies a RawMessage message.
|
110550
|
+
* @function verify
|
110551
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110552
|
+
* @static
|
110553
|
+
* @param {Object.<string,*>} message Plain object to verify
|
110554
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
110555
|
+
*/
|
110556
|
+
RawMessage.verify = function verify(message) {
|
110557
|
+
if (typeof message !== "object" || message === null)
|
110558
|
+
return "object expected";
|
110559
|
+
var properties = {};
|
110560
|
+
if (message.signatures != null && message.hasOwnProperty("signatures")) {
|
110561
|
+
if (!Array.isArray(message.signatures))
|
110562
|
+
return "signatures: array expected";
|
110563
|
+
for (var i = 0; i < message.signatures.length; ++i) {
|
110564
|
+
var error = $root.TW.Solana.Proto.PubkeySignature.verify(message.signatures[i]);
|
110565
|
+
if (error)
|
110566
|
+
return "signatures." + error;
|
110567
|
+
}
|
110568
|
+
}
|
110569
|
+
if (message.legacy != null && message.hasOwnProperty("legacy")) {
|
110570
|
+
properties.message = 1;
|
110571
|
+
{
|
110572
|
+
var error = $root.TW.Solana.Proto.RawMessage.MessageLegacy.verify(message.legacy);
|
110573
|
+
if (error)
|
110574
|
+
return "legacy." + error;
|
110575
|
+
}
|
110576
|
+
}
|
110577
|
+
if (message.v0 != null && message.hasOwnProperty("v0")) {
|
110578
|
+
if (properties.message === 1)
|
110579
|
+
return "message: multiple values";
|
110580
|
+
properties.message = 1;
|
110581
|
+
{
|
110582
|
+
var error = $root.TW.Solana.Proto.RawMessage.MessageV0.verify(message.v0);
|
110583
|
+
if (error)
|
110584
|
+
return "v0." + error;
|
110585
|
+
}
|
110586
|
+
}
|
110587
|
+
return null;
|
110588
|
+
};
|
110589
|
+
|
110590
|
+
/**
|
110591
|
+
* Creates a RawMessage message from a plain object. Also converts values to their respective internal types.
|
110592
|
+
* @function fromObject
|
110593
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110594
|
+
* @static
|
110595
|
+
* @param {Object.<string,*>} object Plain object
|
110596
|
+
* @returns {TW.Solana.Proto.RawMessage} RawMessage
|
110597
|
+
*/
|
110598
|
+
RawMessage.fromObject = function fromObject(object) {
|
110599
|
+
if (object instanceof $root.TW.Solana.Proto.RawMessage)
|
110600
|
+
return object;
|
110601
|
+
var message = new $root.TW.Solana.Proto.RawMessage();
|
110602
|
+
if (object.signatures) {
|
110603
|
+
if (!Array.isArray(object.signatures))
|
110604
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.signatures: array expected");
|
110605
|
+
message.signatures = [];
|
110606
|
+
for (var i = 0; i < object.signatures.length; ++i) {
|
110607
|
+
if (typeof object.signatures[i] !== "object")
|
110608
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.signatures: object expected");
|
110609
|
+
message.signatures[i] = $root.TW.Solana.Proto.PubkeySignature.fromObject(object.signatures[i]);
|
110610
|
+
}
|
110611
|
+
}
|
110612
|
+
if (object.legacy != null) {
|
110613
|
+
if (typeof object.legacy !== "object")
|
110614
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.legacy: object expected");
|
110615
|
+
message.legacy = $root.TW.Solana.Proto.RawMessage.MessageLegacy.fromObject(object.legacy);
|
110616
|
+
}
|
110617
|
+
if (object.v0 != null) {
|
110618
|
+
if (typeof object.v0 !== "object")
|
110619
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.v0: object expected");
|
110620
|
+
message.v0 = $root.TW.Solana.Proto.RawMessage.MessageV0.fromObject(object.v0);
|
110621
|
+
}
|
110622
|
+
return message;
|
110623
|
+
};
|
110624
|
+
|
110625
|
+
/**
|
110626
|
+
* Creates a plain object from a RawMessage message. Also converts values to other types if specified.
|
110627
|
+
* @function toObject
|
110628
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110629
|
+
* @static
|
110630
|
+
* @param {TW.Solana.Proto.RawMessage} message RawMessage
|
110631
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
110632
|
+
* @returns {Object.<string,*>} Plain object
|
110633
|
+
*/
|
110634
|
+
RawMessage.toObject = function toObject(message, options) {
|
110635
|
+
if (!options)
|
110636
|
+
options = {};
|
110637
|
+
var object = {};
|
110638
|
+
if (options.arrays || options.defaults)
|
110639
|
+
object.signatures = [];
|
110640
|
+
if (message.signatures && message.signatures.length) {
|
110641
|
+
object.signatures = [];
|
110642
|
+
for (var j = 0; j < message.signatures.length; ++j)
|
110643
|
+
object.signatures[j] = $root.TW.Solana.Proto.PubkeySignature.toObject(message.signatures[j], options);
|
110644
|
+
}
|
110645
|
+
if (message.legacy != null && message.hasOwnProperty("legacy")) {
|
110646
|
+
object.legacy = $root.TW.Solana.Proto.RawMessage.MessageLegacy.toObject(message.legacy, options);
|
110647
|
+
if (options.oneofs)
|
110648
|
+
object.message = "legacy";
|
110649
|
+
}
|
110650
|
+
if (message.v0 != null && message.hasOwnProperty("v0")) {
|
110651
|
+
object.v0 = $root.TW.Solana.Proto.RawMessage.MessageV0.toObject(message.v0, options);
|
110652
|
+
if (options.oneofs)
|
110653
|
+
object.message = "v0";
|
110654
|
+
}
|
110655
|
+
return object;
|
110656
|
+
};
|
110657
|
+
|
110658
|
+
/**
|
110659
|
+
* Converts this RawMessage to JSON.
|
110660
|
+
* @function toJSON
|
110661
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110662
|
+
* @instance
|
110663
|
+
* @returns {Object.<string,*>} JSON object
|
110664
|
+
*/
|
110665
|
+
RawMessage.prototype.toJSON = function toJSON() {
|
110666
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
110667
|
+
};
|
110668
|
+
|
110669
|
+
RawMessage.MessageHeader = (function() {
|
110670
|
+
|
110671
|
+
/**
|
110672
|
+
* Properties of a MessageHeader.
|
110673
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110674
|
+
* @interface IMessageHeader
|
110675
|
+
* @property {number|null} [numRequiredSignatures] MessageHeader numRequiredSignatures
|
110676
|
+
* @property {number|null} [numReadonlySignedAccounts] MessageHeader numReadonlySignedAccounts
|
110677
|
+
* @property {number|null} [numReadonlyUnsignedAccounts] MessageHeader numReadonlyUnsignedAccounts
|
110678
|
+
*/
|
110679
|
+
|
110680
|
+
/**
|
110681
|
+
* Constructs a new MessageHeader.
|
110682
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110683
|
+
* @classdesc Represents a MessageHeader.
|
110684
|
+
* @implements IMessageHeader
|
110685
|
+
* @constructor
|
110686
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageHeader=} [properties] Properties to set
|
110687
|
+
*/
|
110688
|
+
function MessageHeader(properties) {
|
110689
|
+
if (properties)
|
110690
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
110691
|
+
if (properties[keys[i]] != null)
|
110692
|
+
this[keys[i]] = properties[keys[i]];
|
110693
|
+
}
|
110694
|
+
|
110695
|
+
/**
|
110696
|
+
* MessageHeader numRequiredSignatures.
|
110697
|
+
* @member {number} numRequiredSignatures
|
110698
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110699
|
+
* @instance
|
110700
|
+
*/
|
110701
|
+
MessageHeader.prototype.numRequiredSignatures = 0;
|
110702
|
+
|
110703
|
+
/**
|
110704
|
+
* MessageHeader numReadonlySignedAccounts.
|
110705
|
+
* @member {number} numReadonlySignedAccounts
|
110706
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110707
|
+
* @instance
|
110708
|
+
*/
|
110709
|
+
MessageHeader.prototype.numReadonlySignedAccounts = 0;
|
110710
|
+
|
110711
|
+
/**
|
110712
|
+
* MessageHeader numReadonlyUnsignedAccounts.
|
110713
|
+
* @member {number} numReadonlyUnsignedAccounts
|
110714
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110715
|
+
* @instance
|
110716
|
+
*/
|
110717
|
+
MessageHeader.prototype.numReadonlyUnsignedAccounts = 0;
|
110718
|
+
|
110719
|
+
/**
|
110720
|
+
* Creates a new MessageHeader instance using the specified properties.
|
110721
|
+
* @function create
|
110722
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110723
|
+
* @static
|
110724
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageHeader=} [properties] Properties to set
|
110725
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageHeader} MessageHeader instance
|
110726
|
+
*/
|
110727
|
+
MessageHeader.create = function create(properties) {
|
110728
|
+
return new MessageHeader(properties);
|
110729
|
+
};
|
110730
|
+
|
110731
|
+
/**
|
110732
|
+
* Encodes the specified MessageHeader message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageHeader.verify|verify} messages.
|
110733
|
+
* @function encode
|
110734
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110735
|
+
* @static
|
110736
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageHeader} message MessageHeader message or plain object to encode
|
110737
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
110738
|
+
* @returns {$protobuf.Writer} Writer
|
110739
|
+
*/
|
110740
|
+
MessageHeader.encode = function encode(message, writer) {
|
110741
|
+
if (!writer)
|
110742
|
+
writer = $Writer.create();
|
110743
|
+
if (message.numRequiredSignatures != null && Object.hasOwnProperty.call(message, "numRequiredSignatures"))
|
110744
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.numRequiredSignatures);
|
110745
|
+
if (message.numReadonlySignedAccounts != null && Object.hasOwnProperty.call(message, "numReadonlySignedAccounts"))
|
110746
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.numReadonlySignedAccounts);
|
110747
|
+
if (message.numReadonlyUnsignedAccounts != null && Object.hasOwnProperty.call(message, "numReadonlyUnsignedAccounts"))
|
110748
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numReadonlyUnsignedAccounts);
|
110749
|
+
return writer;
|
110750
|
+
};
|
110751
|
+
|
110752
|
+
/**
|
110753
|
+
* Decodes a MessageHeader message from the specified reader or buffer.
|
110754
|
+
* @function decode
|
110755
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110756
|
+
* @static
|
110757
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
110758
|
+
* @param {number} [length] Message length if known beforehand
|
110759
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageHeader} MessageHeader
|
110760
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
110761
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
110762
|
+
*/
|
110763
|
+
MessageHeader.decode = function decode(reader, length) {
|
110764
|
+
if (!(reader instanceof $Reader))
|
110765
|
+
reader = $Reader.create(reader);
|
110766
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageHeader();
|
110767
|
+
while (reader.pos < end) {
|
110768
|
+
var tag = reader.uint32();
|
110769
|
+
switch (tag >>> 3) {
|
110770
|
+
case 1:
|
110771
|
+
message.numRequiredSignatures = reader.uint32();
|
110772
|
+
break;
|
110773
|
+
case 2:
|
110774
|
+
message.numReadonlySignedAccounts = reader.uint32();
|
110775
|
+
break;
|
110776
|
+
case 3:
|
110777
|
+
message.numReadonlyUnsignedAccounts = reader.uint32();
|
110778
|
+
break;
|
110779
|
+
default:
|
110780
|
+
reader.skipType(tag & 7);
|
110781
|
+
break;
|
110782
|
+
}
|
110783
|
+
}
|
110784
|
+
return message;
|
110785
|
+
};
|
110786
|
+
|
110787
|
+
/**
|
110788
|
+
* Verifies a MessageHeader message.
|
110789
|
+
* @function verify
|
110790
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110791
|
+
* @static
|
110792
|
+
* @param {Object.<string,*>} message Plain object to verify
|
110793
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
110794
|
+
*/
|
110795
|
+
MessageHeader.verify = function verify(message) {
|
110796
|
+
if (typeof message !== "object" || message === null)
|
110797
|
+
return "object expected";
|
110798
|
+
if (message.numRequiredSignatures != null && message.hasOwnProperty("numRequiredSignatures"))
|
110799
|
+
if (!$util.isInteger(message.numRequiredSignatures))
|
110800
|
+
return "numRequiredSignatures: integer expected";
|
110801
|
+
if (message.numReadonlySignedAccounts != null && message.hasOwnProperty("numReadonlySignedAccounts"))
|
110802
|
+
if (!$util.isInteger(message.numReadonlySignedAccounts))
|
110803
|
+
return "numReadonlySignedAccounts: integer expected";
|
110804
|
+
if (message.numReadonlyUnsignedAccounts != null && message.hasOwnProperty("numReadonlyUnsignedAccounts"))
|
110805
|
+
if (!$util.isInteger(message.numReadonlyUnsignedAccounts))
|
110806
|
+
return "numReadonlyUnsignedAccounts: integer expected";
|
110807
|
+
return null;
|
110808
|
+
};
|
110809
|
+
|
110810
|
+
/**
|
110811
|
+
* Creates a MessageHeader message from a plain object. Also converts values to their respective internal types.
|
110812
|
+
* @function fromObject
|
110813
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110814
|
+
* @static
|
110815
|
+
* @param {Object.<string,*>} object Plain object
|
110816
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageHeader} MessageHeader
|
110817
|
+
*/
|
110818
|
+
MessageHeader.fromObject = function fromObject(object) {
|
110819
|
+
if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageHeader)
|
110820
|
+
return object;
|
110821
|
+
var message = new $root.TW.Solana.Proto.RawMessage.MessageHeader();
|
110822
|
+
if (object.numRequiredSignatures != null)
|
110823
|
+
message.numRequiredSignatures = object.numRequiredSignatures >>> 0;
|
110824
|
+
if (object.numReadonlySignedAccounts != null)
|
110825
|
+
message.numReadonlySignedAccounts = object.numReadonlySignedAccounts >>> 0;
|
110826
|
+
if (object.numReadonlyUnsignedAccounts != null)
|
110827
|
+
message.numReadonlyUnsignedAccounts = object.numReadonlyUnsignedAccounts >>> 0;
|
110828
|
+
return message;
|
110829
|
+
};
|
110830
|
+
|
110831
|
+
/**
|
110832
|
+
* Creates a plain object from a MessageHeader message. Also converts values to other types if specified.
|
110833
|
+
* @function toObject
|
110834
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110835
|
+
* @static
|
110836
|
+
* @param {TW.Solana.Proto.RawMessage.MessageHeader} message MessageHeader
|
110837
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
110838
|
+
* @returns {Object.<string,*>} Plain object
|
110839
|
+
*/
|
110840
|
+
MessageHeader.toObject = function toObject(message, options) {
|
110841
|
+
if (!options)
|
110842
|
+
options = {};
|
110843
|
+
var object = {};
|
110844
|
+
if (options.defaults) {
|
110845
|
+
object.numRequiredSignatures = 0;
|
110846
|
+
object.numReadonlySignedAccounts = 0;
|
110847
|
+
object.numReadonlyUnsignedAccounts = 0;
|
110848
|
+
}
|
110849
|
+
if (message.numRequiredSignatures != null && message.hasOwnProperty("numRequiredSignatures"))
|
110850
|
+
object.numRequiredSignatures = message.numRequiredSignatures;
|
110851
|
+
if (message.numReadonlySignedAccounts != null && message.hasOwnProperty("numReadonlySignedAccounts"))
|
110852
|
+
object.numReadonlySignedAccounts = message.numReadonlySignedAccounts;
|
110853
|
+
if (message.numReadonlyUnsignedAccounts != null && message.hasOwnProperty("numReadonlyUnsignedAccounts"))
|
110854
|
+
object.numReadonlyUnsignedAccounts = message.numReadonlyUnsignedAccounts;
|
110855
|
+
return object;
|
110856
|
+
};
|
110857
|
+
|
110858
|
+
/**
|
110859
|
+
* Converts this MessageHeader to JSON.
|
110860
|
+
* @function toJSON
|
110861
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageHeader
|
110862
|
+
* @instance
|
110863
|
+
* @returns {Object.<string,*>} JSON object
|
110864
|
+
*/
|
110865
|
+
MessageHeader.prototype.toJSON = function toJSON() {
|
110866
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
110867
|
+
};
|
110868
|
+
|
110869
|
+
return MessageHeader;
|
110870
|
+
})();
|
110871
|
+
|
110872
|
+
RawMessage.Instruction = (function() {
|
110873
|
+
|
110874
|
+
/**
|
110875
|
+
* Properties of an Instruction.
|
110876
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110877
|
+
* @interface IInstruction
|
110878
|
+
* @property {number|null} [programId] Instruction programId
|
110879
|
+
* @property {Array.<number>|null} [accounts] Instruction accounts
|
110880
|
+
* @property {Uint8Array|null} [programData] Instruction programData
|
110881
|
+
*/
|
110882
|
+
|
110883
|
+
/**
|
110884
|
+
* Constructs a new Instruction.
|
110885
|
+
* @memberof TW.Solana.Proto.RawMessage
|
110886
|
+
* @classdesc Represents an Instruction.
|
110887
|
+
* @implements IInstruction
|
110888
|
+
* @constructor
|
110889
|
+
* @param {TW.Solana.Proto.RawMessage.IInstruction=} [properties] Properties to set
|
110890
|
+
*/
|
110891
|
+
function Instruction(properties) {
|
110892
|
+
this.accounts = [];
|
110893
|
+
if (properties)
|
110894
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
110895
|
+
if (properties[keys[i]] != null)
|
110896
|
+
this[keys[i]] = properties[keys[i]];
|
110897
|
+
}
|
110898
|
+
|
110899
|
+
/**
|
110900
|
+
* Instruction programId.
|
110901
|
+
* @member {number} programId
|
110902
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
110903
|
+
* @instance
|
110904
|
+
*/
|
110905
|
+
Instruction.prototype.programId = 0;
|
110906
|
+
|
110907
|
+
/**
|
110908
|
+
* Instruction accounts.
|
110909
|
+
* @member {Array.<number>} accounts
|
110910
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
110911
|
+
* @instance
|
110912
|
+
*/
|
110913
|
+
Instruction.prototype.accounts = $util.emptyArray;
|
110914
|
+
|
110915
|
+
/**
|
110916
|
+
* Instruction programData.
|
110917
|
+
* @member {Uint8Array} programData
|
110918
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
110919
|
+
* @instance
|
110920
|
+
*/
|
110921
|
+
Instruction.prototype.programData = $util.newBuffer([]);
|
110922
|
+
|
110923
|
+
/**
|
110924
|
+
* Creates a new Instruction instance using the specified properties.
|
110925
|
+
* @function create
|
110926
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
110927
|
+
* @static
|
110928
|
+
* @param {TW.Solana.Proto.RawMessage.IInstruction=} [properties] Properties to set
|
110929
|
+
* @returns {TW.Solana.Proto.RawMessage.Instruction} Instruction instance
|
110930
|
+
*/
|
110931
|
+
Instruction.create = function create(properties) {
|
110932
|
+
return new Instruction(properties);
|
110933
|
+
};
|
110934
|
+
|
110935
|
+
/**
|
110936
|
+
* Encodes the specified Instruction message. Does not implicitly {@link TW.Solana.Proto.RawMessage.Instruction.verify|verify} messages.
|
110937
|
+
* @function encode
|
110938
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
110939
|
+
* @static
|
110940
|
+
* @param {TW.Solana.Proto.RawMessage.IInstruction} message Instruction message or plain object to encode
|
110941
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
110942
|
+
* @returns {$protobuf.Writer} Writer
|
110943
|
+
*/
|
110944
|
+
Instruction.encode = function encode(message, writer) {
|
110945
|
+
if (!writer)
|
110946
|
+
writer = $Writer.create();
|
110947
|
+
if (message.programId != null && Object.hasOwnProperty.call(message, "programId"))
|
110948
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.programId);
|
110949
|
+
if (message.accounts != null && message.accounts.length) {
|
110950
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
110951
|
+
for (var i = 0; i < message.accounts.length; ++i)
|
110952
|
+
writer.uint32(message.accounts[i]);
|
110953
|
+
writer.ldelim();
|
110954
|
+
}
|
110955
|
+
if (message.programData != null && Object.hasOwnProperty.call(message, "programData"))
|
110956
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.programData);
|
110957
|
+
return writer;
|
110958
|
+
};
|
110959
|
+
|
110960
|
+
/**
|
110961
|
+
* Decodes an Instruction message from the specified reader or buffer.
|
110962
|
+
* @function decode
|
110963
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
110964
|
+
* @static
|
110965
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
110966
|
+
* @param {number} [length] Message length if known beforehand
|
110967
|
+
* @returns {TW.Solana.Proto.RawMessage.Instruction} Instruction
|
110968
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
110969
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
110970
|
+
*/
|
110971
|
+
Instruction.decode = function decode(reader, length) {
|
110972
|
+
if (!(reader instanceof $Reader))
|
110973
|
+
reader = $Reader.create(reader);
|
110974
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.Instruction();
|
110975
|
+
while (reader.pos < end) {
|
110976
|
+
var tag = reader.uint32();
|
110977
|
+
switch (tag >>> 3) {
|
110978
|
+
case 1:
|
110979
|
+
message.programId = reader.uint32();
|
110980
|
+
break;
|
110981
|
+
case 2:
|
110982
|
+
if (!(message.accounts && message.accounts.length))
|
110983
|
+
message.accounts = [];
|
110984
|
+
if ((tag & 7) === 2) {
|
110985
|
+
var end2 = reader.uint32() + reader.pos;
|
110986
|
+
while (reader.pos < end2)
|
110987
|
+
message.accounts.push(reader.uint32());
|
110988
|
+
} else
|
110989
|
+
message.accounts.push(reader.uint32());
|
110990
|
+
break;
|
110991
|
+
case 3:
|
110992
|
+
message.programData = reader.bytes();
|
110993
|
+
break;
|
110994
|
+
default:
|
110995
|
+
reader.skipType(tag & 7);
|
110996
|
+
break;
|
110997
|
+
}
|
110998
|
+
}
|
110999
|
+
return message;
|
111000
|
+
};
|
111001
|
+
|
111002
|
+
/**
|
111003
|
+
* Verifies an Instruction message.
|
111004
|
+
* @function verify
|
111005
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
111006
|
+
* @static
|
111007
|
+
* @param {Object.<string,*>} message Plain object to verify
|
111008
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
111009
|
+
*/
|
111010
|
+
Instruction.verify = function verify(message) {
|
111011
|
+
if (typeof message !== "object" || message === null)
|
111012
|
+
return "object expected";
|
111013
|
+
if (message.programId != null && message.hasOwnProperty("programId"))
|
111014
|
+
if (!$util.isInteger(message.programId))
|
111015
|
+
return "programId: integer expected";
|
111016
|
+
if (message.accounts != null && message.hasOwnProperty("accounts")) {
|
111017
|
+
if (!Array.isArray(message.accounts))
|
111018
|
+
return "accounts: array expected";
|
111019
|
+
for (var i = 0; i < message.accounts.length; ++i)
|
111020
|
+
if (!$util.isInteger(message.accounts[i]))
|
111021
|
+
return "accounts: integer[] expected";
|
111022
|
+
}
|
111023
|
+
if (message.programData != null && message.hasOwnProperty("programData"))
|
111024
|
+
if (!(message.programData && typeof message.programData.length === "number" || $util.isString(message.programData)))
|
111025
|
+
return "programData: buffer expected";
|
111026
|
+
return null;
|
111027
|
+
};
|
111028
|
+
|
111029
|
+
/**
|
111030
|
+
* Creates an Instruction message from a plain object. Also converts values to their respective internal types.
|
111031
|
+
* @function fromObject
|
111032
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
111033
|
+
* @static
|
111034
|
+
* @param {Object.<string,*>} object Plain object
|
111035
|
+
* @returns {TW.Solana.Proto.RawMessage.Instruction} Instruction
|
111036
|
+
*/
|
111037
|
+
Instruction.fromObject = function fromObject(object) {
|
111038
|
+
if (object instanceof $root.TW.Solana.Proto.RawMessage.Instruction)
|
111039
|
+
return object;
|
111040
|
+
var message = new $root.TW.Solana.Proto.RawMessage.Instruction();
|
111041
|
+
if (object.programId != null)
|
111042
|
+
message.programId = object.programId >>> 0;
|
111043
|
+
if (object.accounts) {
|
111044
|
+
if (!Array.isArray(object.accounts))
|
111045
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.Instruction.accounts: array expected");
|
111046
|
+
message.accounts = [];
|
111047
|
+
for (var i = 0; i < object.accounts.length; ++i)
|
111048
|
+
message.accounts[i] = object.accounts[i] >>> 0;
|
111049
|
+
}
|
111050
|
+
if (object.programData != null)
|
111051
|
+
if (typeof object.programData === "string")
|
111052
|
+
$util.base64.decode(object.programData, message.programData = $util.newBuffer($util.base64.length(object.programData)), 0);
|
111053
|
+
else if (object.programData.length)
|
111054
|
+
message.programData = object.programData;
|
111055
|
+
return message;
|
111056
|
+
};
|
111057
|
+
|
111058
|
+
/**
|
111059
|
+
* Creates a plain object from an Instruction message. Also converts values to other types if specified.
|
111060
|
+
* @function toObject
|
111061
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
111062
|
+
* @static
|
111063
|
+
* @param {TW.Solana.Proto.RawMessage.Instruction} message Instruction
|
111064
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
111065
|
+
* @returns {Object.<string,*>} Plain object
|
111066
|
+
*/
|
111067
|
+
Instruction.toObject = function toObject(message, options) {
|
111068
|
+
if (!options)
|
111069
|
+
options = {};
|
111070
|
+
var object = {};
|
111071
|
+
if (options.arrays || options.defaults)
|
111072
|
+
object.accounts = [];
|
111073
|
+
if (options.defaults) {
|
111074
|
+
object.programId = 0;
|
111075
|
+
if (options.bytes === String)
|
111076
|
+
object.programData = "";
|
111077
|
+
else {
|
111078
|
+
object.programData = [];
|
111079
|
+
if (options.bytes !== Array)
|
111080
|
+
object.programData = $util.newBuffer(object.programData);
|
111081
|
+
}
|
111082
|
+
}
|
111083
|
+
if (message.programId != null && message.hasOwnProperty("programId"))
|
111084
|
+
object.programId = message.programId;
|
111085
|
+
if (message.accounts && message.accounts.length) {
|
111086
|
+
object.accounts = [];
|
111087
|
+
for (var j = 0; j < message.accounts.length; ++j)
|
111088
|
+
object.accounts[j] = message.accounts[j];
|
111089
|
+
}
|
111090
|
+
if (message.programData != null && message.hasOwnProperty("programData"))
|
111091
|
+
object.programData = options.bytes === String ? $util.base64.encode(message.programData, 0, message.programData.length) : options.bytes === Array ? Array.prototype.slice.call(message.programData) : message.programData;
|
111092
|
+
return object;
|
111093
|
+
};
|
111094
|
+
|
111095
|
+
/**
|
111096
|
+
* Converts this Instruction to JSON.
|
111097
|
+
* @function toJSON
|
111098
|
+
* @memberof TW.Solana.Proto.RawMessage.Instruction
|
111099
|
+
* @instance
|
111100
|
+
* @returns {Object.<string,*>} JSON object
|
111101
|
+
*/
|
111102
|
+
Instruction.prototype.toJSON = function toJSON() {
|
111103
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
111104
|
+
};
|
111105
|
+
|
111106
|
+
return Instruction;
|
111107
|
+
})();
|
111108
|
+
|
111109
|
+
RawMessage.MessageAddressTableLookup = (function() {
|
111110
|
+
|
111111
|
+
/**
|
111112
|
+
* Properties of a MessageAddressTableLookup.
|
111113
|
+
* @memberof TW.Solana.Proto.RawMessage
|
111114
|
+
* @interface IMessageAddressTableLookup
|
111115
|
+
* @property {string|null} [accountKey] MessageAddressTableLookup accountKey
|
111116
|
+
* @property {Array.<number>|null} [writableIndexes] MessageAddressTableLookup writableIndexes
|
111117
|
+
* @property {Array.<number>|null} [readonlyIndexes] MessageAddressTableLookup readonlyIndexes
|
111118
|
+
*/
|
111119
|
+
|
111120
|
+
/**
|
111121
|
+
* Constructs a new MessageAddressTableLookup.
|
111122
|
+
* @memberof TW.Solana.Proto.RawMessage
|
111123
|
+
* @classdesc Represents a MessageAddressTableLookup.
|
111124
|
+
* @implements IMessageAddressTableLookup
|
111125
|
+
* @constructor
|
111126
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageAddressTableLookup=} [properties] Properties to set
|
111127
|
+
*/
|
111128
|
+
function MessageAddressTableLookup(properties) {
|
111129
|
+
this.writableIndexes = [];
|
111130
|
+
this.readonlyIndexes = [];
|
111131
|
+
if (properties)
|
111132
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
111133
|
+
if (properties[keys[i]] != null)
|
111134
|
+
this[keys[i]] = properties[keys[i]];
|
111135
|
+
}
|
111136
|
+
|
111137
|
+
/**
|
111138
|
+
* MessageAddressTableLookup accountKey.
|
111139
|
+
* @member {string} accountKey
|
111140
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111141
|
+
* @instance
|
111142
|
+
*/
|
111143
|
+
MessageAddressTableLookup.prototype.accountKey = "";
|
111144
|
+
|
111145
|
+
/**
|
111146
|
+
* MessageAddressTableLookup writableIndexes.
|
111147
|
+
* @member {Array.<number>} writableIndexes
|
111148
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111149
|
+
* @instance
|
111150
|
+
*/
|
111151
|
+
MessageAddressTableLookup.prototype.writableIndexes = $util.emptyArray;
|
111152
|
+
|
111153
|
+
/**
|
111154
|
+
* MessageAddressTableLookup readonlyIndexes.
|
111155
|
+
* @member {Array.<number>} readonlyIndexes
|
111156
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111157
|
+
* @instance
|
111158
|
+
*/
|
111159
|
+
MessageAddressTableLookup.prototype.readonlyIndexes = $util.emptyArray;
|
111160
|
+
|
111161
|
+
/**
|
111162
|
+
* Creates a new MessageAddressTableLookup instance using the specified properties.
|
111163
|
+
* @function create
|
111164
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111165
|
+
* @static
|
111166
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageAddressTableLookup=} [properties] Properties to set
|
111167
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} MessageAddressTableLookup instance
|
111168
|
+
*/
|
111169
|
+
MessageAddressTableLookup.create = function create(properties) {
|
111170
|
+
return new MessageAddressTableLookup(properties);
|
111171
|
+
};
|
111172
|
+
|
111173
|
+
/**
|
111174
|
+
* Encodes the specified MessageAddressTableLookup message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageAddressTableLookup.verify|verify} messages.
|
111175
|
+
* @function encode
|
111176
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111177
|
+
* @static
|
111178
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageAddressTableLookup} message MessageAddressTableLookup message or plain object to encode
|
111179
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
111180
|
+
* @returns {$protobuf.Writer} Writer
|
111181
|
+
*/
|
111182
|
+
MessageAddressTableLookup.encode = function encode(message, writer) {
|
111183
|
+
if (!writer)
|
111184
|
+
writer = $Writer.create();
|
111185
|
+
if (message.accountKey != null && Object.hasOwnProperty.call(message, "accountKey"))
|
111186
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountKey);
|
111187
|
+
if (message.writableIndexes != null && message.writableIndexes.length) {
|
111188
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
111189
|
+
for (var i = 0; i < message.writableIndexes.length; ++i)
|
111190
|
+
writer.uint32(message.writableIndexes[i]);
|
111191
|
+
writer.ldelim();
|
111192
|
+
}
|
111193
|
+
if (message.readonlyIndexes != null && message.readonlyIndexes.length) {
|
111194
|
+
writer.uint32(/* id 3, wireType 2 =*/26).fork();
|
111195
|
+
for (var i = 0; i < message.readonlyIndexes.length; ++i)
|
111196
|
+
writer.uint32(message.readonlyIndexes[i]);
|
111197
|
+
writer.ldelim();
|
111198
|
+
}
|
111199
|
+
return writer;
|
111200
|
+
};
|
111201
|
+
|
111202
|
+
/**
|
111203
|
+
* Decodes a MessageAddressTableLookup message from the specified reader or buffer.
|
111204
|
+
* @function decode
|
111205
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111206
|
+
* @static
|
111207
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
111208
|
+
* @param {number} [length] Message length if known beforehand
|
111209
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} MessageAddressTableLookup
|
111210
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
111211
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
111212
|
+
*/
|
111213
|
+
MessageAddressTableLookup.decode = function decode(reader, length) {
|
111214
|
+
if (!(reader instanceof $Reader))
|
111215
|
+
reader = $Reader.create(reader);
|
111216
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup();
|
111217
|
+
while (reader.pos < end) {
|
111218
|
+
var tag = reader.uint32();
|
111219
|
+
switch (tag >>> 3) {
|
111220
|
+
case 1:
|
111221
|
+
message.accountKey = reader.string();
|
111222
|
+
break;
|
111223
|
+
case 2:
|
111224
|
+
if (!(message.writableIndexes && message.writableIndexes.length))
|
111225
|
+
message.writableIndexes = [];
|
111226
|
+
if ((tag & 7) === 2) {
|
111227
|
+
var end2 = reader.uint32() + reader.pos;
|
111228
|
+
while (reader.pos < end2)
|
111229
|
+
message.writableIndexes.push(reader.uint32());
|
111230
|
+
} else
|
111231
|
+
message.writableIndexes.push(reader.uint32());
|
111232
|
+
break;
|
111233
|
+
case 3:
|
111234
|
+
if (!(message.readonlyIndexes && message.readonlyIndexes.length))
|
111235
|
+
message.readonlyIndexes = [];
|
111236
|
+
if ((tag & 7) === 2) {
|
111237
|
+
var end2 = reader.uint32() + reader.pos;
|
111238
|
+
while (reader.pos < end2)
|
111239
|
+
message.readonlyIndexes.push(reader.uint32());
|
111240
|
+
} else
|
111241
|
+
message.readonlyIndexes.push(reader.uint32());
|
111242
|
+
break;
|
111243
|
+
default:
|
111244
|
+
reader.skipType(tag & 7);
|
111245
|
+
break;
|
111246
|
+
}
|
111247
|
+
}
|
111248
|
+
return message;
|
111249
|
+
};
|
111250
|
+
|
111251
|
+
/**
|
111252
|
+
* Verifies a MessageAddressTableLookup message.
|
111253
|
+
* @function verify
|
111254
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111255
|
+
* @static
|
111256
|
+
* @param {Object.<string,*>} message Plain object to verify
|
111257
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
111258
|
+
*/
|
111259
|
+
MessageAddressTableLookup.verify = function verify(message) {
|
111260
|
+
if (typeof message !== "object" || message === null)
|
111261
|
+
return "object expected";
|
111262
|
+
if (message.accountKey != null && message.hasOwnProperty("accountKey"))
|
111263
|
+
if (!$util.isString(message.accountKey))
|
111264
|
+
return "accountKey: string expected";
|
111265
|
+
if (message.writableIndexes != null && message.hasOwnProperty("writableIndexes")) {
|
111266
|
+
if (!Array.isArray(message.writableIndexes))
|
111267
|
+
return "writableIndexes: array expected";
|
111268
|
+
for (var i = 0; i < message.writableIndexes.length; ++i)
|
111269
|
+
if (!$util.isInteger(message.writableIndexes[i]))
|
111270
|
+
return "writableIndexes: integer[] expected";
|
111271
|
+
}
|
111272
|
+
if (message.readonlyIndexes != null && message.hasOwnProperty("readonlyIndexes")) {
|
111273
|
+
if (!Array.isArray(message.readonlyIndexes))
|
111274
|
+
return "readonlyIndexes: array expected";
|
111275
|
+
for (var i = 0; i < message.readonlyIndexes.length; ++i)
|
111276
|
+
if (!$util.isInteger(message.readonlyIndexes[i]))
|
111277
|
+
return "readonlyIndexes: integer[] expected";
|
111278
|
+
}
|
111279
|
+
return null;
|
111280
|
+
};
|
111281
|
+
|
111282
|
+
/**
|
111283
|
+
* Creates a MessageAddressTableLookup message from a plain object. Also converts values to their respective internal types.
|
111284
|
+
* @function fromObject
|
111285
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111286
|
+
* @static
|
111287
|
+
* @param {Object.<string,*>} object Plain object
|
111288
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} MessageAddressTableLookup
|
111289
|
+
*/
|
111290
|
+
MessageAddressTableLookup.fromObject = function fromObject(object) {
|
111291
|
+
if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup)
|
111292
|
+
return object;
|
111293
|
+
var message = new $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup();
|
111294
|
+
if (object.accountKey != null)
|
111295
|
+
message.accountKey = String(object.accountKey);
|
111296
|
+
if (object.writableIndexes) {
|
111297
|
+
if (!Array.isArray(object.writableIndexes))
|
111298
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageAddressTableLookup.writableIndexes: array expected");
|
111299
|
+
message.writableIndexes = [];
|
111300
|
+
for (var i = 0; i < object.writableIndexes.length; ++i)
|
111301
|
+
message.writableIndexes[i] = object.writableIndexes[i] >>> 0;
|
111302
|
+
}
|
111303
|
+
if (object.readonlyIndexes) {
|
111304
|
+
if (!Array.isArray(object.readonlyIndexes))
|
111305
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageAddressTableLookup.readonlyIndexes: array expected");
|
111306
|
+
message.readonlyIndexes = [];
|
111307
|
+
for (var i = 0; i < object.readonlyIndexes.length; ++i)
|
111308
|
+
message.readonlyIndexes[i] = object.readonlyIndexes[i] >>> 0;
|
111309
|
+
}
|
111310
|
+
return message;
|
111311
|
+
};
|
111312
|
+
|
111313
|
+
/**
|
111314
|
+
* Creates a plain object from a MessageAddressTableLookup message. Also converts values to other types if specified.
|
111315
|
+
* @function toObject
|
111316
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111317
|
+
* @static
|
111318
|
+
* @param {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} message MessageAddressTableLookup
|
111319
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
111320
|
+
* @returns {Object.<string,*>} Plain object
|
111321
|
+
*/
|
111322
|
+
MessageAddressTableLookup.toObject = function toObject(message, options) {
|
111323
|
+
if (!options)
|
111324
|
+
options = {};
|
111325
|
+
var object = {};
|
111326
|
+
if (options.arrays || options.defaults) {
|
111327
|
+
object.writableIndexes = [];
|
111328
|
+
object.readonlyIndexes = [];
|
111329
|
+
}
|
111330
|
+
if (options.defaults)
|
111331
|
+
object.accountKey = "";
|
111332
|
+
if (message.accountKey != null && message.hasOwnProperty("accountKey"))
|
111333
|
+
object.accountKey = message.accountKey;
|
111334
|
+
if (message.writableIndexes && message.writableIndexes.length) {
|
111335
|
+
object.writableIndexes = [];
|
111336
|
+
for (var j = 0; j < message.writableIndexes.length; ++j)
|
111337
|
+
object.writableIndexes[j] = message.writableIndexes[j];
|
111338
|
+
}
|
111339
|
+
if (message.readonlyIndexes && message.readonlyIndexes.length) {
|
111340
|
+
object.readonlyIndexes = [];
|
111341
|
+
for (var j = 0; j < message.readonlyIndexes.length; ++j)
|
111342
|
+
object.readonlyIndexes[j] = message.readonlyIndexes[j];
|
111343
|
+
}
|
111344
|
+
return object;
|
111345
|
+
};
|
111346
|
+
|
111347
|
+
/**
|
111348
|
+
* Converts this MessageAddressTableLookup to JSON.
|
111349
|
+
* @function toJSON
|
111350
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
|
111351
|
+
* @instance
|
111352
|
+
* @returns {Object.<string,*>} JSON object
|
111353
|
+
*/
|
111354
|
+
MessageAddressTableLookup.prototype.toJSON = function toJSON() {
|
111355
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
111356
|
+
};
|
111357
|
+
|
111358
|
+
return MessageAddressTableLookup;
|
111359
|
+
})();
|
111360
|
+
|
111361
|
+
RawMessage.MessageLegacy = (function() {
|
111362
|
+
|
111363
|
+
/**
|
111364
|
+
* Properties of a MessageLegacy.
|
111365
|
+
* @memberof TW.Solana.Proto.RawMessage
|
111366
|
+
* @interface IMessageLegacy
|
111367
|
+
* @property {TW.Solana.Proto.RawMessage.IMessageHeader|null} [header] MessageLegacy header
|
111368
|
+
* @property {Array.<string>|null} [accountKeys] MessageLegacy accountKeys
|
111369
|
+
* @property {string|null} [recentBlockhash] MessageLegacy recentBlockhash
|
111370
|
+
* @property {Array.<TW.Solana.Proto.RawMessage.IInstruction>|null} [instructions] MessageLegacy instructions
|
111371
|
+
*/
|
111372
|
+
|
111373
|
+
/**
|
111374
|
+
* Constructs a new MessageLegacy.
|
111375
|
+
* @memberof TW.Solana.Proto.RawMessage
|
111376
|
+
* @classdesc Represents a MessageLegacy.
|
111377
|
+
* @implements IMessageLegacy
|
111378
|
+
* @constructor
|
111379
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageLegacy=} [properties] Properties to set
|
111380
|
+
*/
|
111381
|
+
function MessageLegacy(properties) {
|
111382
|
+
this.accountKeys = [];
|
111383
|
+
this.instructions = [];
|
111384
|
+
if (properties)
|
111385
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
111386
|
+
if (properties[keys[i]] != null)
|
111387
|
+
this[keys[i]] = properties[keys[i]];
|
111388
|
+
}
|
111389
|
+
|
111390
|
+
/**
|
111391
|
+
* MessageLegacy header.
|
111392
|
+
* @member {TW.Solana.Proto.RawMessage.IMessageHeader|null|undefined} header
|
111393
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111394
|
+
* @instance
|
111395
|
+
*/
|
111396
|
+
MessageLegacy.prototype.header = null;
|
111397
|
+
|
111398
|
+
/**
|
111399
|
+
* MessageLegacy accountKeys.
|
111400
|
+
* @member {Array.<string>} accountKeys
|
111401
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111402
|
+
* @instance
|
111403
|
+
*/
|
111404
|
+
MessageLegacy.prototype.accountKeys = $util.emptyArray;
|
111405
|
+
|
111406
|
+
/**
|
111407
|
+
* MessageLegacy recentBlockhash.
|
111408
|
+
* @member {string} recentBlockhash
|
111409
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111410
|
+
* @instance
|
111411
|
+
*/
|
111412
|
+
MessageLegacy.prototype.recentBlockhash = "";
|
111413
|
+
|
111414
|
+
/**
|
111415
|
+
* MessageLegacy instructions.
|
111416
|
+
* @member {Array.<TW.Solana.Proto.RawMessage.IInstruction>} instructions
|
111417
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111418
|
+
* @instance
|
111419
|
+
*/
|
111420
|
+
MessageLegacy.prototype.instructions = $util.emptyArray;
|
111421
|
+
|
111422
|
+
/**
|
111423
|
+
* Creates a new MessageLegacy instance using the specified properties.
|
111424
|
+
* @function create
|
111425
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111426
|
+
* @static
|
111427
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageLegacy=} [properties] Properties to set
|
111428
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageLegacy} MessageLegacy instance
|
111429
|
+
*/
|
111430
|
+
MessageLegacy.create = function create(properties) {
|
111431
|
+
return new MessageLegacy(properties);
|
111432
|
+
};
|
111433
|
+
|
111434
|
+
/**
|
111435
|
+
* Encodes the specified MessageLegacy message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageLegacy.verify|verify} messages.
|
111436
|
+
* @function encode
|
111437
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111438
|
+
* @static
|
111439
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageLegacy} message MessageLegacy message or plain object to encode
|
111440
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
111441
|
+
* @returns {$protobuf.Writer} Writer
|
111442
|
+
*/
|
111443
|
+
MessageLegacy.encode = function encode(message, writer) {
|
111444
|
+
if (!writer)
|
111445
|
+
writer = $Writer.create();
|
111446
|
+
if (message.header != null && Object.hasOwnProperty.call(message, "header"))
|
111447
|
+
$root.TW.Solana.Proto.RawMessage.MessageHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
111448
|
+
if (message.accountKeys != null && message.accountKeys.length)
|
111449
|
+
for (var i = 0; i < message.accountKeys.length; ++i)
|
111450
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountKeys[i]);
|
111451
|
+
if (message.recentBlockhash != null && Object.hasOwnProperty.call(message, "recentBlockhash"))
|
111452
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.recentBlockhash);
|
111453
|
+
if (message.instructions != null && message.instructions.length)
|
111454
|
+
for (var i = 0; i < message.instructions.length; ++i)
|
111455
|
+
$root.TW.Solana.Proto.RawMessage.Instruction.encode(message.instructions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
111456
|
+
return writer;
|
111457
|
+
};
|
111458
|
+
|
111459
|
+
/**
|
111460
|
+
* Decodes a MessageLegacy message from the specified reader or buffer.
|
111461
|
+
* @function decode
|
111462
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111463
|
+
* @static
|
111464
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
111465
|
+
* @param {number} [length] Message length if known beforehand
|
111466
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageLegacy} MessageLegacy
|
111467
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
111468
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
111469
|
+
*/
|
111470
|
+
MessageLegacy.decode = function decode(reader, length) {
|
111471
|
+
if (!(reader instanceof $Reader))
|
111472
|
+
reader = $Reader.create(reader);
|
111473
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageLegacy();
|
111474
|
+
while (reader.pos < end) {
|
111475
|
+
var tag = reader.uint32();
|
111476
|
+
switch (tag >>> 3) {
|
111477
|
+
case 1:
|
111478
|
+
message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.decode(reader, reader.uint32());
|
111479
|
+
break;
|
111480
|
+
case 2:
|
111481
|
+
if (!(message.accountKeys && message.accountKeys.length))
|
111482
|
+
message.accountKeys = [];
|
111483
|
+
message.accountKeys.push(reader.string());
|
111484
|
+
break;
|
111485
|
+
case 3:
|
111486
|
+
message.recentBlockhash = reader.string();
|
111487
|
+
break;
|
111488
|
+
case 4:
|
111489
|
+
if (!(message.instructions && message.instructions.length))
|
111490
|
+
message.instructions = [];
|
111491
|
+
message.instructions.push($root.TW.Solana.Proto.RawMessage.Instruction.decode(reader, reader.uint32()));
|
111492
|
+
break;
|
111493
|
+
default:
|
111494
|
+
reader.skipType(tag & 7);
|
111495
|
+
break;
|
111496
|
+
}
|
111497
|
+
}
|
111498
|
+
return message;
|
111499
|
+
};
|
111500
|
+
|
111501
|
+
/**
|
111502
|
+
* Verifies a MessageLegacy message.
|
111503
|
+
* @function verify
|
111504
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111505
|
+
* @static
|
111506
|
+
* @param {Object.<string,*>} message Plain object to verify
|
111507
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
111508
|
+
*/
|
111509
|
+
MessageLegacy.verify = function verify(message) {
|
111510
|
+
if (typeof message !== "object" || message === null)
|
111511
|
+
return "object expected";
|
111512
|
+
if (message.header != null && message.hasOwnProperty("header")) {
|
111513
|
+
var error = $root.TW.Solana.Proto.RawMessage.MessageHeader.verify(message.header);
|
111514
|
+
if (error)
|
111515
|
+
return "header." + error;
|
111516
|
+
}
|
111517
|
+
if (message.accountKeys != null && message.hasOwnProperty("accountKeys")) {
|
111518
|
+
if (!Array.isArray(message.accountKeys))
|
111519
|
+
return "accountKeys: array expected";
|
111520
|
+
for (var i = 0; i < message.accountKeys.length; ++i)
|
111521
|
+
if (!$util.isString(message.accountKeys[i]))
|
111522
|
+
return "accountKeys: string[] expected";
|
111523
|
+
}
|
111524
|
+
if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
|
111525
|
+
if (!$util.isString(message.recentBlockhash))
|
111526
|
+
return "recentBlockhash: string expected";
|
111527
|
+
if (message.instructions != null && message.hasOwnProperty("instructions")) {
|
111528
|
+
if (!Array.isArray(message.instructions))
|
111529
|
+
return "instructions: array expected";
|
111530
|
+
for (var i = 0; i < message.instructions.length; ++i) {
|
111531
|
+
var error = $root.TW.Solana.Proto.RawMessage.Instruction.verify(message.instructions[i]);
|
111532
|
+
if (error)
|
111533
|
+
return "instructions." + error;
|
111534
|
+
}
|
111535
|
+
}
|
111536
|
+
return null;
|
111537
|
+
};
|
111538
|
+
|
111539
|
+
/**
|
111540
|
+
* Creates a MessageLegacy message from a plain object. Also converts values to their respective internal types.
|
111541
|
+
* @function fromObject
|
111542
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111543
|
+
* @static
|
111544
|
+
* @param {Object.<string,*>} object Plain object
|
111545
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageLegacy} MessageLegacy
|
111546
|
+
*/
|
111547
|
+
MessageLegacy.fromObject = function fromObject(object) {
|
111548
|
+
if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageLegacy)
|
111549
|
+
return object;
|
111550
|
+
var message = new $root.TW.Solana.Proto.RawMessage.MessageLegacy();
|
111551
|
+
if (object.header != null) {
|
111552
|
+
if (typeof object.header !== "object")
|
111553
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.header: object expected");
|
111554
|
+
message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.fromObject(object.header);
|
111555
|
+
}
|
111556
|
+
if (object.accountKeys) {
|
111557
|
+
if (!Array.isArray(object.accountKeys))
|
111558
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.accountKeys: array expected");
|
111559
|
+
message.accountKeys = [];
|
111560
|
+
for (var i = 0; i < object.accountKeys.length; ++i)
|
111561
|
+
message.accountKeys[i] = String(object.accountKeys[i]);
|
111562
|
+
}
|
111563
|
+
if (object.recentBlockhash != null)
|
111564
|
+
message.recentBlockhash = String(object.recentBlockhash);
|
111565
|
+
if (object.instructions) {
|
111566
|
+
if (!Array.isArray(object.instructions))
|
111567
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.instructions: array expected");
|
111568
|
+
message.instructions = [];
|
111569
|
+
for (var i = 0; i < object.instructions.length; ++i) {
|
111570
|
+
if (typeof object.instructions[i] !== "object")
|
111571
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.instructions: object expected");
|
111572
|
+
message.instructions[i] = $root.TW.Solana.Proto.RawMessage.Instruction.fromObject(object.instructions[i]);
|
111573
|
+
}
|
111574
|
+
}
|
111575
|
+
return message;
|
111576
|
+
};
|
111577
|
+
|
111578
|
+
/**
|
111579
|
+
* Creates a plain object from a MessageLegacy message. Also converts values to other types if specified.
|
111580
|
+
* @function toObject
|
111581
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111582
|
+
* @static
|
111583
|
+
* @param {TW.Solana.Proto.RawMessage.MessageLegacy} message MessageLegacy
|
111584
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
111585
|
+
* @returns {Object.<string,*>} Plain object
|
111586
|
+
*/
|
111587
|
+
MessageLegacy.toObject = function toObject(message, options) {
|
111588
|
+
if (!options)
|
111589
|
+
options = {};
|
111590
|
+
var object = {};
|
111591
|
+
if (options.arrays || options.defaults) {
|
111592
|
+
object.accountKeys = [];
|
111593
|
+
object.instructions = [];
|
111594
|
+
}
|
111595
|
+
if (options.defaults) {
|
111596
|
+
object.header = null;
|
111597
|
+
object.recentBlockhash = "";
|
111598
|
+
}
|
111599
|
+
if (message.header != null && message.hasOwnProperty("header"))
|
111600
|
+
object.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.toObject(message.header, options);
|
111601
|
+
if (message.accountKeys && message.accountKeys.length) {
|
111602
|
+
object.accountKeys = [];
|
111603
|
+
for (var j = 0; j < message.accountKeys.length; ++j)
|
111604
|
+
object.accountKeys[j] = message.accountKeys[j];
|
111605
|
+
}
|
111606
|
+
if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
|
111607
|
+
object.recentBlockhash = message.recentBlockhash;
|
111608
|
+
if (message.instructions && message.instructions.length) {
|
111609
|
+
object.instructions = [];
|
111610
|
+
for (var j = 0; j < message.instructions.length; ++j)
|
111611
|
+
object.instructions[j] = $root.TW.Solana.Proto.RawMessage.Instruction.toObject(message.instructions[j], options);
|
111612
|
+
}
|
111613
|
+
return object;
|
111614
|
+
};
|
111615
|
+
|
111616
|
+
/**
|
111617
|
+
* Converts this MessageLegacy to JSON.
|
111618
|
+
* @function toJSON
|
111619
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageLegacy
|
111620
|
+
* @instance
|
111621
|
+
* @returns {Object.<string,*>} JSON object
|
111622
|
+
*/
|
111623
|
+
MessageLegacy.prototype.toJSON = function toJSON() {
|
111624
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
111625
|
+
};
|
111626
|
+
|
111627
|
+
return MessageLegacy;
|
111628
|
+
})();
|
111629
|
+
|
111630
|
+
RawMessage.MessageV0 = (function() {
|
111631
|
+
|
111632
|
+
/**
|
111633
|
+
* Properties of a MessageV0.
|
111634
|
+
* @memberof TW.Solana.Proto.RawMessage
|
111635
|
+
* @interface IMessageV0
|
111636
|
+
* @property {TW.Solana.Proto.RawMessage.IMessageHeader|null} [header] MessageV0 header
|
111637
|
+
* @property {Array.<string>|null} [accountKeys] MessageV0 accountKeys
|
111638
|
+
* @property {string|null} [recentBlockhash] MessageV0 recentBlockhash
|
111639
|
+
* @property {Array.<TW.Solana.Proto.RawMessage.IInstruction>|null} [instructions] MessageV0 instructions
|
111640
|
+
* @property {Array.<TW.Solana.Proto.RawMessage.IMessageAddressTableLookup>|null} [addressTableLookups] MessageV0 addressTableLookups
|
111641
|
+
*/
|
111642
|
+
|
111643
|
+
/**
|
111644
|
+
* Constructs a new MessageV0.
|
111645
|
+
* @memberof TW.Solana.Proto.RawMessage
|
111646
|
+
* @classdesc Represents a MessageV0.
|
111647
|
+
* @implements IMessageV0
|
111648
|
+
* @constructor
|
111649
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageV0=} [properties] Properties to set
|
111650
|
+
*/
|
111651
|
+
function MessageV0(properties) {
|
111652
|
+
this.accountKeys = [];
|
111653
|
+
this.instructions = [];
|
111654
|
+
this.addressTableLookups = [];
|
111655
|
+
if (properties)
|
111656
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
111657
|
+
if (properties[keys[i]] != null)
|
111658
|
+
this[keys[i]] = properties[keys[i]];
|
111659
|
+
}
|
111660
|
+
|
111661
|
+
/**
|
111662
|
+
* MessageV0 header.
|
111663
|
+
* @member {TW.Solana.Proto.RawMessage.IMessageHeader|null|undefined} header
|
111664
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111665
|
+
* @instance
|
111666
|
+
*/
|
111667
|
+
MessageV0.prototype.header = null;
|
111668
|
+
|
111669
|
+
/**
|
111670
|
+
* MessageV0 accountKeys.
|
111671
|
+
* @member {Array.<string>} accountKeys
|
111672
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111673
|
+
* @instance
|
111674
|
+
*/
|
111675
|
+
MessageV0.prototype.accountKeys = $util.emptyArray;
|
111676
|
+
|
111677
|
+
/**
|
111678
|
+
* MessageV0 recentBlockhash.
|
111679
|
+
* @member {string} recentBlockhash
|
111680
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111681
|
+
* @instance
|
111682
|
+
*/
|
111683
|
+
MessageV0.prototype.recentBlockhash = "";
|
111684
|
+
|
111685
|
+
/**
|
111686
|
+
* MessageV0 instructions.
|
111687
|
+
* @member {Array.<TW.Solana.Proto.RawMessage.IInstruction>} instructions
|
111688
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111689
|
+
* @instance
|
111690
|
+
*/
|
111691
|
+
MessageV0.prototype.instructions = $util.emptyArray;
|
111692
|
+
|
111693
|
+
/**
|
111694
|
+
* MessageV0 addressTableLookups.
|
111695
|
+
* @member {Array.<TW.Solana.Proto.RawMessage.IMessageAddressTableLookup>} addressTableLookups
|
111696
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111697
|
+
* @instance
|
111698
|
+
*/
|
111699
|
+
MessageV0.prototype.addressTableLookups = $util.emptyArray;
|
111700
|
+
|
111701
|
+
/**
|
111702
|
+
* Creates a new MessageV0 instance using the specified properties.
|
111703
|
+
* @function create
|
111704
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111705
|
+
* @static
|
111706
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageV0=} [properties] Properties to set
|
111707
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageV0} MessageV0 instance
|
111708
|
+
*/
|
111709
|
+
MessageV0.create = function create(properties) {
|
111710
|
+
return new MessageV0(properties);
|
111711
|
+
};
|
111712
|
+
|
111713
|
+
/**
|
111714
|
+
* Encodes the specified MessageV0 message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageV0.verify|verify} messages.
|
111715
|
+
* @function encode
|
111716
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111717
|
+
* @static
|
111718
|
+
* @param {TW.Solana.Proto.RawMessage.IMessageV0} message MessageV0 message or plain object to encode
|
111719
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
111720
|
+
* @returns {$protobuf.Writer} Writer
|
111721
|
+
*/
|
111722
|
+
MessageV0.encode = function encode(message, writer) {
|
111723
|
+
if (!writer)
|
111724
|
+
writer = $Writer.create();
|
111725
|
+
if (message.header != null && Object.hasOwnProperty.call(message, "header"))
|
111726
|
+
$root.TW.Solana.Proto.RawMessage.MessageHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
111727
|
+
if (message.accountKeys != null && message.accountKeys.length)
|
111728
|
+
for (var i = 0; i < message.accountKeys.length; ++i)
|
111729
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountKeys[i]);
|
111730
|
+
if (message.recentBlockhash != null && Object.hasOwnProperty.call(message, "recentBlockhash"))
|
111731
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.recentBlockhash);
|
111732
|
+
if (message.instructions != null && message.instructions.length)
|
111733
|
+
for (var i = 0; i < message.instructions.length; ++i)
|
111734
|
+
$root.TW.Solana.Proto.RawMessage.Instruction.encode(message.instructions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
111735
|
+
if (message.addressTableLookups != null && message.addressTableLookups.length)
|
111736
|
+
for (var i = 0; i < message.addressTableLookups.length; ++i)
|
111737
|
+
$root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.encode(message.addressTableLookups[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
111738
|
+
return writer;
|
111739
|
+
};
|
111740
|
+
|
111741
|
+
/**
|
111742
|
+
* Decodes a MessageV0 message from the specified reader or buffer.
|
111743
|
+
* @function decode
|
111744
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111745
|
+
* @static
|
111746
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
111747
|
+
* @param {number} [length] Message length if known beforehand
|
111748
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageV0} MessageV0
|
111749
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
111750
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
111751
|
+
*/
|
111752
|
+
MessageV0.decode = function decode(reader, length) {
|
111753
|
+
if (!(reader instanceof $Reader))
|
111754
|
+
reader = $Reader.create(reader);
|
111755
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageV0();
|
111756
|
+
while (reader.pos < end) {
|
111757
|
+
var tag = reader.uint32();
|
111758
|
+
switch (tag >>> 3) {
|
111759
|
+
case 1:
|
111760
|
+
message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.decode(reader, reader.uint32());
|
111761
|
+
break;
|
111762
|
+
case 2:
|
111763
|
+
if (!(message.accountKeys && message.accountKeys.length))
|
111764
|
+
message.accountKeys = [];
|
111765
|
+
message.accountKeys.push(reader.string());
|
111766
|
+
break;
|
111767
|
+
case 3:
|
111768
|
+
message.recentBlockhash = reader.string();
|
111769
|
+
break;
|
111770
|
+
case 4:
|
111771
|
+
if (!(message.instructions && message.instructions.length))
|
111772
|
+
message.instructions = [];
|
111773
|
+
message.instructions.push($root.TW.Solana.Proto.RawMessage.Instruction.decode(reader, reader.uint32()));
|
111774
|
+
break;
|
111775
|
+
case 5:
|
111776
|
+
if (!(message.addressTableLookups && message.addressTableLookups.length))
|
111777
|
+
message.addressTableLookups = [];
|
111778
|
+
message.addressTableLookups.push($root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.decode(reader, reader.uint32()));
|
111779
|
+
break;
|
111780
|
+
default:
|
111781
|
+
reader.skipType(tag & 7);
|
111782
|
+
break;
|
111783
|
+
}
|
111784
|
+
}
|
111785
|
+
return message;
|
111786
|
+
};
|
111787
|
+
|
111788
|
+
/**
|
111789
|
+
* Verifies a MessageV0 message.
|
111790
|
+
* @function verify
|
111791
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111792
|
+
* @static
|
111793
|
+
* @param {Object.<string,*>} message Plain object to verify
|
111794
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
111795
|
+
*/
|
111796
|
+
MessageV0.verify = function verify(message) {
|
111797
|
+
if (typeof message !== "object" || message === null)
|
111798
|
+
return "object expected";
|
111799
|
+
if (message.header != null && message.hasOwnProperty("header")) {
|
111800
|
+
var error = $root.TW.Solana.Proto.RawMessage.MessageHeader.verify(message.header);
|
111801
|
+
if (error)
|
111802
|
+
return "header." + error;
|
111803
|
+
}
|
111804
|
+
if (message.accountKeys != null && message.hasOwnProperty("accountKeys")) {
|
111805
|
+
if (!Array.isArray(message.accountKeys))
|
111806
|
+
return "accountKeys: array expected";
|
111807
|
+
for (var i = 0; i < message.accountKeys.length; ++i)
|
111808
|
+
if (!$util.isString(message.accountKeys[i]))
|
111809
|
+
return "accountKeys: string[] expected";
|
111810
|
+
}
|
111811
|
+
if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
|
111812
|
+
if (!$util.isString(message.recentBlockhash))
|
111813
|
+
return "recentBlockhash: string expected";
|
111814
|
+
if (message.instructions != null && message.hasOwnProperty("instructions")) {
|
111815
|
+
if (!Array.isArray(message.instructions))
|
111816
|
+
return "instructions: array expected";
|
111817
|
+
for (var i = 0; i < message.instructions.length; ++i) {
|
111818
|
+
var error = $root.TW.Solana.Proto.RawMessage.Instruction.verify(message.instructions[i]);
|
111819
|
+
if (error)
|
111820
|
+
return "instructions." + error;
|
111821
|
+
}
|
111822
|
+
}
|
111823
|
+
if (message.addressTableLookups != null && message.hasOwnProperty("addressTableLookups")) {
|
111824
|
+
if (!Array.isArray(message.addressTableLookups))
|
111825
|
+
return "addressTableLookups: array expected";
|
111826
|
+
for (var i = 0; i < message.addressTableLookups.length; ++i) {
|
111827
|
+
var error = $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.verify(message.addressTableLookups[i]);
|
111828
|
+
if (error)
|
111829
|
+
return "addressTableLookups." + error;
|
111830
|
+
}
|
111831
|
+
}
|
111832
|
+
return null;
|
111833
|
+
};
|
111834
|
+
|
111835
|
+
/**
|
111836
|
+
* Creates a MessageV0 message from a plain object. Also converts values to their respective internal types.
|
111837
|
+
* @function fromObject
|
111838
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111839
|
+
* @static
|
111840
|
+
* @param {Object.<string,*>} object Plain object
|
111841
|
+
* @returns {TW.Solana.Proto.RawMessage.MessageV0} MessageV0
|
111842
|
+
*/
|
111843
|
+
MessageV0.fromObject = function fromObject(object) {
|
111844
|
+
if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageV0)
|
111845
|
+
return object;
|
111846
|
+
var message = new $root.TW.Solana.Proto.RawMessage.MessageV0();
|
111847
|
+
if (object.header != null) {
|
111848
|
+
if (typeof object.header !== "object")
|
111849
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.header: object expected");
|
111850
|
+
message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.fromObject(object.header);
|
111851
|
+
}
|
111852
|
+
if (object.accountKeys) {
|
111853
|
+
if (!Array.isArray(object.accountKeys))
|
111854
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.accountKeys: array expected");
|
111855
|
+
message.accountKeys = [];
|
111856
|
+
for (var i = 0; i < object.accountKeys.length; ++i)
|
111857
|
+
message.accountKeys[i] = String(object.accountKeys[i]);
|
111858
|
+
}
|
111859
|
+
if (object.recentBlockhash != null)
|
111860
|
+
message.recentBlockhash = String(object.recentBlockhash);
|
111861
|
+
if (object.instructions) {
|
111862
|
+
if (!Array.isArray(object.instructions))
|
111863
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.instructions: array expected");
|
111864
|
+
message.instructions = [];
|
111865
|
+
for (var i = 0; i < object.instructions.length; ++i) {
|
111866
|
+
if (typeof object.instructions[i] !== "object")
|
111867
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.instructions: object expected");
|
111868
|
+
message.instructions[i] = $root.TW.Solana.Proto.RawMessage.Instruction.fromObject(object.instructions[i]);
|
111869
|
+
}
|
111870
|
+
}
|
111871
|
+
if (object.addressTableLookups) {
|
111872
|
+
if (!Array.isArray(object.addressTableLookups))
|
111873
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.addressTableLookups: array expected");
|
111874
|
+
message.addressTableLookups = [];
|
111875
|
+
for (var i = 0; i < object.addressTableLookups.length; ++i) {
|
111876
|
+
if (typeof object.addressTableLookups[i] !== "object")
|
111877
|
+
throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.addressTableLookups: object expected");
|
111878
|
+
message.addressTableLookups[i] = $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.fromObject(object.addressTableLookups[i]);
|
111879
|
+
}
|
111880
|
+
}
|
111881
|
+
return message;
|
111882
|
+
};
|
111883
|
+
|
111884
|
+
/**
|
111885
|
+
* Creates a plain object from a MessageV0 message. Also converts values to other types if specified.
|
111886
|
+
* @function toObject
|
111887
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111888
|
+
* @static
|
111889
|
+
* @param {TW.Solana.Proto.RawMessage.MessageV0} message MessageV0
|
111890
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
111891
|
+
* @returns {Object.<string,*>} Plain object
|
111892
|
+
*/
|
111893
|
+
MessageV0.toObject = function toObject(message, options) {
|
111894
|
+
if (!options)
|
111895
|
+
options = {};
|
111896
|
+
var object = {};
|
111897
|
+
if (options.arrays || options.defaults) {
|
111898
|
+
object.accountKeys = [];
|
111899
|
+
object.instructions = [];
|
111900
|
+
object.addressTableLookups = [];
|
111901
|
+
}
|
111902
|
+
if (options.defaults) {
|
111903
|
+
object.header = null;
|
111904
|
+
object.recentBlockhash = "";
|
111905
|
+
}
|
111906
|
+
if (message.header != null && message.hasOwnProperty("header"))
|
111907
|
+
object.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.toObject(message.header, options);
|
111908
|
+
if (message.accountKeys && message.accountKeys.length) {
|
111909
|
+
object.accountKeys = [];
|
111910
|
+
for (var j = 0; j < message.accountKeys.length; ++j)
|
111911
|
+
object.accountKeys[j] = message.accountKeys[j];
|
111912
|
+
}
|
111913
|
+
if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
|
111914
|
+
object.recentBlockhash = message.recentBlockhash;
|
111915
|
+
if (message.instructions && message.instructions.length) {
|
111916
|
+
object.instructions = [];
|
111917
|
+
for (var j = 0; j < message.instructions.length; ++j)
|
111918
|
+
object.instructions[j] = $root.TW.Solana.Proto.RawMessage.Instruction.toObject(message.instructions[j], options);
|
111919
|
+
}
|
111920
|
+
if (message.addressTableLookups && message.addressTableLookups.length) {
|
111921
|
+
object.addressTableLookups = [];
|
111922
|
+
for (var j = 0; j < message.addressTableLookups.length; ++j)
|
111923
|
+
object.addressTableLookups[j] = $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.toObject(message.addressTableLookups[j], options);
|
111924
|
+
}
|
111925
|
+
return object;
|
111926
|
+
};
|
111927
|
+
|
111928
|
+
/**
|
111929
|
+
* Converts this MessageV0 to JSON.
|
111930
|
+
* @function toJSON
|
111931
|
+
* @memberof TW.Solana.Proto.RawMessage.MessageV0
|
111932
|
+
* @instance
|
111933
|
+
* @returns {Object.<string,*>} JSON object
|
111934
|
+
*/
|
111935
|
+
MessageV0.prototype.toJSON = function toJSON() {
|
111936
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
111937
|
+
};
|
111938
|
+
|
111939
|
+
return MessageV0;
|
111940
|
+
})();
|
111941
|
+
|
111942
|
+
return RawMessage;
|
111943
|
+
})();
|
111944
|
+
|
111945
|
+
Proto.DecodingTransactionOutput = (function() {
|
111946
|
+
|
111947
|
+
/**
|
111948
|
+
* Properties of a DecodingTransactionOutput.
|
111949
|
+
* @memberof TW.Solana.Proto
|
111950
|
+
* @interface IDecodingTransactionOutput
|
111951
|
+
* @property {TW.Solana.Proto.IRawMessage|null} [transaction] DecodingTransactionOutput transaction
|
111952
|
+
* @property {TW.Common.Proto.SigningError|null} [error] DecodingTransactionOutput error
|
111953
|
+
* @property {string|null} [errorMessage] DecodingTransactionOutput errorMessage
|
111954
|
+
*/
|
111955
|
+
|
111956
|
+
/**
|
111957
|
+
* Constructs a new DecodingTransactionOutput.
|
111958
|
+
* @memberof TW.Solana.Proto
|
111959
|
+
* @classdesc Represents a DecodingTransactionOutput.
|
111960
|
+
* @implements IDecodingTransactionOutput
|
111961
|
+
* @constructor
|
111962
|
+
* @param {TW.Solana.Proto.IDecodingTransactionOutput=} [properties] Properties to set
|
111963
|
+
*/
|
111964
|
+
function DecodingTransactionOutput(properties) {
|
111965
|
+
if (properties)
|
111966
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
111967
|
+
if (properties[keys[i]] != null)
|
111968
|
+
this[keys[i]] = properties[keys[i]];
|
111969
|
+
}
|
111970
|
+
|
111971
|
+
/**
|
111972
|
+
* DecodingTransactionOutput transaction.
|
111973
|
+
* @member {TW.Solana.Proto.IRawMessage|null|undefined} transaction
|
111974
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
111975
|
+
* @instance
|
111976
|
+
*/
|
111977
|
+
DecodingTransactionOutput.prototype.transaction = null;
|
111978
|
+
|
111979
|
+
/**
|
111980
|
+
* DecodingTransactionOutput error.
|
111981
|
+
* @member {TW.Common.Proto.SigningError} error
|
111982
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
111983
|
+
* @instance
|
111984
|
+
*/
|
111985
|
+
DecodingTransactionOutput.prototype.error = 0;
|
111986
|
+
|
111987
|
+
/**
|
111988
|
+
* DecodingTransactionOutput errorMessage.
|
111989
|
+
* @member {string} errorMessage
|
111990
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
111991
|
+
* @instance
|
111992
|
+
*/
|
111993
|
+
DecodingTransactionOutput.prototype.errorMessage = "";
|
111994
|
+
|
111995
|
+
/**
|
111996
|
+
* Creates a new DecodingTransactionOutput instance using the specified properties.
|
111997
|
+
* @function create
|
111998
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
111999
|
+
* @static
|
112000
|
+
* @param {TW.Solana.Proto.IDecodingTransactionOutput=} [properties] Properties to set
|
112001
|
+
* @returns {TW.Solana.Proto.DecodingTransactionOutput} DecodingTransactionOutput instance
|
112002
|
+
*/
|
112003
|
+
DecodingTransactionOutput.create = function create(properties) {
|
112004
|
+
return new DecodingTransactionOutput(properties);
|
112005
|
+
};
|
112006
|
+
|
112007
|
+
/**
|
112008
|
+
* Encodes the specified DecodingTransactionOutput message. Does not implicitly {@link TW.Solana.Proto.DecodingTransactionOutput.verify|verify} messages.
|
112009
|
+
* @function encode
|
112010
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
112011
|
+
* @static
|
112012
|
+
* @param {TW.Solana.Proto.IDecodingTransactionOutput} message DecodingTransactionOutput message or plain object to encode
|
112013
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
112014
|
+
* @returns {$protobuf.Writer} Writer
|
112015
|
+
*/
|
112016
|
+
DecodingTransactionOutput.encode = function encode(message, writer) {
|
112017
|
+
if (!writer)
|
112018
|
+
writer = $Writer.create();
|
112019
|
+
if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
112020
|
+
$root.TW.Solana.Proto.RawMessage.encode(message.transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
112021
|
+
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
112022
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
|
112023
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
112024
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
|
112025
|
+
return writer;
|
112026
|
+
};
|
112027
|
+
|
112028
|
+
/**
|
112029
|
+
* Decodes a DecodingTransactionOutput message from the specified reader or buffer.
|
112030
|
+
* @function decode
|
112031
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
112032
|
+
* @static
|
112033
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
112034
|
+
* @param {number} [length] Message length if known beforehand
|
112035
|
+
* @returns {TW.Solana.Proto.DecodingTransactionOutput} DecodingTransactionOutput
|
112036
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
112037
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
112038
|
+
*/
|
112039
|
+
DecodingTransactionOutput.decode = function decode(reader, length) {
|
112040
|
+
if (!(reader instanceof $Reader))
|
112041
|
+
reader = $Reader.create(reader);
|
112042
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.DecodingTransactionOutput();
|
112043
|
+
while (reader.pos < end) {
|
112044
|
+
var tag = reader.uint32();
|
112045
|
+
switch (tag >>> 3) {
|
112046
|
+
case 1:
|
112047
|
+
message.transaction = $root.TW.Solana.Proto.RawMessage.decode(reader, reader.uint32());
|
112048
|
+
break;
|
112049
|
+
case 2:
|
112050
|
+
message.error = reader.int32();
|
112051
|
+
break;
|
112052
|
+
case 3:
|
112053
|
+
message.errorMessage = reader.string();
|
112054
|
+
break;
|
112055
|
+
default:
|
112056
|
+
reader.skipType(tag & 7);
|
112057
|
+
break;
|
112058
|
+
}
|
112059
|
+
}
|
112060
|
+
return message;
|
112061
|
+
};
|
112062
|
+
|
112063
|
+
/**
|
112064
|
+
* Verifies a DecodingTransactionOutput message.
|
112065
|
+
* @function verify
|
112066
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
112067
|
+
* @static
|
112068
|
+
* @param {Object.<string,*>} message Plain object to verify
|
112069
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
112070
|
+
*/
|
112071
|
+
DecodingTransactionOutput.verify = function verify(message) {
|
112072
|
+
if (typeof message !== "object" || message === null)
|
112073
|
+
return "object expected";
|
112074
|
+
if (message.transaction != null && message.hasOwnProperty("transaction")) {
|
112075
|
+
var error = $root.TW.Solana.Proto.RawMessage.verify(message.transaction);
|
112076
|
+
if (error)
|
112077
|
+
return "transaction." + error;
|
112078
|
+
}
|
112079
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
112080
|
+
switch (message.error) {
|
112081
|
+
default:
|
112082
|
+
return "error: enum value expected";
|
112083
|
+
case 0:
|
112084
|
+
case 1:
|
112085
|
+
case 2:
|
112086
|
+
case 3:
|
112087
|
+
case 4:
|
112088
|
+
case 5:
|
112089
|
+
case 15:
|
112090
|
+
case 16:
|
112091
|
+
case 17:
|
112092
|
+
case 18:
|
112093
|
+
case 6:
|
112094
|
+
case 7:
|
112095
|
+
case 8:
|
112096
|
+
case 9:
|
112097
|
+
case 10:
|
112098
|
+
case 11:
|
112099
|
+
case 12:
|
112100
|
+
case 13:
|
112101
|
+
case 14:
|
112102
|
+
case 19:
|
112103
|
+
case 20:
|
112104
|
+
case 21:
|
112105
|
+
case 22:
|
112106
|
+
case 23:
|
112107
|
+
case 24:
|
112108
|
+
case 25:
|
112109
|
+
break;
|
112110
|
+
}
|
112111
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
112112
|
+
if (!$util.isString(message.errorMessage))
|
112113
|
+
return "errorMessage: string expected";
|
112114
|
+
return null;
|
112115
|
+
};
|
112116
|
+
|
112117
|
+
/**
|
112118
|
+
* Creates a DecodingTransactionOutput message from a plain object. Also converts values to their respective internal types.
|
112119
|
+
* @function fromObject
|
112120
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
112121
|
+
* @static
|
112122
|
+
* @param {Object.<string,*>} object Plain object
|
112123
|
+
* @returns {TW.Solana.Proto.DecodingTransactionOutput} DecodingTransactionOutput
|
112124
|
+
*/
|
112125
|
+
DecodingTransactionOutput.fromObject = function fromObject(object) {
|
112126
|
+
if (object instanceof $root.TW.Solana.Proto.DecodingTransactionOutput)
|
112127
|
+
return object;
|
112128
|
+
var message = new $root.TW.Solana.Proto.DecodingTransactionOutput();
|
112129
|
+
if (object.transaction != null) {
|
112130
|
+
if (typeof object.transaction !== "object")
|
112131
|
+
throw TypeError(".TW.Solana.Proto.DecodingTransactionOutput.transaction: object expected");
|
112132
|
+
message.transaction = $root.TW.Solana.Proto.RawMessage.fromObject(object.transaction);
|
112133
|
+
}
|
112134
|
+
switch (object.error) {
|
112135
|
+
case "OK":
|
112136
|
+
case 0:
|
112137
|
+
message.error = 0;
|
112138
|
+
break;
|
112139
|
+
case "Error_general":
|
112140
|
+
case 1:
|
112141
|
+
message.error = 1;
|
112142
|
+
break;
|
112143
|
+
case "Error_internal":
|
112144
|
+
case 2:
|
112145
|
+
message.error = 2;
|
112146
|
+
break;
|
112147
|
+
case "Error_low_balance":
|
112148
|
+
case 3:
|
112149
|
+
message.error = 3;
|
112150
|
+
break;
|
112151
|
+
case "Error_zero_amount_requested":
|
112152
|
+
case 4:
|
112153
|
+
message.error = 4;
|
112154
|
+
break;
|
112155
|
+
case "Error_missing_private_key":
|
112156
|
+
case 5:
|
112157
|
+
message.error = 5;
|
112158
|
+
break;
|
112159
|
+
case "Error_invalid_private_key":
|
112160
|
+
case 15:
|
112161
|
+
message.error = 15;
|
112162
|
+
break;
|
112163
|
+
case "Error_invalid_address":
|
112164
|
+
case 16:
|
112165
|
+
message.error = 16;
|
112166
|
+
break;
|
112167
|
+
case "Error_invalid_utxo":
|
112168
|
+
case 17:
|
112169
|
+
message.error = 17;
|
112170
|
+
break;
|
112171
|
+
case "Error_invalid_utxo_amount":
|
112172
|
+
case 18:
|
112173
|
+
message.error = 18;
|
112174
|
+
break;
|
112175
|
+
case "Error_wrong_fee":
|
112176
|
+
case 6:
|
112177
|
+
message.error = 6;
|
112178
|
+
break;
|
112179
|
+
case "Error_signing":
|
112180
|
+
case 7:
|
112181
|
+
message.error = 7;
|
112182
|
+
break;
|
112183
|
+
case "Error_tx_too_big":
|
112184
|
+
case 8:
|
112185
|
+
message.error = 8;
|
112186
|
+
break;
|
112187
|
+
case "Error_missing_input_utxos":
|
112188
|
+
case 9:
|
112189
|
+
message.error = 9;
|
112190
|
+
break;
|
112191
|
+
case "Error_not_enough_utxos":
|
112192
|
+
case 10:
|
112193
|
+
message.error = 10;
|
112194
|
+
break;
|
112195
|
+
case "Error_script_redeem":
|
112196
|
+
case 11:
|
112197
|
+
message.error = 11;
|
112198
|
+
break;
|
112199
|
+
case "Error_script_output":
|
112200
|
+
case 12:
|
112201
|
+
message.error = 12;
|
112202
|
+
break;
|
112203
|
+
case "Error_script_witness_program":
|
112204
|
+
case 13:
|
112205
|
+
message.error = 13;
|
112206
|
+
break;
|
112207
|
+
case "Error_invalid_memo":
|
112208
|
+
case 14:
|
112209
|
+
message.error = 14;
|
112210
|
+
break;
|
112211
|
+
case "Error_input_parse":
|
112212
|
+
case 19:
|
112213
|
+
message.error = 19;
|
112214
|
+
break;
|
112215
|
+
case "Error_no_support_n2n":
|
112216
|
+
case 20:
|
112217
|
+
message.error = 20;
|
112218
|
+
break;
|
112219
|
+
case "Error_signatures_count":
|
112220
|
+
case 21:
|
112221
|
+
message.error = 21;
|
112222
|
+
break;
|
112223
|
+
case "Error_invalid_params":
|
112224
|
+
case 22:
|
112225
|
+
message.error = 22;
|
112226
|
+
break;
|
112227
|
+
case "Error_invalid_requested_token_amount":
|
112228
|
+
case 23:
|
112229
|
+
message.error = 23;
|
112230
|
+
break;
|
112231
|
+
case "Error_not_supported":
|
112232
|
+
case 24:
|
112233
|
+
message.error = 24;
|
112234
|
+
break;
|
112235
|
+
case "Error_dust_amount_requested":
|
112236
|
+
case 25:
|
112237
|
+
message.error = 25;
|
112238
|
+
break;
|
112239
|
+
}
|
112240
|
+
if (object.errorMessage != null)
|
112241
|
+
message.errorMessage = String(object.errorMessage);
|
112242
|
+
return message;
|
112243
|
+
};
|
112244
|
+
|
112245
|
+
/**
|
112246
|
+
* Creates a plain object from a DecodingTransactionOutput message. Also converts values to other types if specified.
|
112247
|
+
* @function toObject
|
112248
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
112249
|
+
* @static
|
112250
|
+
* @param {TW.Solana.Proto.DecodingTransactionOutput} message DecodingTransactionOutput
|
112251
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
112252
|
+
* @returns {Object.<string,*>} Plain object
|
112253
|
+
*/
|
112254
|
+
DecodingTransactionOutput.toObject = function toObject(message, options) {
|
112255
|
+
if (!options)
|
112256
|
+
options = {};
|
112257
|
+
var object = {};
|
112258
|
+
if (options.defaults) {
|
112259
|
+
object.transaction = null;
|
112260
|
+
object.error = options.enums === String ? "OK" : 0;
|
112261
|
+
object.errorMessage = "";
|
112262
|
+
}
|
112263
|
+
if (message.transaction != null && message.hasOwnProperty("transaction"))
|
112264
|
+
object.transaction = $root.TW.Solana.Proto.RawMessage.toObject(message.transaction, options);
|
112265
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
112266
|
+
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
112267
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
112268
|
+
object.errorMessage = message.errorMessage;
|
112269
|
+
return object;
|
112270
|
+
};
|
112271
|
+
|
112272
|
+
/**
|
112273
|
+
* Converts this DecodingTransactionOutput to JSON.
|
112274
|
+
* @function toJSON
|
112275
|
+
* @memberof TW.Solana.Proto.DecodingTransactionOutput
|
112276
|
+
* @instance
|
112277
|
+
* @returns {Object.<string,*>} JSON object
|
112278
|
+
*/
|
112279
|
+
DecodingTransactionOutput.prototype.toJSON = function toJSON() {
|
112280
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
112281
|
+
};
|
112282
|
+
|
112283
|
+
return DecodingTransactionOutput;
|
112284
|
+
})();
|
112285
|
+
|
112286
|
+
/**
|
112287
|
+
* Encoding enum.
|
112288
|
+
* @name TW.Solana.Proto.Encoding
|
112289
|
+
* @enum {number}
|
112290
|
+
* @property {number} Base58=0 Base58 value
|
112291
|
+
* @property {number} Base64=1 Base64 value
|
112292
|
+
*/
|
112293
|
+
Proto.Encoding = (function() {
|
112294
|
+
var valuesById = {}, values = Object.create(valuesById);
|
112295
|
+
values[valuesById[0] = "Base58"] = 0;
|
112296
|
+
values[valuesById[1] = "Base64"] = 1;
|
112297
|
+
return values;
|
112298
|
+
})();
|
112299
|
+
|
112300
|
+
Proto.PriorityFeePrice = (function() {
|
112301
|
+
|
112302
|
+
/**
|
112303
|
+
* Properties of a PriorityFeePrice.
|
112304
|
+
* @memberof TW.Solana.Proto
|
112305
|
+
* @interface IPriorityFeePrice
|
112306
|
+
* @property {Long|null} [price] PriorityFeePrice price
|
112307
|
+
*/
|
112308
|
+
|
112309
|
+
/**
|
112310
|
+
* Constructs a new PriorityFeePrice.
|
112311
|
+
* @memberof TW.Solana.Proto
|
112312
|
+
* @classdesc Represents a PriorityFeePrice.
|
112313
|
+
* @implements IPriorityFeePrice
|
112314
|
+
* @constructor
|
112315
|
+
* @param {TW.Solana.Proto.IPriorityFeePrice=} [properties] Properties to set
|
112316
|
+
*/
|
112317
|
+
function PriorityFeePrice(properties) {
|
112318
|
+
if (properties)
|
112319
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
112320
|
+
if (properties[keys[i]] != null)
|
112321
|
+
this[keys[i]] = properties[keys[i]];
|
112322
|
+
}
|
112323
|
+
|
112324
|
+
/**
|
112325
|
+
* PriorityFeePrice price.
|
112326
|
+
* @member {Long} price
|
112327
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112328
|
+
* @instance
|
112329
|
+
*/
|
112330
|
+
PriorityFeePrice.prototype.price = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
112331
|
+
|
112332
|
+
/**
|
112333
|
+
* Creates a new PriorityFeePrice instance using the specified properties.
|
112334
|
+
* @function create
|
112335
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112336
|
+
* @static
|
112337
|
+
* @param {TW.Solana.Proto.IPriorityFeePrice=} [properties] Properties to set
|
112338
|
+
* @returns {TW.Solana.Proto.PriorityFeePrice} PriorityFeePrice instance
|
112339
|
+
*/
|
112340
|
+
PriorityFeePrice.create = function create(properties) {
|
112341
|
+
return new PriorityFeePrice(properties);
|
112342
|
+
};
|
112343
|
+
|
112344
|
+
/**
|
112345
|
+
* Encodes the specified PriorityFeePrice message. Does not implicitly {@link TW.Solana.Proto.PriorityFeePrice.verify|verify} messages.
|
112346
|
+
* @function encode
|
112347
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112348
|
+
* @static
|
112349
|
+
* @param {TW.Solana.Proto.IPriorityFeePrice} message PriorityFeePrice message or plain object to encode
|
112350
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
112351
|
+
* @returns {$protobuf.Writer} Writer
|
112352
|
+
*/
|
112353
|
+
PriorityFeePrice.encode = function encode(message, writer) {
|
112354
|
+
if (!writer)
|
112355
|
+
writer = $Writer.create();
|
112356
|
+
if (message.price != null && Object.hasOwnProperty.call(message, "price"))
|
112357
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.price);
|
112358
|
+
return writer;
|
112359
|
+
};
|
112360
|
+
|
112361
|
+
/**
|
112362
|
+
* Decodes a PriorityFeePrice message from the specified reader or buffer.
|
112363
|
+
* @function decode
|
112364
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112365
|
+
* @static
|
112366
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
112367
|
+
* @param {number} [length] Message length if known beforehand
|
112368
|
+
* @returns {TW.Solana.Proto.PriorityFeePrice} PriorityFeePrice
|
112369
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
112370
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
112371
|
+
*/
|
112372
|
+
PriorityFeePrice.decode = function decode(reader, length) {
|
112373
|
+
if (!(reader instanceof $Reader))
|
112374
|
+
reader = $Reader.create(reader);
|
112375
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PriorityFeePrice();
|
112376
|
+
while (reader.pos < end) {
|
112377
|
+
var tag = reader.uint32();
|
112378
|
+
switch (tag >>> 3) {
|
112379
|
+
case 1:
|
112380
|
+
message.price = reader.uint64();
|
112381
|
+
break;
|
112382
|
+
default:
|
112383
|
+
reader.skipType(tag & 7);
|
112384
|
+
break;
|
112385
|
+
}
|
112386
|
+
}
|
112387
|
+
return message;
|
112388
|
+
};
|
112389
|
+
|
112390
|
+
/**
|
112391
|
+
* Verifies a PriorityFeePrice message.
|
112392
|
+
* @function verify
|
112393
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112394
|
+
* @static
|
112395
|
+
* @param {Object.<string,*>} message Plain object to verify
|
112396
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
112397
|
+
*/
|
112398
|
+
PriorityFeePrice.verify = function verify(message) {
|
112399
|
+
if (typeof message !== "object" || message === null)
|
112400
|
+
return "object expected";
|
112401
|
+
if (message.price != null && message.hasOwnProperty("price"))
|
112402
|
+
if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high)))
|
112403
|
+
return "price: integer|Long expected";
|
112404
|
+
return null;
|
112405
|
+
};
|
112406
|
+
|
112407
|
+
/**
|
112408
|
+
* Creates a PriorityFeePrice message from a plain object. Also converts values to their respective internal types.
|
112409
|
+
* @function fromObject
|
112410
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112411
|
+
* @static
|
112412
|
+
* @param {Object.<string,*>} object Plain object
|
112413
|
+
* @returns {TW.Solana.Proto.PriorityFeePrice} PriorityFeePrice
|
112414
|
+
*/
|
112415
|
+
PriorityFeePrice.fromObject = function fromObject(object) {
|
112416
|
+
if (object instanceof $root.TW.Solana.Proto.PriorityFeePrice)
|
112417
|
+
return object;
|
112418
|
+
var message = new $root.TW.Solana.Proto.PriorityFeePrice();
|
112419
|
+
if (object.price != null)
|
112420
|
+
if ($util.Long)
|
112421
|
+
(message.price = $util.Long.fromValue(object.price)).unsigned = true;
|
112422
|
+
else if (typeof object.price === "string")
|
112423
|
+
message.price = parseInt(object.price, 10);
|
112424
|
+
else if (typeof object.price === "number")
|
112425
|
+
message.price = object.price;
|
112426
|
+
else if (typeof object.price === "object")
|
112427
|
+
message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(true);
|
112428
|
+
return message;
|
112429
|
+
};
|
112430
|
+
|
112431
|
+
/**
|
112432
|
+
* Creates a plain object from a PriorityFeePrice message. Also converts values to other types if specified.
|
112433
|
+
* @function toObject
|
112434
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112435
|
+
* @static
|
112436
|
+
* @param {TW.Solana.Proto.PriorityFeePrice} message PriorityFeePrice
|
112437
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
112438
|
+
* @returns {Object.<string,*>} Plain object
|
112439
|
+
*/
|
112440
|
+
PriorityFeePrice.toObject = function toObject(message, options) {
|
112441
|
+
if (!options)
|
112442
|
+
options = {};
|
112443
|
+
var object = {};
|
112444
|
+
if (options.defaults)
|
112445
|
+
if ($util.Long) {
|
112446
|
+
var long = new $util.Long(0, 0, true);
|
112447
|
+
object.price = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
112448
|
+
} else
|
112449
|
+
object.price = options.longs === String ? "0" : 0;
|
112450
|
+
if (message.price != null && message.hasOwnProperty("price"))
|
112451
|
+
if (typeof message.price === "number")
|
112452
|
+
object.price = options.longs === String ? String(message.price) : message.price;
|
112453
|
+
else
|
112454
|
+
object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber(true) : message.price;
|
112455
|
+
return object;
|
112456
|
+
};
|
112457
|
+
|
112458
|
+
/**
|
112459
|
+
* Converts this PriorityFeePrice to JSON.
|
112460
|
+
* @function toJSON
|
112461
|
+
* @memberof TW.Solana.Proto.PriorityFeePrice
|
112462
|
+
* @instance
|
112463
|
+
* @returns {Object.<string,*>} JSON object
|
112464
|
+
*/
|
112465
|
+
PriorityFeePrice.prototype.toJSON = function toJSON() {
|
112466
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
112467
|
+
};
|
112468
|
+
|
112469
|
+
return PriorityFeePrice;
|
112470
|
+
})();
|
112471
|
+
|
112472
|
+
Proto.PriorityFeeLimit = (function() {
|
112473
|
+
|
112474
|
+
/**
|
112475
|
+
* Properties of a PriorityFeeLimit.
|
112476
|
+
* @memberof TW.Solana.Proto
|
112477
|
+
* @interface IPriorityFeeLimit
|
112478
|
+
* @property {number|null} [limit] PriorityFeeLimit limit
|
112479
|
+
*/
|
112480
|
+
|
112481
|
+
/**
|
112482
|
+
* Constructs a new PriorityFeeLimit.
|
112483
|
+
* @memberof TW.Solana.Proto
|
112484
|
+
* @classdesc Represents a PriorityFeeLimit.
|
112485
|
+
* @implements IPriorityFeeLimit
|
112486
|
+
* @constructor
|
112487
|
+
* @param {TW.Solana.Proto.IPriorityFeeLimit=} [properties] Properties to set
|
112488
|
+
*/
|
112489
|
+
function PriorityFeeLimit(properties) {
|
112490
|
+
if (properties)
|
112491
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
112492
|
+
if (properties[keys[i]] != null)
|
112493
|
+
this[keys[i]] = properties[keys[i]];
|
112494
|
+
}
|
112495
|
+
|
112496
|
+
/**
|
112497
|
+
* PriorityFeeLimit limit.
|
112498
|
+
* @member {number} limit
|
112499
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112500
|
+
* @instance
|
112501
|
+
*/
|
112502
|
+
PriorityFeeLimit.prototype.limit = 0;
|
112503
|
+
|
112504
|
+
/**
|
112505
|
+
* Creates a new PriorityFeeLimit instance using the specified properties.
|
112506
|
+
* @function create
|
112507
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112508
|
+
* @static
|
112509
|
+
* @param {TW.Solana.Proto.IPriorityFeeLimit=} [properties] Properties to set
|
112510
|
+
* @returns {TW.Solana.Proto.PriorityFeeLimit} PriorityFeeLimit instance
|
112511
|
+
*/
|
112512
|
+
PriorityFeeLimit.create = function create(properties) {
|
112513
|
+
return new PriorityFeeLimit(properties);
|
112514
|
+
};
|
112515
|
+
|
112516
|
+
/**
|
112517
|
+
* Encodes the specified PriorityFeeLimit message. Does not implicitly {@link TW.Solana.Proto.PriorityFeeLimit.verify|verify} messages.
|
112518
|
+
* @function encode
|
112519
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112520
|
+
* @static
|
112521
|
+
* @param {TW.Solana.Proto.IPriorityFeeLimit} message PriorityFeeLimit message or plain object to encode
|
112522
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
112523
|
+
* @returns {$protobuf.Writer} Writer
|
112524
|
+
*/
|
112525
|
+
PriorityFeeLimit.encode = function encode(message, writer) {
|
112526
|
+
if (!writer)
|
112527
|
+
writer = $Writer.create();
|
112528
|
+
if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
|
112529
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.limit);
|
112530
|
+
return writer;
|
112531
|
+
};
|
112532
|
+
|
112533
|
+
/**
|
112534
|
+
* Decodes a PriorityFeeLimit message from the specified reader or buffer.
|
112535
|
+
* @function decode
|
112536
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112537
|
+
* @static
|
112538
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
112539
|
+
* @param {number} [length] Message length if known beforehand
|
112540
|
+
* @returns {TW.Solana.Proto.PriorityFeeLimit} PriorityFeeLimit
|
112541
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
112542
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
112543
|
+
*/
|
112544
|
+
PriorityFeeLimit.decode = function decode(reader, length) {
|
112545
|
+
if (!(reader instanceof $Reader))
|
112546
|
+
reader = $Reader.create(reader);
|
112547
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PriorityFeeLimit();
|
112548
|
+
while (reader.pos < end) {
|
112549
|
+
var tag = reader.uint32();
|
112550
|
+
switch (tag >>> 3) {
|
112551
|
+
case 2:
|
112552
|
+
message.limit = reader.uint32();
|
112553
|
+
break;
|
112554
|
+
default:
|
112555
|
+
reader.skipType(tag & 7);
|
112556
|
+
break;
|
112557
|
+
}
|
112558
|
+
}
|
112559
|
+
return message;
|
112560
|
+
};
|
112561
|
+
|
112562
|
+
/**
|
112563
|
+
* Verifies a PriorityFeeLimit message.
|
112564
|
+
* @function verify
|
112565
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112566
|
+
* @static
|
112567
|
+
* @param {Object.<string,*>} message Plain object to verify
|
112568
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
112569
|
+
*/
|
112570
|
+
PriorityFeeLimit.verify = function verify(message) {
|
112571
|
+
if (typeof message !== "object" || message === null)
|
112572
|
+
return "object expected";
|
112573
|
+
if (message.limit != null && message.hasOwnProperty("limit"))
|
112574
|
+
if (!$util.isInteger(message.limit))
|
112575
|
+
return "limit: integer expected";
|
112576
|
+
return null;
|
112577
|
+
};
|
112578
|
+
|
112579
|
+
/**
|
112580
|
+
* Creates a PriorityFeeLimit message from a plain object. Also converts values to their respective internal types.
|
112581
|
+
* @function fromObject
|
112582
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112583
|
+
* @static
|
112584
|
+
* @param {Object.<string,*>} object Plain object
|
112585
|
+
* @returns {TW.Solana.Proto.PriorityFeeLimit} PriorityFeeLimit
|
112586
|
+
*/
|
112587
|
+
PriorityFeeLimit.fromObject = function fromObject(object) {
|
112588
|
+
if (object instanceof $root.TW.Solana.Proto.PriorityFeeLimit)
|
112589
|
+
return object;
|
112590
|
+
var message = new $root.TW.Solana.Proto.PriorityFeeLimit();
|
112591
|
+
if (object.limit != null)
|
112592
|
+
message.limit = object.limit >>> 0;
|
112593
|
+
return message;
|
112594
|
+
};
|
112595
|
+
|
112596
|
+
/**
|
112597
|
+
* Creates a plain object from a PriorityFeeLimit message. Also converts values to other types if specified.
|
112598
|
+
* @function toObject
|
112599
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112600
|
+
* @static
|
112601
|
+
* @param {TW.Solana.Proto.PriorityFeeLimit} message PriorityFeeLimit
|
112602
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
112603
|
+
* @returns {Object.<string,*>} Plain object
|
112604
|
+
*/
|
112605
|
+
PriorityFeeLimit.toObject = function toObject(message, options) {
|
112606
|
+
if (!options)
|
112607
|
+
options = {};
|
112608
|
+
var object = {};
|
112609
|
+
if (options.defaults)
|
112610
|
+
object.limit = 0;
|
112611
|
+
if (message.limit != null && message.hasOwnProperty("limit"))
|
112612
|
+
object.limit = message.limit;
|
112613
|
+
return object;
|
112614
|
+
};
|
112615
|
+
|
112616
|
+
/**
|
112617
|
+
* Converts this PriorityFeeLimit to JSON.
|
112618
|
+
* @function toJSON
|
112619
|
+
* @memberof TW.Solana.Proto.PriorityFeeLimit
|
112620
|
+
* @instance
|
112621
|
+
* @returns {Object.<string,*>} JSON object
|
112622
|
+
*/
|
112623
|
+
PriorityFeeLimit.prototype.toJSON = function toJSON() {
|
112624
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
112625
|
+
};
|
112626
|
+
|
112627
|
+
return PriorityFeeLimit;
|
112628
|
+
})();
|
112629
|
+
|
110003
112630
|
Proto.SigningInput = (function() {
|
110004
112631
|
|
110005
112632
|
/**
|
@@ -110025,6 +112652,10 @@
|
|
110025
112652
|
* @property {string|null} [nonceAccount] SigningInput nonceAccount
|
110026
112653
|
* @property {Uint8Array|null} [feePayerPrivateKey] SigningInput feePayerPrivateKey
|
110027
112654
|
* @property {string|null} [feePayer] SigningInput feePayer
|
112655
|
+
* @property {TW.Solana.Proto.IRawMessage|null} [rawMessage] SigningInput rawMessage
|
112656
|
+
* @property {TW.Solana.Proto.Encoding|null} [txEncoding] SigningInput txEncoding
|
112657
|
+
* @property {TW.Solana.Proto.IPriorityFeePrice|null} [priorityFeePrice] SigningInput priorityFeePrice
|
112658
|
+
* @property {TW.Solana.Proto.IPriorityFeeLimit|null} [priorityFeeLimit] SigningInput priorityFeeLimit
|
110028
112659
|
*/
|
110029
112660
|
|
110030
112661
|
/**
|
@@ -110194,6 +112825,38 @@
|
|
110194
112825
|
*/
|
110195
112826
|
SigningInput.prototype.feePayer = "";
|
110196
112827
|
|
112828
|
+
/**
|
112829
|
+
* SigningInput rawMessage.
|
112830
|
+
* @member {TW.Solana.Proto.IRawMessage|null|undefined} rawMessage
|
112831
|
+
* @memberof TW.Solana.Proto.SigningInput
|
112832
|
+
* @instance
|
112833
|
+
*/
|
112834
|
+
SigningInput.prototype.rawMessage = null;
|
112835
|
+
|
112836
|
+
/**
|
112837
|
+
* SigningInput txEncoding.
|
112838
|
+
* @member {TW.Solana.Proto.Encoding} txEncoding
|
112839
|
+
* @memberof TW.Solana.Proto.SigningInput
|
112840
|
+
* @instance
|
112841
|
+
*/
|
112842
|
+
SigningInput.prototype.txEncoding = 0;
|
112843
|
+
|
112844
|
+
/**
|
112845
|
+
* SigningInput priorityFeePrice.
|
112846
|
+
* @member {TW.Solana.Proto.IPriorityFeePrice|null|undefined} priorityFeePrice
|
112847
|
+
* @memberof TW.Solana.Proto.SigningInput
|
112848
|
+
* @instance
|
112849
|
+
*/
|
112850
|
+
SigningInput.prototype.priorityFeePrice = null;
|
112851
|
+
|
112852
|
+
/**
|
112853
|
+
* SigningInput priorityFeeLimit.
|
112854
|
+
* @member {TW.Solana.Proto.IPriorityFeeLimit|null|undefined} priorityFeeLimit
|
112855
|
+
* @memberof TW.Solana.Proto.SigningInput
|
112856
|
+
* @instance
|
112857
|
+
*/
|
112858
|
+
SigningInput.prototype.priorityFeeLimit = null;
|
112859
|
+
|
110197
112860
|
// OneOf field names bound to virtual getters and setters
|
110198
112861
|
var $oneOfFields;
|
110199
112862
|
|
@@ -110270,6 +112933,14 @@
|
|
110270
112933
|
writer.uint32(/* id 18, wireType 2 =*/146).string(message.feePayer);
|
110271
112934
|
if (message.advanceNonceAccount != null && Object.hasOwnProperty.call(message, "advanceNonceAccount"))
|
110272
112935
|
$root.TW.Solana.Proto.AdvanceNonceAccount.encode(message.advanceNonceAccount, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
|
112936
|
+
if (message.rawMessage != null && Object.hasOwnProperty.call(message, "rawMessage"))
|
112937
|
+
$root.TW.Solana.Proto.RawMessage.encode(message.rawMessage, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
|
112938
|
+
if (message.txEncoding != null && Object.hasOwnProperty.call(message, "txEncoding"))
|
112939
|
+
writer.uint32(/* id 21, wireType 0 =*/168).int32(message.txEncoding);
|
112940
|
+
if (message.priorityFeePrice != null && Object.hasOwnProperty.call(message, "priorityFeePrice"))
|
112941
|
+
$root.TW.Solana.Proto.PriorityFeePrice.encode(message.priorityFeePrice, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
|
112942
|
+
if (message.priorityFeeLimit != null && Object.hasOwnProperty.call(message, "priorityFeeLimit"))
|
112943
|
+
$root.TW.Solana.Proto.PriorityFeeLimit.encode(message.priorityFeeLimit, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
|
110273
112944
|
return writer;
|
110274
112945
|
};
|
110275
112946
|
|
@@ -110348,6 +113019,18 @@
|
|
110348
113019
|
case 18:
|
110349
113020
|
message.feePayer = reader.string();
|
110350
113021
|
break;
|
113022
|
+
case 20:
|
113023
|
+
message.rawMessage = $root.TW.Solana.Proto.RawMessage.decode(reader, reader.uint32());
|
113024
|
+
break;
|
113025
|
+
case 21:
|
113026
|
+
message.txEncoding = reader.int32();
|
113027
|
+
break;
|
113028
|
+
case 22:
|
113029
|
+
message.priorityFeePrice = $root.TW.Solana.Proto.PriorityFeePrice.decode(reader, reader.uint32());
|
113030
|
+
break;
|
113031
|
+
case 23:
|
113032
|
+
message.priorityFeeLimit = $root.TW.Solana.Proto.PriorityFeeLimit.decode(reader, reader.uint32());
|
113033
|
+
break;
|
110351
113034
|
default:
|
110352
113035
|
reader.skipType(tag & 7);
|
110353
113036
|
break;
|
@@ -110507,6 +113190,29 @@
|
|
110507
113190
|
if (message.feePayer != null && message.hasOwnProperty("feePayer"))
|
110508
113191
|
if (!$util.isString(message.feePayer))
|
110509
113192
|
return "feePayer: string expected";
|
113193
|
+
if (message.rawMessage != null && message.hasOwnProperty("rawMessage")) {
|
113194
|
+
var error = $root.TW.Solana.Proto.RawMessage.verify(message.rawMessage);
|
113195
|
+
if (error)
|
113196
|
+
return "rawMessage." + error;
|
113197
|
+
}
|
113198
|
+
if (message.txEncoding != null && message.hasOwnProperty("txEncoding"))
|
113199
|
+
switch (message.txEncoding) {
|
113200
|
+
default:
|
113201
|
+
return "txEncoding: enum value expected";
|
113202
|
+
case 0:
|
113203
|
+
case 1:
|
113204
|
+
break;
|
113205
|
+
}
|
113206
|
+
if (message.priorityFeePrice != null && message.hasOwnProperty("priorityFeePrice")) {
|
113207
|
+
var error = $root.TW.Solana.Proto.PriorityFeePrice.verify(message.priorityFeePrice);
|
113208
|
+
if (error)
|
113209
|
+
return "priorityFeePrice." + error;
|
113210
|
+
}
|
113211
|
+
if (message.priorityFeeLimit != null && message.hasOwnProperty("priorityFeeLimit")) {
|
113212
|
+
var error = $root.TW.Solana.Proto.PriorityFeeLimit.verify(message.priorityFeeLimit);
|
113213
|
+
if (error)
|
113214
|
+
return "priorityFeeLimit." + error;
|
113215
|
+
}
|
110510
113216
|
return null;
|
110511
113217
|
};
|
110512
113218
|
|
@@ -110602,6 +113308,31 @@
|
|
110602
113308
|
message.feePayerPrivateKey = object.feePayerPrivateKey;
|
110603
113309
|
if (object.feePayer != null)
|
110604
113310
|
message.feePayer = String(object.feePayer);
|
113311
|
+
if (object.rawMessage != null) {
|
113312
|
+
if (typeof object.rawMessage !== "object")
|
113313
|
+
throw TypeError(".TW.Solana.Proto.SigningInput.rawMessage: object expected");
|
113314
|
+
message.rawMessage = $root.TW.Solana.Proto.RawMessage.fromObject(object.rawMessage);
|
113315
|
+
}
|
113316
|
+
switch (object.txEncoding) {
|
113317
|
+
case "Base58":
|
113318
|
+
case 0:
|
113319
|
+
message.txEncoding = 0;
|
113320
|
+
break;
|
113321
|
+
case "Base64":
|
113322
|
+
case 1:
|
113323
|
+
message.txEncoding = 1;
|
113324
|
+
break;
|
113325
|
+
}
|
113326
|
+
if (object.priorityFeePrice != null) {
|
113327
|
+
if (typeof object.priorityFeePrice !== "object")
|
113328
|
+
throw TypeError(".TW.Solana.Proto.SigningInput.priorityFeePrice: object expected");
|
113329
|
+
message.priorityFeePrice = $root.TW.Solana.Proto.PriorityFeePrice.fromObject(object.priorityFeePrice);
|
113330
|
+
}
|
113331
|
+
if (object.priorityFeeLimit != null) {
|
113332
|
+
if (typeof object.priorityFeeLimit !== "object")
|
113333
|
+
throw TypeError(".TW.Solana.Proto.SigningInput.priorityFeeLimit: object expected");
|
113334
|
+
message.priorityFeeLimit = $root.TW.Solana.Proto.PriorityFeeLimit.fromObject(object.priorityFeeLimit);
|
113335
|
+
}
|
110605
113336
|
return message;
|
110606
113337
|
};
|
110607
113338
|
|
@@ -110638,6 +113369,10 @@
|
|
110638
113369
|
object.feePayerPrivateKey = $util.newBuffer(object.feePayerPrivateKey);
|
110639
113370
|
}
|
110640
113371
|
object.feePayer = "";
|
113372
|
+
object.rawMessage = null;
|
113373
|
+
object.txEncoding = options.enums === String ? "Base58" : 0;
|
113374
|
+
object.priorityFeePrice = null;
|
113375
|
+
object.priorityFeeLimit = null;
|
110641
113376
|
}
|
110642
113377
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
110643
113378
|
object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
|
@@ -110713,6 +113448,14 @@
|
|
110713
113448
|
if (options.oneofs)
|
110714
113449
|
object.transactionType = "advanceNonceAccount";
|
110715
113450
|
}
|
113451
|
+
if (message.rawMessage != null && message.hasOwnProperty("rawMessage"))
|
113452
|
+
object.rawMessage = $root.TW.Solana.Proto.RawMessage.toObject(message.rawMessage, options);
|
113453
|
+
if (message.txEncoding != null && message.hasOwnProperty("txEncoding"))
|
113454
|
+
object.txEncoding = options.enums === String ? $root.TW.Solana.Proto.Encoding[message.txEncoding] : message.txEncoding;
|
113455
|
+
if (message.priorityFeePrice != null && message.hasOwnProperty("priorityFeePrice"))
|
113456
|
+
object.priorityFeePrice = $root.TW.Solana.Proto.PriorityFeePrice.toObject(message.priorityFeePrice, options);
|
113457
|
+
if (message.priorityFeeLimit != null && message.hasOwnProperty("priorityFeeLimit"))
|
113458
|
+
object.priorityFeeLimit = $root.TW.Solana.Proto.PriorityFeeLimit.toObject(message.priorityFeeLimit, options);
|
110716
113459
|
return object;
|
110717
113460
|
};
|
110718
113461
|
|
@@ -110740,7 +113483,7 @@
|
|
110740
113483
|
* @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
|
110741
113484
|
* @property {string|null} [errorMessage] SigningOutput errorMessage
|
110742
113485
|
* @property {string|null} [unsignedTx] SigningOutput unsignedTx
|
110743
|
-
* @property {
|
113486
|
+
* @property {Array.<TW.Solana.Proto.IPubkeySignature>|null} [signatures] SigningOutput signatures
|
110744
113487
|
*/
|
110745
113488
|
|
110746
113489
|
/**
|
@@ -110752,6 +113495,7 @@
|
|
110752
113495
|
* @param {TW.Solana.Proto.ISigningOutput=} [properties] Properties to set
|
110753
113496
|
*/
|
110754
113497
|
function SigningOutput(properties) {
|
113498
|
+
this.signatures = [];
|
110755
113499
|
if (properties)
|
110756
113500
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
110757
113501
|
if (properties[keys[i]] != null)
|
@@ -110791,12 +113535,12 @@
|
|
110791
113535
|
SigningOutput.prototype.unsignedTx = "";
|
110792
113536
|
|
110793
113537
|
/**
|
110794
|
-
* SigningOutput
|
110795
|
-
* @member {
|
113538
|
+
* SigningOutput signatures.
|
113539
|
+
* @member {Array.<TW.Solana.Proto.IPubkeySignature>} signatures
|
110796
113540
|
* @memberof TW.Solana.Proto.SigningOutput
|
110797
113541
|
* @instance
|
110798
113542
|
*/
|
110799
|
-
SigningOutput.prototype.
|
113543
|
+
SigningOutput.prototype.signatures = $util.emptyArray;
|
110800
113544
|
|
110801
113545
|
/**
|
110802
113546
|
* Creates a new SigningOutput instance using the specified properties.
|
@@ -110830,8 +113574,9 @@
|
|
110830
113574
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
|
110831
113575
|
if (message.unsignedTx != null && Object.hasOwnProperty.call(message, "unsignedTx"))
|
110832
113576
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.unsignedTx);
|
110833
|
-
if (message.
|
110834
|
-
|
113577
|
+
if (message.signatures != null && message.signatures.length)
|
113578
|
+
for (var i = 0; i < message.signatures.length; ++i)
|
113579
|
+
$root.TW.Solana.Proto.PubkeySignature.encode(message.signatures[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
110835
113580
|
return writer;
|
110836
113581
|
};
|
110837
113582
|
|
@@ -110866,7 +113611,9 @@
|
|
110866
113611
|
message.unsignedTx = reader.string();
|
110867
113612
|
break;
|
110868
113613
|
case 5:
|
110869
|
-
message.
|
113614
|
+
if (!(message.signatures && message.signatures.length))
|
113615
|
+
message.signatures = [];
|
113616
|
+
message.signatures.push($root.TW.Solana.Proto.PubkeySignature.decode(reader, reader.uint32()));
|
110870
113617
|
break;
|
110871
113618
|
default:
|
110872
113619
|
reader.skipType(tag & 7);
|
@@ -110919,6 +113666,7 @@
|
|
110919
113666
|
case 22:
|
110920
113667
|
case 23:
|
110921
113668
|
case 24:
|
113669
|
+
case 25:
|
110922
113670
|
break;
|
110923
113671
|
}
|
110924
113672
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -110927,9 +113675,15 @@
|
|
110927
113675
|
if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
|
110928
113676
|
if (!$util.isString(message.unsignedTx))
|
110929
113677
|
return "unsignedTx: string expected";
|
110930
|
-
if (message.
|
110931
|
-
if (
|
110932
|
-
return "
|
113678
|
+
if (message.signatures != null && message.hasOwnProperty("signatures")) {
|
113679
|
+
if (!Array.isArray(message.signatures))
|
113680
|
+
return "signatures: array expected";
|
113681
|
+
for (var i = 0; i < message.signatures.length; ++i) {
|
113682
|
+
var error = $root.TW.Solana.Proto.PubkeySignature.verify(message.signatures[i]);
|
113683
|
+
if (error)
|
113684
|
+
return "signatures." + error;
|
113685
|
+
}
|
113686
|
+
}
|
110933
113687
|
return null;
|
110934
113688
|
};
|
110935
113689
|
|
@@ -111048,384 +113802,405 @@
|
|
111048
113802
|
case 24:
|
111049
113803
|
message.error = 24;
|
111050
113804
|
break;
|
111051
|
-
|
111052
|
-
|
111053
|
-
message.
|
111054
|
-
|
111055
|
-
|
111056
|
-
if (object.
|
111057
|
-
message.
|
111058
|
-
|
111059
|
-
|
111060
|
-
|
111061
|
-
|
111062
|
-
|
111063
|
-
|
111064
|
-
|
111065
|
-
|
111066
|
-
|
111067
|
-
|
111068
|
-
|
111069
|
-
|
111070
|
-
|
111071
|
-
|
111072
|
-
|
111073
|
-
|
111074
|
-
|
111075
|
-
|
111076
|
-
|
111077
|
-
|
111078
|
-
|
111079
|
-
|
111080
|
-
|
111081
|
-
|
111082
|
-
|
111083
|
-
if (
|
111084
|
-
|
111085
|
-
|
111086
|
-
|
111087
|
-
|
111088
|
-
|
111089
|
-
|
111090
|
-
object.
|
111091
|
-
|
111092
|
-
|
111093
|
-
|
111094
|
-
|
111095
|
-
|
111096
|
-
|
111097
|
-
|
111098
|
-
|
111099
|
-
|
111100
|
-
|
111101
|
-
|
111102
|
-
|
111103
|
-
|
111104
|
-
|
111105
|
-
|
111106
|
-
|
111107
|
-
|
111108
|
-
|
111109
|
-
|
111110
|
-
/**
|
111111
|
-
*
|
111112
|
-
* @
|
111113
|
-
* @
|
111114
|
-
* @
|
111115
|
-
* @
|
111116
|
-
|
111117
|
-
|
111118
|
-
|
111119
|
-
|
111120
|
-
|
111121
|
-
|
111122
|
-
|
111123
|
-
|
111124
|
-
|
111125
|
-
|
111126
|
-
|
111127
|
-
|
111128
|
-
|
111129
|
-
|
111130
|
-
|
111131
|
-
|
111132
|
-
|
111133
|
-
|
111134
|
-
|
111135
|
-
|
111136
|
-
/**
|
111137
|
-
*
|
111138
|
-
* @
|
111139
|
-
* @
|
111140
|
-
* @
|
111141
|
-
|
111142
|
-
|
111143
|
-
|
111144
|
-
|
111145
|
-
|
111146
|
-
|
111147
|
-
|
111148
|
-
|
111149
|
-
|
111150
|
-
|
111151
|
-
|
111152
|
-
/**
|
111153
|
-
* PreSigningOutput
|
111154
|
-
* @member {
|
111155
|
-
* @memberof TW.Solana.Proto.PreSigningOutput
|
111156
|
-
* @instance
|
111157
|
-
*/
|
111158
|
-
PreSigningOutput.prototype.
|
111159
|
-
|
111160
|
-
/**
|
111161
|
-
* PreSigningOutput
|
111162
|
-
* @member {
|
111163
|
-
* @memberof TW.Solana.Proto.PreSigningOutput
|
111164
|
-
* @instance
|
111165
|
-
*/
|
111166
|
-
PreSigningOutput.prototype.
|
111167
|
-
|
111168
|
-
/**
|
111169
|
-
*
|
111170
|
-
* @
|
111171
|
-
* @memberof TW.Solana.Proto.PreSigningOutput
|
111172
|
-
* @
|
111173
|
-
|
111174
|
-
|
111175
|
-
|
111176
|
-
|
111177
|
-
|
111178
|
-
|
111179
|
-
|
111180
|
-
|
111181
|
-
|
111182
|
-
|
111183
|
-
|
111184
|
-
|
111185
|
-
*
|
111186
|
-
* @
|
111187
|
-
* @
|
111188
|
-
|
111189
|
-
|
111190
|
-
|
111191
|
-
|
111192
|
-
|
111193
|
-
|
111194
|
-
|
111195
|
-
|
111196
|
-
|
111197
|
-
|
111198
|
-
|
111199
|
-
|
111200
|
-
|
111201
|
-
|
111202
|
-
|
111203
|
-
|
111204
|
-
|
111205
|
-
|
111206
|
-
|
111207
|
-
|
111208
|
-
|
111209
|
-
|
111210
|
-
|
111211
|
-
|
111212
|
-
|
111213
|
-
|
111214
|
-
|
111215
|
-
|
111216
|
-
|
111217
|
-
|
111218
|
-
|
111219
|
-
|
111220
|
-
|
111221
|
-
|
111222
|
-
|
111223
|
-
|
111224
|
-
|
111225
|
-
|
111226
|
-
|
111227
|
-
|
111228
|
-
|
111229
|
-
|
111230
|
-
|
111231
|
-
|
111232
|
-
|
111233
|
-
|
111234
|
-
|
111235
|
-
|
111236
|
-
|
111237
|
-
|
111238
|
-
|
111239
|
-
|
111240
|
-
|
111241
|
-
|
111242
|
-
|
111243
|
-
|
111244
|
-
|
111245
|
-
|
111246
|
-
|
111247
|
-
|
111248
|
-
|
111249
|
-
|
111250
|
-
|
111251
|
-
|
111252
|
-
|
111253
|
-
|
111254
|
-
|
111255
|
-
|
111256
|
-
|
111257
|
-
|
111258
|
-
|
111259
|
-
|
111260
|
-
|
111261
|
-
|
111262
|
-
|
111263
|
-
|
111264
|
-
|
111265
|
-
|
111266
|
-
|
111267
|
-
|
111268
|
-
|
111269
|
-
|
111270
|
-
|
111271
|
-
|
111272
|
-
|
111273
|
-
|
111274
|
-
|
111275
|
-
|
111276
|
-
|
111277
|
-
|
111278
|
-
|
111279
|
-
|
111280
|
-
|
111281
|
-
|
111282
|
-
|
111283
|
-
|
111284
|
-
|
111285
|
-
case
|
111286
|
-
case
|
111287
|
-
case
|
111288
|
-
case
|
111289
|
-
case
|
111290
|
-
case
|
111291
|
-
case
|
111292
|
-
case
|
111293
|
-
case
|
111294
|
-
|
111295
|
-
|
111296
|
-
|
111297
|
-
|
111298
|
-
|
111299
|
-
|
111300
|
-
|
111301
|
-
|
111302
|
-
|
111303
|
-
|
111304
|
-
|
111305
|
-
|
111306
|
-
|
111307
|
-
|
111308
|
-
|
111309
|
-
|
111310
|
-
|
111311
|
-
|
111312
|
-
|
111313
|
-
|
111314
|
-
|
111315
|
-
|
111316
|
-
|
111317
|
-
|
111318
|
-
|
111319
|
-
|
111320
|
-
|
111321
|
-
|
111322
|
-
|
111323
|
-
|
111324
|
-
|
111325
|
-
|
111326
|
-
|
111327
|
-
|
111328
|
-
|
111329
|
-
|
111330
|
-
|
111331
|
-
|
111332
|
-
|
111333
|
-
|
111334
|
-
|
111335
|
-
|
111336
|
-
|
111337
|
-
|
111338
|
-
|
111339
|
-
|
111340
|
-
|
111341
|
-
|
111342
|
-
|
111343
|
-
|
111344
|
-
|
111345
|
-
|
111346
|
-
|
111347
|
-
case
|
111348
|
-
|
111349
|
-
|
111350
|
-
|
111351
|
-
case
|
111352
|
-
|
111353
|
-
|
111354
|
-
|
111355
|
-
case
|
111356
|
-
|
111357
|
-
|
111358
|
-
|
111359
|
-
case
|
111360
|
-
|
111361
|
-
|
111362
|
-
|
111363
|
-
case
|
111364
|
-
|
111365
|
-
|
111366
|
-
|
111367
|
-
case
|
111368
|
-
|
111369
|
-
|
111370
|
-
|
111371
|
-
case
|
111372
|
-
|
111373
|
-
|
111374
|
-
|
111375
|
-
case
|
111376
|
-
|
111377
|
-
|
111378
|
-
|
111379
|
-
case
|
111380
|
-
|
111381
|
-
|
111382
|
-
|
111383
|
-
case
|
111384
|
-
|
111385
|
-
|
111386
|
-
|
111387
|
-
case
|
111388
|
-
|
111389
|
-
|
111390
|
-
|
111391
|
-
case
|
111392
|
-
|
111393
|
-
|
111394
|
-
|
111395
|
-
case
|
111396
|
-
|
111397
|
-
|
111398
|
-
|
111399
|
-
case
|
111400
|
-
|
111401
|
-
|
111402
|
-
|
111403
|
-
case
|
111404
|
-
|
111405
|
-
|
111406
|
-
|
111407
|
-
case
|
111408
|
-
|
111409
|
-
|
111410
|
-
|
111411
|
-
case
|
111412
|
-
|
111413
|
-
|
111414
|
-
|
111415
|
-
case
|
111416
|
-
|
111417
|
-
|
111418
|
-
|
111419
|
-
case
|
111420
|
-
|
111421
|
-
|
111422
|
-
|
111423
|
-
case
|
111424
|
-
|
111425
|
-
|
111426
|
-
|
111427
|
-
case
|
111428
|
-
|
113805
|
+
case "Error_dust_amount_requested":
|
113806
|
+
case 25:
|
113807
|
+
message.error = 25;
|
113808
|
+
break;
|
113809
|
+
}
|
113810
|
+
if (object.errorMessage != null)
|
113811
|
+
message.errorMessage = String(object.errorMessage);
|
113812
|
+
if (object.unsignedTx != null)
|
113813
|
+
message.unsignedTx = String(object.unsignedTx);
|
113814
|
+
if (object.signatures) {
|
113815
|
+
if (!Array.isArray(object.signatures))
|
113816
|
+
throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: array expected");
|
113817
|
+
message.signatures = [];
|
113818
|
+
for (var i = 0; i < object.signatures.length; ++i) {
|
113819
|
+
if (typeof object.signatures[i] !== "object")
|
113820
|
+
throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: object expected");
|
113821
|
+
message.signatures[i] = $root.TW.Solana.Proto.PubkeySignature.fromObject(object.signatures[i]);
|
113822
|
+
}
|
113823
|
+
}
|
113824
|
+
return message;
|
113825
|
+
};
|
113826
|
+
|
113827
|
+
/**
|
113828
|
+
* Creates a plain object from a SigningOutput message. Also converts values to other types if specified.
|
113829
|
+
* @function toObject
|
113830
|
+
* @memberof TW.Solana.Proto.SigningOutput
|
113831
|
+
* @static
|
113832
|
+
* @param {TW.Solana.Proto.SigningOutput} message SigningOutput
|
113833
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
113834
|
+
* @returns {Object.<string,*>} Plain object
|
113835
|
+
*/
|
113836
|
+
SigningOutput.toObject = function toObject(message, options) {
|
113837
|
+
if (!options)
|
113838
|
+
options = {};
|
113839
|
+
var object = {};
|
113840
|
+
if (options.arrays || options.defaults)
|
113841
|
+
object.signatures = [];
|
113842
|
+
if (options.defaults) {
|
113843
|
+
object.encoded = "";
|
113844
|
+
object.error = options.enums === String ? "OK" : 0;
|
113845
|
+
object.errorMessage = "";
|
113846
|
+
object.unsignedTx = "";
|
113847
|
+
}
|
113848
|
+
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
113849
|
+
object.encoded = message.encoded;
|
113850
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
113851
|
+
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
113852
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
113853
|
+
object.errorMessage = message.errorMessage;
|
113854
|
+
if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
|
113855
|
+
object.unsignedTx = message.unsignedTx;
|
113856
|
+
if (message.signatures && message.signatures.length) {
|
113857
|
+
object.signatures = [];
|
113858
|
+
for (var j = 0; j < message.signatures.length; ++j)
|
113859
|
+
object.signatures[j] = $root.TW.Solana.Proto.PubkeySignature.toObject(message.signatures[j], options);
|
113860
|
+
}
|
113861
|
+
return object;
|
113862
|
+
};
|
113863
|
+
|
113864
|
+
/**
|
113865
|
+
* Converts this SigningOutput to JSON.
|
113866
|
+
* @function toJSON
|
113867
|
+
* @memberof TW.Solana.Proto.SigningOutput
|
113868
|
+
* @instance
|
113869
|
+
* @returns {Object.<string,*>} JSON object
|
113870
|
+
*/
|
113871
|
+
SigningOutput.prototype.toJSON = function toJSON() {
|
113872
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
113873
|
+
};
|
113874
|
+
|
113875
|
+
return SigningOutput;
|
113876
|
+
})();
|
113877
|
+
|
113878
|
+
Proto.PreSigningOutput = (function() {
|
113879
|
+
|
113880
|
+
/**
|
113881
|
+
* Properties of a PreSigningOutput.
|
113882
|
+
* @memberof TW.Solana.Proto
|
113883
|
+
* @interface IPreSigningOutput
|
113884
|
+
* @property {Array.<Uint8Array>|null} [signers] PreSigningOutput signers
|
113885
|
+
* @property {Uint8Array|null} [data] PreSigningOutput data
|
113886
|
+
* @property {TW.Common.Proto.SigningError|null} [error] PreSigningOutput error
|
113887
|
+
* @property {string|null} [errorMessage] PreSigningOutput errorMessage
|
113888
|
+
*/
|
113889
|
+
|
113890
|
+
/**
|
113891
|
+
* Constructs a new PreSigningOutput.
|
113892
|
+
* @memberof TW.Solana.Proto
|
113893
|
+
* @classdesc Transaction pre-signing output
|
113894
|
+
* @implements IPreSigningOutput
|
113895
|
+
* @constructor
|
113896
|
+
* @param {TW.Solana.Proto.IPreSigningOutput=} [properties] Properties to set
|
113897
|
+
*/
|
113898
|
+
function PreSigningOutput(properties) {
|
113899
|
+
this.signers = [];
|
113900
|
+
if (properties)
|
113901
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
113902
|
+
if (properties[keys[i]] != null)
|
113903
|
+
this[keys[i]] = properties[keys[i]];
|
113904
|
+
}
|
113905
|
+
|
113906
|
+
/**
|
113907
|
+
* PreSigningOutput signers.
|
113908
|
+
* @member {Array.<Uint8Array>} signers
|
113909
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113910
|
+
* @instance
|
113911
|
+
*/
|
113912
|
+
PreSigningOutput.prototype.signers = $util.emptyArray;
|
113913
|
+
|
113914
|
+
/**
|
113915
|
+
* PreSigningOutput data.
|
113916
|
+
* @member {Uint8Array} data
|
113917
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113918
|
+
* @instance
|
113919
|
+
*/
|
113920
|
+
PreSigningOutput.prototype.data = $util.newBuffer([]);
|
113921
|
+
|
113922
|
+
/**
|
113923
|
+
* PreSigningOutput error.
|
113924
|
+
* @member {TW.Common.Proto.SigningError} error
|
113925
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113926
|
+
* @instance
|
113927
|
+
*/
|
113928
|
+
PreSigningOutput.prototype.error = 0;
|
113929
|
+
|
113930
|
+
/**
|
113931
|
+
* PreSigningOutput errorMessage.
|
113932
|
+
* @member {string} errorMessage
|
113933
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113934
|
+
* @instance
|
113935
|
+
*/
|
113936
|
+
PreSigningOutput.prototype.errorMessage = "";
|
113937
|
+
|
113938
|
+
/**
|
113939
|
+
* Creates a new PreSigningOutput instance using the specified properties.
|
113940
|
+
* @function create
|
113941
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113942
|
+
* @static
|
113943
|
+
* @param {TW.Solana.Proto.IPreSigningOutput=} [properties] Properties to set
|
113944
|
+
* @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput instance
|
113945
|
+
*/
|
113946
|
+
PreSigningOutput.create = function create(properties) {
|
113947
|
+
return new PreSigningOutput(properties);
|
113948
|
+
};
|
113949
|
+
|
113950
|
+
/**
|
113951
|
+
* Encodes the specified PreSigningOutput message. Does not implicitly {@link TW.Solana.Proto.PreSigningOutput.verify|verify} messages.
|
113952
|
+
* @function encode
|
113953
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113954
|
+
* @static
|
113955
|
+
* @param {TW.Solana.Proto.IPreSigningOutput} message PreSigningOutput message or plain object to encode
|
113956
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
113957
|
+
* @returns {$protobuf.Writer} Writer
|
113958
|
+
*/
|
113959
|
+
PreSigningOutput.encode = function encode(message, writer) {
|
113960
|
+
if (!writer)
|
113961
|
+
writer = $Writer.create();
|
113962
|
+
if (message.signers != null && message.signers.length)
|
113963
|
+
for (var i = 0; i < message.signers.length; ++i)
|
113964
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signers[i]);
|
113965
|
+
if (message.data != null && Object.hasOwnProperty.call(message, "data"))
|
113966
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);
|
113967
|
+
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
113968
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.error);
|
113969
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
113970
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.errorMessage);
|
113971
|
+
return writer;
|
113972
|
+
};
|
113973
|
+
|
113974
|
+
/**
|
113975
|
+
* Decodes a PreSigningOutput message from the specified reader or buffer.
|
113976
|
+
* @function decode
|
113977
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
113978
|
+
* @static
|
113979
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
113980
|
+
* @param {number} [length] Message length if known beforehand
|
113981
|
+
* @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput
|
113982
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
113983
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
113984
|
+
*/
|
113985
|
+
PreSigningOutput.decode = function decode(reader, length) {
|
113986
|
+
if (!(reader instanceof $Reader))
|
113987
|
+
reader = $Reader.create(reader);
|
113988
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PreSigningOutput();
|
113989
|
+
while (reader.pos < end) {
|
113990
|
+
var tag = reader.uint32();
|
113991
|
+
switch (tag >>> 3) {
|
113992
|
+
case 1:
|
113993
|
+
if (!(message.signers && message.signers.length))
|
113994
|
+
message.signers = [];
|
113995
|
+
message.signers.push(reader.bytes());
|
113996
|
+
break;
|
113997
|
+
case 2:
|
113998
|
+
message.data = reader.bytes();
|
113999
|
+
break;
|
114000
|
+
case 3:
|
114001
|
+
message.error = reader.int32();
|
114002
|
+
break;
|
114003
|
+
case 4:
|
114004
|
+
message.errorMessage = reader.string();
|
114005
|
+
break;
|
114006
|
+
default:
|
114007
|
+
reader.skipType(tag & 7);
|
114008
|
+
break;
|
114009
|
+
}
|
114010
|
+
}
|
114011
|
+
return message;
|
114012
|
+
};
|
114013
|
+
|
114014
|
+
/**
|
114015
|
+
* Verifies a PreSigningOutput message.
|
114016
|
+
* @function verify
|
114017
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
114018
|
+
* @static
|
114019
|
+
* @param {Object.<string,*>} message Plain object to verify
|
114020
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
114021
|
+
*/
|
114022
|
+
PreSigningOutput.verify = function verify(message) {
|
114023
|
+
if (typeof message !== "object" || message === null)
|
114024
|
+
return "object expected";
|
114025
|
+
if (message.signers != null && message.hasOwnProperty("signers")) {
|
114026
|
+
if (!Array.isArray(message.signers))
|
114027
|
+
return "signers: array expected";
|
114028
|
+
for (var i = 0; i < message.signers.length; ++i)
|
114029
|
+
if (!(message.signers[i] && typeof message.signers[i].length === "number" || $util.isString(message.signers[i])))
|
114030
|
+
return "signers: buffer[] expected";
|
114031
|
+
}
|
114032
|
+
if (message.data != null && message.hasOwnProperty("data"))
|
114033
|
+
if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
|
114034
|
+
return "data: buffer expected";
|
114035
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
114036
|
+
switch (message.error) {
|
114037
|
+
default:
|
114038
|
+
return "error: enum value expected";
|
114039
|
+
case 0:
|
114040
|
+
case 1:
|
114041
|
+
case 2:
|
114042
|
+
case 3:
|
114043
|
+
case 4:
|
114044
|
+
case 5:
|
114045
|
+
case 15:
|
114046
|
+
case 16:
|
114047
|
+
case 17:
|
114048
|
+
case 18:
|
114049
|
+
case 6:
|
114050
|
+
case 7:
|
114051
|
+
case 8:
|
114052
|
+
case 9:
|
114053
|
+
case 10:
|
114054
|
+
case 11:
|
114055
|
+
case 12:
|
114056
|
+
case 13:
|
114057
|
+
case 14:
|
114058
|
+
case 19:
|
114059
|
+
case 20:
|
114060
|
+
case 21:
|
114061
|
+
case 22:
|
114062
|
+
case 23:
|
114063
|
+
case 24:
|
114064
|
+
case 25:
|
114065
|
+
break;
|
114066
|
+
}
|
114067
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
114068
|
+
if (!$util.isString(message.errorMessage))
|
114069
|
+
return "errorMessage: string expected";
|
114070
|
+
return null;
|
114071
|
+
};
|
114072
|
+
|
114073
|
+
/**
|
114074
|
+
* Creates a PreSigningOutput message from a plain object. Also converts values to their respective internal types.
|
114075
|
+
* @function fromObject
|
114076
|
+
* @memberof TW.Solana.Proto.PreSigningOutput
|
114077
|
+
* @static
|
114078
|
+
* @param {Object.<string,*>} object Plain object
|
114079
|
+
* @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput
|
114080
|
+
*/
|
114081
|
+
PreSigningOutput.fromObject = function fromObject(object) {
|
114082
|
+
if (object instanceof $root.TW.Solana.Proto.PreSigningOutput)
|
114083
|
+
return object;
|
114084
|
+
var message = new $root.TW.Solana.Proto.PreSigningOutput();
|
114085
|
+
if (object.signers) {
|
114086
|
+
if (!Array.isArray(object.signers))
|
114087
|
+
throw TypeError(".TW.Solana.Proto.PreSigningOutput.signers: array expected");
|
114088
|
+
message.signers = [];
|
114089
|
+
for (var i = 0; i < object.signers.length; ++i)
|
114090
|
+
if (typeof object.signers[i] === "string")
|
114091
|
+
$util.base64.decode(object.signers[i], message.signers[i] = $util.newBuffer($util.base64.length(object.signers[i])), 0);
|
114092
|
+
else if (object.signers[i].length)
|
114093
|
+
message.signers[i] = object.signers[i];
|
114094
|
+
}
|
114095
|
+
if (object.data != null)
|
114096
|
+
if (typeof object.data === "string")
|
114097
|
+
$util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
|
114098
|
+
else if (object.data.length)
|
114099
|
+
message.data = object.data;
|
114100
|
+
switch (object.error) {
|
114101
|
+
case "OK":
|
114102
|
+
case 0:
|
114103
|
+
message.error = 0;
|
114104
|
+
break;
|
114105
|
+
case "Error_general":
|
114106
|
+
case 1:
|
114107
|
+
message.error = 1;
|
114108
|
+
break;
|
114109
|
+
case "Error_internal":
|
114110
|
+
case 2:
|
114111
|
+
message.error = 2;
|
114112
|
+
break;
|
114113
|
+
case "Error_low_balance":
|
114114
|
+
case 3:
|
114115
|
+
message.error = 3;
|
114116
|
+
break;
|
114117
|
+
case "Error_zero_amount_requested":
|
114118
|
+
case 4:
|
114119
|
+
message.error = 4;
|
114120
|
+
break;
|
114121
|
+
case "Error_missing_private_key":
|
114122
|
+
case 5:
|
114123
|
+
message.error = 5;
|
114124
|
+
break;
|
114125
|
+
case "Error_invalid_private_key":
|
114126
|
+
case 15:
|
114127
|
+
message.error = 15;
|
114128
|
+
break;
|
114129
|
+
case "Error_invalid_address":
|
114130
|
+
case 16:
|
114131
|
+
message.error = 16;
|
114132
|
+
break;
|
114133
|
+
case "Error_invalid_utxo":
|
114134
|
+
case 17:
|
114135
|
+
message.error = 17;
|
114136
|
+
break;
|
114137
|
+
case "Error_invalid_utxo_amount":
|
114138
|
+
case 18:
|
114139
|
+
message.error = 18;
|
114140
|
+
break;
|
114141
|
+
case "Error_wrong_fee":
|
114142
|
+
case 6:
|
114143
|
+
message.error = 6;
|
114144
|
+
break;
|
114145
|
+
case "Error_signing":
|
114146
|
+
case 7:
|
114147
|
+
message.error = 7;
|
114148
|
+
break;
|
114149
|
+
case "Error_tx_too_big":
|
114150
|
+
case 8:
|
114151
|
+
message.error = 8;
|
114152
|
+
break;
|
114153
|
+
case "Error_missing_input_utxos":
|
114154
|
+
case 9:
|
114155
|
+
message.error = 9;
|
114156
|
+
break;
|
114157
|
+
case "Error_not_enough_utxos":
|
114158
|
+
case 10:
|
114159
|
+
message.error = 10;
|
114160
|
+
break;
|
114161
|
+
case "Error_script_redeem":
|
114162
|
+
case 11:
|
114163
|
+
message.error = 11;
|
114164
|
+
break;
|
114165
|
+
case "Error_script_output":
|
114166
|
+
case 12:
|
114167
|
+
message.error = 12;
|
114168
|
+
break;
|
114169
|
+
case "Error_script_witness_program":
|
114170
|
+
case 13:
|
114171
|
+
message.error = 13;
|
114172
|
+
break;
|
114173
|
+
case "Error_invalid_memo":
|
114174
|
+
case 14:
|
114175
|
+
message.error = 14;
|
114176
|
+
break;
|
114177
|
+
case "Error_input_parse":
|
114178
|
+
case 19:
|
114179
|
+
message.error = 19;
|
114180
|
+
break;
|
114181
|
+
case "Error_no_support_n2n":
|
114182
|
+
case 20:
|
114183
|
+
message.error = 20;
|
114184
|
+
break;
|
114185
|
+
case "Error_signatures_count":
|
114186
|
+
case 21:
|
114187
|
+
message.error = 21;
|
114188
|
+
break;
|
114189
|
+
case "Error_invalid_params":
|
114190
|
+
case 22:
|
114191
|
+
message.error = 22;
|
114192
|
+
break;
|
114193
|
+
case "Error_invalid_requested_token_amount":
|
114194
|
+
case 23:
|
114195
|
+
message.error = 23;
|
114196
|
+
break;
|
114197
|
+
case "Error_not_supported":
|
114198
|
+
case 24:
|
114199
|
+
message.error = 24;
|
114200
|
+
break;
|
114201
|
+
case "Error_dust_amount_requested":
|
114202
|
+
case 25:
|
114203
|
+
message.error = 25;
|
111429
114204
|
break;
|
111430
114205
|
}
|
111431
114206
|
if (object.errorMessage != null)
|
@@ -114378,6 +117153,7 @@
|
|
114378
117153
|
case 22:
|
114379
117154
|
case 23:
|
114380
117155
|
case 24:
|
117156
|
+
case 25:
|
114381
117157
|
break;
|
114382
117158
|
}
|
114383
117159
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -114501,6 +117277,10 @@
|
|
114501
117277
|
case 24:
|
114502
117278
|
message.error = 24;
|
114503
117279
|
break;
|
117280
|
+
case "Error_dust_amount_requested":
|
117281
|
+
case 25:
|
117282
|
+
message.error = 25;
|
117283
|
+
break;
|
114504
117284
|
}
|
114505
117285
|
if (object.errorMessage != null)
|
114506
117286
|
message.errorMessage = String(object.errorMessage);
|
@@ -115122,6 +117902,7 @@
|
|
115122
117902
|
case 22:
|
115123
117903
|
case 23:
|
115124
117904
|
case 24:
|
117905
|
+
case 25:
|
115125
117906
|
break;
|
115126
117907
|
}
|
115127
117908
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -115247,6 +118028,10 @@
|
|
115247
118028
|
case 24:
|
115248
118029
|
message.error = 24;
|
115249
118030
|
break;
|
118031
|
+
case "Error_dust_amount_requested":
|
118032
|
+
case 25:
|
118033
|
+
message.error = 25;
|
118034
|
+
break;
|
115250
118035
|
}
|
115251
118036
|
if (object.errorMessage != null)
|
115252
118037
|
message.errorMessage = String(object.errorMessage);
|
@@ -115708,6 +118493,7 @@
|
|
115708
118493
|
case 22:
|
115709
118494
|
case 23:
|
115710
118495
|
case 24:
|
118496
|
+
case 25:
|
115711
118497
|
break;
|
115712
118498
|
}
|
115713
118499
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -115834,6 +118620,10 @@
|
|
115834
118620
|
case 24:
|
115835
118621
|
message.error = 24;
|
115836
118622
|
break;
|
118623
|
+
case "Error_dust_amount_requested":
|
118624
|
+
case 25:
|
118625
|
+
message.error = 25;
|
118626
|
+
break;
|
115837
118627
|
}
|
115838
118628
|
if (object.errorMessage != null)
|
115839
118629
|
message.errorMessage = String(object.errorMessage);
|
@@ -119328,6 +122118,7 @@
|
|
119328
122118
|
case 22:
|
119329
122119
|
case 23:
|
119330
122120
|
case 24:
|
122121
|
+
case 25:
|
119331
122122
|
break;
|
119332
122123
|
}
|
119333
122124
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -119451,6 +122242,10 @@
|
|
119451
122242
|
case 24:
|
119452
122243
|
message.error = 24;
|
119453
122244
|
break;
|
122245
|
+
case "Error_dust_amount_requested":
|
122246
|
+
case 25:
|
122247
|
+
message.error = 25;
|
122248
|
+
break;
|
119454
122249
|
}
|
119455
122250
|
if (object.errorMessage != null)
|
119456
122251
|
message.errorMessage = String(object.errorMessage);
|
@@ -120072,6 +122867,7 @@
|
|
120072
122867
|
case 22:
|
120073
122868
|
case 23:
|
120074
122869
|
case 24:
|
122870
|
+
case 25:
|
120075
122871
|
break;
|
120076
122872
|
}
|
120077
122873
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -120203,6 +122999,10 @@
|
|
120203
122999
|
case 24:
|
120204
123000
|
message.error = 24;
|
120205
123001
|
break;
|
123002
|
+
case "Error_dust_amount_requested":
|
123003
|
+
case 25:
|
123004
|
+
message.error = 25;
|
123005
|
+
break;
|
120206
123006
|
}
|
120207
123007
|
if (object.errorMessage != null)
|
120208
123008
|
message.errorMessage = String(object.errorMessage);
|
@@ -122130,6 +124930,7 @@
|
|
122130
124930
|
case 22:
|
122131
124931
|
case 23:
|
122132
124932
|
case 24:
|
124933
|
+
case 25:
|
122133
124934
|
break;
|
122134
124935
|
}
|
122135
124936
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -122261,6 +125062,10 @@
|
|
122261
125062
|
case 24:
|
122262
125063
|
message.error = 24;
|
122263
125064
|
break;
|
125065
|
+
case "Error_dust_amount_requested":
|
125066
|
+
case 25:
|
125067
|
+
message.error = 25;
|
125068
|
+
break;
|
122264
125069
|
}
|
122265
125070
|
if (object.errorMessage != null)
|
122266
125071
|
message.errorMessage = String(object.errorMessage);
|
@@ -127470,6 +130275,7 @@
|
|
127470
130275
|
case 22:
|
127471
130276
|
case 23:
|
127472
130277
|
case 24:
|
130278
|
+
case 25:
|
127473
130279
|
break;
|
127474
130280
|
}
|
127475
130281
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -127613,6 +130419,10 @@
|
|
127613
130419
|
case 24:
|
127614
130420
|
message.error = 24;
|
127615
130421
|
break;
|
130422
|
+
case "Error_dust_amount_requested":
|
130423
|
+
case 25:
|
130424
|
+
message.error = 25;
|
130425
|
+
break;
|
127616
130426
|
}
|
127617
130427
|
if (object.errorMessage != null)
|
127618
130428
|
message.errorMessage = String(object.errorMessage);
|
@@ -128536,6 +131346,7 @@
|
|
128536
131346
|
case 22:
|
128537
131347
|
case 23:
|
128538
131348
|
case 24:
|
131349
|
+
case 25:
|
128539
131350
|
break;
|
128540
131351
|
}
|
128541
131352
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -128667,6 +131478,10 @@
|
|
128667
131478
|
case 24:
|
128668
131479
|
message.error = 24;
|
128669
131480
|
break;
|
131481
|
+
case "Error_dust_amount_requested":
|
131482
|
+
case 25:
|
131483
|
+
message.error = 25;
|
131484
|
+
break;
|
128670
131485
|
}
|
128671
131486
|
if (object.errorMessage != null)
|
128672
131487
|
message.errorMessage = String(object.errorMessage);
|
@@ -128771,11 +131586,13 @@
|
|
128771
131586
|
* @enum {number}
|
128772
131587
|
* @property {number} Unknown=0 Unknown value
|
128773
131588
|
* @property {number} CosmosSignAmino=1 CosmosSignAmino value
|
131589
|
+
* @property {number} SolanaSignTransaction=2 SolanaSignTransaction value
|
128774
131590
|
*/
|
128775
131591
|
Proto.Method = (function() {
|
128776
131592
|
var valuesById = {}, values = Object.create(valuesById);
|
128777
131593
|
values[valuesById[0] = "Unknown"] = 0;
|
128778
131594
|
values[valuesById[1] = "CosmosSignAmino"] = 1;
|
131595
|
+
values[valuesById[2] = "SolanaSignTransaction"] = 2;
|
128779
131596
|
return values;
|
128780
131597
|
})();
|
128781
131598
|
|
@@ -128921,6 +131738,7 @@
|
|
128921
131738
|
return "method: enum value expected";
|
128922
131739
|
case 0:
|
128923
131740
|
case 1:
|
131741
|
+
case 2:
|
128924
131742
|
break;
|
128925
131743
|
}
|
128926
131744
|
if (message.payload != null && message.hasOwnProperty("payload"))
|
@@ -128956,6 +131774,10 @@
|
|
128956
131774
|
case 1:
|
128957
131775
|
message.method = 1;
|
128958
131776
|
break;
|
131777
|
+
case "SolanaSignTransaction":
|
131778
|
+
case 2:
|
131779
|
+
message.method = 2;
|
131780
|
+
break;
|
128959
131781
|
}
|
128960
131782
|
if (object.payload != null)
|
128961
131783
|
message.payload = String(object.payload);
|
@@ -129012,6 +131834,7 @@
|
|
129012
131834
|
* @property {TW.Common.Proto.SigningError|null} [error] ParseRequestOutput error
|
129013
131835
|
* @property {string|null} [errorMessage] ParseRequestOutput errorMessage
|
129014
131836
|
* @property {TW.Binance.Proto.ISigningInput|null} [binance] ParseRequestOutput binance
|
131837
|
+
* @property {TW.Solana.Proto.ISigningInput|null} [solana] ParseRequestOutput solana
|
129015
131838
|
*/
|
129016
131839
|
|
129017
131840
|
/**
|
@@ -129053,17 +131876,25 @@
|
|
129053
131876
|
*/
|
129054
131877
|
ParseRequestOutput.prototype.binance = null;
|
129055
131878
|
|
131879
|
+
/**
|
131880
|
+
* ParseRequestOutput solana.
|
131881
|
+
* @member {TW.Solana.Proto.ISigningInput|null|undefined} solana
|
131882
|
+
* @memberof TW.WalletConnect.Proto.ParseRequestOutput
|
131883
|
+
* @instance
|
131884
|
+
*/
|
131885
|
+
ParseRequestOutput.prototype.solana = null;
|
131886
|
+
|
129056
131887
|
// OneOf field names bound to virtual getters and setters
|
129057
131888
|
var $oneOfFields;
|
129058
131889
|
|
129059
131890
|
/**
|
129060
131891
|
* ParseRequestOutput signingInputOneof.
|
129061
|
-
* @member {"binance"|undefined} signingInputOneof
|
131892
|
+
* @member {"binance"|"solana"|undefined} signingInputOneof
|
129062
131893
|
* @memberof TW.WalletConnect.Proto.ParseRequestOutput
|
129063
131894
|
* @instance
|
129064
131895
|
*/
|
129065
131896
|
Object.defineProperty(ParseRequestOutput.prototype, "signingInputOneof", {
|
129066
|
-
get: $util.oneOfGetter($oneOfFields = ["binance"]),
|
131897
|
+
get: $util.oneOfGetter($oneOfFields = ["binance", "solana"]),
|
129067
131898
|
set: $util.oneOfSetter($oneOfFields)
|
129068
131899
|
});
|
129069
131900
|
|
@@ -129097,6 +131928,8 @@
|
|
129097
131928
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
|
129098
131929
|
if (message.binance != null && Object.hasOwnProperty.call(message, "binance"))
|
129099
131930
|
$root.TW.Binance.Proto.SigningInput.encode(message.binance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
131931
|
+
if (message.solana != null && Object.hasOwnProperty.call(message, "solana"))
|
131932
|
+
$root.TW.Solana.Proto.SigningInput.encode(message.solana, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
129100
131933
|
return writer;
|
129101
131934
|
};
|
129102
131935
|
|
@@ -129127,6 +131960,9 @@
|
|
129127
131960
|
case 3:
|
129128
131961
|
message.binance = $root.TW.Binance.Proto.SigningInput.decode(reader, reader.uint32());
|
129129
131962
|
break;
|
131963
|
+
case 4:
|
131964
|
+
message.solana = $root.TW.Solana.Proto.SigningInput.decode(reader, reader.uint32());
|
131965
|
+
break;
|
129130
131966
|
default:
|
129131
131967
|
reader.skipType(tag & 7);
|
129132
131968
|
break;
|
@@ -129176,6 +132012,7 @@
|
|
129176
132012
|
case 22:
|
129177
132013
|
case 23:
|
129178
132014
|
case 24:
|
132015
|
+
case 25:
|
129179
132016
|
break;
|
129180
132017
|
}
|
129181
132018
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
@@ -129189,6 +132026,16 @@
|
|
129189
132026
|
return "binance." + error;
|
129190
132027
|
}
|
129191
132028
|
}
|
132029
|
+
if (message.solana != null && message.hasOwnProperty("solana")) {
|
132030
|
+
if (properties.signingInputOneof === 1)
|
132031
|
+
return "signingInputOneof: multiple values";
|
132032
|
+
properties.signingInputOneof = 1;
|
132033
|
+
{
|
132034
|
+
var error = $root.TW.Solana.Proto.SigningInput.verify(message.solana);
|
132035
|
+
if (error)
|
132036
|
+
return "solana." + error;
|
132037
|
+
}
|
132038
|
+
}
|
129192
132039
|
return null;
|
129193
132040
|
};
|
129194
132041
|
|
@@ -129305,6 +132152,10 @@
|
|
129305
132152
|
case 24:
|
129306
132153
|
message.error = 24;
|
129307
132154
|
break;
|
132155
|
+
case "Error_dust_amount_requested":
|
132156
|
+
case 25:
|
132157
|
+
message.error = 25;
|
132158
|
+
break;
|
129308
132159
|
}
|
129309
132160
|
if (object.errorMessage != null)
|
129310
132161
|
message.errorMessage = String(object.errorMessage);
|
@@ -129313,6 +132164,11 @@
|
|
129313
132164
|
throw TypeError(".TW.WalletConnect.Proto.ParseRequestOutput.binance: object expected");
|
129314
132165
|
message.binance = $root.TW.Binance.Proto.SigningInput.fromObject(object.binance);
|
129315
132166
|
}
|
132167
|
+
if (object.solana != null) {
|
132168
|
+
if (typeof object.solana !== "object")
|
132169
|
+
throw TypeError(".TW.WalletConnect.Proto.ParseRequestOutput.solana: object expected");
|
132170
|
+
message.solana = $root.TW.Solana.Proto.SigningInput.fromObject(object.solana);
|
132171
|
+
}
|
129316
132172
|
return message;
|
129317
132173
|
};
|
129318
132174
|
|
@@ -129342,6 +132198,11 @@
|
|
129342
132198
|
if (options.oneofs)
|
129343
132199
|
object.signingInputOneof = "binance";
|
129344
132200
|
}
|
132201
|
+
if (message.solana != null && message.hasOwnProperty("solana")) {
|
132202
|
+
object.solana = $root.TW.Solana.Proto.SigningInput.toObject(message.solana, options);
|
132203
|
+
if (options.oneofs)
|
132204
|
+
object.signingInputOneof = "solana";
|
132205
|
+
}
|
129345
132206
|
return object;
|
129346
132207
|
};
|
129347
132208
|
|