@trustwallet/wallet-core 3.1.7 → 3.1.9
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 +301 -0
- package/dist/generated/core_proto.js +925 -0
- package/dist/lib/wallet-core.js +11 -11
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +28 -0
- package/package.json +1 -1
@@ -75297,6 +75297,931 @@
|
|
75297
75297
|
return Tezos;
|
75298
75298
|
})();
|
75299
75299
|
|
75300
|
+
TW.TheOpenNetwork = (function() {
|
75301
|
+
|
75302
|
+
/**
|
75303
|
+
* Namespace TheOpenNetwork.
|
75304
|
+
* @memberof TW
|
75305
|
+
* @namespace
|
75306
|
+
*/
|
75307
|
+
var TheOpenNetwork = {};
|
75308
|
+
|
75309
|
+
TheOpenNetwork.Proto = (function() {
|
75310
|
+
|
75311
|
+
/**
|
75312
|
+
* Namespace Proto.
|
75313
|
+
* @memberof TW.TheOpenNetwork
|
75314
|
+
* @namespace
|
75315
|
+
*/
|
75316
|
+
var Proto = {};
|
75317
|
+
|
75318
|
+
/**
|
75319
|
+
* WalletVersion enum.
|
75320
|
+
* @name TW.TheOpenNetwork.Proto.WalletVersion
|
75321
|
+
* @enum {number}
|
75322
|
+
* @property {number} WALLET_V3_R1=0 WALLET_V3_R1 value
|
75323
|
+
* @property {number} WALLET_V3_R2=1 WALLET_V3_R2 value
|
75324
|
+
* @property {number} WALLET_V4_R2=2 WALLET_V4_R2 value
|
75325
|
+
*/
|
75326
|
+
Proto.WalletVersion = (function() {
|
75327
|
+
var valuesById = {}, values = Object.create(valuesById);
|
75328
|
+
values[valuesById[0] = "WALLET_V3_R1"] = 0;
|
75329
|
+
values[valuesById[1] = "WALLET_V3_R2"] = 1;
|
75330
|
+
values[valuesById[2] = "WALLET_V4_R2"] = 2;
|
75331
|
+
return values;
|
75332
|
+
})();
|
75333
|
+
|
75334
|
+
/**
|
75335
|
+
* SendMode enum.
|
75336
|
+
* @name TW.TheOpenNetwork.Proto.SendMode
|
75337
|
+
* @enum {number}
|
75338
|
+
* @property {number} DEFAULT=0 DEFAULT value
|
75339
|
+
* @property {number} PAY_FEES_SEPARATELY=1 PAY_FEES_SEPARATELY value
|
75340
|
+
* @property {number} IGNORE_ACTION_PHASE_ERRORS=2 IGNORE_ACTION_PHASE_ERRORS value
|
75341
|
+
* @property {number} DESTROY_ON_ZERO_BALANCE=32 DESTROY_ON_ZERO_BALANCE value
|
75342
|
+
* @property {number} ATTACH_ALL_INBOUND_MESSAGE_VALUE=64 ATTACH_ALL_INBOUND_MESSAGE_VALUE value
|
75343
|
+
* @property {number} ATTACH_ALL_CONTRACT_BALANCE=128 ATTACH_ALL_CONTRACT_BALANCE value
|
75344
|
+
*/
|
75345
|
+
Proto.SendMode = (function() {
|
75346
|
+
var valuesById = {}, values = Object.create(valuesById);
|
75347
|
+
values[valuesById[0] = "DEFAULT"] = 0;
|
75348
|
+
values[valuesById[1] = "PAY_FEES_SEPARATELY"] = 1;
|
75349
|
+
values[valuesById[2] = "IGNORE_ACTION_PHASE_ERRORS"] = 2;
|
75350
|
+
values[valuesById[32] = "DESTROY_ON_ZERO_BALANCE"] = 32;
|
75351
|
+
values[valuesById[64] = "ATTACH_ALL_INBOUND_MESSAGE_VALUE"] = 64;
|
75352
|
+
values[valuesById[128] = "ATTACH_ALL_CONTRACT_BALANCE"] = 128;
|
75353
|
+
return values;
|
75354
|
+
})();
|
75355
|
+
|
75356
|
+
Proto.Transfer = (function() {
|
75357
|
+
|
75358
|
+
/**
|
75359
|
+
* Properties of a Transfer.
|
75360
|
+
* @memberof TW.TheOpenNetwork.Proto
|
75361
|
+
* @interface ITransfer
|
75362
|
+
* @property {TW.TheOpenNetwork.Proto.WalletVersion|null} [walletVersion] Transfer walletVersion
|
75363
|
+
* @property {string|null} [dest] Transfer dest
|
75364
|
+
* @property {Long|null} [amount] Transfer amount
|
75365
|
+
* @property {number|null} [sequenceNumber] Transfer sequenceNumber
|
75366
|
+
* @property {number|null} [mode] Transfer mode
|
75367
|
+
* @property {number|null} [expireAt] Transfer expireAt
|
75368
|
+
* @property {string|null} [comment] Transfer comment
|
75369
|
+
*/
|
75370
|
+
|
75371
|
+
/**
|
75372
|
+
* Constructs a new Transfer.
|
75373
|
+
* @memberof TW.TheOpenNetwork.Proto
|
75374
|
+
* @classdesc Represents a Transfer.
|
75375
|
+
* @implements ITransfer
|
75376
|
+
* @constructor
|
75377
|
+
* @param {TW.TheOpenNetwork.Proto.ITransfer=} [properties] Properties to set
|
75378
|
+
*/
|
75379
|
+
function Transfer(properties) {
|
75380
|
+
if (properties)
|
75381
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
75382
|
+
if (properties[keys[i]] != null)
|
75383
|
+
this[keys[i]] = properties[keys[i]];
|
75384
|
+
}
|
75385
|
+
|
75386
|
+
/**
|
75387
|
+
* Transfer walletVersion.
|
75388
|
+
* @member {TW.TheOpenNetwork.Proto.WalletVersion} walletVersion
|
75389
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75390
|
+
* @instance
|
75391
|
+
*/
|
75392
|
+
Transfer.prototype.walletVersion = 0;
|
75393
|
+
|
75394
|
+
/**
|
75395
|
+
* Transfer dest.
|
75396
|
+
* @member {string} dest
|
75397
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75398
|
+
* @instance
|
75399
|
+
*/
|
75400
|
+
Transfer.prototype.dest = "";
|
75401
|
+
|
75402
|
+
/**
|
75403
|
+
* Transfer amount.
|
75404
|
+
* @member {Long} amount
|
75405
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75406
|
+
* @instance
|
75407
|
+
*/
|
75408
|
+
Transfer.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
75409
|
+
|
75410
|
+
/**
|
75411
|
+
* Transfer sequenceNumber.
|
75412
|
+
* @member {number} sequenceNumber
|
75413
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75414
|
+
* @instance
|
75415
|
+
*/
|
75416
|
+
Transfer.prototype.sequenceNumber = 0;
|
75417
|
+
|
75418
|
+
/**
|
75419
|
+
* Transfer mode.
|
75420
|
+
* @member {number} mode
|
75421
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75422
|
+
* @instance
|
75423
|
+
*/
|
75424
|
+
Transfer.prototype.mode = 0;
|
75425
|
+
|
75426
|
+
/**
|
75427
|
+
* Transfer expireAt.
|
75428
|
+
* @member {number} expireAt
|
75429
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75430
|
+
* @instance
|
75431
|
+
*/
|
75432
|
+
Transfer.prototype.expireAt = 0;
|
75433
|
+
|
75434
|
+
/**
|
75435
|
+
* Transfer comment.
|
75436
|
+
* @member {string} comment
|
75437
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75438
|
+
* @instance
|
75439
|
+
*/
|
75440
|
+
Transfer.prototype.comment = "";
|
75441
|
+
|
75442
|
+
/**
|
75443
|
+
* Creates a new Transfer instance using the specified properties.
|
75444
|
+
* @function create
|
75445
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75446
|
+
* @static
|
75447
|
+
* @param {TW.TheOpenNetwork.Proto.ITransfer=} [properties] Properties to set
|
75448
|
+
* @returns {TW.TheOpenNetwork.Proto.Transfer} Transfer instance
|
75449
|
+
*/
|
75450
|
+
Transfer.create = function create(properties) {
|
75451
|
+
return new Transfer(properties);
|
75452
|
+
};
|
75453
|
+
|
75454
|
+
/**
|
75455
|
+
* Encodes the specified Transfer message. Does not implicitly {@link TW.TheOpenNetwork.Proto.Transfer.verify|verify} messages.
|
75456
|
+
* @function encode
|
75457
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75458
|
+
* @static
|
75459
|
+
* @param {TW.TheOpenNetwork.Proto.ITransfer} message Transfer message or plain object to encode
|
75460
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
75461
|
+
* @returns {$protobuf.Writer} Writer
|
75462
|
+
*/
|
75463
|
+
Transfer.encode = function encode(message, writer) {
|
75464
|
+
if (!writer)
|
75465
|
+
writer = $Writer.create();
|
75466
|
+
if (message.walletVersion != null && Object.hasOwnProperty.call(message, "walletVersion"))
|
75467
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.walletVersion);
|
75468
|
+
if (message.dest != null && Object.hasOwnProperty.call(message, "dest"))
|
75469
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.dest);
|
75470
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
75471
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.amount);
|
75472
|
+
if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
|
75473
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.sequenceNumber);
|
75474
|
+
if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
|
75475
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.mode);
|
75476
|
+
if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt"))
|
75477
|
+
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.expireAt);
|
75478
|
+
if (message.comment != null && Object.hasOwnProperty.call(message, "comment"))
|
75479
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.comment);
|
75480
|
+
return writer;
|
75481
|
+
};
|
75482
|
+
|
75483
|
+
/**
|
75484
|
+
* Decodes a Transfer message from the specified reader or buffer.
|
75485
|
+
* @function decode
|
75486
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75487
|
+
* @static
|
75488
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
75489
|
+
* @param {number} [length] Message length if known beforehand
|
75490
|
+
* @returns {TW.TheOpenNetwork.Proto.Transfer} Transfer
|
75491
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
75492
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
75493
|
+
*/
|
75494
|
+
Transfer.decode = function decode(reader, length) {
|
75495
|
+
if (!(reader instanceof $Reader))
|
75496
|
+
reader = $Reader.create(reader);
|
75497
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.TheOpenNetwork.Proto.Transfer();
|
75498
|
+
while (reader.pos < end) {
|
75499
|
+
var tag = reader.uint32();
|
75500
|
+
switch (tag >>> 3) {
|
75501
|
+
case 1:
|
75502
|
+
message.walletVersion = reader.int32();
|
75503
|
+
break;
|
75504
|
+
case 2:
|
75505
|
+
message.dest = reader.string();
|
75506
|
+
break;
|
75507
|
+
case 3:
|
75508
|
+
message.amount = reader.uint64();
|
75509
|
+
break;
|
75510
|
+
case 4:
|
75511
|
+
message.sequenceNumber = reader.uint32();
|
75512
|
+
break;
|
75513
|
+
case 5:
|
75514
|
+
message.mode = reader.uint32();
|
75515
|
+
break;
|
75516
|
+
case 6:
|
75517
|
+
message.expireAt = reader.uint32();
|
75518
|
+
break;
|
75519
|
+
case 7:
|
75520
|
+
message.comment = reader.string();
|
75521
|
+
break;
|
75522
|
+
default:
|
75523
|
+
reader.skipType(tag & 7);
|
75524
|
+
break;
|
75525
|
+
}
|
75526
|
+
}
|
75527
|
+
return message;
|
75528
|
+
};
|
75529
|
+
|
75530
|
+
/**
|
75531
|
+
* Verifies a Transfer message.
|
75532
|
+
* @function verify
|
75533
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75534
|
+
* @static
|
75535
|
+
* @param {Object.<string,*>} message Plain object to verify
|
75536
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
75537
|
+
*/
|
75538
|
+
Transfer.verify = function verify(message) {
|
75539
|
+
if (typeof message !== "object" || message === null)
|
75540
|
+
return "object expected";
|
75541
|
+
if (message.walletVersion != null && message.hasOwnProperty("walletVersion"))
|
75542
|
+
switch (message.walletVersion) {
|
75543
|
+
default:
|
75544
|
+
return "walletVersion: enum value expected";
|
75545
|
+
case 0:
|
75546
|
+
case 1:
|
75547
|
+
case 2:
|
75548
|
+
break;
|
75549
|
+
}
|
75550
|
+
if (message.dest != null && message.hasOwnProperty("dest"))
|
75551
|
+
if (!$util.isString(message.dest))
|
75552
|
+
return "dest: string expected";
|
75553
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
75554
|
+
if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
|
75555
|
+
return "amount: integer|Long expected";
|
75556
|
+
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
75557
|
+
if (!$util.isInteger(message.sequenceNumber))
|
75558
|
+
return "sequenceNumber: integer expected";
|
75559
|
+
if (message.mode != null && message.hasOwnProperty("mode"))
|
75560
|
+
if (!$util.isInteger(message.mode))
|
75561
|
+
return "mode: integer expected";
|
75562
|
+
if (message.expireAt != null && message.hasOwnProperty("expireAt"))
|
75563
|
+
if (!$util.isInteger(message.expireAt))
|
75564
|
+
return "expireAt: integer expected";
|
75565
|
+
if (message.comment != null && message.hasOwnProperty("comment"))
|
75566
|
+
if (!$util.isString(message.comment))
|
75567
|
+
return "comment: string expected";
|
75568
|
+
return null;
|
75569
|
+
};
|
75570
|
+
|
75571
|
+
/**
|
75572
|
+
* Creates a Transfer message from a plain object. Also converts values to their respective internal types.
|
75573
|
+
* @function fromObject
|
75574
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75575
|
+
* @static
|
75576
|
+
* @param {Object.<string,*>} object Plain object
|
75577
|
+
* @returns {TW.TheOpenNetwork.Proto.Transfer} Transfer
|
75578
|
+
*/
|
75579
|
+
Transfer.fromObject = function fromObject(object) {
|
75580
|
+
if (object instanceof $root.TW.TheOpenNetwork.Proto.Transfer)
|
75581
|
+
return object;
|
75582
|
+
var message = new $root.TW.TheOpenNetwork.Proto.Transfer();
|
75583
|
+
switch (object.walletVersion) {
|
75584
|
+
case "WALLET_V3_R1":
|
75585
|
+
case 0:
|
75586
|
+
message.walletVersion = 0;
|
75587
|
+
break;
|
75588
|
+
case "WALLET_V3_R2":
|
75589
|
+
case 1:
|
75590
|
+
message.walletVersion = 1;
|
75591
|
+
break;
|
75592
|
+
case "WALLET_V4_R2":
|
75593
|
+
case 2:
|
75594
|
+
message.walletVersion = 2;
|
75595
|
+
break;
|
75596
|
+
}
|
75597
|
+
if (object.dest != null)
|
75598
|
+
message.dest = String(object.dest);
|
75599
|
+
if (object.amount != null)
|
75600
|
+
if ($util.Long)
|
75601
|
+
(message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
|
75602
|
+
else if (typeof object.amount === "string")
|
75603
|
+
message.amount = parseInt(object.amount, 10);
|
75604
|
+
else if (typeof object.amount === "number")
|
75605
|
+
message.amount = object.amount;
|
75606
|
+
else if (typeof object.amount === "object")
|
75607
|
+
message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
|
75608
|
+
if (object.sequenceNumber != null)
|
75609
|
+
message.sequenceNumber = object.sequenceNumber >>> 0;
|
75610
|
+
if (object.mode != null)
|
75611
|
+
message.mode = object.mode >>> 0;
|
75612
|
+
if (object.expireAt != null)
|
75613
|
+
message.expireAt = object.expireAt >>> 0;
|
75614
|
+
if (object.comment != null)
|
75615
|
+
message.comment = String(object.comment);
|
75616
|
+
return message;
|
75617
|
+
};
|
75618
|
+
|
75619
|
+
/**
|
75620
|
+
* Creates a plain object from a Transfer message. Also converts values to other types if specified.
|
75621
|
+
* @function toObject
|
75622
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75623
|
+
* @static
|
75624
|
+
* @param {TW.TheOpenNetwork.Proto.Transfer} message Transfer
|
75625
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
75626
|
+
* @returns {Object.<string,*>} Plain object
|
75627
|
+
*/
|
75628
|
+
Transfer.toObject = function toObject(message, options) {
|
75629
|
+
if (!options)
|
75630
|
+
options = {};
|
75631
|
+
var object = {};
|
75632
|
+
if (options.defaults) {
|
75633
|
+
object.walletVersion = options.enums === String ? "WALLET_V3_R1" : 0;
|
75634
|
+
object.dest = "";
|
75635
|
+
if ($util.Long) {
|
75636
|
+
var long = new $util.Long(0, 0, true);
|
75637
|
+
object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
75638
|
+
} else
|
75639
|
+
object.amount = options.longs === String ? "0" : 0;
|
75640
|
+
object.sequenceNumber = 0;
|
75641
|
+
object.mode = 0;
|
75642
|
+
object.expireAt = 0;
|
75643
|
+
object.comment = "";
|
75644
|
+
}
|
75645
|
+
if (message.walletVersion != null && message.hasOwnProperty("walletVersion"))
|
75646
|
+
object.walletVersion = options.enums === String ? $root.TW.TheOpenNetwork.Proto.WalletVersion[message.walletVersion] : message.walletVersion;
|
75647
|
+
if (message.dest != null && message.hasOwnProperty("dest"))
|
75648
|
+
object.dest = message.dest;
|
75649
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
75650
|
+
if (typeof message.amount === "number")
|
75651
|
+
object.amount = options.longs === String ? String(message.amount) : message.amount;
|
75652
|
+
else
|
75653
|
+
object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
|
75654
|
+
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
75655
|
+
object.sequenceNumber = message.sequenceNumber;
|
75656
|
+
if (message.mode != null && message.hasOwnProperty("mode"))
|
75657
|
+
object.mode = message.mode;
|
75658
|
+
if (message.expireAt != null && message.hasOwnProperty("expireAt"))
|
75659
|
+
object.expireAt = message.expireAt;
|
75660
|
+
if (message.comment != null && message.hasOwnProperty("comment"))
|
75661
|
+
object.comment = message.comment;
|
75662
|
+
return object;
|
75663
|
+
};
|
75664
|
+
|
75665
|
+
/**
|
75666
|
+
* Converts this Transfer to JSON.
|
75667
|
+
* @function toJSON
|
75668
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
75669
|
+
* @instance
|
75670
|
+
* @returns {Object.<string,*>} JSON object
|
75671
|
+
*/
|
75672
|
+
Transfer.prototype.toJSON = function toJSON() {
|
75673
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
75674
|
+
};
|
75675
|
+
|
75676
|
+
return Transfer;
|
75677
|
+
})();
|
75678
|
+
|
75679
|
+
Proto.SigningInput = (function() {
|
75680
|
+
|
75681
|
+
/**
|
75682
|
+
* Properties of a SigningInput.
|
75683
|
+
* @memberof TW.TheOpenNetwork.Proto
|
75684
|
+
* @interface ISigningInput
|
75685
|
+
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
75686
|
+
* @property {TW.TheOpenNetwork.Proto.ITransfer|null} [transfer] SigningInput transfer
|
75687
|
+
*/
|
75688
|
+
|
75689
|
+
/**
|
75690
|
+
* Constructs a new SigningInput.
|
75691
|
+
* @memberof TW.TheOpenNetwork.Proto
|
75692
|
+
* @classdesc Represents a SigningInput.
|
75693
|
+
* @implements ISigningInput
|
75694
|
+
* @constructor
|
75695
|
+
* @param {TW.TheOpenNetwork.Proto.ISigningInput=} [properties] Properties to set
|
75696
|
+
*/
|
75697
|
+
function SigningInput(properties) {
|
75698
|
+
if (properties)
|
75699
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
75700
|
+
if (properties[keys[i]] != null)
|
75701
|
+
this[keys[i]] = properties[keys[i]];
|
75702
|
+
}
|
75703
|
+
|
75704
|
+
/**
|
75705
|
+
* SigningInput privateKey.
|
75706
|
+
* @member {Uint8Array} privateKey
|
75707
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75708
|
+
* @instance
|
75709
|
+
*/
|
75710
|
+
SigningInput.prototype.privateKey = $util.newBuffer([]);
|
75711
|
+
|
75712
|
+
/**
|
75713
|
+
* SigningInput transfer.
|
75714
|
+
* @member {TW.TheOpenNetwork.Proto.ITransfer|null|undefined} transfer
|
75715
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75716
|
+
* @instance
|
75717
|
+
*/
|
75718
|
+
SigningInput.prototype.transfer = null;
|
75719
|
+
|
75720
|
+
// OneOf field names bound to virtual getters and setters
|
75721
|
+
var $oneOfFields;
|
75722
|
+
|
75723
|
+
/**
|
75724
|
+
* SigningInput actionOneof.
|
75725
|
+
* @member {"transfer"|undefined} actionOneof
|
75726
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75727
|
+
* @instance
|
75728
|
+
*/
|
75729
|
+
Object.defineProperty(SigningInput.prototype, "actionOneof", {
|
75730
|
+
get: $util.oneOfGetter($oneOfFields = ["transfer"]),
|
75731
|
+
set: $util.oneOfSetter($oneOfFields)
|
75732
|
+
});
|
75733
|
+
|
75734
|
+
/**
|
75735
|
+
* Creates a new SigningInput instance using the specified properties.
|
75736
|
+
* @function create
|
75737
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75738
|
+
* @static
|
75739
|
+
* @param {TW.TheOpenNetwork.Proto.ISigningInput=} [properties] Properties to set
|
75740
|
+
* @returns {TW.TheOpenNetwork.Proto.SigningInput} SigningInput instance
|
75741
|
+
*/
|
75742
|
+
SigningInput.create = function create(properties) {
|
75743
|
+
return new SigningInput(properties);
|
75744
|
+
};
|
75745
|
+
|
75746
|
+
/**
|
75747
|
+
* Encodes the specified SigningInput message. Does not implicitly {@link TW.TheOpenNetwork.Proto.SigningInput.verify|verify} messages.
|
75748
|
+
* @function encode
|
75749
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75750
|
+
* @static
|
75751
|
+
* @param {TW.TheOpenNetwork.Proto.ISigningInput} message SigningInput message or plain object to encode
|
75752
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
75753
|
+
* @returns {$protobuf.Writer} Writer
|
75754
|
+
*/
|
75755
|
+
SigningInput.encode = function encode(message, writer) {
|
75756
|
+
if (!writer)
|
75757
|
+
writer = $Writer.create();
|
75758
|
+
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
75759
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
|
75760
|
+
if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
|
75761
|
+
$root.TW.TheOpenNetwork.Proto.Transfer.encode(message.transfer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
75762
|
+
return writer;
|
75763
|
+
};
|
75764
|
+
|
75765
|
+
/**
|
75766
|
+
* Decodes a SigningInput message from the specified reader or buffer.
|
75767
|
+
* @function decode
|
75768
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75769
|
+
* @static
|
75770
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
75771
|
+
* @param {number} [length] Message length if known beforehand
|
75772
|
+
* @returns {TW.TheOpenNetwork.Proto.SigningInput} SigningInput
|
75773
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
75774
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
75775
|
+
*/
|
75776
|
+
SigningInput.decode = function decode(reader, length) {
|
75777
|
+
if (!(reader instanceof $Reader))
|
75778
|
+
reader = $Reader.create(reader);
|
75779
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.TheOpenNetwork.Proto.SigningInput();
|
75780
|
+
while (reader.pos < end) {
|
75781
|
+
var tag = reader.uint32();
|
75782
|
+
switch (tag >>> 3) {
|
75783
|
+
case 1:
|
75784
|
+
message.privateKey = reader.bytes();
|
75785
|
+
break;
|
75786
|
+
case 2:
|
75787
|
+
message.transfer = $root.TW.TheOpenNetwork.Proto.Transfer.decode(reader, reader.uint32());
|
75788
|
+
break;
|
75789
|
+
default:
|
75790
|
+
reader.skipType(tag & 7);
|
75791
|
+
break;
|
75792
|
+
}
|
75793
|
+
}
|
75794
|
+
return message;
|
75795
|
+
};
|
75796
|
+
|
75797
|
+
/**
|
75798
|
+
* Verifies a SigningInput message.
|
75799
|
+
* @function verify
|
75800
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75801
|
+
* @static
|
75802
|
+
* @param {Object.<string,*>} message Plain object to verify
|
75803
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
75804
|
+
*/
|
75805
|
+
SigningInput.verify = function verify(message) {
|
75806
|
+
if (typeof message !== "object" || message === null)
|
75807
|
+
return "object expected";
|
75808
|
+
var properties = {};
|
75809
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
75810
|
+
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
75811
|
+
return "privateKey: buffer expected";
|
75812
|
+
if (message.transfer != null && message.hasOwnProperty("transfer")) {
|
75813
|
+
properties.actionOneof = 1;
|
75814
|
+
{
|
75815
|
+
var error = $root.TW.TheOpenNetwork.Proto.Transfer.verify(message.transfer);
|
75816
|
+
if (error)
|
75817
|
+
return "transfer." + error;
|
75818
|
+
}
|
75819
|
+
}
|
75820
|
+
return null;
|
75821
|
+
};
|
75822
|
+
|
75823
|
+
/**
|
75824
|
+
* Creates a SigningInput message from a plain object. Also converts values to their respective internal types.
|
75825
|
+
* @function fromObject
|
75826
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75827
|
+
* @static
|
75828
|
+
* @param {Object.<string,*>} object Plain object
|
75829
|
+
* @returns {TW.TheOpenNetwork.Proto.SigningInput} SigningInput
|
75830
|
+
*/
|
75831
|
+
SigningInput.fromObject = function fromObject(object) {
|
75832
|
+
if (object instanceof $root.TW.TheOpenNetwork.Proto.SigningInput)
|
75833
|
+
return object;
|
75834
|
+
var message = new $root.TW.TheOpenNetwork.Proto.SigningInput();
|
75835
|
+
if (object.privateKey != null)
|
75836
|
+
if (typeof object.privateKey === "string")
|
75837
|
+
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
75838
|
+
else if (object.privateKey.length)
|
75839
|
+
message.privateKey = object.privateKey;
|
75840
|
+
if (object.transfer != null) {
|
75841
|
+
if (typeof object.transfer !== "object")
|
75842
|
+
throw TypeError(".TW.TheOpenNetwork.Proto.SigningInput.transfer: object expected");
|
75843
|
+
message.transfer = $root.TW.TheOpenNetwork.Proto.Transfer.fromObject(object.transfer);
|
75844
|
+
}
|
75845
|
+
return message;
|
75846
|
+
};
|
75847
|
+
|
75848
|
+
/**
|
75849
|
+
* Creates a plain object from a SigningInput message. Also converts values to other types if specified.
|
75850
|
+
* @function toObject
|
75851
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75852
|
+
* @static
|
75853
|
+
* @param {TW.TheOpenNetwork.Proto.SigningInput} message SigningInput
|
75854
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
75855
|
+
* @returns {Object.<string,*>} Plain object
|
75856
|
+
*/
|
75857
|
+
SigningInput.toObject = function toObject(message, options) {
|
75858
|
+
if (!options)
|
75859
|
+
options = {};
|
75860
|
+
var object = {};
|
75861
|
+
if (options.defaults)
|
75862
|
+
if (options.bytes === String)
|
75863
|
+
object.privateKey = "";
|
75864
|
+
else {
|
75865
|
+
object.privateKey = [];
|
75866
|
+
if (options.bytes !== Array)
|
75867
|
+
object.privateKey = $util.newBuffer(object.privateKey);
|
75868
|
+
}
|
75869
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
75870
|
+
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;
|
75871
|
+
if (message.transfer != null && message.hasOwnProperty("transfer")) {
|
75872
|
+
object.transfer = $root.TW.TheOpenNetwork.Proto.Transfer.toObject(message.transfer, options);
|
75873
|
+
if (options.oneofs)
|
75874
|
+
object.actionOneof = "transfer";
|
75875
|
+
}
|
75876
|
+
return object;
|
75877
|
+
};
|
75878
|
+
|
75879
|
+
/**
|
75880
|
+
* Converts this SigningInput to JSON.
|
75881
|
+
* @function toJSON
|
75882
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
75883
|
+
* @instance
|
75884
|
+
* @returns {Object.<string,*>} JSON object
|
75885
|
+
*/
|
75886
|
+
SigningInput.prototype.toJSON = function toJSON() {
|
75887
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
75888
|
+
};
|
75889
|
+
|
75890
|
+
return SigningInput;
|
75891
|
+
})();
|
75892
|
+
|
75893
|
+
Proto.SigningOutput = (function() {
|
75894
|
+
|
75895
|
+
/**
|
75896
|
+
* Properties of a SigningOutput.
|
75897
|
+
* @memberof TW.TheOpenNetwork.Proto
|
75898
|
+
* @interface ISigningOutput
|
75899
|
+
* @property {string|null} [encoded] SigningOutput encoded
|
75900
|
+
* @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
|
75901
|
+
* @property {string|null} [errorMessage] SigningOutput errorMessage
|
75902
|
+
*/
|
75903
|
+
|
75904
|
+
/**
|
75905
|
+
* Constructs a new SigningOutput.
|
75906
|
+
* @memberof TW.TheOpenNetwork.Proto
|
75907
|
+
* @classdesc Represents a SigningOutput.
|
75908
|
+
* @implements ISigningOutput
|
75909
|
+
* @constructor
|
75910
|
+
* @param {TW.TheOpenNetwork.Proto.ISigningOutput=} [properties] Properties to set
|
75911
|
+
*/
|
75912
|
+
function SigningOutput(properties) {
|
75913
|
+
if (properties)
|
75914
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
75915
|
+
if (properties[keys[i]] != null)
|
75916
|
+
this[keys[i]] = properties[keys[i]];
|
75917
|
+
}
|
75918
|
+
|
75919
|
+
/**
|
75920
|
+
* SigningOutput encoded.
|
75921
|
+
* @member {string} encoded
|
75922
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
75923
|
+
* @instance
|
75924
|
+
*/
|
75925
|
+
SigningOutput.prototype.encoded = "";
|
75926
|
+
|
75927
|
+
/**
|
75928
|
+
* SigningOutput error.
|
75929
|
+
* @member {TW.Common.Proto.SigningError} error
|
75930
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
75931
|
+
* @instance
|
75932
|
+
*/
|
75933
|
+
SigningOutput.prototype.error = 0;
|
75934
|
+
|
75935
|
+
/**
|
75936
|
+
* SigningOutput errorMessage.
|
75937
|
+
* @member {string} errorMessage
|
75938
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
75939
|
+
* @instance
|
75940
|
+
*/
|
75941
|
+
SigningOutput.prototype.errorMessage = "";
|
75942
|
+
|
75943
|
+
/**
|
75944
|
+
* Creates a new SigningOutput instance using the specified properties.
|
75945
|
+
* @function create
|
75946
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
75947
|
+
* @static
|
75948
|
+
* @param {TW.TheOpenNetwork.Proto.ISigningOutput=} [properties] Properties to set
|
75949
|
+
* @returns {TW.TheOpenNetwork.Proto.SigningOutput} SigningOutput instance
|
75950
|
+
*/
|
75951
|
+
SigningOutput.create = function create(properties) {
|
75952
|
+
return new SigningOutput(properties);
|
75953
|
+
};
|
75954
|
+
|
75955
|
+
/**
|
75956
|
+
* Encodes the specified SigningOutput message. Does not implicitly {@link TW.TheOpenNetwork.Proto.SigningOutput.verify|verify} messages.
|
75957
|
+
* @function encode
|
75958
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
75959
|
+
* @static
|
75960
|
+
* @param {TW.TheOpenNetwork.Proto.ISigningOutput} message SigningOutput message or plain object to encode
|
75961
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
75962
|
+
* @returns {$protobuf.Writer} Writer
|
75963
|
+
*/
|
75964
|
+
SigningOutput.encode = function encode(message, writer) {
|
75965
|
+
if (!writer)
|
75966
|
+
writer = $Writer.create();
|
75967
|
+
if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
|
75968
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoded);
|
75969
|
+
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
75970
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
|
75971
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
75972
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
|
75973
|
+
return writer;
|
75974
|
+
};
|
75975
|
+
|
75976
|
+
/**
|
75977
|
+
* Decodes a SigningOutput message from the specified reader or buffer.
|
75978
|
+
* @function decode
|
75979
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
75980
|
+
* @static
|
75981
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
75982
|
+
* @param {number} [length] Message length if known beforehand
|
75983
|
+
* @returns {TW.TheOpenNetwork.Proto.SigningOutput} SigningOutput
|
75984
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
75985
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
75986
|
+
*/
|
75987
|
+
SigningOutput.decode = function decode(reader, length) {
|
75988
|
+
if (!(reader instanceof $Reader))
|
75989
|
+
reader = $Reader.create(reader);
|
75990
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.TheOpenNetwork.Proto.SigningOutput();
|
75991
|
+
while (reader.pos < end) {
|
75992
|
+
var tag = reader.uint32();
|
75993
|
+
switch (tag >>> 3) {
|
75994
|
+
case 1:
|
75995
|
+
message.encoded = reader.string();
|
75996
|
+
break;
|
75997
|
+
case 2:
|
75998
|
+
message.error = reader.int32();
|
75999
|
+
break;
|
76000
|
+
case 3:
|
76001
|
+
message.errorMessage = reader.string();
|
76002
|
+
break;
|
76003
|
+
default:
|
76004
|
+
reader.skipType(tag & 7);
|
76005
|
+
break;
|
76006
|
+
}
|
76007
|
+
}
|
76008
|
+
return message;
|
76009
|
+
};
|
76010
|
+
|
76011
|
+
/**
|
76012
|
+
* Verifies a SigningOutput message.
|
76013
|
+
* @function verify
|
76014
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
76015
|
+
* @static
|
76016
|
+
* @param {Object.<string,*>} message Plain object to verify
|
76017
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
76018
|
+
*/
|
76019
|
+
SigningOutput.verify = function verify(message) {
|
76020
|
+
if (typeof message !== "object" || message === null)
|
76021
|
+
return "object expected";
|
76022
|
+
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
76023
|
+
if (!$util.isString(message.encoded))
|
76024
|
+
return "encoded: string expected";
|
76025
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
76026
|
+
switch (message.error) {
|
76027
|
+
default:
|
76028
|
+
return "error: enum value expected";
|
76029
|
+
case 0:
|
76030
|
+
case 1:
|
76031
|
+
case 2:
|
76032
|
+
case 3:
|
76033
|
+
case 4:
|
76034
|
+
case 5:
|
76035
|
+
case 15:
|
76036
|
+
case 16:
|
76037
|
+
case 17:
|
76038
|
+
case 18:
|
76039
|
+
case 6:
|
76040
|
+
case 7:
|
76041
|
+
case 8:
|
76042
|
+
case 9:
|
76043
|
+
case 10:
|
76044
|
+
case 11:
|
76045
|
+
case 12:
|
76046
|
+
case 13:
|
76047
|
+
case 14:
|
76048
|
+
case 19:
|
76049
|
+
case 20:
|
76050
|
+
case 21:
|
76051
|
+
case 22:
|
76052
|
+
case 23:
|
76053
|
+
break;
|
76054
|
+
}
|
76055
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
76056
|
+
if (!$util.isString(message.errorMessage))
|
76057
|
+
return "errorMessage: string expected";
|
76058
|
+
return null;
|
76059
|
+
};
|
76060
|
+
|
76061
|
+
/**
|
76062
|
+
* Creates a SigningOutput message from a plain object. Also converts values to their respective internal types.
|
76063
|
+
* @function fromObject
|
76064
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
76065
|
+
* @static
|
76066
|
+
* @param {Object.<string,*>} object Plain object
|
76067
|
+
* @returns {TW.TheOpenNetwork.Proto.SigningOutput} SigningOutput
|
76068
|
+
*/
|
76069
|
+
SigningOutput.fromObject = function fromObject(object) {
|
76070
|
+
if (object instanceof $root.TW.TheOpenNetwork.Proto.SigningOutput)
|
76071
|
+
return object;
|
76072
|
+
var message = new $root.TW.TheOpenNetwork.Proto.SigningOutput();
|
76073
|
+
if (object.encoded != null)
|
76074
|
+
message.encoded = String(object.encoded);
|
76075
|
+
switch (object.error) {
|
76076
|
+
case "OK":
|
76077
|
+
case 0:
|
76078
|
+
message.error = 0;
|
76079
|
+
break;
|
76080
|
+
case "Error_general":
|
76081
|
+
case 1:
|
76082
|
+
message.error = 1;
|
76083
|
+
break;
|
76084
|
+
case "Error_internal":
|
76085
|
+
case 2:
|
76086
|
+
message.error = 2;
|
76087
|
+
break;
|
76088
|
+
case "Error_low_balance":
|
76089
|
+
case 3:
|
76090
|
+
message.error = 3;
|
76091
|
+
break;
|
76092
|
+
case "Error_zero_amount_requested":
|
76093
|
+
case 4:
|
76094
|
+
message.error = 4;
|
76095
|
+
break;
|
76096
|
+
case "Error_missing_private_key":
|
76097
|
+
case 5:
|
76098
|
+
message.error = 5;
|
76099
|
+
break;
|
76100
|
+
case "Error_invalid_private_key":
|
76101
|
+
case 15:
|
76102
|
+
message.error = 15;
|
76103
|
+
break;
|
76104
|
+
case "Error_invalid_address":
|
76105
|
+
case 16:
|
76106
|
+
message.error = 16;
|
76107
|
+
break;
|
76108
|
+
case "Error_invalid_utxo":
|
76109
|
+
case 17:
|
76110
|
+
message.error = 17;
|
76111
|
+
break;
|
76112
|
+
case "Error_invalid_utxo_amount":
|
76113
|
+
case 18:
|
76114
|
+
message.error = 18;
|
76115
|
+
break;
|
76116
|
+
case "Error_wrong_fee":
|
76117
|
+
case 6:
|
76118
|
+
message.error = 6;
|
76119
|
+
break;
|
76120
|
+
case "Error_signing":
|
76121
|
+
case 7:
|
76122
|
+
message.error = 7;
|
76123
|
+
break;
|
76124
|
+
case "Error_tx_too_big":
|
76125
|
+
case 8:
|
76126
|
+
message.error = 8;
|
76127
|
+
break;
|
76128
|
+
case "Error_missing_input_utxos":
|
76129
|
+
case 9:
|
76130
|
+
message.error = 9;
|
76131
|
+
break;
|
76132
|
+
case "Error_not_enough_utxos":
|
76133
|
+
case 10:
|
76134
|
+
message.error = 10;
|
76135
|
+
break;
|
76136
|
+
case "Error_script_redeem":
|
76137
|
+
case 11:
|
76138
|
+
message.error = 11;
|
76139
|
+
break;
|
76140
|
+
case "Error_script_output":
|
76141
|
+
case 12:
|
76142
|
+
message.error = 12;
|
76143
|
+
break;
|
76144
|
+
case "Error_script_witness_program":
|
76145
|
+
case 13:
|
76146
|
+
message.error = 13;
|
76147
|
+
break;
|
76148
|
+
case "Error_invalid_memo":
|
76149
|
+
case 14:
|
76150
|
+
message.error = 14;
|
76151
|
+
break;
|
76152
|
+
case "Error_input_parse":
|
76153
|
+
case 19:
|
76154
|
+
message.error = 19;
|
76155
|
+
break;
|
76156
|
+
case "Error_no_support_n2n":
|
76157
|
+
case 20:
|
76158
|
+
message.error = 20;
|
76159
|
+
break;
|
76160
|
+
case "Error_signatures_count":
|
76161
|
+
case 21:
|
76162
|
+
message.error = 21;
|
76163
|
+
break;
|
76164
|
+
case "Error_invalid_params":
|
76165
|
+
case 22:
|
76166
|
+
message.error = 22;
|
76167
|
+
break;
|
76168
|
+
case "Error_invalid_requested_token_amount":
|
76169
|
+
case 23:
|
76170
|
+
message.error = 23;
|
76171
|
+
break;
|
76172
|
+
}
|
76173
|
+
if (object.errorMessage != null)
|
76174
|
+
message.errorMessage = String(object.errorMessage);
|
76175
|
+
return message;
|
76176
|
+
};
|
76177
|
+
|
76178
|
+
/**
|
76179
|
+
* Creates a plain object from a SigningOutput message. Also converts values to other types if specified.
|
76180
|
+
* @function toObject
|
76181
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
76182
|
+
* @static
|
76183
|
+
* @param {TW.TheOpenNetwork.Proto.SigningOutput} message SigningOutput
|
76184
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
76185
|
+
* @returns {Object.<string,*>} Plain object
|
76186
|
+
*/
|
76187
|
+
SigningOutput.toObject = function toObject(message, options) {
|
76188
|
+
if (!options)
|
76189
|
+
options = {};
|
76190
|
+
var object = {};
|
76191
|
+
if (options.defaults) {
|
76192
|
+
object.encoded = "";
|
76193
|
+
object.error = options.enums === String ? "OK" : 0;
|
76194
|
+
object.errorMessage = "";
|
76195
|
+
}
|
76196
|
+
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
76197
|
+
object.encoded = message.encoded;
|
76198
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
76199
|
+
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
76200
|
+
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
76201
|
+
object.errorMessage = message.errorMessage;
|
76202
|
+
return object;
|
76203
|
+
};
|
76204
|
+
|
76205
|
+
/**
|
76206
|
+
* Converts this SigningOutput to JSON.
|
76207
|
+
* @function toJSON
|
76208
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
76209
|
+
* @instance
|
76210
|
+
* @returns {Object.<string,*>} JSON object
|
76211
|
+
*/
|
76212
|
+
SigningOutput.prototype.toJSON = function toJSON() {
|
76213
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
76214
|
+
};
|
76215
|
+
|
76216
|
+
return SigningOutput;
|
76217
|
+
})();
|
76218
|
+
|
76219
|
+
return Proto;
|
76220
|
+
})();
|
76221
|
+
|
76222
|
+
return TheOpenNetwork;
|
76223
|
+
})();
|
76224
|
+
|
75300
76225
|
TW.Theta = (function() {
|
75301
76226
|
|
75302
76227
|
/**
|