@trustwallet/wallet-core 4.1.9 → 4.1.11
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 +14 -81
- package/dist/generated/core_proto.js +55 -198
- package/dist/lib/wallet-core.js +151 -147
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +1 -0
- package/package.json +1 -1
@@ -40921,11 +40921,14 @@ export namespace TW {
|
|
40921
40921
|
/** Transfer bounceable */
|
40922
40922
|
bounceable?: (boolean|null);
|
40923
40923
|
|
40924
|
+
/** Transfer stateInit */
|
40925
|
+
stateInit?: (string|null);
|
40926
|
+
|
40924
40927
|
/** Transfer jettonTransfer */
|
40925
40928
|
jettonTransfer?: (TW.TheOpenNetwork.Proto.IJettonTransfer|null);
|
40926
40929
|
|
40927
40930
|
/** Transfer customPayload */
|
40928
|
-
customPayload?: (
|
40931
|
+
customPayload?: (string|null);
|
40929
40932
|
}
|
40930
40933
|
|
40931
40934
|
/** Represents a Transfer. */
|
@@ -40952,11 +40955,14 @@ export namespace TW {
|
|
40952
40955
|
/** Transfer bounceable. */
|
40953
40956
|
public bounceable: boolean;
|
40954
40957
|
|
40958
|
+
/** Transfer stateInit. */
|
40959
|
+
public stateInit: string;
|
40960
|
+
|
40955
40961
|
/** Transfer jettonTransfer. */
|
40956
40962
|
public jettonTransfer?: (TW.TheOpenNetwork.Proto.IJettonTransfer|null);
|
40957
40963
|
|
40958
40964
|
/** Transfer customPayload. */
|
40959
|
-
public customPayload?: (
|
40965
|
+
public customPayload?: (string|null);
|
40960
40966
|
|
40961
40967
|
/** Transfer payload. */
|
40962
40968
|
public payload?: ("jettonTransfer"|"customPayload");
|
@@ -41032,6 +41038,9 @@ export namespace TW {
|
|
41032
41038
|
|
41033
41039
|
/** JettonTransfer forwardAmount */
|
41034
41040
|
forwardAmount?: (Long|null);
|
41041
|
+
|
41042
|
+
/** JettonTransfer customPayload */
|
41043
|
+
customPayload?: (string|null);
|
41035
41044
|
}
|
41036
41045
|
|
41037
41046
|
/** Represents a JettonTransfer. */
|
@@ -41058,6 +41067,9 @@ export namespace TW {
|
|
41058
41067
|
/** JettonTransfer forwardAmount. */
|
41059
41068
|
public forwardAmount: Long;
|
41060
41069
|
|
41070
|
+
/** JettonTransfer customPayload. */
|
41071
|
+
public customPayload: string;
|
41072
|
+
|
41061
41073
|
/**
|
41062
41074
|
* Creates a new JettonTransfer instance using the specified properties.
|
41063
41075
|
* @param [properties] Properties to set
|
@@ -41112,85 +41124,6 @@ export namespace TW {
|
|
41112
41124
|
public toJSON(): { [k: string]: any };
|
41113
41125
|
}
|
41114
41126
|
|
41115
|
-
/** Properties of a CustomPayload. */
|
41116
|
-
interface ICustomPayload {
|
41117
|
-
|
41118
|
-
/** CustomPayload stateInit */
|
41119
|
-
stateInit?: (string|null);
|
41120
|
-
|
41121
|
-
/** CustomPayload payload */
|
41122
|
-
payload?: (string|null);
|
41123
|
-
}
|
41124
|
-
|
41125
|
-
/** Represents a CustomPayload. */
|
41126
|
-
class CustomPayload implements ICustomPayload {
|
41127
|
-
|
41128
|
-
/**
|
41129
|
-
* Constructs a new CustomPayload.
|
41130
|
-
* @param [properties] Properties to set
|
41131
|
-
*/
|
41132
|
-
constructor(properties?: TW.TheOpenNetwork.Proto.ICustomPayload);
|
41133
|
-
|
41134
|
-
/** CustomPayload stateInit. */
|
41135
|
-
public stateInit: string;
|
41136
|
-
|
41137
|
-
/** CustomPayload payload. */
|
41138
|
-
public payload: string;
|
41139
|
-
|
41140
|
-
/**
|
41141
|
-
* Creates a new CustomPayload instance using the specified properties.
|
41142
|
-
* @param [properties] Properties to set
|
41143
|
-
* @returns CustomPayload instance
|
41144
|
-
*/
|
41145
|
-
public static create(properties?: TW.TheOpenNetwork.Proto.ICustomPayload): TW.TheOpenNetwork.Proto.CustomPayload;
|
41146
|
-
|
41147
|
-
/**
|
41148
|
-
* Encodes the specified CustomPayload message. Does not implicitly {@link TW.TheOpenNetwork.Proto.CustomPayload.verify|verify} messages.
|
41149
|
-
* @param message CustomPayload message or plain object to encode
|
41150
|
-
* @param [writer] Writer to encode to
|
41151
|
-
* @returns Writer
|
41152
|
-
*/
|
41153
|
-
public static encode(message: TW.TheOpenNetwork.Proto.ICustomPayload, writer?: $protobuf.Writer): $protobuf.Writer;
|
41154
|
-
|
41155
|
-
/**
|
41156
|
-
* Decodes a CustomPayload message from the specified reader or buffer.
|
41157
|
-
* @param reader Reader or buffer to decode from
|
41158
|
-
* @param [length] Message length if known beforehand
|
41159
|
-
* @returns CustomPayload
|
41160
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
41161
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41162
|
-
*/
|
41163
|
-
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.TheOpenNetwork.Proto.CustomPayload;
|
41164
|
-
|
41165
|
-
/**
|
41166
|
-
* Verifies a CustomPayload message.
|
41167
|
-
* @param message Plain object to verify
|
41168
|
-
* @returns `null` if valid, otherwise the reason why it is not
|
41169
|
-
*/
|
41170
|
-
public static verify(message: { [k: string]: any }): (string|null);
|
41171
|
-
|
41172
|
-
/**
|
41173
|
-
* Creates a CustomPayload message from a plain object. Also converts values to their respective internal types.
|
41174
|
-
* @param object Plain object
|
41175
|
-
* @returns CustomPayload
|
41176
|
-
*/
|
41177
|
-
public static fromObject(object: { [k: string]: any }): TW.TheOpenNetwork.Proto.CustomPayload;
|
41178
|
-
|
41179
|
-
/**
|
41180
|
-
* Creates a plain object from a CustomPayload message. Also converts values to other types if specified.
|
41181
|
-
* @param message CustomPayload
|
41182
|
-
* @param [options] Conversion options
|
41183
|
-
* @returns Plain object
|
41184
|
-
*/
|
41185
|
-
public static toObject(message: TW.TheOpenNetwork.Proto.CustomPayload, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
41186
|
-
|
41187
|
-
/**
|
41188
|
-
* Converts this CustomPayload to JSON.
|
41189
|
-
* @returns JSON object
|
41190
|
-
*/
|
41191
|
-
public toJSON(): { [k: string]: any };
|
41192
|
-
}
|
41193
|
-
|
41194
41127
|
/** Properties of a SigningInput. */
|
41195
41128
|
interface ISigningInput {
|
41196
41129
|
|
@@ -120826,8 +120826,9 @@
|
|
120826
120826
|
* @property {number|null} [mode] Transfer mode
|
120827
120827
|
* @property {string|null} [comment] Transfer comment
|
120828
120828
|
* @property {boolean|null} [bounceable] Transfer bounceable
|
120829
|
+
* @property {string|null} [stateInit] Transfer stateInit
|
120829
120830
|
* @property {TW.TheOpenNetwork.Proto.IJettonTransfer|null} [jettonTransfer] Transfer jettonTransfer
|
120830
|
-
* @property {
|
120831
|
+
* @property {string|null} [customPayload] Transfer customPayload
|
120831
120832
|
*/
|
120832
120833
|
|
120833
120834
|
/**
|
@@ -120885,6 +120886,14 @@
|
|
120885
120886
|
*/
|
120886
120887
|
Transfer.prototype.bounceable = false;
|
120887
120888
|
|
120889
|
+
/**
|
120890
|
+
* Transfer stateInit.
|
120891
|
+
* @member {string} stateInit
|
120892
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120893
|
+
* @instance
|
120894
|
+
*/
|
120895
|
+
Transfer.prototype.stateInit = "";
|
120896
|
+
|
120888
120897
|
/**
|
120889
120898
|
* Transfer jettonTransfer.
|
120890
120899
|
* @member {TW.TheOpenNetwork.Proto.IJettonTransfer|null|undefined} jettonTransfer
|
@@ -120895,7 +120904,7 @@
|
|
120895
120904
|
|
120896
120905
|
/**
|
120897
120906
|
* Transfer customPayload.
|
120898
|
-
* @member {
|
120907
|
+
* @member {string|null|undefined} customPayload
|
120899
120908
|
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120900
120909
|
* @instance
|
120901
120910
|
*/
|
@@ -120949,10 +120958,12 @@
|
|
120949
120958
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.comment);
|
120950
120959
|
if (message.bounceable != null && Object.hasOwnProperty.call(message, "bounceable"))
|
120951
120960
|
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.bounceable);
|
120961
|
+
if (message.stateInit != null && Object.hasOwnProperty.call(message, "stateInit"))
|
120962
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.stateInit);
|
120952
120963
|
if (message.jettonTransfer != null && Object.hasOwnProperty.call(message, "jettonTransfer"))
|
120953
|
-
$root.TW.TheOpenNetwork.Proto.JettonTransfer.encode(message.jettonTransfer, writer.uint32(/* id
|
120964
|
+
$root.TW.TheOpenNetwork.Proto.JettonTransfer.encode(message.jettonTransfer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
120954
120965
|
if (message.customPayload != null && Object.hasOwnProperty.call(message, "customPayload"))
|
120955
|
-
|
120966
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.customPayload);
|
120956
120967
|
return writer;
|
120957
120968
|
};
|
120958
120969
|
|
@@ -120990,10 +121001,13 @@
|
|
120990
121001
|
message.bounceable = reader.bool();
|
120991
121002
|
break;
|
120992
121003
|
case 6:
|
120993
|
-
message.
|
121004
|
+
message.stateInit = reader.string();
|
120994
121005
|
break;
|
120995
121006
|
case 7:
|
120996
|
-
message.
|
121007
|
+
message.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.decode(reader, reader.uint32());
|
121008
|
+
break;
|
121009
|
+
case 8:
|
121010
|
+
message.customPayload = reader.string();
|
120997
121011
|
break;
|
120998
121012
|
default:
|
120999
121013
|
reader.skipType(tag & 7);
|
@@ -121030,6 +121044,9 @@
|
|
121030
121044
|
if (message.bounceable != null && message.hasOwnProperty("bounceable"))
|
121031
121045
|
if (typeof message.bounceable !== "boolean")
|
121032
121046
|
return "bounceable: boolean expected";
|
121047
|
+
if (message.stateInit != null && message.hasOwnProperty("stateInit"))
|
121048
|
+
if (!$util.isString(message.stateInit))
|
121049
|
+
return "stateInit: string expected";
|
121033
121050
|
if (message.jettonTransfer != null && message.hasOwnProperty("jettonTransfer")) {
|
121034
121051
|
properties.payload = 1;
|
121035
121052
|
{
|
@@ -121042,11 +121059,8 @@
|
|
121042
121059
|
if (properties.payload === 1)
|
121043
121060
|
return "payload: multiple values";
|
121044
121061
|
properties.payload = 1;
|
121045
|
-
|
121046
|
-
|
121047
|
-
if (error)
|
121048
|
-
return "customPayload." + error;
|
121049
|
-
}
|
121062
|
+
if (!$util.isString(message.customPayload))
|
121063
|
+
return "customPayload: string expected";
|
121050
121064
|
}
|
121051
121065
|
return null;
|
121052
121066
|
};
|
@@ -121080,16 +121094,15 @@
|
|
121080
121094
|
message.comment = String(object.comment);
|
121081
121095
|
if (object.bounceable != null)
|
121082
121096
|
message.bounceable = Boolean(object.bounceable);
|
121097
|
+
if (object.stateInit != null)
|
121098
|
+
message.stateInit = String(object.stateInit);
|
121083
121099
|
if (object.jettonTransfer != null) {
|
121084
121100
|
if (typeof object.jettonTransfer !== "object")
|
121085
121101
|
throw TypeError(".TW.TheOpenNetwork.Proto.Transfer.jettonTransfer: object expected");
|
121086
121102
|
message.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.fromObject(object.jettonTransfer);
|
121087
121103
|
}
|
121088
|
-
if (object.customPayload != null)
|
121089
|
-
|
121090
|
-
throw TypeError(".TW.TheOpenNetwork.Proto.Transfer.customPayload: object expected");
|
121091
|
-
message.customPayload = $root.TW.TheOpenNetwork.Proto.CustomPayload.fromObject(object.customPayload);
|
121092
|
-
}
|
121104
|
+
if (object.customPayload != null)
|
121105
|
+
message.customPayload = String(object.customPayload);
|
121093
121106
|
return message;
|
121094
121107
|
};
|
121095
121108
|
|
@@ -121116,6 +121129,7 @@
|
|
121116
121129
|
object.mode = 0;
|
121117
121130
|
object.comment = "";
|
121118
121131
|
object.bounceable = false;
|
121132
|
+
object.stateInit = "";
|
121119
121133
|
}
|
121120
121134
|
if (message.dest != null && message.hasOwnProperty("dest"))
|
121121
121135
|
object.dest = message.dest;
|
@@ -121130,13 +121144,15 @@
|
|
121130
121144
|
object.comment = message.comment;
|
121131
121145
|
if (message.bounceable != null && message.hasOwnProperty("bounceable"))
|
121132
121146
|
object.bounceable = message.bounceable;
|
121147
|
+
if (message.stateInit != null && message.hasOwnProperty("stateInit"))
|
121148
|
+
object.stateInit = message.stateInit;
|
121133
121149
|
if (message.jettonTransfer != null && message.hasOwnProperty("jettonTransfer")) {
|
121134
121150
|
object.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.toObject(message.jettonTransfer, options);
|
121135
121151
|
if (options.oneofs)
|
121136
121152
|
object.payload = "jettonTransfer";
|
121137
121153
|
}
|
121138
121154
|
if (message.customPayload != null && message.hasOwnProperty("customPayload")) {
|
121139
|
-
object.customPayload =
|
121155
|
+
object.customPayload = message.customPayload;
|
121140
121156
|
if (options.oneofs)
|
121141
121157
|
object.payload = "customPayload";
|
121142
121158
|
}
|
@@ -121168,6 +121184,7 @@
|
|
121168
121184
|
* @property {string|null} [toOwner] JettonTransfer toOwner
|
121169
121185
|
* @property {string|null} [responseAddress] JettonTransfer responseAddress
|
121170
121186
|
* @property {Long|null} [forwardAmount] JettonTransfer forwardAmount
|
121187
|
+
* @property {string|null} [customPayload] JettonTransfer customPayload
|
121171
121188
|
*/
|
121172
121189
|
|
121173
121190
|
/**
|
@@ -121225,6 +121242,14 @@
|
|
121225
121242
|
*/
|
121226
121243
|
JettonTransfer.prototype.forwardAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
121227
121244
|
|
121245
|
+
/**
|
121246
|
+
* JettonTransfer customPayload.
|
121247
|
+
* @member {string} customPayload
|
121248
|
+
* @memberof TW.TheOpenNetwork.Proto.JettonTransfer
|
121249
|
+
* @instance
|
121250
|
+
*/
|
121251
|
+
JettonTransfer.prototype.customPayload = "";
|
121252
|
+
|
121228
121253
|
/**
|
121229
121254
|
* Creates a new JettonTransfer instance using the specified properties.
|
121230
121255
|
* @function create
|
@@ -121259,6 +121284,8 @@
|
|
121259
121284
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.responseAddress);
|
121260
121285
|
if (message.forwardAmount != null && Object.hasOwnProperty.call(message, "forwardAmount"))
|
121261
121286
|
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.forwardAmount);
|
121287
|
+
if (message.customPayload != null && Object.hasOwnProperty.call(message, "customPayload"))
|
121288
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.customPayload);
|
121262
121289
|
return writer;
|
121263
121290
|
};
|
121264
121291
|
|
@@ -121295,6 +121322,9 @@
|
|
121295
121322
|
case 5:
|
121296
121323
|
message.forwardAmount = reader.uint64();
|
121297
121324
|
break;
|
121325
|
+
case 6:
|
121326
|
+
message.customPayload = reader.string();
|
121327
|
+
break;
|
121298
121328
|
default:
|
121299
121329
|
reader.skipType(tag & 7);
|
121300
121330
|
break;
|
@@ -121329,6 +121359,9 @@
|
|
121329
121359
|
if (message.forwardAmount != null && message.hasOwnProperty("forwardAmount"))
|
121330
121360
|
if (!$util.isInteger(message.forwardAmount) && !(message.forwardAmount && $util.isInteger(message.forwardAmount.low) && $util.isInteger(message.forwardAmount.high)))
|
121331
121361
|
return "forwardAmount: integer|Long expected";
|
121362
|
+
if (message.customPayload != null && message.hasOwnProperty("customPayload"))
|
121363
|
+
if (!$util.isString(message.customPayload))
|
121364
|
+
return "customPayload: string expected";
|
121332
121365
|
return null;
|
121333
121366
|
};
|
121334
121367
|
|
@@ -121375,6 +121408,8 @@
|
|
121375
121408
|
message.forwardAmount = object.forwardAmount;
|
121376
121409
|
else if (typeof object.forwardAmount === "object")
|
121377
121410
|
message.forwardAmount = new $util.LongBits(object.forwardAmount.low >>> 0, object.forwardAmount.high >>> 0).toNumber(true);
|
121411
|
+
if (object.customPayload != null)
|
121412
|
+
message.customPayload = String(object.customPayload);
|
121378
121413
|
return message;
|
121379
121414
|
};
|
121380
121415
|
|
@@ -121409,6 +121444,7 @@
|
|
121409
121444
|
object.forwardAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
121410
121445
|
} else
|
121411
121446
|
object.forwardAmount = options.longs === String ? "0" : 0;
|
121447
|
+
object.customPayload = "";
|
121412
121448
|
}
|
121413
121449
|
if (message.queryId != null && message.hasOwnProperty("queryId"))
|
121414
121450
|
if (typeof message.queryId === "number")
|
@@ -121429,6 +121465,8 @@
|
|
121429
121465
|
object.forwardAmount = options.longs === String ? String(message.forwardAmount) : message.forwardAmount;
|
121430
121466
|
else
|
121431
121467
|
object.forwardAmount = options.longs === String ? $util.Long.prototype.toString.call(message.forwardAmount) : options.longs === Number ? new $util.LongBits(message.forwardAmount.low >>> 0, message.forwardAmount.high >>> 0).toNumber(true) : message.forwardAmount;
|
121468
|
+
if (message.customPayload != null && message.hasOwnProperty("customPayload"))
|
121469
|
+
object.customPayload = message.customPayload;
|
121432
121470
|
return object;
|
121433
121471
|
};
|
121434
121472
|
|
@@ -121446,187 +121484,6 @@
|
|
121446
121484
|
return JettonTransfer;
|
121447
121485
|
})();
|
121448
121486
|
|
121449
|
-
Proto.CustomPayload = (function() {
|
121450
|
-
|
121451
|
-
/**
|
121452
|
-
* Properties of a CustomPayload.
|
121453
|
-
* @memberof TW.TheOpenNetwork.Proto
|
121454
|
-
* @interface ICustomPayload
|
121455
|
-
* @property {string|null} [stateInit] CustomPayload stateInit
|
121456
|
-
* @property {string|null} [payload] CustomPayload payload
|
121457
|
-
*/
|
121458
|
-
|
121459
|
-
/**
|
121460
|
-
* Constructs a new CustomPayload.
|
121461
|
-
* @memberof TW.TheOpenNetwork.Proto
|
121462
|
-
* @classdesc Represents a CustomPayload.
|
121463
|
-
* @implements ICustomPayload
|
121464
|
-
* @constructor
|
121465
|
-
* @param {TW.TheOpenNetwork.Proto.ICustomPayload=} [properties] Properties to set
|
121466
|
-
*/
|
121467
|
-
function CustomPayload(properties) {
|
121468
|
-
if (properties)
|
121469
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
121470
|
-
if (properties[keys[i]] != null)
|
121471
|
-
this[keys[i]] = properties[keys[i]];
|
121472
|
-
}
|
121473
|
-
|
121474
|
-
/**
|
121475
|
-
* CustomPayload stateInit.
|
121476
|
-
* @member {string} stateInit
|
121477
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121478
|
-
* @instance
|
121479
|
-
*/
|
121480
|
-
CustomPayload.prototype.stateInit = "";
|
121481
|
-
|
121482
|
-
/**
|
121483
|
-
* CustomPayload payload.
|
121484
|
-
* @member {string} payload
|
121485
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121486
|
-
* @instance
|
121487
|
-
*/
|
121488
|
-
CustomPayload.prototype.payload = "";
|
121489
|
-
|
121490
|
-
/**
|
121491
|
-
* Creates a new CustomPayload instance using the specified properties.
|
121492
|
-
* @function create
|
121493
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121494
|
-
* @static
|
121495
|
-
* @param {TW.TheOpenNetwork.Proto.ICustomPayload=} [properties] Properties to set
|
121496
|
-
* @returns {TW.TheOpenNetwork.Proto.CustomPayload} CustomPayload instance
|
121497
|
-
*/
|
121498
|
-
CustomPayload.create = function create(properties) {
|
121499
|
-
return new CustomPayload(properties);
|
121500
|
-
};
|
121501
|
-
|
121502
|
-
/**
|
121503
|
-
* Encodes the specified CustomPayload message. Does not implicitly {@link TW.TheOpenNetwork.Proto.CustomPayload.verify|verify} messages.
|
121504
|
-
* @function encode
|
121505
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121506
|
-
* @static
|
121507
|
-
* @param {TW.TheOpenNetwork.Proto.ICustomPayload} message CustomPayload message or plain object to encode
|
121508
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
121509
|
-
* @returns {$protobuf.Writer} Writer
|
121510
|
-
*/
|
121511
|
-
CustomPayload.encode = function encode(message, writer) {
|
121512
|
-
if (!writer)
|
121513
|
-
writer = $Writer.create();
|
121514
|
-
if (message.stateInit != null && Object.hasOwnProperty.call(message, "stateInit"))
|
121515
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.stateInit);
|
121516
|
-
if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
|
121517
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.payload);
|
121518
|
-
return writer;
|
121519
|
-
};
|
121520
|
-
|
121521
|
-
/**
|
121522
|
-
* Decodes a CustomPayload message from the specified reader or buffer.
|
121523
|
-
* @function decode
|
121524
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121525
|
-
* @static
|
121526
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
121527
|
-
* @param {number} [length] Message length if known beforehand
|
121528
|
-
* @returns {TW.TheOpenNetwork.Proto.CustomPayload} CustomPayload
|
121529
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
121530
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
121531
|
-
*/
|
121532
|
-
CustomPayload.decode = function decode(reader, length) {
|
121533
|
-
if (!(reader instanceof $Reader))
|
121534
|
-
reader = $Reader.create(reader);
|
121535
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.TheOpenNetwork.Proto.CustomPayload();
|
121536
|
-
while (reader.pos < end) {
|
121537
|
-
var tag = reader.uint32();
|
121538
|
-
switch (tag >>> 3) {
|
121539
|
-
case 1:
|
121540
|
-
message.stateInit = reader.string();
|
121541
|
-
break;
|
121542
|
-
case 2:
|
121543
|
-
message.payload = reader.string();
|
121544
|
-
break;
|
121545
|
-
default:
|
121546
|
-
reader.skipType(tag & 7);
|
121547
|
-
break;
|
121548
|
-
}
|
121549
|
-
}
|
121550
|
-
return message;
|
121551
|
-
};
|
121552
|
-
|
121553
|
-
/**
|
121554
|
-
* Verifies a CustomPayload message.
|
121555
|
-
* @function verify
|
121556
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121557
|
-
* @static
|
121558
|
-
* @param {Object.<string,*>} message Plain object to verify
|
121559
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
121560
|
-
*/
|
121561
|
-
CustomPayload.verify = function verify(message) {
|
121562
|
-
if (typeof message !== "object" || message === null)
|
121563
|
-
return "object expected";
|
121564
|
-
if (message.stateInit != null && message.hasOwnProperty("stateInit"))
|
121565
|
-
if (!$util.isString(message.stateInit))
|
121566
|
-
return "stateInit: string expected";
|
121567
|
-
if (message.payload != null && message.hasOwnProperty("payload"))
|
121568
|
-
if (!$util.isString(message.payload))
|
121569
|
-
return "payload: string expected";
|
121570
|
-
return null;
|
121571
|
-
};
|
121572
|
-
|
121573
|
-
/**
|
121574
|
-
* Creates a CustomPayload message from a plain object. Also converts values to their respective internal types.
|
121575
|
-
* @function fromObject
|
121576
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121577
|
-
* @static
|
121578
|
-
* @param {Object.<string,*>} object Plain object
|
121579
|
-
* @returns {TW.TheOpenNetwork.Proto.CustomPayload} CustomPayload
|
121580
|
-
*/
|
121581
|
-
CustomPayload.fromObject = function fromObject(object) {
|
121582
|
-
if (object instanceof $root.TW.TheOpenNetwork.Proto.CustomPayload)
|
121583
|
-
return object;
|
121584
|
-
var message = new $root.TW.TheOpenNetwork.Proto.CustomPayload();
|
121585
|
-
if (object.stateInit != null)
|
121586
|
-
message.stateInit = String(object.stateInit);
|
121587
|
-
if (object.payload != null)
|
121588
|
-
message.payload = String(object.payload);
|
121589
|
-
return message;
|
121590
|
-
};
|
121591
|
-
|
121592
|
-
/**
|
121593
|
-
* Creates a plain object from a CustomPayload message. Also converts values to other types if specified.
|
121594
|
-
* @function toObject
|
121595
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121596
|
-
* @static
|
121597
|
-
* @param {TW.TheOpenNetwork.Proto.CustomPayload} message CustomPayload
|
121598
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
121599
|
-
* @returns {Object.<string,*>} Plain object
|
121600
|
-
*/
|
121601
|
-
CustomPayload.toObject = function toObject(message, options) {
|
121602
|
-
if (!options)
|
121603
|
-
options = {};
|
121604
|
-
var object = {};
|
121605
|
-
if (options.defaults) {
|
121606
|
-
object.stateInit = "";
|
121607
|
-
object.payload = "";
|
121608
|
-
}
|
121609
|
-
if (message.stateInit != null && message.hasOwnProperty("stateInit"))
|
121610
|
-
object.stateInit = message.stateInit;
|
121611
|
-
if (message.payload != null && message.hasOwnProperty("payload"))
|
121612
|
-
object.payload = message.payload;
|
121613
|
-
return object;
|
121614
|
-
};
|
121615
|
-
|
121616
|
-
/**
|
121617
|
-
* Converts this CustomPayload to JSON.
|
121618
|
-
* @function toJSON
|
121619
|
-
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
121620
|
-
* @instance
|
121621
|
-
* @returns {Object.<string,*>} JSON object
|
121622
|
-
*/
|
121623
|
-
CustomPayload.prototype.toJSON = function toJSON() {
|
121624
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
121625
|
-
};
|
121626
|
-
|
121627
|
-
return CustomPayload;
|
121628
|
-
})();
|
121629
|
-
|
121630
121487
|
Proto.SigningInput = (function() {
|
121631
121488
|
|
121632
121489
|
/**
|