@trustwallet/wallet-core 4.1.0-rc1 → 4.1.1
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 +119 -28
- package/dist/generated/core_proto.js +402 -141
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/package.json +1 -1
@@ -40632,20 +40632,20 @@ export namespace TW {
|
|
40632
40632
|
/** Transfer amount */
|
40633
40633
|
amount?: (Long|null);
|
40634
40634
|
|
40635
|
-
/** Transfer sequenceNumber */
|
40636
|
-
sequenceNumber?: (number|null);
|
40637
|
-
|
40638
40635
|
/** Transfer mode */
|
40639
40636
|
mode?: (number|null);
|
40640
40637
|
|
40641
|
-
/** Transfer expireAt */
|
40642
|
-
expireAt?: (number|null);
|
40643
|
-
|
40644
40638
|
/** Transfer comment */
|
40645
40639
|
comment?: (string|null);
|
40646
40640
|
|
40647
40641
|
/** Transfer bounceable */
|
40648
40642
|
bounceable?: (boolean|null);
|
40643
|
+
|
40644
|
+
/** Transfer jettonTransfer */
|
40645
|
+
jettonTransfer?: (TW.TheOpenNetwork.Proto.IJettonTransfer|null);
|
40646
|
+
|
40647
|
+
/** Transfer customPayload */
|
40648
|
+
customPayload?: (TW.TheOpenNetwork.Proto.ICustomPayload|null);
|
40649
40649
|
}
|
40650
40650
|
|
40651
40651
|
/** Represents a Transfer. */
|
@@ -40666,21 +40666,24 @@ export namespace TW {
|
|
40666
40666
|
/** Transfer amount. */
|
40667
40667
|
public amount: Long;
|
40668
40668
|
|
40669
|
-
/** Transfer sequenceNumber. */
|
40670
|
-
public sequenceNumber: number;
|
40671
|
-
|
40672
40669
|
/** Transfer mode. */
|
40673
40670
|
public mode: number;
|
40674
40671
|
|
40675
|
-
/** Transfer expireAt. */
|
40676
|
-
public expireAt: number;
|
40677
|
-
|
40678
40672
|
/** Transfer comment. */
|
40679
40673
|
public comment: string;
|
40680
40674
|
|
40681
40675
|
/** Transfer bounceable. */
|
40682
40676
|
public bounceable: boolean;
|
40683
40677
|
|
40678
|
+
/** Transfer jettonTransfer. */
|
40679
|
+
public jettonTransfer?: (TW.TheOpenNetwork.Proto.IJettonTransfer|null);
|
40680
|
+
|
40681
|
+
/** Transfer customPayload. */
|
40682
|
+
public customPayload?: (TW.TheOpenNetwork.Proto.ICustomPayload|null);
|
40683
|
+
|
40684
|
+
/** Transfer payload. */
|
40685
|
+
public payload?: ("jettonTransfer"|"customPayload");
|
40686
|
+
|
40684
40687
|
/**
|
40685
40688
|
* Creates a new Transfer instance using the specified properties.
|
40686
40689
|
* @param [properties] Properties to set
|
@@ -40738,9 +40741,6 @@ export namespace TW {
|
|
40738
40741
|
/** Properties of a JettonTransfer. */
|
40739
40742
|
interface IJettonTransfer {
|
40740
40743
|
|
40741
|
-
/** JettonTransfer transfer */
|
40742
|
-
transfer?: (TW.TheOpenNetwork.Proto.ITransfer|null);
|
40743
|
-
|
40744
40744
|
/** JettonTransfer queryId */
|
40745
40745
|
queryId?: (Long|null);
|
40746
40746
|
|
@@ -40766,9 +40766,6 @@ export namespace TW {
|
|
40766
40766
|
*/
|
40767
40767
|
constructor(properties?: TW.TheOpenNetwork.Proto.IJettonTransfer);
|
40768
40768
|
|
40769
|
-
/** JettonTransfer transfer. */
|
40770
|
-
public transfer?: (TW.TheOpenNetwork.Proto.ITransfer|null);
|
40771
|
-
|
40772
40769
|
/** JettonTransfer queryId. */
|
40773
40770
|
public queryId: Long;
|
40774
40771
|
|
@@ -40838,17 +40835,102 @@ export namespace TW {
|
|
40838
40835
|
public toJSON(): { [k: string]: any };
|
40839
40836
|
}
|
40840
40837
|
|
40838
|
+
/** Properties of a CustomPayload. */
|
40839
|
+
interface ICustomPayload {
|
40840
|
+
|
40841
|
+
/** CustomPayload stateInit */
|
40842
|
+
stateInit?: (string|null);
|
40843
|
+
|
40844
|
+
/** CustomPayload payload */
|
40845
|
+
payload?: (string|null);
|
40846
|
+
}
|
40847
|
+
|
40848
|
+
/** Represents a CustomPayload. */
|
40849
|
+
class CustomPayload implements ICustomPayload {
|
40850
|
+
|
40851
|
+
/**
|
40852
|
+
* Constructs a new CustomPayload.
|
40853
|
+
* @param [properties] Properties to set
|
40854
|
+
*/
|
40855
|
+
constructor(properties?: TW.TheOpenNetwork.Proto.ICustomPayload);
|
40856
|
+
|
40857
|
+
/** CustomPayload stateInit. */
|
40858
|
+
public stateInit: string;
|
40859
|
+
|
40860
|
+
/** CustomPayload payload. */
|
40861
|
+
public payload: string;
|
40862
|
+
|
40863
|
+
/**
|
40864
|
+
* Creates a new CustomPayload instance using the specified properties.
|
40865
|
+
* @param [properties] Properties to set
|
40866
|
+
* @returns CustomPayload instance
|
40867
|
+
*/
|
40868
|
+
public static create(properties?: TW.TheOpenNetwork.Proto.ICustomPayload): TW.TheOpenNetwork.Proto.CustomPayload;
|
40869
|
+
|
40870
|
+
/**
|
40871
|
+
* Encodes the specified CustomPayload message. Does not implicitly {@link TW.TheOpenNetwork.Proto.CustomPayload.verify|verify} messages.
|
40872
|
+
* @param message CustomPayload message or plain object to encode
|
40873
|
+
* @param [writer] Writer to encode to
|
40874
|
+
* @returns Writer
|
40875
|
+
*/
|
40876
|
+
public static encode(message: TW.TheOpenNetwork.Proto.ICustomPayload, writer?: $protobuf.Writer): $protobuf.Writer;
|
40877
|
+
|
40878
|
+
/**
|
40879
|
+
* Decodes a CustomPayload message from the specified reader or buffer.
|
40880
|
+
* @param reader Reader or buffer to decode from
|
40881
|
+
* @param [length] Message length if known beforehand
|
40882
|
+
* @returns CustomPayload
|
40883
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
40884
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40885
|
+
*/
|
40886
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.TheOpenNetwork.Proto.CustomPayload;
|
40887
|
+
|
40888
|
+
/**
|
40889
|
+
* Verifies a CustomPayload message.
|
40890
|
+
* @param message Plain object to verify
|
40891
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
40892
|
+
*/
|
40893
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
40894
|
+
|
40895
|
+
/**
|
40896
|
+
* Creates a CustomPayload message from a plain object. Also converts values to their respective internal types.
|
40897
|
+
* @param object Plain object
|
40898
|
+
* @returns CustomPayload
|
40899
|
+
*/
|
40900
|
+
public static fromObject(object: { [k: string]: any }): TW.TheOpenNetwork.Proto.CustomPayload;
|
40901
|
+
|
40902
|
+
/**
|
40903
|
+
* Creates a plain object from a CustomPayload message. Also converts values to other types if specified.
|
40904
|
+
* @param message CustomPayload
|
40905
|
+
* @param [options] Conversion options
|
40906
|
+
* @returns Plain object
|
40907
|
+
*/
|
40908
|
+
public static toObject(message: TW.TheOpenNetwork.Proto.CustomPayload, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
40909
|
+
|
40910
|
+
/**
|
40911
|
+
* Converts this CustomPayload to JSON.
|
40912
|
+
* @returns JSON object
|
40913
|
+
*/
|
40914
|
+
public toJSON(): { [k: string]: any };
|
40915
|
+
}
|
40916
|
+
|
40841
40917
|
/** Properties of a SigningInput. */
|
40842
40918
|
interface ISigningInput {
|
40843
40919
|
|
40844
40920
|
/** SigningInput privateKey */
|
40845
40921
|
privateKey?: (Uint8Array|null);
|
40846
40922
|
|
40847
|
-
/** SigningInput
|
40848
|
-
|
40923
|
+
/** SigningInput publicKey */
|
40924
|
+
publicKey?: (Uint8Array|null);
|
40849
40925
|
|
40850
|
-
/** SigningInput
|
40851
|
-
|
40926
|
+
/** SigningInput messages */
|
40927
|
+
messages?: (TW.TheOpenNetwork.Proto.ITransfer[]|null);
|
40928
|
+
|
40929
|
+
/** SigningInput sequenceNumber */
|
40930
|
+
sequenceNumber?: (number|null);
|
40931
|
+
|
40932
|
+
/** SigningInput expireAt */
|
40933
|
+
expireAt?: (number|null);
|
40852
40934
|
}
|
40853
40935
|
|
40854
40936
|
/** Represents a SigningInput. */
|
@@ -40863,14 +40945,17 @@ export namespace TW {
|
|
40863
40945
|
/** SigningInput privateKey. */
|
40864
40946
|
public privateKey: Uint8Array;
|
40865
40947
|
|
40866
|
-
/** SigningInput
|
40867
|
-
public
|
40948
|
+
/** SigningInput publicKey. */
|
40949
|
+
public publicKey: Uint8Array;
|
40868
40950
|
|
40869
|
-
/** SigningInput
|
40870
|
-
public
|
40951
|
+
/** SigningInput messages. */
|
40952
|
+
public messages: TW.TheOpenNetwork.Proto.ITransfer[];
|
40871
40953
|
|
40872
|
-
/** SigningInput
|
40873
|
-
public
|
40954
|
+
/** SigningInput sequenceNumber. */
|
40955
|
+
public sequenceNumber: number;
|
40956
|
+
|
40957
|
+
/** SigningInput expireAt. */
|
40958
|
+
public expireAt: number;
|
40874
40959
|
|
40875
40960
|
/**
|
40876
40961
|
* Creates a new SigningInput instance using the specified properties.
|
@@ -40932,6 +41017,9 @@ export namespace TW {
|
|
40932
41017
|
/** SigningOutput encoded */
|
40933
41018
|
encoded?: (string|null);
|
40934
41019
|
|
41020
|
+
/** SigningOutput hash */
|
41021
|
+
hash?: (Uint8Array|null);
|
41022
|
+
|
40935
41023
|
/** SigningOutput error */
|
40936
41024
|
error?: (TW.Common.Proto.SigningError|null);
|
40937
41025
|
|
@@ -40951,6 +41039,9 @@ export namespace TW {
|
|
40951
41039
|
/** SigningOutput encoded. */
|
40952
41040
|
public encoded: string;
|
40953
41041
|
|
41042
|
+
/** SigningOutput hash. */
|
41043
|
+
public hash: Uint8Array;
|
41044
|
+
|
40954
41045
|
/** SigningOutput error. */
|
40955
41046
|
public error: TW.Common.Proto.SigningError;
|
40956
41047
|
|
@@ -119996,11 +119996,11 @@
|
|
119996
119996
|
* @property {TW.TheOpenNetwork.Proto.WalletVersion|null} [walletVersion] Transfer walletVersion
|
119997
119997
|
* @property {string|null} [dest] Transfer dest
|
119998
119998
|
* @property {Long|null} [amount] Transfer amount
|
119999
|
-
* @property {number|null} [sequenceNumber] Transfer sequenceNumber
|
120000
119999
|
* @property {number|null} [mode] Transfer mode
|
120001
|
-
* @property {number|null} [expireAt] Transfer expireAt
|
120002
120000
|
* @property {string|null} [comment] Transfer comment
|
120003
120001
|
* @property {boolean|null} [bounceable] Transfer bounceable
|
120002
|
+
* @property {TW.TheOpenNetwork.Proto.IJettonTransfer|null} [jettonTransfer] Transfer jettonTransfer
|
120003
|
+
* @property {TW.TheOpenNetwork.Proto.ICustomPayload|null} [customPayload] Transfer customPayload
|
120004
120004
|
*/
|
120005
120005
|
|
120006
120006
|
/**
|
@@ -120043,44 +120043,58 @@
|
|
120043
120043
|
Transfer.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
120044
120044
|
|
120045
120045
|
/**
|
120046
|
-
* Transfer
|
120047
|
-
* @member {number}
|
120046
|
+
* Transfer mode.
|
120047
|
+
* @member {number} mode
|
120048
120048
|
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120049
120049
|
* @instance
|
120050
120050
|
*/
|
120051
|
-
Transfer.prototype.
|
120051
|
+
Transfer.prototype.mode = 0;
|
120052
120052
|
|
120053
120053
|
/**
|
120054
|
-
* Transfer
|
120055
|
-
* @member {
|
120054
|
+
* Transfer comment.
|
120055
|
+
* @member {string} comment
|
120056
120056
|
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120057
120057
|
* @instance
|
120058
120058
|
*/
|
120059
|
-
Transfer.prototype.
|
120059
|
+
Transfer.prototype.comment = "";
|
120060
120060
|
|
120061
120061
|
/**
|
120062
|
-
* Transfer
|
120063
|
-
* @member {
|
120062
|
+
* Transfer bounceable.
|
120063
|
+
* @member {boolean} bounceable
|
120064
120064
|
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120065
120065
|
* @instance
|
120066
120066
|
*/
|
120067
|
-
Transfer.prototype.
|
120067
|
+
Transfer.prototype.bounceable = false;
|
120068
120068
|
|
120069
120069
|
/**
|
120070
|
-
* Transfer
|
120071
|
-
* @member {
|
120070
|
+
* Transfer jettonTransfer.
|
120071
|
+
* @member {TW.TheOpenNetwork.Proto.IJettonTransfer|null|undefined} jettonTransfer
|
120072
120072
|
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120073
120073
|
* @instance
|
120074
120074
|
*/
|
120075
|
-
Transfer.prototype.
|
120075
|
+
Transfer.prototype.jettonTransfer = null;
|
120076
120076
|
|
120077
120077
|
/**
|
120078
|
-
* Transfer
|
120079
|
-
* @member {
|
120078
|
+
* Transfer customPayload.
|
120079
|
+
* @member {TW.TheOpenNetwork.Proto.ICustomPayload|null|undefined} customPayload
|
120080
120080
|
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120081
120081
|
* @instance
|
120082
120082
|
*/
|
120083
|
-
Transfer.prototype.
|
120083
|
+
Transfer.prototype.customPayload = null;
|
120084
|
+
|
120085
|
+
// OneOf field names bound to virtual getters and setters
|
120086
|
+
var $oneOfFields;
|
120087
|
+
|
120088
|
+
/**
|
120089
|
+
* Transfer payload.
|
120090
|
+
* @member {"jettonTransfer"|"customPayload"|undefined} payload
|
120091
|
+
* @memberof TW.TheOpenNetwork.Proto.Transfer
|
120092
|
+
* @instance
|
120093
|
+
*/
|
120094
|
+
Object.defineProperty(Transfer.prototype, "payload", {
|
120095
|
+
get: $util.oneOfGetter($oneOfFields = ["jettonTransfer", "customPayload"]),
|
120096
|
+
set: $util.oneOfSetter($oneOfFields)
|
120097
|
+
});
|
120084
120098
|
|
120085
120099
|
/**
|
120086
120100
|
* Creates a new Transfer instance using the specified properties.
|
@@ -120112,16 +120126,16 @@
|
|
120112
120126
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.dest);
|
120113
120127
|
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
120114
120128
|
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.amount);
|
120115
|
-
if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
|
120116
|
-
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.sequenceNumber);
|
120117
120129
|
if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
|
120118
|
-
writer.uint32(/* id
|
120119
|
-
if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt"))
|
120120
|
-
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.expireAt);
|
120130
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.mode);
|
120121
120131
|
if (message.comment != null && Object.hasOwnProperty.call(message, "comment"))
|
120122
|
-
writer.uint32(/* id
|
120132
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.comment);
|
120123
120133
|
if (message.bounceable != null && Object.hasOwnProperty.call(message, "bounceable"))
|
120124
|
-
writer.uint32(/* id
|
120134
|
+
writer.uint32(/* id 6, wireType 0 =*/48).bool(message.bounceable);
|
120135
|
+
if (message.jettonTransfer != null && Object.hasOwnProperty.call(message, "jettonTransfer"))
|
120136
|
+
$root.TW.TheOpenNetwork.Proto.JettonTransfer.encode(message.jettonTransfer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
120137
|
+
if (message.customPayload != null && Object.hasOwnProperty.call(message, "customPayload"))
|
120138
|
+
$root.TW.TheOpenNetwork.Proto.CustomPayload.encode(message.customPayload, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
120125
120139
|
return writer;
|
120126
120140
|
};
|
120127
120141
|
|
@@ -120153,19 +120167,19 @@
|
|
120153
120167
|
message.amount = reader.uint64();
|
120154
120168
|
break;
|
120155
120169
|
case 4:
|
120156
|
-
message.
|
120170
|
+
message.mode = reader.uint32();
|
120157
120171
|
break;
|
120158
120172
|
case 5:
|
120159
|
-
message.
|
120173
|
+
message.comment = reader.string();
|
120160
120174
|
break;
|
120161
120175
|
case 6:
|
120162
|
-
message.
|
120176
|
+
message.bounceable = reader.bool();
|
120163
120177
|
break;
|
120164
120178
|
case 7:
|
120165
|
-
message.
|
120179
|
+
message.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.decode(reader, reader.uint32());
|
120166
120180
|
break;
|
120167
120181
|
case 8:
|
120168
|
-
message.
|
120182
|
+
message.customPayload = $root.TW.TheOpenNetwork.Proto.CustomPayload.decode(reader, reader.uint32());
|
120169
120183
|
break;
|
120170
120184
|
default:
|
120171
120185
|
reader.skipType(tag & 7);
|
@@ -120186,6 +120200,7 @@
|
|
120186
120200
|
Transfer.verify = function verify(message) {
|
120187
120201
|
if (typeof message !== "object" || message === null)
|
120188
120202
|
return "object expected";
|
120203
|
+
var properties = {};
|
120189
120204
|
if (message.walletVersion != null && message.hasOwnProperty("walletVersion"))
|
120190
120205
|
switch (message.walletVersion) {
|
120191
120206
|
default:
|
@@ -120201,21 +120216,33 @@
|
|
120201
120216
|
if (message.amount != null && message.hasOwnProperty("amount"))
|
120202
120217
|
if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
|
120203
120218
|
return "amount: integer|Long expected";
|
120204
|
-
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
120205
|
-
if (!$util.isInteger(message.sequenceNumber))
|
120206
|
-
return "sequenceNumber: integer expected";
|
120207
120219
|
if (message.mode != null && message.hasOwnProperty("mode"))
|
120208
120220
|
if (!$util.isInteger(message.mode))
|
120209
120221
|
return "mode: integer expected";
|
120210
|
-
if (message.expireAt != null && message.hasOwnProperty("expireAt"))
|
120211
|
-
if (!$util.isInteger(message.expireAt))
|
120212
|
-
return "expireAt: integer expected";
|
120213
120222
|
if (message.comment != null && message.hasOwnProperty("comment"))
|
120214
120223
|
if (!$util.isString(message.comment))
|
120215
120224
|
return "comment: string expected";
|
120216
120225
|
if (message.bounceable != null && message.hasOwnProperty("bounceable"))
|
120217
120226
|
if (typeof message.bounceable !== "boolean")
|
120218
120227
|
return "bounceable: boolean expected";
|
120228
|
+
if (message.jettonTransfer != null && message.hasOwnProperty("jettonTransfer")) {
|
120229
|
+
properties.payload = 1;
|
120230
|
+
{
|
120231
|
+
var error = $root.TW.TheOpenNetwork.Proto.JettonTransfer.verify(message.jettonTransfer);
|
120232
|
+
if (error)
|
120233
|
+
return "jettonTransfer." + error;
|
120234
|
+
}
|
120235
|
+
}
|
120236
|
+
if (message.customPayload != null && message.hasOwnProperty("customPayload")) {
|
120237
|
+
if (properties.payload === 1)
|
120238
|
+
return "payload: multiple values";
|
120239
|
+
properties.payload = 1;
|
120240
|
+
{
|
120241
|
+
var error = $root.TW.TheOpenNetwork.Proto.CustomPayload.verify(message.customPayload);
|
120242
|
+
if (error)
|
120243
|
+
return "customPayload." + error;
|
120244
|
+
}
|
120245
|
+
}
|
120219
120246
|
return null;
|
120220
120247
|
};
|
120221
120248
|
|
@@ -120256,16 +120283,22 @@
|
|
120256
120283
|
message.amount = object.amount;
|
120257
120284
|
else if (typeof object.amount === "object")
|
120258
120285
|
message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
|
120259
|
-
if (object.sequenceNumber != null)
|
120260
|
-
message.sequenceNumber = object.sequenceNumber >>> 0;
|
120261
120286
|
if (object.mode != null)
|
120262
120287
|
message.mode = object.mode >>> 0;
|
120263
|
-
if (object.expireAt != null)
|
120264
|
-
message.expireAt = object.expireAt >>> 0;
|
120265
120288
|
if (object.comment != null)
|
120266
120289
|
message.comment = String(object.comment);
|
120267
120290
|
if (object.bounceable != null)
|
120268
120291
|
message.bounceable = Boolean(object.bounceable);
|
120292
|
+
if (object.jettonTransfer != null) {
|
120293
|
+
if (typeof object.jettonTransfer !== "object")
|
120294
|
+
throw TypeError(".TW.TheOpenNetwork.Proto.Transfer.jettonTransfer: object expected");
|
120295
|
+
message.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.fromObject(object.jettonTransfer);
|
120296
|
+
}
|
120297
|
+
if (object.customPayload != null) {
|
120298
|
+
if (typeof object.customPayload !== "object")
|
120299
|
+
throw TypeError(".TW.TheOpenNetwork.Proto.Transfer.customPayload: object expected");
|
120300
|
+
message.customPayload = $root.TW.TheOpenNetwork.Proto.CustomPayload.fromObject(object.customPayload);
|
120301
|
+
}
|
120269
120302
|
return message;
|
120270
120303
|
};
|
120271
120304
|
|
@@ -120290,9 +120323,7 @@
|
|
120290
120323
|
object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
120291
120324
|
} else
|
120292
120325
|
object.amount = options.longs === String ? "0" : 0;
|
120293
|
-
object.sequenceNumber = 0;
|
120294
120326
|
object.mode = 0;
|
120295
|
-
object.expireAt = 0;
|
120296
120327
|
object.comment = "";
|
120297
120328
|
object.bounceable = false;
|
120298
120329
|
}
|
@@ -120305,16 +120336,22 @@
|
|
120305
120336
|
object.amount = options.longs === String ? String(message.amount) : message.amount;
|
120306
120337
|
else
|
120307
120338
|
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;
|
120308
|
-
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
120309
|
-
object.sequenceNumber = message.sequenceNumber;
|
120310
120339
|
if (message.mode != null && message.hasOwnProperty("mode"))
|
120311
120340
|
object.mode = message.mode;
|
120312
|
-
if (message.expireAt != null && message.hasOwnProperty("expireAt"))
|
120313
|
-
object.expireAt = message.expireAt;
|
120314
120341
|
if (message.comment != null && message.hasOwnProperty("comment"))
|
120315
120342
|
object.comment = message.comment;
|
120316
120343
|
if (message.bounceable != null && message.hasOwnProperty("bounceable"))
|
120317
120344
|
object.bounceable = message.bounceable;
|
120345
|
+
if (message.jettonTransfer != null && message.hasOwnProperty("jettonTransfer")) {
|
120346
|
+
object.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.toObject(message.jettonTransfer, options);
|
120347
|
+
if (options.oneofs)
|
120348
|
+
object.payload = "jettonTransfer";
|
120349
|
+
}
|
120350
|
+
if (message.customPayload != null && message.hasOwnProperty("customPayload")) {
|
120351
|
+
object.customPayload = $root.TW.TheOpenNetwork.Proto.CustomPayload.toObject(message.customPayload, options);
|
120352
|
+
if (options.oneofs)
|
120353
|
+
object.payload = "customPayload";
|
120354
|
+
}
|
120318
120355
|
return object;
|
120319
120356
|
};
|
120320
120357
|
|
@@ -120338,7 +120375,6 @@
|
|
120338
120375
|
* Properties of a JettonTransfer.
|
120339
120376
|
* @memberof TW.TheOpenNetwork.Proto
|
120340
120377
|
* @interface IJettonTransfer
|
120341
|
-
* @property {TW.TheOpenNetwork.Proto.ITransfer|null} [transfer] JettonTransfer transfer
|
120342
120378
|
* @property {Long|null} [queryId] JettonTransfer queryId
|
120343
120379
|
* @property {Long|null} [jettonAmount] JettonTransfer jettonAmount
|
120344
120380
|
* @property {string|null} [toOwner] JettonTransfer toOwner
|
@@ -120361,14 +120397,6 @@
|
|
120361
120397
|
this[keys[i]] = properties[keys[i]];
|
120362
120398
|
}
|
120363
120399
|
|
120364
|
-
/**
|
120365
|
-
* JettonTransfer transfer.
|
120366
|
-
* @member {TW.TheOpenNetwork.Proto.ITransfer|null|undefined} transfer
|
120367
|
-
* @memberof TW.TheOpenNetwork.Proto.JettonTransfer
|
120368
|
-
* @instance
|
120369
|
-
*/
|
120370
|
-
JettonTransfer.prototype.transfer = null;
|
120371
|
-
|
120372
120400
|
/**
|
120373
120401
|
* JettonTransfer queryId.
|
120374
120402
|
* @member {Long} queryId
|
@@ -120433,18 +120461,16 @@
|
|
120433
120461
|
JettonTransfer.encode = function encode(message, writer) {
|
120434
120462
|
if (!writer)
|
120435
120463
|
writer = $Writer.create();
|
120436
|
-
if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
|
120437
|
-
$root.TW.TheOpenNetwork.Proto.Transfer.encode(message.transfer, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
120438
120464
|
if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId"))
|
120439
|
-
writer.uint32(/* id
|
120465
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.queryId);
|
120440
120466
|
if (message.jettonAmount != null && Object.hasOwnProperty.call(message, "jettonAmount"))
|
120441
|
-
writer.uint32(/* id
|
120467
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.jettonAmount);
|
120442
120468
|
if (message.toOwner != null && Object.hasOwnProperty.call(message, "toOwner"))
|
120443
|
-
writer.uint32(/* id
|
120469
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.toOwner);
|
120444
120470
|
if (message.responseAddress != null && Object.hasOwnProperty.call(message, "responseAddress"))
|
120445
|
-
writer.uint32(/* id
|
120471
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.responseAddress);
|
120446
120472
|
if (message.forwardAmount != null && Object.hasOwnProperty.call(message, "forwardAmount"))
|
120447
|
-
writer.uint32(/* id
|
120473
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.forwardAmount);
|
120448
120474
|
return writer;
|
120449
120475
|
};
|
120450
120476
|
|
@@ -120467,21 +120493,18 @@
|
|
120467
120493
|
var tag = reader.uint32();
|
120468
120494
|
switch (tag >>> 3) {
|
120469
120495
|
case 1:
|
120470
|
-
message.transfer = $root.TW.TheOpenNetwork.Proto.Transfer.decode(reader, reader.uint32());
|
120471
|
-
break;
|
120472
|
-
case 2:
|
120473
120496
|
message.queryId = reader.uint64();
|
120474
120497
|
break;
|
120475
|
-
case
|
120498
|
+
case 2:
|
120476
120499
|
message.jettonAmount = reader.uint64();
|
120477
120500
|
break;
|
120478
|
-
case
|
120501
|
+
case 3:
|
120479
120502
|
message.toOwner = reader.string();
|
120480
120503
|
break;
|
120481
|
-
case
|
120504
|
+
case 4:
|
120482
120505
|
message.responseAddress = reader.string();
|
120483
120506
|
break;
|
120484
|
-
case
|
120507
|
+
case 5:
|
120485
120508
|
message.forwardAmount = reader.uint64();
|
120486
120509
|
break;
|
120487
120510
|
default:
|
@@ -120503,11 +120526,6 @@
|
|
120503
120526
|
JettonTransfer.verify = function verify(message) {
|
120504
120527
|
if (typeof message !== "object" || message === null)
|
120505
120528
|
return "object expected";
|
120506
|
-
if (message.transfer != null && message.hasOwnProperty("transfer")) {
|
120507
|
-
var error = $root.TW.TheOpenNetwork.Proto.Transfer.verify(message.transfer);
|
120508
|
-
if (error)
|
120509
|
-
return "transfer." + error;
|
120510
|
-
}
|
120511
120529
|
if (message.queryId != null && message.hasOwnProperty("queryId"))
|
120512
120530
|
if (!$util.isInteger(message.queryId) && !(message.queryId && $util.isInteger(message.queryId.low) && $util.isInteger(message.queryId.high)))
|
120513
120531
|
return "queryId: integer|Long expected";
|
@@ -120538,11 +120556,6 @@
|
|
120538
120556
|
if (object instanceof $root.TW.TheOpenNetwork.Proto.JettonTransfer)
|
120539
120557
|
return object;
|
120540
120558
|
var message = new $root.TW.TheOpenNetwork.Proto.JettonTransfer();
|
120541
|
-
if (object.transfer != null) {
|
120542
|
-
if (typeof object.transfer !== "object")
|
120543
|
-
throw TypeError(".TW.TheOpenNetwork.Proto.JettonTransfer.transfer: object expected");
|
120544
|
-
message.transfer = $root.TW.TheOpenNetwork.Proto.Transfer.fromObject(object.transfer);
|
120545
|
-
}
|
120546
120559
|
if (object.queryId != null)
|
120547
120560
|
if ($util.Long)
|
120548
120561
|
(message.queryId = $util.Long.fromValue(object.queryId)).unsigned = true;
|
@@ -120591,7 +120604,6 @@
|
|
120591
120604
|
options = {};
|
120592
120605
|
var object = {};
|
120593
120606
|
if (options.defaults) {
|
120594
|
-
object.transfer = null;
|
120595
120607
|
if ($util.Long) {
|
120596
120608
|
var long = new $util.Long(0, 0, true);
|
120597
120609
|
object.queryId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
@@ -120610,8 +120622,6 @@
|
|
120610
120622
|
} else
|
120611
120623
|
object.forwardAmount = options.longs === String ? "0" : 0;
|
120612
120624
|
}
|
120613
|
-
if (message.transfer != null && message.hasOwnProperty("transfer"))
|
120614
|
-
object.transfer = $root.TW.TheOpenNetwork.Proto.Transfer.toObject(message.transfer, options);
|
120615
120625
|
if (message.queryId != null && message.hasOwnProperty("queryId"))
|
120616
120626
|
if (typeof message.queryId === "number")
|
120617
120627
|
object.queryId = options.longs === String ? String(message.queryId) : message.queryId;
|
@@ -120648,6 +120658,187 @@
|
|
120648
120658
|
return JettonTransfer;
|
120649
120659
|
})();
|
120650
120660
|
|
120661
|
+
Proto.CustomPayload = (function() {
|
120662
|
+
|
120663
|
+
/**
|
120664
|
+
* Properties of a CustomPayload.
|
120665
|
+
* @memberof TW.TheOpenNetwork.Proto
|
120666
|
+
* @interface ICustomPayload
|
120667
|
+
* @property {string|null} [stateInit] CustomPayload stateInit
|
120668
|
+
* @property {string|null} [payload] CustomPayload payload
|
120669
|
+
*/
|
120670
|
+
|
120671
|
+
/**
|
120672
|
+
* Constructs a new CustomPayload.
|
120673
|
+
* @memberof TW.TheOpenNetwork.Proto
|
120674
|
+
* @classdesc Represents a CustomPayload.
|
120675
|
+
* @implements ICustomPayload
|
120676
|
+
* @constructor
|
120677
|
+
* @param {TW.TheOpenNetwork.Proto.ICustomPayload=} [properties] Properties to set
|
120678
|
+
*/
|
120679
|
+
function CustomPayload(properties) {
|
120680
|
+
if (properties)
|
120681
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
120682
|
+
if (properties[keys[i]] != null)
|
120683
|
+
this[keys[i]] = properties[keys[i]];
|
120684
|
+
}
|
120685
|
+
|
120686
|
+
/**
|
120687
|
+
* CustomPayload stateInit.
|
120688
|
+
* @member {string} stateInit
|
120689
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120690
|
+
* @instance
|
120691
|
+
*/
|
120692
|
+
CustomPayload.prototype.stateInit = "";
|
120693
|
+
|
120694
|
+
/**
|
120695
|
+
* CustomPayload payload.
|
120696
|
+
* @member {string} payload
|
120697
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120698
|
+
* @instance
|
120699
|
+
*/
|
120700
|
+
CustomPayload.prototype.payload = "";
|
120701
|
+
|
120702
|
+
/**
|
120703
|
+
* Creates a new CustomPayload instance using the specified properties.
|
120704
|
+
* @function create
|
120705
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120706
|
+
* @static
|
120707
|
+
* @param {TW.TheOpenNetwork.Proto.ICustomPayload=} [properties] Properties to set
|
120708
|
+
* @returns {TW.TheOpenNetwork.Proto.CustomPayload} CustomPayload instance
|
120709
|
+
*/
|
120710
|
+
CustomPayload.create = function create(properties) {
|
120711
|
+
return new CustomPayload(properties);
|
120712
|
+
};
|
120713
|
+
|
120714
|
+
/**
|
120715
|
+
* Encodes the specified CustomPayload message. Does not implicitly {@link TW.TheOpenNetwork.Proto.CustomPayload.verify|verify} messages.
|
120716
|
+
* @function encode
|
120717
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120718
|
+
* @static
|
120719
|
+
* @param {TW.TheOpenNetwork.Proto.ICustomPayload} message CustomPayload message or plain object to encode
|
120720
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
120721
|
+
* @returns {$protobuf.Writer} Writer
|
120722
|
+
*/
|
120723
|
+
CustomPayload.encode = function encode(message, writer) {
|
120724
|
+
if (!writer)
|
120725
|
+
writer = $Writer.create();
|
120726
|
+
if (message.stateInit != null && Object.hasOwnProperty.call(message, "stateInit"))
|
120727
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.stateInit);
|
120728
|
+
if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
|
120729
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.payload);
|
120730
|
+
return writer;
|
120731
|
+
};
|
120732
|
+
|
120733
|
+
/**
|
120734
|
+
* Decodes a CustomPayload message from the specified reader or buffer.
|
120735
|
+
* @function decode
|
120736
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120737
|
+
* @static
|
120738
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
120739
|
+
* @param {number} [length] Message length if known beforehand
|
120740
|
+
* @returns {TW.TheOpenNetwork.Proto.CustomPayload} CustomPayload
|
120741
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
120742
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
120743
|
+
*/
|
120744
|
+
CustomPayload.decode = function decode(reader, length) {
|
120745
|
+
if (!(reader instanceof $Reader))
|
120746
|
+
reader = $Reader.create(reader);
|
120747
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.TheOpenNetwork.Proto.CustomPayload();
|
120748
|
+
while (reader.pos < end) {
|
120749
|
+
var tag = reader.uint32();
|
120750
|
+
switch (tag >>> 3) {
|
120751
|
+
case 1:
|
120752
|
+
message.stateInit = reader.string();
|
120753
|
+
break;
|
120754
|
+
case 2:
|
120755
|
+
message.payload = reader.string();
|
120756
|
+
break;
|
120757
|
+
default:
|
120758
|
+
reader.skipType(tag & 7);
|
120759
|
+
break;
|
120760
|
+
}
|
120761
|
+
}
|
120762
|
+
return message;
|
120763
|
+
};
|
120764
|
+
|
120765
|
+
/**
|
120766
|
+
* Verifies a CustomPayload message.
|
120767
|
+
* @function verify
|
120768
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120769
|
+
* @static
|
120770
|
+
* @param {Object.<string,*>} message Plain object to verify
|
120771
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
120772
|
+
*/
|
120773
|
+
CustomPayload.verify = function verify(message) {
|
120774
|
+
if (typeof message !== "object" || message === null)
|
120775
|
+
return "object expected";
|
120776
|
+
if (message.stateInit != null && message.hasOwnProperty("stateInit"))
|
120777
|
+
if (!$util.isString(message.stateInit))
|
120778
|
+
return "stateInit: string expected";
|
120779
|
+
if (message.payload != null && message.hasOwnProperty("payload"))
|
120780
|
+
if (!$util.isString(message.payload))
|
120781
|
+
return "payload: string expected";
|
120782
|
+
return null;
|
120783
|
+
};
|
120784
|
+
|
120785
|
+
/**
|
120786
|
+
* Creates a CustomPayload message from a plain object. Also converts values to their respective internal types.
|
120787
|
+
* @function fromObject
|
120788
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120789
|
+
* @static
|
120790
|
+
* @param {Object.<string,*>} object Plain object
|
120791
|
+
* @returns {TW.TheOpenNetwork.Proto.CustomPayload} CustomPayload
|
120792
|
+
*/
|
120793
|
+
CustomPayload.fromObject = function fromObject(object) {
|
120794
|
+
if (object instanceof $root.TW.TheOpenNetwork.Proto.CustomPayload)
|
120795
|
+
return object;
|
120796
|
+
var message = new $root.TW.TheOpenNetwork.Proto.CustomPayload();
|
120797
|
+
if (object.stateInit != null)
|
120798
|
+
message.stateInit = String(object.stateInit);
|
120799
|
+
if (object.payload != null)
|
120800
|
+
message.payload = String(object.payload);
|
120801
|
+
return message;
|
120802
|
+
};
|
120803
|
+
|
120804
|
+
/**
|
120805
|
+
* Creates a plain object from a CustomPayload message. Also converts values to other types if specified.
|
120806
|
+
* @function toObject
|
120807
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120808
|
+
* @static
|
120809
|
+
* @param {TW.TheOpenNetwork.Proto.CustomPayload} message CustomPayload
|
120810
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
120811
|
+
* @returns {Object.<string,*>} Plain object
|
120812
|
+
*/
|
120813
|
+
CustomPayload.toObject = function toObject(message, options) {
|
120814
|
+
if (!options)
|
120815
|
+
options = {};
|
120816
|
+
var object = {};
|
120817
|
+
if (options.defaults) {
|
120818
|
+
object.stateInit = "";
|
120819
|
+
object.payload = "";
|
120820
|
+
}
|
120821
|
+
if (message.stateInit != null && message.hasOwnProperty("stateInit"))
|
120822
|
+
object.stateInit = message.stateInit;
|
120823
|
+
if (message.payload != null && message.hasOwnProperty("payload"))
|
120824
|
+
object.payload = message.payload;
|
120825
|
+
return object;
|
120826
|
+
};
|
120827
|
+
|
120828
|
+
/**
|
120829
|
+
* Converts this CustomPayload to JSON.
|
120830
|
+
* @function toJSON
|
120831
|
+
* @memberof TW.TheOpenNetwork.Proto.CustomPayload
|
120832
|
+
* @instance
|
120833
|
+
* @returns {Object.<string,*>} JSON object
|
120834
|
+
*/
|
120835
|
+
CustomPayload.prototype.toJSON = function toJSON() {
|
120836
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
120837
|
+
};
|
120838
|
+
|
120839
|
+
return CustomPayload;
|
120840
|
+
})();
|
120841
|
+
|
120651
120842
|
Proto.SigningInput = (function() {
|
120652
120843
|
|
120653
120844
|
/**
|
@@ -120655,8 +120846,10 @@
|
|
120655
120846
|
* @memberof TW.TheOpenNetwork.Proto
|
120656
120847
|
* @interface ISigningInput
|
120657
120848
|
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
120658
|
-
* @property {
|
120659
|
-
* @property {TW.TheOpenNetwork.Proto.
|
120849
|
+
* @property {Uint8Array|null} [publicKey] SigningInput publicKey
|
120850
|
+
* @property {Array.<TW.TheOpenNetwork.Proto.ITransfer>|null} [messages] SigningInput messages
|
120851
|
+
* @property {number|null} [sequenceNumber] SigningInput sequenceNumber
|
120852
|
+
* @property {number|null} [expireAt] SigningInput expireAt
|
120660
120853
|
*/
|
120661
120854
|
|
120662
120855
|
/**
|
@@ -120668,6 +120861,7 @@
|
|
120668
120861
|
* @param {TW.TheOpenNetwork.Proto.ISigningInput=} [properties] Properties to set
|
120669
120862
|
*/
|
120670
120863
|
function SigningInput(properties) {
|
120864
|
+
this.messages = [];
|
120671
120865
|
if (properties)
|
120672
120866
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
120673
120867
|
if (properties[keys[i]] != null)
|
@@ -120683,34 +120877,36 @@
|
|
120683
120877
|
SigningInput.prototype.privateKey = $util.newBuffer([]);
|
120684
120878
|
|
120685
120879
|
/**
|
120686
|
-
* SigningInput
|
120687
|
-
* @member {
|
120880
|
+
* SigningInput publicKey.
|
120881
|
+
* @member {Uint8Array} publicKey
|
120688
120882
|
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
120689
120883
|
* @instance
|
120690
120884
|
*/
|
120691
|
-
SigningInput.prototype.
|
120885
|
+
SigningInput.prototype.publicKey = $util.newBuffer([]);
|
120692
120886
|
|
120693
120887
|
/**
|
120694
|
-
* SigningInput
|
120695
|
-
* @member {TW.TheOpenNetwork.Proto.
|
120888
|
+
* SigningInput messages.
|
120889
|
+
* @member {Array.<TW.TheOpenNetwork.Proto.ITransfer>} messages
|
120696
120890
|
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
120697
120891
|
* @instance
|
120698
120892
|
*/
|
120699
|
-
SigningInput.prototype.
|
120893
|
+
SigningInput.prototype.messages = $util.emptyArray;
|
120700
120894
|
|
120701
|
-
|
120702
|
-
|
120895
|
+
/**
|
120896
|
+
* SigningInput sequenceNumber.
|
120897
|
+
* @member {number} sequenceNumber
|
120898
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
120899
|
+
* @instance
|
120900
|
+
*/
|
120901
|
+
SigningInput.prototype.sequenceNumber = 0;
|
120703
120902
|
|
120704
120903
|
/**
|
120705
|
-
* SigningInput
|
120706
|
-
* @member {
|
120904
|
+
* SigningInput expireAt.
|
120905
|
+
* @member {number} expireAt
|
120707
120906
|
* @memberof TW.TheOpenNetwork.Proto.SigningInput
|
120708
120907
|
* @instance
|
120709
120908
|
*/
|
120710
|
-
|
120711
|
-
get: $util.oneOfGetter($oneOfFields = ["transfer", "jettonTransfer"]),
|
120712
|
-
set: $util.oneOfSetter($oneOfFields)
|
120713
|
-
});
|
120909
|
+
SigningInput.prototype.expireAt = 0;
|
120714
120910
|
|
120715
120911
|
/**
|
120716
120912
|
* Creates a new SigningInput instance using the specified properties.
|
@@ -120738,10 +120934,15 @@
|
|
120738
120934
|
writer = $Writer.create();
|
120739
120935
|
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
120740
120936
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
|
120741
|
-
if (message.
|
120742
|
-
|
120743
|
-
if (message.
|
120744
|
-
|
120937
|
+
if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
|
120938
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKey);
|
120939
|
+
if (message.messages != null && message.messages.length)
|
120940
|
+
for (var i = 0; i < message.messages.length; ++i)
|
120941
|
+
$root.TW.TheOpenNetwork.Proto.Transfer.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
120942
|
+
if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
|
120943
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.sequenceNumber);
|
120944
|
+
if (message.expireAt != null && Object.hasOwnProperty.call(message, "expireAt"))
|
120945
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.expireAt);
|
120745
120946
|
return writer;
|
120746
120947
|
};
|
120747
120948
|
|
@@ -120767,10 +120968,18 @@
|
|
120767
120968
|
message.privateKey = reader.bytes();
|
120768
120969
|
break;
|
120769
120970
|
case 2:
|
120770
|
-
message.
|
120971
|
+
message.publicKey = reader.bytes();
|
120771
120972
|
break;
|
120772
120973
|
case 3:
|
120773
|
-
message.
|
120974
|
+
if (!(message.messages && message.messages.length))
|
120975
|
+
message.messages = [];
|
120976
|
+
message.messages.push($root.TW.TheOpenNetwork.Proto.Transfer.decode(reader, reader.uint32()));
|
120977
|
+
break;
|
120978
|
+
case 4:
|
120979
|
+
message.sequenceNumber = reader.uint32();
|
120980
|
+
break;
|
120981
|
+
case 5:
|
120982
|
+
message.expireAt = reader.uint32();
|
120774
120983
|
break;
|
120775
120984
|
default:
|
120776
120985
|
reader.skipType(tag & 7);
|
@@ -120791,28 +121000,27 @@
|
|
120791
121000
|
SigningInput.verify = function verify(message) {
|
120792
121001
|
if (typeof message !== "object" || message === null)
|
120793
121002
|
return "object expected";
|
120794
|
-
var properties = {};
|
120795
121003
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
120796
121004
|
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
120797
121005
|
return "privateKey: buffer expected";
|
120798
|
-
if (message.
|
120799
|
-
|
120800
|
-
|
120801
|
-
|
120802
|
-
|
120803
|
-
|
120804
|
-
|
120805
|
-
|
120806
|
-
if (message.jettonTransfer != null && message.hasOwnProperty("jettonTransfer")) {
|
120807
|
-
if (properties.actionOneof === 1)
|
120808
|
-
return "actionOneof: multiple values";
|
120809
|
-
properties.actionOneof = 1;
|
120810
|
-
{
|
120811
|
-
var error = $root.TW.TheOpenNetwork.Proto.JettonTransfer.verify(message.jettonTransfer);
|
121006
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
121007
|
+
if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
|
121008
|
+
return "publicKey: buffer expected";
|
121009
|
+
if (message.messages != null && message.hasOwnProperty("messages")) {
|
121010
|
+
if (!Array.isArray(message.messages))
|
121011
|
+
return "messages: array expected";
|
121012
|
+
for (var i = 0; i < message.messages.length; ++i) {
|
121013
|
+
var error = $root.TW.TheOpenNetwork.Proto.Transfer.verify(message.messages[i]);
|
120812
121014
|
if (error)
|
120813
|
-
return "
|
121015
|
+
return "messages." + error;
|
120814
121016
|
}
|
120815
121017
|
}
|
121018
|
+
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
121019
|
+
if (!$util.isInteger(message.sequenceNumber))
|
121020
|
+
return "sequenceNumber: integer expected";
|
121021
|
+
if (message.expireAt != null && message.hasOwnProperty("expireAt"))
|
121022
|
+
if (!$util.isInteger(message.expireAt))
|
121023
|
+
return "expireAt: integer expected";
|
120816
121024
|
return null;
|
120817
121025
|
};
|
120818
121026
|
|
@@ -120833,16 +121041,25 @@
|
|
120833
121041
|
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
120834
121042
|
else if (object.privateKey.length)
|
120835
121043
|
message.privateKey = object.privateKey;
|
120836
|
-
if (object.
|
120837
|
-
if (typeof object.
|
120838
|
-
|
120839
|
-
|
120840
|
-
|
120841
|
-
if (object.
|
120842
|
-
if (
|
120843
|
-
throw TypeError(".TW.TheOpenNetwork.Proto.SigningInput.
|
120844
|
-
message.
|
121044
|
+
if (object.publicKey != null)
|
121045
|
+
if (typeof object.publicKey === "string")
|
121046
|
+
$util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
|
121047
|
+
else if (object.publicKey.length)
|
121048
|
+
message.publicKey = object.publicKey;
|
121049
|
+
if (object.messages) {
|
121050
|
+
if (!Array.isArray(object.messages))
|
121051
|
+
throw TypeError(".TW.TheOpenNetwork.Proto.SigningInput.messages: array expected");
|
121052
|
+
message.messages = [];
|
121053
|
+
for (var i = 0; i < object.messages.length; ++i) {
|
121054
|
+
if (typeof object.messages[i] !== "object")
|
121055
|
+
throw TypeError(".TW.TheOpenNetwork.Proto.SigningInput.messages: object expected");
|
121056
|
+
message.messages[i] = $root.TW.TheOpenNetwork.Proto.Transfer.fromObject(object.messages[i]);
|
121057
|
+
}
|
120845
121058
|
}
|
121059
|
+
if (object.sequenceNumber != null)
|
121060
|
+
message.sequenceNumber = object.sequenceNumber >>> 0;
|
121061
|
+
if (object.expireAt != null)
|
121062
|
+
message.expireAt = object.expireAt >>> 0;
|
120846
121063
|
return message;
|
120847
121064
|
};
|
120848
121065
|
|
@@ -120859,7 +121076,9 @@
|
|
120859
121076
|
if (!options)
|
120860
121077
|
options = {};
|
120861
121078
|
var object = {};
|
120862
|
-
if (options.defaults)
|
121079
|
+
if (options.arrays || options.defaults)
|
121080
|
+
object.messages = [];
|
121081
|
+
if (options.defaults) {
|
120863
121082
|
if (options.bytes === String)
|
120864
121083
|
object.privateKey = "";
|
120865
121084
|
else {
|
@@ -120867,18 +121086,29 @@
|
|
120867
121086
|
if (options.bytes !== Array)
|
120868
121087
|
object.privateKey = $util.newBuffer(object.privateKey);
|
120869
121088
|
}
|
121089
|
+
if (options.bytes === String)
|
121090
|
+
object.publicKey = "";
|
121091
|
+
else {
|
121092
|
+
object.publicKey = [];
|
121093
|
+
if (options.bytes !== Array)
|
121094
|
+
object.publicKey = $util.newBuffer(object.publicKey);
|
121095
|
+
}
|
121096
|
+
object.sequenceNumber = 0;
|
121097
|
+
object.expireAt = 0;
|
121098
|
+
}
|
120870
121099
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
120871
121100
|
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;
|
120872
|
-
if (message.
|
120873
|
-
object.
|
120874
|
-
|
120875
|
-
|
120876
|
-
|
120877
|
-
|
120878
|
-
object.jettonTransfer = $root.TW.TheOpenNetwork.Proto.JettonTransfer.toObject(message.jettonTransfer, options);
|
120879
|
-
if (options.oneofs)
|
120880
|
-
object.actionOneof = "jettonTransfer";
|
121101
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
121102
|
+
object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
|
121103
|
+
if (message.messages && message.messages.length) {
|
121104
|
+
object.messages = [];
|
121105
|
+
for (var j = 0; j < message.messages.length; ++j)
|
121106
|
+
object.messages[j] = $root.TW.TheOpenNetwork.Proto.Transfer.toObject(message.messages[j], options);
|
120881
121107
|
}
|
121108
|
+
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
121109
|
+
object.sequenceNumber = message.sequenceNumber;
|
121110
|
+
if (message.expireAt != null && message.hasOwnProperty("expireAt"))
|
121111
|
+
object.expireAt = message.expireAt;
|
120882
121112
|
return object;
|
120883
121113
|
};
|
120884
121114
|
|
@@ -120903,6 +121133,7 @@
|
|
120903
121133
|
* @memberof TW.TheOpenNetwork.Proto
|
120904
121134
|
* @interface ISigningOutput
|
120905
121135
|
* @property {string|null} [encoded] SigningOutput encoded
|
121136
|
+
* @property {Uint8Array|null} [hash] SigningOutput hash
|
120906
121137
|
* @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
|
120907
121138
|
* @property {string|null} [errorMessage] SigningOutput errorMessage
|
120908
121139
|
*/
|
@@ -120930,6 +121161,14 @@
|
|
120930
121161
|
*/
|
120931
121162
|
SigningOutput.prototype.encoded = "";
|
120932
121163
|
|
121164
|
+
/**
|
121165
|
+
* SigningOutput hash.
|
121166
|
+
* @member {Uint8Array} hash
|
121167
|
+
* @memberof TW.TheOpenNetwork.Proto.SigningOutput
|
121168
|
+
* @instance
|
121169
|
+
*/
|
121170
|
+
SigningOutput.prototype.hash = $util.newBuffer([]);
|
121171
|
+
|
120933
121172
|
/**
|
120934
121173
|
* SigningOutput error.
|
120935
121174
|
* @member {TW.Common.Proto.SigningError} error
|
@@ -120972,10 +121211,12 @@
|
|
120972
121211
|
writer = $Writer.create();
|
120973
121212
|
if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
|
120974
121213
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoded);
|
121214
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
121215
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
|
120975
121216
|
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
120976
|
-
writer.uint32(/* id
|
121217
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.error);
|
120977
121218
|
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
120978
|
-
writer.uint32(/* id
|
121219
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.errorMessage);
|
120979
121220
|
return writer;
|
120980
121221
|
};
|
120981
121222
|
|
@@ -121001,9 +121242,12 @@
|
|
121001
121242
|
message.encoded = reader.string();
|
121002
121243
|
break;
|
121003
121244
|
case 2:
|
121004
|
-
message.
|
121245
|
+
message.hash = reader.bytes();
|
121005
121246
|
break;
|
121006
121247
|
case 3:
|
121248
|
+
message.error = reader.int32();
|
121249
|
+
break;
|
121250
|
+
case 4:
|
121007
121251
|
message.errorMessage = reader.string();
|
121008
121252
|
break;
|
121009
121253
|
default:
|
@@ -121028,6 +121272,9 @@
|
|
121028
121272
|
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
121029
121273
|
if (!$util.isString(message.encoded))
|
121030
121274
|
return "encoded: string expected";
|
121275
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
121276
|
+
if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
|
121277
|
+
return "hash: buffer expected";
|
121031
121278
|
if (message.error != null && message.hasOwnProperty("error"))
|
121032
121279
|
switch (message.error) {
|
121033
121280
|
default:
|
@@ -121080,6 +121327,11 @@
|
|
121080
121327
|
var message = new $root.TW.TheOpenNetwork.Proto.SigningOutput();
|
121081
121328
|
if (object.encoded != null)
|
121082
121329
|
message.encoded = String(object.encoded);
|
121330
|
+
if (object.hash != null)
|
121331
|
+
if (typeof object.hash === "string")
|
121332
|
+
$util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
|
121333
|
+
else if (object.hash.length)
|
121334
|
+
message.hash = object.hash;
|
121083
121335
|
switch (object.error) {
|
121084
121336
|
case "OK":
|
121085
121337
|
case 0:
|
@@ -121206,11 +121458,20 @@
|
|
121206
121458
|
var object = {};
|
121207
121459
|
if (options.defaults) {
|
121208
121460
|
object.encoded = "";
|
121461
|
+
if (options.bytes === String)
|
121462
|
+
object.hash = "";
|
121463
|
+
else {
|
121464
|
+
object.hash = [];
|
121465
|
+
if (options.bytes !== Array)
|
121466
|
+
object.hash = $util.newBuffer(object.hash);
|
121467
|
+
}
|
121209
121468
|
object.error = options.enums === String ? "OK" : 0;
|
121210
121469
|
object.errorMessage = "";
|
121211
121470
|
}
|
121212
121471
|
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
121213
121472
|
object.encoded = message.encoded;
|
121473
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
121474
|
+
object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
|
121214
121475
|
if (message.error != null && message.hasOwnProperty("error"))
|
121215
121476
|
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
121216
121477
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
package/dist/lib/wallet-core.js
CHANGED
@@ -34,7 +34,7 @@ function Ra(){H++;g.monitorRunDependencies&&g.monitorRunDependencies(H);assert(!
|
|
34
34
|
function Sa(){return K.startsWith("data:application/octet-stream;base64,")}function ma(a){return a.startsWith("file://")}function M(a){return function(){var b=g.asm;assert(Na,"native function `"+a+"` called before runtime initialization");b[a]||assert(b[a],"exported native function `"+a+"` not found");return b[a].apply(null,arguments)}}var K;K="wallet-core.wasm";if(!Sa()){var Ta=K;K=g.locateFile?g.locateFile(Ta,x):x+Ta}
|
35
35
|
function Ua(){var a=K;try{if(a==K&&qa)return new Uint8Array(qa);if(ka)return ka(a);throw"both async and sync fetching of the wasm failed";}catch(b){n(b)}}
|
36
36
|
function Va(){if(!qa&&(ea||fa)){if("function"==typeof fetch&&!ma(K))return fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Ua()});if(ja)return new Promise(function(a,b){ja(K,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Ua()})}
|
37
|
-
var Wa,Xa,Ya={
|
37
|
+
var Wa,Xa,Ya={2062036:()=>{if(void 0===g.ea)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.ea=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.ea=a}catch(e){throw"No secure random number generator found";}}},2062758:()=>g.ea()};function Za(a){for(;0<a.length;)a.shift()(g)}
|
38
38
|
function va(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function pa(a){$a||($a={});$a[a]||($a[a]=1,v&&(a="warning: "+a),y(a))}var $a;function ab(a){this.l=a-24;this.Na=function(b){G[this.l+4>>2]=b};this.Ia=function(b){G[this.l+8>>2]=b};this.Ja=function(){F[this.l>>2]=0};this.Ea=function(){D[this.l+12>>0]=0};this.Ka=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Da();this.Na(b);this.Ia(c);this.Ja();this.Ea();this.Ka()};this.Da=function(){G[this.l+16>>2]=0}}
|
39
39
|
var bb=0,cb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},db=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=cb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},eb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},fb=
|
40
40
|
a=>{if("/"===a)return"/";a=db(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};
|
Binary file
|