@trustwallet/wallet-core 4.4.4 → 4.5.0
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 +569 -79
- package/dist/generated/core_proto.js +1715 -302
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +5 -0
- package/package.json +1 -1
|
@@ -31660,13 +31660,1305 @@
|
|
|
31660
31660
|
*/
|
|
31661
31661
|
var Proto = {};
|
|
31662
31662
|
|
|
31663
|
+
Proto.EncodingHashParams = (function() {
|
|
31664
|
+
|
|
31665
|
+
/**
|
|
31666
|
+
* Properties of an EncodingHashParams.
|
|
31667
|
+
* @memberof TW.Biz.Proto
|
|
31668
|
+
* @interface IEncodingHashParams
|
|
31669
|
+
* @property {Uint8Array|null} [chainId] EncodingHashParams chainId
|
|
31670
|
+
* @property {string|null} [codeAddress] EncodingHashParams codeAddress
|
|
31671
|
+
* @property {string|null} [codeName] EncodingHashParams codeName
|
|
31672
|
+
* @property {string|null} [codeVersion] EncodingHashParams codeVersion
|
|
31673
|
+
* @property {string|null} [typeHash] EncodingHashParams typeHash
|
|
31674
|
+
* @property {string|null} [domainSeparatorHash] EncodingHashParams domainSeparatorHash
|
|
31675
|
+
*/
|
|
31676
|
+
|
|
31677
|
+
/**
|
|
31678
|
+
* Constructs a new EncodingHashParams.
|
|
31679
|
+
* @memberof TW.Biz.Proto
|
|
31680
|
+
* @classdesc Represents an EncodingHashParams.
|
|
31681
|
+
* @implements IEncodingHashParams
|
|
31682
|
+
* @constructor
|
|
31683
|
+
* @param {TW.Biz.Proto.IEncodingHashParams=} [properties] Properties to set
|
|
31684
|
+
*/
|
|
31685
|
+
function EncodingHashParams(properties) {
|
|
31686
|
+
if (properties)
|
|
31687
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
31688
|
+
if (properties[keys[i]] != null)
|
|
31689
|
+
this[keys[i]] = properties[keys[i]];
|
|
31690
|
+
}
|
|
31691
|
+
|
|
31692
|
+
/**
|
|
31693
|
+
* EncodingHashParams chainId.
|
|
31694
|
+
* @member {Uint8Array} chainId
|
|
31695
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31696
|
+
* @instance
|
|
31697
|
+
*/
|
|
31698
|
+
EncodingHashParams.prototype.chainId = $util.newBuffer([]);
|
|
31699
|
+
|
|
31700
|
+
/**
|
|
31701
|
+
* EncodingHashParams codeAddress.
|
|
31702
|
+
* @member {string} codeAddress
|
|
31703
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31704
|
+
* @instance
|
|
31705
|
+
*/
|
|
31706
|
+
EncodingHashParams.prototype.codeAddress = "";
|
|
31707
|
+
|
|
31708
|
+
/**
|
|
31709
|
+
* EncodingHashParams codeName.
|
|
31710
|
+
* @member {string} codeName
|
|
31711
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31712
|
+
* @instance
|
|
31713
|
+
*/
|
|
31714
|
+
EncodingHashParams.prototype.codeName = "";
|
|
31715
|
+
|
|
31716
|
+
/**
|
|
31717
|
+
* EncodingHashParams codeVersion.
|
|
31718
|
+
* @member {string} codeVersion
|
|
31719
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31720
|
+
* @instance
|
|
31721
|
+
*/
|
|
31722
|
+
EncodingHashParams.prototype.codeVersion = "";
|
|
31723
|
+
|
|
31724
|
+
/**
|
|
31725
|
+
* EncodingHashParams typeHash.
|
|
31726
|
+
* @member {string} typeHash
|
|
31727
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31728
|
+
* @instance
|
|
31729
|
+
*/
|
|
31730
|
+
EncodingHashParams.prototype.typeHash = "";
|
|
31731
|
+
|
|
31732
|
+
/**
|
|
31733
|
+
* EncodingHashParams domainSeparatorHash.
|
|
31734
|
+
* @member {string} domainSeparatorHash
|
|
31735
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31736
|
+
* @instance
|
|
31737
|
+
*/
|
|
31738
|
+
EncodingHashParams.prototype.domainSeparatorHash = "";
|
|
31739
|
+
|
|
31740
|
+
/**
|
|
31741
|
+
* Creates a new EncodingHashParams instance using the specified properties.
|
|
31742
|
+
* @function create
|
|
31743
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31744
|
+
* @static
|
|
31745
|
+
* @param {TW.Biz.Proto.IEncodingHashParams=} [properties] Properties to set
|
|
31746
|
+
* @returns {TW.Biz.Proto.EncodingHashParams} EncodingHashParams instance
|
|
31747
|
+
*/
|
|
31748
|
+
EncodingHashParams.create = function create(properties) {
|
|
31749
|
+
return new EncodingHashParams(properties);
|
|
31750
|
+
};
|
|
31751
|
+
|
|
31752
|
+
/**
|
|
31753
|
+
* Encodes the specified EncodingHashParams message. Does not implicitly {@link TW.Biz.Proto.EncodingHashParams.verify|verify} messages.
|
|
31754
|
+
* @function encode
|
|
31755
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31756
|
+
* @static
|
|
31757
|
+
* @param {TW.Biz.Proto.IEncodingHashParams} message EncodingHashParams message or plain object to encode
|
|
31758
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
31759
|
+
* @returns {$protobuf.Writer} Writer
|
|
31760
|
+
*/
|
|
31761
|
+
EncodingHashParams.encode = function encode(message, writer) {
|
|
31762
|
+
if (!writer)
|
|
31763
|
+
writer = $Writer.create();
|
|
31764
|
+
if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
|
|
31765
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chainId);
|
|
31766
|
+
if (message.codeAddress != null && Object.hasOwnProperty.call(message, "codeAddress"))
|
|
31767
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeAddress);
|
|
31768
|
+
if (message.codeName != null && Object.hasOwnProperty.call(message, "codeName"))
|
|
31769
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.codeName);
|
|
31770
|
+
if (message.codeVersion != null && Object.hasOwnProperty.call(message, "codeVersion"))
|
|
31771
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.codeVersion);
|
|
31772
|
+
if (message.typeHash != null && Object.hasOwnProperty.call(message, "typeHash"))
|
|
31773
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.typeHash);
|
|
31774
|
+
if (message.domainSeparatorHash != null && Object.hasOwnProperty.call(message, "domainSeparatorHash"))
|
|
31775
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.domainSeparatorHash);
|
|
31776
|
+
return writer;
|
|
31777
|
+
};
|
|
31778
|
+
|
|
31779
|
+
/**
|
|
31780
|
+
* Decodes an EncodingHashParams message from the specified reader or buffer.
|
|
31781
|
+
* @function decode
|
|
31782
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31783
|
+
* @static
|
|
31784
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
31785
|
+
* @param {number} [length] Message length if known beforehand
|
|
31786
|
+
* @returns {TW.Biz.Proto.EncodingHashParams} EncodingHashParams
|
|
31787
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31788
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31789
|
+
*/
|
|
31790
|
+
EncodingHashParams.decode = function decode(reader, length) {
|
|
31791
|
+
if (!(reader instanceof $Reader))
|
|
31792
|
+
reader = $Reader.create(reader);
|
|
31793
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Biz.Proto.EncodingHashParams();
|
|
31794
|
+
while (reader.pos < end) {
|
|
31795
|
+
var tag = reader.uint32();
|
|
31796
|
+
switch (tag >>> 3) {
|
|
31797
|
+
case 1:
|
|
31798
|
+
message.chainId = reader.bytes();
|
|
31799
|
+
break;
|
|
31800
|
+
case 2:
|
|
31801
|
+
message.codeAddress = reader.string();
|
|
31802
|
+
break;
|
|
31803
|
+
case 3:
|
|
31804
|
+
message.codeName = reader.string();
|
|
31805
|
+
break;
|
|
31806
|
+
case 4:
|
|
31807
|
+
message.codeVersion = reader.string();
|
|
31808
|
+
break;
|
|
31809
|
+
case 5:
|
|
31810
|
+
message.typeHash = reader.string();
|
|
31811
|
+
break;
|
|
31812
|
+
case 6:
|
|
31813
|
+
message.domainSeparatorHash = reader.string();
|
|
31814
|
+
break;
|
|
31815
|
+
default:
|
|
31816
|
+
reader.skipType(tag & 7);
|
|
31817
|
+
break;
|
|
31818
|
+
}
|
|
31819
|
+
}
|
|
31820
|
+
return message;
|
|
31821
|
+
};
|
|
31822
|
+
|
|
31823
|
+
/**
|
|
31824
|
+
* Verifies an EncodingHashParams message.
|
|
31825
|
+
* @function verify
|
|
31826
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31827
|
+
* @static
|
|
31828
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
31829
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
31830
|
+
*/
|
|
31831
|
+
EncodingHashParams.verify = function verify(message) {
|
|
31832
|
+
if (typeof message !== "object" || message === null)
|
|
31833
|
+
return "object expected";
|
|
31834
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
|
31835
|
+
if (!(message.chainId && typeof message.chainId.length === "number" || $util.isString(message.chainId)))
|
|
31836
|
+
return "chainId: buffer expected";
|
|
31837
|
+
if (message.codeAddress != null && message.hasOwnProperty("codeAddress"))
|
|
31838
|
+
if (!$util.isString(message.codeAddress))
|
|
31839
|
+
return "codeAddress: string expected";
|
|
31840
|
+
if (message.codeName != null && message.hasOwnProperty("codeName"))
|
|
31841
|
+
if (!$util.isString(message.codeName))
|
|
31842
|
+
return "codeName: string expected";
|
|
31843
|
+
if (message.codeVersion != null && message.hasOwnProperty("codeVersion"))
|
|
31844
|
+
if (!$util.isString(message.codeVersion))
|
|
31845
|
+
return "codeVersion: string expected";
|
|
31846
|
+
if (message.typeHash != null && message.hasOwnProperty("typeHash"))
|
|
31847
|
+
if (!$util.isString(message.typeHash))
|
|
31848
|
+
return "typeHash: string expected";
|
|
31849
|
+
if (message.domainSeparatorHash != null && message.hasOwnProperty("domainSeparatorHash"))
|
|
31850
|
+
if (!$util.isString(message.domainSeparatorHash))
|
|
31851
|
+
return "domainSeparatorHash: string expected";
|
|
31852
|
+
return null;
|
|
31853
|
+
};
|
|
31854
|
+
|
|
31855
|
+
/**
|
|
31856
|
+
* Creates an EncodingHashParams message from a plain object. Also converts values to their respective internal types.
|
|
31857
|
+
* @function fromObject
|
|
31858
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31859
|
+
* @static
|
|
31860
|
+
* @param {Object.<string,*>} object Plain object
|
|
31861
|
+
* @returns {TW.Biz.Proto.EncodingHashParams} EncodingHashParams
|
|
31862
|
+
*/
|
|
31863
|
+
EncodingHashParams.fromObject = function fromObject(object) {
|
|
31864
|
+
if (object instanceof $root.TW.Biz.Proto.EncodingHashParams)
|
|
31865
|
+
return object;
|
|
31866
|
+
var message = new $root.TW.Biz.Proto.EncodingHashParams();
|
|
31867
|
+
if (object.chainId != null)
|
|
31868
|
+
if (typeof object.chainId === "string")
|
|
31869
|
+
$util.base64.decode(object.chainId, message.chainId = $util.newBuffer($util.base64.length(object.chainId)), 0);
|
|
31870
|
+
else if (object.chainId.length)
|
|
31871
|
+
message.chainId = object.chainId;
|
|
31872
|
+
if (object.codeAddress != null)
|
|
31873
|
+
message.codeAddress = String(object.codeAddress);
|
|
31874
|
+
if (object.codeName != null)
|
|
31875
|
+
message.codeName = String(object.codeName);
|
|
31876
|
+
if (object.codeVersion != null)
|
|
31877
|
+
message.codeVersion = String(object.codeVersion);
|
|
31878
|
+
if (object.typeHash != null)
|
|
31879
|
+
message.typeHash = String(object.typeHash);
|
|
31880
|
+
if (object.domainSeparatorHash != null)
|
|
31881
|
+
message.domainSeparatorHash = String(object.domainSeparatorHash);
|
|
31882
|
+
return message;
|
|
31883
|
+
};
|
|
31884
|
+
|
|
31885
|
+
/**
|
|
31886
|
+
* Creates a plain object from an EncodingHashParams message. Also converts values to other types if specified.
|
|
31887
|
+
* @function toObject
|
|
31888
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31889
|
+
* @static
|
|
31890
|
+
* @param {TW.Biz.Proto.EncodingHashParams} message EncodingHashParams
|
|
31891
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
31892
|
+
* @returns {Object.<string,*>} Plain object
|
|
31893
|
+
*/
|
|
31894
|
+
EncodingHashParams.toObject = function toObject(message, options) {
|
|
31895
|
+
if (!options)
|
|
31896
|
+
options = {};
|
|
31897
|
+
var object = {};
|
|
31898
|
+
if (options.defaults) {
|
|
31899
|
+
if (options.bytes === String)
|
|
31900
|
+
object.chainId = "";
|
|
31901
|
+
else {
|
|
31902
|
+
object.chainId = [];
|
|
31903
|
+
if (options.bytes !== Array)
|
|
31904
|
+
object.chainId = $util.newBuffer(object.chainId);
|
|
31905
|
+
}
|
|
31906
|
+
object.codeAddress = "";
|
|
31907
|
+
object.codeName = "";
|
|
31908
|
+
object.codeVersion = "";
|
|
31909
|
+
object.typeHash = "";
|
|
31910
|
+
object.domainSeparatorHash = "";
|
|
31911
|
+
}
|
|
31912
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
|
31913
|
+
object.chainId = options.bytes === String ? $util.base64.encode(message.chainId, 0, message.chainId.length) : options.bytes === Array ? Array.prototype.slice.call(message.chainId) : message.chainId;
|
|
31914
|
+
if (message.codeAddress != null && message.hasOwnProperty("codeAddress"))
|
|
31915
|
+
object.codeAddress = message.codeAddress;
|
|
31916
|
+
if (message.codeName != null && message.hasOwnProperty("codeName"))
|
|
31917
|
+
object.codeName = message.codeName;
|
|
31918
|
+
if (message.codeVersion != null && message.hasOwnProperty("codeVersion"))
|
|
31919
|
+
object.codeVersion = message.codeVersion;
|
|
31920
|
+
if (message.typeHash != null && message.hasOwnProperty("typeHash"))
|
|
31921
|
+
object.typeHash = message.typeHash;
|
|
31922
|
+
if (message.domainSeparatorHash != null && message.hasOwnProperty("domainSeparatorHash"))
|
|
31923
|
+
object.domainSeparatorHash = message.domainSeparatorHash;
|
|
31924
|
+
return object;
|
|
31925
|
+
};
|
|
31926
|
+
|
|
31927
|
+
/**
|
|
31928
|
+
* Converts this EncodingHashParams to JSON.
|
|
31929
|
+
* @function toJSON
|
|
31930
|
+
* @memberof TW.Biz.Proto.EncodingHashParams
|
|
31931
|
+
* @instance
|
|
31932
|
+
* @returns {Object.<string,*>} JSON object
|
|
31933
|
+
*/
|
|
31934
|
+
EncodingHashParams.prototype.toJSON = function toJSON() {
|
|
31935
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
31936
|
+
};
|
|
31937
|
+
|
|
31938
|
+
return EncodingHashParams;
|
|
31939
|
+
})();
|
|
31940
|
+
|
|
31941
|
+
Proto.Execution = (function() {
|
|
31942
|
+
|
|
31943
|
+
/**
|
|
31944
|
+
* Properties of an Execution.
|
|
31945
|
+
* @memberof TW.Biz.Proto
|
|
31946
|
+
* @interface IExecution
|
|
31947
|
+
* @property {string|null} [address] Execution address
|
|
31948
|
+
* @property {Uint8Array|null} [amount] Execution amount
|
|
31949
|
+
* @property {Uint8Array|null} [payload] Execution payload
|
|
31950
|
+
*/
|
|
31951
|
+
|
|
31952
|
+
/**
|
|
31953
|
+
* Constructs a new Execution.
|
|
31954
|
+
* @memberof TW.Biz.Proto
|
|
31955
|
+
* @classdesc Represents an Execution.
|
|
31956
|
+
* @implements IExecution
|
|
31957
|
+
* @constructor
|
|
31958
|
+
* @param {TW.Biz.Proto.IExecution=} [properties] Properties to set
|
|
31959
|
+
*/
|
|
31960
|
+
function Execution(properties) {
|
|
31961
|
+
if (properties)
|
|
31962
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
31963
|
+
if (properties[keys[i]] != null)
|
|
31964
|
+
this[keys[i]] = properties[keys[i]];
|
|
31965
|
+
}
|
|
31966
|
+
|
|
31967
|
+
/**
|
|
31968
|
+
* Execution address.
|
|
31969
|
+
* @member {string} address
|
|
31970
|
+
* @memberof TW.Biz.Proto.Execution
|
|
31971
|
+
* @instance
|
|
31972
|
+
*/
|
|
31973
|
+
Execution.prototype.address = "";
|
|
31974
|
+
|
|
31975
|
+
/**
|
|
31976
|
+
* Execution amount.
|
|
31977
|
+
* @member {Uint8Array} amount
|
|
31978
|
+
* @memberof TW.Biz.Proto.Execution
|
|
31979
|
+
* @instance
|
|
31980
|
+
*/
|
|
31981
|
+
Execution.prototype.amount = $util.newBuffer([]);
|
|
31982
|
+
|
|
31983
|
+
/**
|
|
31984
|
+
* Execution payload.
|
|
31985
|
+
* @member {Uint8Array} payload
|
|
31986
|
+
* @memberof TW.Biz.Proto.Execution
|
|
31987
|
+
* @instance
|
|
31988
|
+
*/
|
|
31989
|
+
Execution.prototype.payload = $util.newBuffer([]);
|
|
31990
|
+
|
|
31991
|
+
/**
|
|
31992
|
+
* Creates a new Execution instance using the specified properties.
|
|
31993
|
+
* @function create
|
|
31994
|
+
* @memberof TW.Biz.Proto.Execution
|
|
31995
|
+
* @static
|
|
31996
|
+
* @param {TW.Biz.Proto.IExecution=} [properties] Properties to set
|
|
31997
|
+
* @returns {TW.Biz.Proto.Execution} Execution instance
|
|
31998
|
+
*/
|
|
31999
|
+
Execution.create = function create(properties) {
|
|
32000
|
+
return new Execution(properties);
|
|
32001
|
+
};
|
|
32002
|
+
|
|
32003
|
+
/**
|
|
32004
|
+
* Encodes the specified Execution message. Does not implicitly {@link TW.Biz.Proto.Execution.verify|verify} messages.
|
|
32005
|
+
* @function encode
|
|
32006
|
+
* @memberof TW.Biz.Proto.Execution
|
|
32007
|
+
* @static
|
|
32008
|
+
* @param {TW.Biz.Proto.IExecution} message Execution message or plain object to encode
|
|
32009
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32010
|
+
* @returns {$protobuf.Writer} Writer
|
|
32011
|
+
*/
|
|
32012
|
+
Execution.encode = function encode(message, writer) {
|
|
32013
|
+
if (!writer)
|
|
32014
|
+
writer = $Writer.create();
|
|
32015
|
+
if (message.address != null && Object.hasOwnProperty.call(message, "address"))
|
|
32016
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.address);
|
|
32017
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
|
32018
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.amount);
|
|
32019
|
+
if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
|
|
32020
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload);
|
|
32021
|
+
return writer;
|
|
32022
|
+
};
|
|
32023
|
+
|
|
32024
|
+
/**
|
|
32025
|
+
* Decodes an Execution message from the specified reader or buffer.
|
|
32026
|
+
* @function decode
|
|
32027
|
+
* @memberof TW.Biz.Proto.Execution
|
|
32028
|
+
* @static
|
|
32029
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32030
|
+
* @param {number} [length] Message length if known beforehand
|
|
32031
|
+
* @returns {TW.Biz.Proto.Execution} Execution
|
|
32032
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32033
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32034
|
+
*/
|
|
32035
|
+
Execution.decode = function decode(reader, length) {
|
|
32036
|
+
if (!(reader instanceof $Reader))
|
|
32037
|
+
reader = $Reader.create(reader);
|
|
32038
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Biz.Proto.Execution();
|
|
32039
|
+
while (reader.pos < end) {
|
|
32040
|
+
var tag = reader.uint32();
|
|
32041
|
+
switch (tag >>> 3) {
|
|
32042
|
+
case 1:
|
|
32043
|
+
message.address = reader.string();
|
|
32044
|
+
break;
|
|
32045
|
+
case 2:
|
|
32046
|
+
message.amount = reader.bytes();
|
|
32047
|
+
break;
|
|
32048
|
+
case 3:
|
|
32049
|
+
message.payload = reader.bytes();
|
|
32050
|
+
break;
|
|
32051
|
+
default:
|
|
32052
|
+
reader.skipType(tag & 7);
|
|
32053
|
+
break;
|
|
32054
|
+
}
|
|
32055
|
+
}
|
|
32056
|
+
return message;
|
|
32057
|
+
};
|
|
32058
|
+
|
|
32059
|
+
/**
|
|
32060
|
+
* Verifies an Execution message.
|
|
32061
|
+
* @function verify
|
|
32062
|
+
* @memberof TW.Biz.Proto.Execution
|
|
32063
|
+
* @static
|
|
32064
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
32065
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
32066
|
+
*/
|
|
32067
|
+
Execution.verify = function verify(message) {
|
|
32068
|
+
if (typeof message !== "object" || message === null)
|
|
32069
|
+
return "object expected";
|
|
32070
|
+
if (message.address != null && message.hasOwnProperty("address"))
|
|
32071
|
+
if (!$util.isString(message.address))
|
|
32072
|
+
return "address: string expected";
|
|
32073
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
32074
|
+
if (!(message.amount && typeof message.amount.length === "number" || $util.isString(message.amount)))
|
|
32075
|
+
return "amount: buffer expected";
|
|
32076
|
+
if (message.payload != null && message.hasOwnProperty("payload"))
|
|
32077
|
+
if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
|
|
32078
|
+
return "payload: buffer expected";
|
|
32079
|
+
return null;
|
|
32080
|
+
};
|
|
32081
|
+
|
|
32082
|
+
/**
|
|
32083
|
+
* Creates an Execution message from a plain object. Also converts values to their respective internal types.
|
|
32084
|
+
* @function fromObject
|
|
32085
|
+
* @memberof TW.Biz.Proto.Execution
|
|
32086
|
+
* @static
|
|
32087
|
+
* @param {Object.<string,*>} object Plain object
|
|
32088
|
+
* @returns {TW.Biz.Proto.Execution} Execution
|
|
32089
|
+
*/
|
|
32090
|
+
Execution.fromObject = function fromObject(object) {
|
|
32091
|
+
if (object instanceof $root.TW.Biz.Proto.Execution)
|
|
32092
|
+
return object;
|
|
32093
|
+
var message = new $root.TW.Biz.Proto.Execution();
|
|
32094
|
+
if (object.address != null)
|
|
32095
|
+
message.address = String(object.address);
|
|
32096
|
+
if (object.amount != null)
|
|
32097
|
+
if (typeof object.amount === "string")
|
|
32098
|
+
$util.base64.decode(object.amount, message.amount = $util.newBuffer($util.base64.length(object.amount)), 0);
|
|
32099
|
+
else if (object.amount.length)
|
|
32100
|
+
message.amount = object.amount;
|
|
32101
|
+
if (object.payload != null)
|
|
32102
|
+
if (typeof object.payload === "string")
|
|
32103
|
+
$util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
|
|
32104
|
+
else if (object.payload.length)
|
|
32105
|
+
message.payload = object.payload;
|
|
32106
|
+
return message;
|
|
32107
|
+
};
|
|
32108
|
+
|
|
32109
|
+
/**
|
|
32110
|
+
* Creates a plain object from an Execution message. Also converts values to other types if specified.
|
|
32111
|
+
* @function toObject
|
|
32112
|
+
* @memberof TW.Biz.Proto.Execution
|
|
32113
|
+
* @static
|
|
32114
|
+
* @param {TW.Biz.Proto.Execution} message Execution
|
|
32115
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
32116
|
+
* @returns {Object.<string,*>} Plain object
|
|
32117
|
+
*/
|
|
32118
|
+
Execution.toObject = function toObject(message, options) {
|
|
32119
|
+
if (!options)
|
|
32120
|
+
options = {};
|
|
32121
|
+
var object = {};
|
|
32122
|
+
if (options.defaults) {
|
|
32123
|
+
object.address = "";
|
|
32124
|
+
if (options.bytes === String)
|
|
32125
|
+
object.amount = "";
|
|
32126
|
+
else {
|
|
32127
|
+
object.amount = [];
|
|
32128
|
+
if (options.bytes !== Array)
|
|
32129
|
+
object.amount = $util.newBuffer(object.amount);
|
|
32130
|
+
}
|
|
32131
|
+
if (options.bytes === String)
|
|
32132
|
+
object.payload = "";
|
|
32133
|
+
else {
|
|
32134
|
+
object.payload = [];
|
|
32135
|
+
if (options.bytes !== Array)
|
|
32136
|
+
object.payload = $util.newBuffer(object.payload);
|
|
32137
|
+
}
|
|
32138
|
+
}
|
|
32139
|
+
if (message.address != null && message.hasOwnProperty("address"))
|
|
32140
|
+
object.address = message.address;
|
|
32141
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
32142
|
+
object.amount = options.bytes === String ? $util.base64.encode(message.amount, 0, message.amount.length) : options.bytes === Array ? Array.prototype.slice.call(message.amount) : message.amount;
|
|
32143
|
+
if (message.payload != null && message.hasOwnProperty("payload"))
|
|
32144
|
+
object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
|
|
32145
|
+
return object;
|
|
32146
|
+
};
|
|
32147
|
+
|
|
32148
|
+
/**
|
|
32149
|
+
* Converts this Execution to JSON.
|
|
32150
|
+
* @function toJSON
|
|
32151
|
+
* @memberof TW.Biz.Proto.Execution
|
|
32152
|
+
* @instance
|
|
32153
|
+
* @returns {Object.<string,*>} JSON object
|
|
32154
|
+
*/
|
|
32155
|
+
Execution.prototype.toJSON = function toJSON() {
|
|
32156
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
32157
|
+
};
|
|
32158
|
+
|
|
32159
|
+
return Execution;
|
|
32160
|
+
})();
|
|
32161
|
+
|
|
32162
|
+
Proto.ExecuteWithSignatureInput = (function() {
|
|
32163
|
+
|
|
32164
|
+
/**
|
|
32165
|
+
* Properties of an ExecuteWithSignatureInput.
|
|
32166
|
+
* @memberof TW.Biz.Proto
|
|
32167
|
+
* @interface IExecuteWithSignatureInput
|
|
32168
|
+
* @property {Array.<TW.Biz.Proto.IExecution>|null} [executions] ExecuteWithSignatureInput executions
|
|
32169
|
+
* @property {Uint8Array|null} [privateKey] ExecuteWithSignatureInput privateKey
|
|
32170
|
+
* @property {Uint8Array|null} [nonce] ExecuteWithSignatureInput nonce
|
|
32171
|
+
* @property {TW.Biz.Proto.IEncodingHashParams|null} [encodingHashParams] ExecuteWithSignatureInput encodingHashParams
|
|
32172
|
+
*/
|
|
32173
|
+
|
|
32174
|
+
/**
|
|
32175
|
+
* Constructs a new ExecuteWithSignatureInput.
|
|
32176
|
+
* @memberof TW.Biz.Proto
|
|
32177
|
+
* @classdesc Represents an ExecuteWithSignatureInput.
|
|
32178
|
+
* @implements IExecuteWithSignatureInput
|
|
32179
|
+
* @constructor
|
|
32180
|
+
* @param {TW.Biz.Proto.IExecuteWithSignatureInput=} [properties] Properties to set
|
|
32181
|
+
*/
|
|
32182
|
+
function ExecuteWithSignatureInput(properties) {
|
|
32183
|
+
this.executions = [];
|
|
32184
|
+
if (properties)
|
|
32185
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
32186
|
+
if (properties[keys[i]] != null)
|
|
32187
|
+
this[keys[i]] = properties[keys[i]];
|
|
32188
|
+
}
|
|
32189
|
+
|
|
32190
|
+
/**
|
|
32191
|
+
* ExecuteWithSignatureInput executions.
|
|
32192
|
+
* @member {Array.<TW.Biz.Proto.IExecution>} executions
|
|
32193
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32194
|
+
* @instance
|
|
32195
|
+
*/
|
|
32196
|
+
ExecuteWithSignatureInput.prototype.executions = $util.emptyArray;
|
|
32197
|
+
|
|
32198
|
+
/**
|
|
32199
|
+
* ExecuteWithSignatureInput privateKey.
|
|
32200
|
+
* @member {Uint8Array} privateKey
|
|
32201
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32202
|
+
* @instance
|
|
32203
|
+
*/
|
|
32204
|
+
ExecuteWithSignatureInput.prototype.privateKey = $util.newBuffer([]);
|
|
32205
|
+
|
|
32206
|
+
/**
|
|
32207
|
+
* ExecuteWithSignatureInput nonce.
|
|
32208
|
+
* @member {Uint8Array} nonce
|
|
32209
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32210
|
+
* @instance
|
|
32211
|
+
*/
|
|
32212
|
+
ExecuteWithSignatureInput.prototype.nonce = $util.newBuffer([]);
|
|
32213
|
+
|
|
32214
|
+
/**
|
|
32215
|
+
* ExecuteWithSignatureInput encodingHashParams.
|
|
32216
|
+
* @member {TW.Biz.Proto.IEncodingHashParams|null|undefined} encodingHashParams
|
|
32217
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32218
|
+
* @instance
|
|
32219
|
+
*/
|
|
32220
|
+
ExecuteWithSignatureInput.prototype.encodingHashParams = null;
|
|
32221
|
+
|
|
32222
|
+
/**
|
|
32223
|
+
* Creates a new ExecuteWithSignatureInput instance using the specified properties.
|
|
32224
|
+
* @function create
|
|
32225
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32226
|
+
* @static
|
|
32227
|
+
* @param {TW.Biz.Proto.IExecuteWithSignatureInput=} [properties] Properties to set
|
|
32228
|
+
* @returns {TW.Biz.Proto.ExecuteWithSignatureInput} ExecuteWithSignatureInput instance
|
|
32229
|
+
*/
|
|
32230
|
+
ExecuteWithSignatureInput.create = function create(properties) {
|
|
32231
|
+
return new ExecuteWithSignatureInput(properties);
|
|
32232
|
+
};
|
|
32233
|
+
|
|
32234
|
+
/**
|
|
32235
|
+
* Encodes the specified ExecuteWithSignatureInput message. Does not implicitly {@link TW.Biz.Proto.ExecuteWithSignatureInput.verify|verify} messages.
|
|
32236
|
+
* @function encode
|
|
32237
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32238
|
+
* @static
|
|
32239
|
+
* @param {TW.Biz.Proto.IExecuteWithSignatureInput} message ExecuteWithSignatureInput message or plain object to encode
|
|
32240
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32241
|
+
* @returns {$protobuf.Writer} Writer
|
|
32242
|
+
*/
|
|
32243
|
+
ExecuteWithSignatureInput.encode = function encode(message, writer) {
|
|
32244
|
+
if (!writer)
|
|
32245
|
+
writer = $Writer.create();
|
|
32246
|
+
if (message.executions != null && message.executions.length)
|
|
32247
|
+
for (var i = 0; i < message.executions.length; ++i)
|
|
32248
|
+
$root.TW.Biz.Proto.Execution.encode(message.executions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
32249
|
+
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
|
32250
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.privateKey);
|
|
32251
|
+
if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
|
|
32252
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.nonce);
|
|
32253
|
+
if (message.encodingHashParams != null && Object.hasOwnProperty.call(message, "encodingHashParams"))
|
|
32254
|
+
$root.TW.Biz.Proto.EncodingHashParams.encode(message.encodingHashParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
32255
|
+
return writer;
|
|
32256
|
+
};
|
|
32257
|
+
|
|
32258
|
+
/**
|
|
32259
|
+
* Decodes an ExecuteWithSignatureInput message from the specified reader or buffer.
|
|
32260
|
+
* @function decode
|
|
32261
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32262
|
+
* @static
|
|
32263
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32264
|
+
* @param {number} [length] Message length if known beforehand
|
|
32265
|
+
* @returns {TW.Biz.Proto.ExecuteWithSignatureInput} ExecuteWithSignatureInput
|
|
32266
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32267
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32268
|
+
*/
|
|
32269
|
+
ExecuteWithSignatureInput.decode = function decode(reader, length) {
|
|
32270
|
+
if (!(reader instanceof $Reader))
|
|
32271
|
+
reader = $Reader.create(reader);
|
|
32272
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Biz.Proto.ExecuteWithSignatureInput();
|
|
32273
|
+
while (reader.pos < end) {
|
|
32274
|
+
var tag = reader.uint32();
|
|
32275
|
+
switch (tag >>> 3) {
|
|
32276
|
+
case 1:
|
|
32277
|
+
if (!(message.executions && message.executions.length))
|
|
32278
|
+
message.executions = [];
|
|
32279
|
+
message.executions.push($root.TW.Biz.Proto.Execution.decode(reader, reader.uint32()));
|
|
32280
|
+
break;
|
|
32281
|
+
case 2:
|
|
32282
|
+
message.privateKey = reader.bytes();
|
|
32283
|
+
break;
|
|
32284
|
+
case 3:
|
|
32285
|
+
message.nonce = reader.bytes();
|
|
32286
|
+
break;
|
|
32287
|
+
case 4:
|
|
32288
|
+
message.encodingHashParams = $root.TW.Biz.Proto.EncodingHashParams.decode(reader, reader.uint32());
|
|
32289
|
+
break;
|
|
32290
|
+
default:
|
|
32291
|
+
reader.skipType(tag & 7);
|
|
32292
|
+
break;
|
|
32293
|
+
}
|
|
32294
|
+
}
|
|
32295
|
+
return message;
|
|
32296
|
+
};
|
|
32297
|
+
|
|
32298
|
+
/**
|
|
32299
|
+
* Verifies an ExecuteWithSignatureInput message.
|
|
32300
|
+
* @function verify
|
|
32301
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32302
|
+
* @static
|
|
32303
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
32304
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
32305
|
+
*/
|
|
32306
|
+
ExecuteWithSignatureInput.verify = function verify(message) {
|
|
32307
|
+
if (typeof message !== "object" || message === null)
|
|
32308
|
+
return "object expected";
|
|
32309
|
+
if (message.executions != null && message.hasOwnProperty("executions")) {
|
|
32310
|
+
if (!Array.isArray(message.executions))
|
|
32311
|
+
return "executions: array expected";
|
|
32312
|
+
for (var i = 0; i < message.executions.length; ++i) {
|
|
32313
|
+
var error = $root.TW.Biz.Proto.Execution.verify(message.executions[i]);
|
|
32314
|
+
if (error)
|
|
32315
|
+
return "executions." + error;
|
|
32316
|
+
}
|
|
32317
|
+
}
|
|
32318
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
|
32319
|
+
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
|
32320
|
+
return "privateKey: buffer expected";
|
|
32321
|
+
if (message.nonce != null && message.hasOwnProperty("nonce"))
|
|
32322
|
+
if (!(message.nonce && typeof message.nonce.length === "number" || $util.isString(message.nonce)))
|
|
32323
|
+
return "nonce: buffer expected";
|
|
32324
|
+
if (message.encodingHashParams != null && message.hasOwnProperty("encodingHashParams")) {
|
|
32325
|
+
var error = $root.TW.Biz.Proto.EncodingHashParams.verify(message.encodingHashParams);
|
|
32326
|
+
if (error)
|
|
32327
|
+
return "encodingHashParams." + error;
|
|
32328
|
+
}
|
|
32329
|
+
return null;
|
|
32330
|
+
};
|
|
32331
|
+
|
|
32332
|
+
/**
|
|
32333
|
+
* Creates an ExecuteWithSignatureInput message from a plain object. Also converts values to their respective internal types.
|
|
32334
|
+
* @function fromObject
|
|
32335
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32336
|
+
* @static
|
|
32337
|
+
* @param {Object.<string,*>} object Plain object
|
|
32338
|
+
* @returns {TW.Biz.Proto.ExecuteWithSignatureInput} ExecuteWithSignatureInput
|
|
32339
|
+
*/
|
|
32340
|
+
ExecuteWithSignatureInput.fromObject = function fromObject(object) {
|
|
32341
|
+
if (object instanceof $root.TW.Biz.Proto.ExecuteWithSignatureInput)
|
|
32342
|
+
return object;
|
|
32343
|
+
var message = new $root.TW.Biz.Proto.ExecuteWithSignatureInput();
|
|
32344
|
+
if (object.executions) {
|
|
32345
|
+
if (!Array.isArray(object.executions))
|
|
32346
|
+
throw TypeError(".TW.Biz.Proto.ExecuteWithSignatureInput.executions: array expected");
|
|
32347
|
+
message.executions = [];
|
|
32348
|
+
for (var i = 0; i < object.executions.length; ++i) {
|
|
32349
|
+
if (typeof object.executions[i] !== "object")
|
|
32350
|
+
throw TypeError(".TW.Biz.Proto.ExecuteWithSignatureInput.executions: object expected");
|
|
32351
|
+
message.executions[i] = $root.TW.Biz.Proto.Execution.fromObject(object.executions[i]);
|
|
32352
|
+
}
|
|
32353
|
+
}
|
|
32354
|
+
if (object.privateKey != null)
|
|
32355
|
+
if (typeof object.privateKey === "string")
|
|
32356
|
+
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
|
32357
|
+
else if (object.privateKey.length)
|
|
32358
|
+
message.privateKey = object.privateKey;
|
|
32359
|
+
if (object.nonce != null)
|
|
32360
|
+
if (typeof object.nonce === "string")
|
|
32361
|
+
$util.base64.decode(object.nonce, message.nonce = $util.newBuffer($util.base64.length(object.nonce)), 0);
|
|
32362
|
+
else if (object.nonce.length)
|
|
32363
|
+
message.nonce = object.nonce;
|
|
32364
|
+
if (object.encodingHashParams != null) {
|
|
32365
|
+
if (typeof object.encodingHashParams !== "object")
|
|
32366
|
+
throw TypeError(".TW.Biz.Proto.ExecuteWithSignatureInput.encodingHashParams: object expected");
|
|
32367
|
+
message.encodingHashParams = $root.TW.Biz.Proto.EncodingHashParams.fromObject(object.encodingHashParams);
|
|
32368
|
+
}
|
|
32369
|
+
return message;
|
|
32370
|
+
};
|
|
32371
|
+
|
|
32372
|
+
/**
|
|
32373
|
+
* Creates a plain object from an ExecuteWithSignatureInput message. Also converts values to other types if specified.
|
|
32374
|
+
* @function toObject
|
|
32375
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32376
|
+
* @static
|
|
32377
|
+
* @param {TW.Biz.Proto.ExecuteWithSignatureInput} message ExecuteWithSignatureInput
|
|
32378
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
32379
|
+
* @returns {Object.<string,*>} Plain object
|
|
32380
|
+
*/
|
|
32381
|
+
ExecuteWithSignatureInput.toObject = function toObject(message, options) {
|
|
32382
|
+
if (!options)
|
|
32383
|
+
options = {};
|
|
32384
|
+
var object = {};
|
|
32385
|
+
if (options.arrays || options.defaults)
|
|
32386
|
+
object.executions = [];
|
|
32387
|
+
if (options.defaults) {
|
|
32388
|
+
if (options.bytes === String)
|
|
32389
|
+
object.privateKey = "";
|
|
32390
|
+
else {
|
|
32391
|
+
object.privateKey = [];
|
|
32392
|
+
if (options.bytes !== Array)
|
|
32393
|
+
object.privateKey = $util.newBuffer(object.privateKey);
|
|
32394
|
+
}
|
|
32395
|
+
if (options.bytes === String)
|
|
32396
|
+
object.nonce = "";
|
|
32397
|
+
else {
|
|
32398
|
+
object.nonce = [];
|
|
32399
|
+
if (options.bytes !== Array)
|
|
32400
|
+
object.nonce = $util.newBuffer(object.nonce);
|
|
32401
|
+
}
|
|
32402
|
+
object.encodingHashParams = null;
|
|
32403
|
+
}
|
|
32404
|
+
if (message.executions && message.executions.length) {
|
|
32405
|
+
object.executions = [];
|
|
32406
|
+
for (var j = 0; j < message.executions.length; ++j)
|
|
32407
|
+
object.executions[j] = $root.TW.Biz.Proto.Execution.toObject(message.executions[j], options);
|
|
32408
|
+
}
|
|
32409
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
|
32410
|
+
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;
|
|
32411
|
+
if (message.nonce != null && message.hasOwnProperty("nonce"))
|
|
32412
|
+
object.nonce = options.bytes === String ? $util.base64.encode(message.nonce, 0, message.nonce.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonce) : message.nonce;
|
|
32413
|
+
if (message.encodingHashParams != null && message.hasOwnProperty("encodingHashParams"))
|
|
32414
|
+
object.encodingHashParams = $root.TW.Biz.Proto.EncodingHashParams.toObject(message.encodingHashParams, options);
|
|
32415
|
+
return object;
|
|
32416
|
+
};
|
|
32417
|
+
|
|
32418
|
+
/**
|
|
32419
|
+
* Converts this ExecuteWithSignatureInput to JSON.
|
|
32420
|
+
* @function toJSON
|
|
32421
|
+
* @memberof TW.Biz.Proto.ExecuteWithSignatureInput
|
|
32422
|
+
* @instance
|
|
32423
|
+
* @returns {Object.<string,*>} JSON object
|
|
32424
|
+
*/
|
|
32425
|
+
ExecuteWithSignatureInput.prototype.toJSON = function toJSON() {
|
|
32426
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
32427
|
+
};
|
|
32428
|
+
|
|
32429
|
+
return ExecuteWithSignatureInput;
|
|
32430
|
+
})();
|
|
32431
|
+
|
|
32432
|
+
return Proto;
|
|
32433
|
+
})();
|
|
32434
|
+
|
|
32435
|
+
return Biz;
|
|
32436
|
+
})();
|
|
32437
|
+
|
|
32438
|
+
TW.BizPasskeySession = (function() {
|
|
32439
|
+
|
|
32440
|
+
/**
|
|
32441
|
+
* Namespace BizPasskeySession.
|
|
32442
|
+
* @memberof TW
|
|
32443
|
+
* @namespace
|
|
32444
|
+
*/
|
|
32445
|
+
var BizPasskeySession = {};
|
|
32446
|
+
|
|
32447
|
+
BizPasskeySession.Proto = (function() {
|
|
32448
|
+
|
|
32449
|
+
/**
|
|
32450
|
+
* Namespace Proto.
|
|
32451
|
+
* @memberof TW.BizPasskeySession
|
|
32452
|
+
* @namespace
|
|
32453
|
+
*/
|
|
32454
|
+
var Proto = {};
|
|
32455
|
+
|
|
32456
|
+
Proto.EncodingHashParams = (function() {
|
|
32457
|
+
|
|
32458
|
+
/**
|
|
32459
|
+
* Properties of an EncodingHashParams.
|
|
32460
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
32461
|
+
* @interface IEncodingHashParams
|
|
32462
|
+
* @property {Uint8Array|null} [chainId] EncodingHashParams chainId
|
|
32463
|
+
* @property {string|null} [codeAddress] EncodingHashParams codeAddress
|
|
32464
|
+
* @property {string|null} [codeName] EncodingHashParams codeName
|
|
32465
|
+
* @property {string|null} [codeVersion] EncodingHashParams codeVersion
|
|
32466
|
+
* @property {string|null} [typeHash] EncodingHashParams typeHash
|
|
32467
|
+
* @property {string|null} [domainSeparatorHash] EncodingHashParams domainSeparatorHash
|
|
32468
|
+
*/
|
|
32469
|
+
|
|
32470
|
+
/**
|
|
32471
|
+
* Constructs a new EncodingHashParams.
|
|
32472
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
32473
|
+
* @classdesc Represents an EncodingHashParams.
|
|
32474
|
+
* @implements IEncodingHashParams
|
|
32475
|
+
* @constructor
|
|
32476
|
+
* @param {TW.BizPasskeySession.Proto.IEncodingHashParams=} [properties] Properties to set
|
|
32477
|
+
*/
|
|
32478
|
+
function EncodingHashParams(properties) {
|
|
32479
|
+
if (properties)
|
|
32480
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
32481
|
+
if (properties[keys[i]] != null)
|
|
32482
|
+
this[keys[i]] = properties[keys[i]];
|
|
32483
|
+
}
|
|
32484
|
+
|
|
32485
|
+
/**
|
|
32486
|
+
* EncodingHashParams chainId.
|
|
32487
|
+
* @member {Uint8Array} chainId
|
|
32488
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32489
|
+
* @instance
|
|
32490
|
+
*/
|
|
32491
|
+
EncodingHashParams.prototype.chainId = $util.newBuffer([]);
|
|
32492
|
+
|
|
32493
|
+
/**
|
|
32494
|
+
* EncodingHashParams codeAddress.
|
|
32495
|
+
* @member {string} codeAddress
|
|
32496
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32497
|
+
* @instance
|
|
32498
|
+
*/
|
|
32499
|
+
EncodingHashParams.prototype.codeAddress = "";
|
|
32500
|
+
|
|
32501
|
+
/**
|
|
32502
|
+
* EncodingHashParams codeName.
|
|
32503
|
+
* @member {string} codeName
|
|
32504
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32505
|
+
* @instance
|
|
32506
|
+
*/
|
|
32507
|
+
EncodingHashParams.prototype.codeName = "";
|
|
32508
|
+
|
|
32509
|
+
/**
|
|
32510
|
+
* EncodingHashParams codeVersion.
|
|
32511
|
+
* @member {string} codeVersion
|
|
32512
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32513
|
+
* @instance
|
|
32514
|
+
*/
|
|
32515
|
+
EncodingHashParams.prototype.codeVersion = "";
|
|
32516
|
+
|
|
32517
|
+
/**
|
|
32518
|
+
* EncodingHashParams typeHash.
|
|
32519
|
+
* @member {string} typeHash
|
|
32520
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32521
|
+
* @instance
|
|
32522
|
+
*/
|
|
32523
|
+
EncodingHashParams.prototype.typeHash = "";
|
|
32524
|
+
|
|
32525
|
+
/**
|
|
32526
|
+
* EncodingHashParams domainSeparatorHash.
|
|
32527
|
+
* @member {string} domainSeparatorHash
|
|
32528
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32529
|
+
* @instance
|
|
32530
|
+
*/
|
|
32531
|
+
EncodingHashParams.prototype.domainSeparatorHash = "";
|
|
32532
|
+
|
|
32533
|
+
/**
|
|
32534
|
+
* Creates a new EncodingHashParams instance using the specified properties.
|
|
32535
|
+
* @function create
|
|
32536
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32537
|
+
* @static
|
|
32538
|
+
* @param {TW.BizPasskeySession.Proto.IEncodingHashParams=} [properties] Properties to set
|
|
32539
|
+
* @returns {TW.BizPasskeySession.Proto.EncodingHashParams} EncodingHashParams instance
|
|
32540
|
+
*/
|
|
32541
|
+
EncodingHashParams.create = function create(properties) {
|
|
32542
|
+
return new EncodingHashParams(properties);
|
|
32543
|
+
};
|
|
32544
|
+
|
|
32545
|
+
/**
|
|
32546
|
+
* Encodes the specified EncodingHashParams message. Does not implicitly {@link TW.BizPasskeySession.Proto.EncodingHashParams.verify|verify} messages.
|
|
32547
|
+
* @function encode
|
|
32548
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32549
|
+
* @static
|
|
32550
|
+
* @param {TW.BizPasskeySession.Proto.IEncodingHashParams} message EncodingHashParams message or plain object to encode
|
|
32551
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32552
|
+
* @returns {$protobuf.Writer} Writer
|
|
32553
|
+
*/
|
|
32554
|
+
EncodingHashParams.encode = function encode(message, writer) {
|
|
32555
|
+
if (!writer)
|
|
32556
|
+
writer = $Writer.create();
|
|
32557
|
+
if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
|
|
32558
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chainId);
|
|
32559
|
+
if (message.codeAddress != null && Object.hasOwnProperty.call(message, "codeAddress"))
|
|
32560
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeAddress);
|
|
32561
|
+
if (message.codeName != null && Object.hasOwnProperty.call(message, "codeName"))
|
|
32562
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.codeName);
|
|
32563
|
+
if (message.codeVersion != null && Object.hasOwnProperty.call(message, "codeVersion"))
|
|
32564
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.codeVersion);
|
|
32565
|
+
if (message.typeHash != null && Object.hasOwnProperty.call(message, "typeHash"))
|
|
32566
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.typeHash);
|
|
32567
|
+
if (message.domainSeparatorHash != null && Object.hasOwnProperty.call(message, "domainSeparatorHash"))
|
|
32568
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.domainSeparatorHash);
|
|
32569
|
+
return writer;
|
|
32570
|
+
};
|
|
32571
|
+
|
|
32572
|
+
/**
|
|
32573
|
+
* Decodes an EncodingHashParams message from the specified reader or buffer.
|
|
32574
|
+
* @function decode
|
|
32575
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32576
|
+
* @static
|
|
32577
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32578
|
+
* @param {number} [length] Message length if known beforehand
|
|
32579
|
+
* @returns {TW.BizPasskeySession.Proto.EncodingHashParams} EncodingHashParams
|
|
32580
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32581
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32582
|
+
*/
|
|
32583
|
+
EncodingHashParams.decode = function decode(reader, length) {
|
|
32584
|
+
if (!(reader instanceof $Reader))
|
|
32585
|
+
reader = $Reader.create(reader);
|
|
32586
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BizPasskeySession.Proto.EncodingHashParams();
|
|
32587
|
+
while (reader.pos < end) {
|
|
32588
|
+
var tag = reader.uint32();
|
|
32589
|
+
switch (tag >>> 3) {
|
|
32590
|
+
case 1:
|
|
32591
|
+
message.chainId = reader.bytes();
|
|
32592
|
+
break;
|
|
32593
|
+
case 2:
|
|
32594
|
+
message.codeAddress = reader.string();
|
|
32595
|
+
break;
|
|
32596
|
+
case 3:
|
|
32597
|
+
message.codeName = reader.string();
|
|
32598
|
+
break;
|
|
32599
|
+
case 4:
|
|
32600
|
+
message.codeVersion = reader.string();
|
|
32601
|
+
break;
|
|
32602
|
+
case 5:
|
|
32603
|
+
message.typeHash = reader.string();
|
|
32604
|
+
break;
|
|
32605
|
+
case 6:
|
|
32606
|
+
message.domainSeparatorHash = reader.string();
|
|
32607
|
+
break;
|
|
32608
|
+
default:
|
|
32609
|
+
reader.skipType(tag & 7);
|
|
32610
|
+
break;
|
|
32611
|
+
}
|
|
32612
|
+
}
|
|
32613
|
+
return message;
|
|
32614
|
+
};
|
|
32615
|
+
|
|
32616
|
+
/**
|
|
32617
|
+
* Verifies an EncodingHashParams message.
|
|
32618
|
+
* @function verify
|
|
32619
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32620
|
+
* @static
|
|
32621
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
32622
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
32623
|
+
*/
|
|
32624
|
+
EncodingHashParams.verify = function verify(message) {
|
|
32625
|
+
if (typeof message !== "object" || message === null)
|
|
32626
|
+
return "object expected";
|
|
32627
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
|
32628
|
+
if (!(message.chainId && typeof message.chainId.length === "number" || $util.isString(message.chainId)))
|
|
32629
|
+
return "chainId: buffer expected";
|
|
32630
|
+
if (message.codeAddress != null && message.hasOwnProperty("codeAddress"))
|
|
32631
|
+
if (!$util.isString(message.codeAddress))
|
|
32632
|
+
return "codeAddress: string expected";
|
|
32633
|
+
if (message.codeName != null && message.hasOwnProperty("codeName"))
|
|
32634
|
+
if (!$util.isString(message.codeName))
|
|
32635
|
+
return "codeName: string expected";
|
|
32636
|
+
if (message.codeVersion != null && message.hasOwnProperty("codeVersion"))
|
|
32637
|
+
if (!$util.isString(message.codeVersion))
|
|
32638
|
+
return "codeVersion: string expected";
|
|
32639
|
+
if (message.typeHash != null && message.hasOwnProperty("typeHash"))
|
|
32640
|
+
if (!$util.isString(message.typeHash))
|
|
32641
|
+
return "typeHash: string expected";
|
|
32642
|
+
if (message.domainSeparatorHash != null && message.hasOwnProperty("domainSeparatorHash"))
|
|
32643
|
+
if (!$util.isString(message.domainSeparatorHash))
|
|
32644
|
+
return "domainSeparatorHash: string expected";
|
|
32645
|
+
return null;
|
|
32646
|
+
};
|
|
32647
|
+
|
|
32648
|
+
/**
|
|
32649
|
+
* Creates an EncodingHashParams message from a plain object. Also converts values to their respective internal types.
|
|
32650
|
+
* @function fromObject
|
|
32651
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32652
|
+
* @static
|
|
32653
|
+
* @param {Object.<string,*>} object Plain object
|
|
32654
|
+
* @returns {TW.BizPasskeySession.Proto.EncodingHashParams} EncodingHashParams
|
|
32655
|
+
*/
|
|
32656
|
+
EncodingHashParams.fromObject = function fromObject(object) {
|
|
32657
|
+
if (object instanceof $root.TW.BizPasskeySession.Proto.EncodingHashParams)
|
|
32658
|
+
return object;
|
|
32659
|
+
var message = new $root.TW.BizPasskeySession.Proto.EncodingHashParams();
|
|
32660
|
+
if (object.chainId != null)
|
|
32661
|
+
if (typeof object.chainId === "string")
|
|
32662
|
+
$util.base64.decode(object.chainId, message.chainId = $util.newBuffer($util.base64.length(object.chainId)), 0);
|
|
32663
|
+
else if (object.chainId.length)
|
|
32664
|
+
message.chainId = object.chainId;
|
|
32665
|
+
if (object.codeAddress != null)
|
|
32666
|
+
message.codeAddress = String(object.codeAddress);
|
|
32667
|
+
if (object.codeName != null)
|
|
32668
|
+
message.codeName = String(object.codeName);
|
|
32669
|
+
if (object.codeVersion != null)
|
|
32670
|
+
message.codeVersion = String(object.codeVersion);
|
|
32671
|
+
if (object.typeHash != null)
|
|
32672
|
+
message.typeHash = String(object.typeHash);
|
|
32673
|
+
if (object.domainSeparatorHash != null)
|
|
32674
|
+
message.domainSeparatorHash = String(object.domainSeparatorHash);
|
|
32675
|
+
return message;
|
|
32676
|
+
};
|
|
32677
|
+
|
|
32678
|
+
/**
|
|
32679
|
+
* Creates a plain object from an EncodingHashParams message. Also converts values to other types if specified.
|
|
32680
|
+
* @function toObject
|
|
32681
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32682
|
+
* @static
|
|
32683
|
+
* @param {TW.BizPasskeySession.Proto.EncodingHashParams} message EncodingHashParams
|
|
32684
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
32685
|
+
* @returns {Object.<string,*>} Plain object
|
|
32686
|
+
*/
|
|
32687
|
+
EncodingHashParams.toObject = function toObject(message, options) {
|
|
32688
|
+
if (!options)
|
|
32689
|
+
options = {};
|
|
32690
|
+
var object = {};
|
|
32691
|
+
if (options.defaults) {
|
|
32692
|
+
if (options.bytes === String)
|
|
32693
|
+
object.chainId = "";
|
|
32694
|
+
else {
|
|
32695
|
+
object.chainId = [];
|
|
32696
|
+
if (options.bytes !== Array)
|
|
32697
|
+
object.chainId = $util.newBuffer(object.chainId);
|
|
32698
|
+
}
|
|
32699
|
+
object.codeAddress = "";
|
|
32700
|
+
object.codeName = "";
|
|
32701
|
+
object.codeVersion = "";
|
|
32702
|
+
object.typeHash = "";
|
|
32703
|
+
object.domainSeparatorHash = "";
|
|
32704
|
+
}
|
|
32705
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
|
32706
|
+
object.chainId = options.bytes === String ? $util.base64.encode(message.chainId, 0, message.chainId.length) : options.bytes === Array ? Array.prototype.slice.call(message.chainId) : message.chainId;
|
|
32707
|
+
if (message.codeAddress != null && message.hasOwnProperty("codeAddress"))
|
|
32708
|
+
object.codeAddress = message.codeAddress;
|
|
32709
|
+
if (message.codeName != null && message.hasOwnProperty("codeName"))
|
|
32710
|
+
object.codeName = message.codeName;
|
|
32711
|
+
if (message.codeVersion != null && message.hasOwnProperty("codeVersion"))
|
|
32712
|
+
object.codeVersion = message.codeVersion;
|
|
32713
|
+
if (message.typeHash != null && message.hasOwnProperty("typeHash"))
|
|
32714
|
+
object.typeHash = message.typeHash;
|
|
32715
|
+
if (message.domainSeparatorHash != null && message.hasOwnProperty("domainSeparatorHash"))
|
|
32716
|
+
object.domainSeparatorHash = message.domainSeparatorHash;
|
|
32717
|
+
return object;
|
|
32718
|
+
};
|
|
32719
|
+
|
|
32720
|
+
/**
|
|
32721
|
+
* Converts this EncodingHashParams to JSON.
|
|
32722
|
+
* @function toJSON
|
|
32723
|
+
* @memberof TW.BizPasskeySession.Proto.EncodingHashParams
|
|
32724
|
+
* @instance
|
|
32725
|
+
* @returns {Object.<string,*>} JSON object
|
|
32726
|
+
*/
|
|
32727
|
+
EncodingHashParams.prototype.toJSON = function toJSON() {
|
|
32728
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
32729
|
+
};
|
|
32730
|
+
|
|
32731
|
+
return EncodingHashParams;
|
|
32732
|
+
})();
|
|
32733
|
+
|
|
32734
|
+
Proto.Execution = (function() {
|
|
32735
|
+
|
|
32736
|
+
/**
|
|
32737
|
+
* Properties of an Execution.
|
|
32738
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
32739
|
+
* @interface IExecution
|
|
32740
|
+
* @property {string|null} [address] Execution address
|
|
32741
|
+
* @property {Uint8Array|null} [amount] Execution amount
|
|
32742
|
+
* @property {Uint8Array|null} [payload] Execution payload
|
|
32743
|
+
*/
|
|
32744
|
+
|
|
32745
|
+
/**
|
|
32746
|
+
* Constructs a new Execution.
|
|
32747
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
32748
|
+
* @classdesc Represents an Execution.
|
|
32749
|
+
* @implements IExecution
|
|
32750
|
+
* @constructor
|
|
32751
|
+
* @param {TW.BizPasskeySession.Proto.IExecution=} [properties] Properties to set
|
|
32752
|
+
*/
|
|
32753
|
+
function Execution(properties) {
|
|
32754
|
+
if (properties)
|
|
32755
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
32756
|
+
if (properties[keys[i]] != null)
|
|
32757
|
+
this[keys[i]] = properties[keys[i]];
|
|
32758
|
+
}
|
|
32759
|
+
|
|
32760
|
+
/**
|
|
32761
|
+
* Execution address.
|
|
32762
|
+
* @member {string} address
|
|
32763
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32764
|
+
* @instance
|
|
32765
|
+
*/
|
|
32766
|
+
Execution.prototype.address = "";
|
|
32767
|
+
|
|
32768
|
+
/**
|
|
32769
|
+
* Execution amount.
|
|
32770
|
+
* @member {Uint8Array} amount
|
|
32771
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32772
|
+
* @instance
|
|
32773
|
+
*/
|
|
32774
|
+
Execution.prototype.amount = $util.newBuffer([]);
|
|
32775
|
+
|
|
32776
|
+
/**
|
|
32777
|
+
* Execution payload.
|
|
32778
|
+
* @member {Uint8Array} payload
|
|
32779
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32780
|
+
* @instance
|
|
32781
|
+
*/
|
|
32782
|
+
Execution.prototype.payload = $util.newBuffer([]);
|
|
32783
|
+
|
|
32784
|
+
/**
|
|
32785
|
+
* Creates a new Execution instance using the specified properties.
|
|
32786
|
+
* @function create
|
|
32787
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32788
|
+
* @static
|
|
32789
|
+
* @param {TW.BizPasskeySession.Proto.IExecution=} [properties] Properties to set
|
|
32790
|
+
* @returns {TW.BizPasskeySession.Proto.Execution} Execution instance
|
|
32791
|
+
*/
|
|
32792
|
+
Execution.create = function create(properties) {
|
|
32793
|
+
return new Execution(properties);
|
|
32794
|
+
};
|
|
32795
|
+
|
|
32796
|
+
/**
|
|
32797
|
+
* Encodes the specified Execution message. Does not implicitly {@link TW.BizPasskeySession.Proto.Execution.verify|verify} messages.
|
|
32798
|
+
* @function encode
|
|
32799
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32800
|
+
* @static
|
|
32801
|
+
* @param {TW.BizPasskeySession.Proto.IExecution} message Execution message or plain object to encode
|
|
32802
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32803
|
+
* @returns {$protobuf.Writer} Writer
|
|
32804
|
+
*/
|
|
32805
|
+
Execution.encode = function encode(message, writer) {
|
|
32806
|
+
if (!writer)
|
|
32807
|
+
writer = $Writer.create();
|
|
32808
|
+
if (message.address != null && Object.hasOwnProperty.call(message, "address"))
|
|
32809
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.address);
|
|
32810
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
|
32811
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.amount);
|
|
32812
|
+
if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
|
|
32813
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload);
|
|
32814
|
+
return writer;
|
|
32815
|
+
};
|
|
32816
|
+
|
|
32817
|
+
/**
|
|
32818
|
+
* Decodes an Execution message from the specified reader or buffer.
|
|
32819
|
+
* @function decode
|
|
32820
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32821
|
+
* @static
|
|
32822
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32823
|
+
* @param {number} [length] Message length if known beforehand
|
|
32824
|
+
* @returns {TW.BizPasskeySession.Proto.Execution} Execution
|
|
32825
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32826
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32827
|
+
*/
|
|
32828
|
+
Execution.decode = function decode(reader, length) {
|
|
32829
|
+
if (!(reader instanceof $Reader))
|
|
32830
|
+
reader = $Reader.create(reader);
|
|
32831
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BizPasskeySession.Proto.Execution();
|
|
32832
|
+
while (reader.pos < end) {
|
|
32833
|
+
var tag = reader.uint32();
|
|
32834
|
+
switch (tag >>> 3) {
|
|
32835
|
+
case 1:
|
|
32836
|
+
message.address = reader.string();
|
|
32837
|
+
break;
|
|
32838
|
+
case 2:
|
|
32839
|
+
message.amount = reader.bytes();
|
|
32840
|
+
break;
|
|
32841
|
+
case 3:
|
|
32842
|
+
message.payload = reader.bytes();
|
|
32843
|
+
break;
|
|
32844
|
+
default:
|
|
32845
|
+
reader.skipType(tag & 7);
|
|
32846
|
+
break;
|
|
32847
|
+
}
|
|
32848
|
+
}
|
|
32849
|
+
return message;
|
|
32850
|
+
};
|
|
32851
|
+
|
|
32852
|
+
/**
|
|
32853
|
+
* Verifies an Execution message.
|
|
32854
|
+
* @function verify
|
|
32855
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32856
|
+
* @static
|
|
32857
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
32858
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
32859
|
+
*/
|
|
32860
|
+
Execution.verify = function verify(message) {
|
|
32861
|
+
if (typeof message !== "object" || message === null)
|
|
32862
|
+
return "object expected";
|
|
32863
|
+
if (message.address != null && message.hasOwnProperty("address"))
|
|
32864
|
+
if (!$util.isString(message.address))
|
|
32865
|
+
return "address: string expected";
|
|
32866
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
32867
|
+
if (!(message.amount && typeof message.amount.length === "number" || $util.isString(message.amount)))
|
|
32868
|
+
return "amount: buffer expected";
|
|
32869
|
+
if (message.payload != null && message.hasOwnProperty("payload"))
|
|
32870
|
+
if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
|
|
32871
|
+
return "payload: buffer expected";
|
|
32872
|
+
return null;
|
|
32873
|
+
};
|
|
32874
|
+
|
|
32875
|
+
/**
|
|
32876
|
+
* Creates an Execution message from a plain object. Also converts values to their respective internal types.
|
|
32877
|
+
* @function fromObject
|
|
32878
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32879
|
+
* @static
|
|
32880
|
+
* @param {Object.<string,*>} object Plain object
|
|
32881
|
+
* @returns {TW.BizPasskeySession.Proto.Execution} Execution
|
|
32882
|
+
*/
|
|
32883
|
+
Execution.fromObject = function fromObject(object) {
|
|
32884
|
+
if (object instanceof $root.TW.BizPasskeySession.Proto.Execution)
|
|
32885
|
+
return object;
|
|
32886
|
+
var message = new $root.TW.BizPasskeySession.Proto.Execution();
|
|
32887
|
+
if (object.address != null)
|
|
32888
|
+
message.address = String(object.address);
|
|
32889
|
+
if (object.amount != null)
|
|
32890
|
+
if (typeof object.amount === "string")
|
|
32891
|
+
$util.base64.decode(object.amount, message.amount = $util.newBuffer($util.base64.length(object.amount)), 0);
|
|
32892
|
+
else if (object.amount.length)
|
|
32893
|
+
message.amount = object.amount;
|
|
32894
|
+
if (object.payload != null)
|
|
32895
|
+
if (typeof object.payload === "string")
|
|
32896
|
+
$util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
|
|
32897
|
+
else if (object.payload.length)
|
|
32898
|
+
message.payload = object.payload;
|
|
32899
|
+
return message;
|
|
32900
|
+
};
|
|
32901
|
+
|
|
32902
|
+
/**
|
|
32903
|
+
* Creates a plain object from an Execution message. Also converts values to other types if specified.
|
|
32904
|
+
* @function toObject
|
|
32905
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32906
|
+
* @static
|
|
32907
|
+
* @param {TW.BizPasskeySession.Proto.Execution} message Execution
|
|
32908
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
32909
|
+
* @returns {Object.<string,*>} Plain object
|
|
32910
|
+
*/
|
|
32911
|
+
Execution.toObject = function toObject(message, options) {
|
|
32912
|
+
if (!options)
|
|
32913
|
+
options = {};
|
|
32914
|
+
var object = {};
|
|
32915
|
+
if (options.defaults) {
|
|
32916
|
+
object.address = "";
|
|
32917
|
+
if (options.bytes === String)
|
|
32918
|
+
object.amount = "";
|
|
32919
|
+
else {
|
|
32920
|
+
object.amount = [];
|
|
32921
|
+
if (options.bytes !== Array)
|
|
32922
|
+
object.amount = $util.newBuffer(object.amount);
|
|
32923
|
+
}
|
|
32924
|
+
if (options.bytes === String)
|
|
32925
|
+
object.payload = "";
|
|
32926
|
+
else {
|
|
32927
|
+
object.payload = [];
|
|
32928
|
+
if (options.bytes !== Array)
|
|
32929
|
+
object.payload = $util.newBuffer(object.payload);
|
|
32930
|
+
}
|
|
32931
|
+
}
|
|
32932
|
+
if (message.address != null && message.hasOwnProperty("address"))
|
|
32933
|
+
object.address = message.address;
|
|
32934
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
32935
|
+
object.amount = options.bytes === String ? $util.base64.encode(message.amount, 0, message.amount.length) : options.bytes === Array ? Array.prototype.slice.call(message.amount) : message.amount;
|
|
32936
|
+
if (message.payload != null && message.hasOwnProperty("payload"))
|
|
32937
|
+
object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
|
|
32938
|
+
return object;
|
|
32939
|
+
};
|
|
32940
|
+
|
|
32941
|
+
/**
|
|
32942
|
+
* Converts this Execution to JSON.
|
|
32943
|
+
* @function toJSON
|
|
32944
|
+
* @memberof TW.BizPasskeySession.Proto.Execution
|
|
32945
|
+
* @instance
|
|
32946
|
+
* @returns {Object.<string,*>} JSON object
|
|
32947
|
+
*/
|
|
32948
|
+
Execution.prototype.toJSON = function toJSON() {
|
|
32949
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
32950
|
+
};
|
|
32951
|
+
|
|
32952
|
+
return Execution;
|
|
32953
|
+
})();
|
|
32954
|
+
|
|
31663
32955
|
Proto.ExecuteWithPasskeySessionInput = (function() {
|
|
31664
32956
|
|
|
31665
32957
|
/**
|
|
31666
32958
|
* Properties of an ExecuteWithPasskeySessionInput.
|
|
31667
|
-
* @memberof TW.
|
|
32959
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
31668
32960
|
* @interface IExecuteWithPasskeySessionInput
|
|
31669
|
-
* @property {Array.<TW.
|
|
32961
|
+
* @property {Array.<TW.BizPasskeySession.Proto.IExecution>|null} [executions] ExecuteWithPasskeySessionInput executions
|
|
31670
32962
|
* @property {Long|null} [validAfter] ExecuteWithPasskeySessionInput validAfter
|
|
31671
32963
|
* @property {Long|null} [validUntil] ExecuteWithPasskeySessionInput validUntil
|
|
31672
32964
|
* @property {Uint8Array|null} [passkeySignature] ExecuteWithPasskeySessionInput passkeySignature
|
|
@@ -31674,11 +32966,11 @@
|
|
|
31674
32966
|
|
|
31675
32967
|
/**
|
|
31676
32968
|
* Constructs a new ExecuteWithPasskeySessionInput.
|
|
31677
|
-
* @memberof TW.
|
|
32969
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
31678
32970
|
* @classdesc Represents an ExecuteWithPasskeySessionInput.
|
|
31679
32971
|
* @implements IExecuteWithPasskeySessionInput
|
|
31680
32972
|
* @constructor
|
|
31681
|
-
* @param {TW.
|
|
32973
|
+
* @param {TW.BizPasskeySession.Proto.IExecuteWithPasskeySessionInput=} [properties] Properties to set
|
|
31682
32974
|
*/
|
|
31683
32975
|
function ExecuteWithPasskeySessionInput(properties) {
|
|
31684
32976
|
this.executions = [];
|
|
@@ -31690,103 +32982,415 @@
|
|
|
31690
32982
|
|
|
31691
32983
|
/**
|
|
31692
32984
|
* ExecuteWithPasskeySessionInput executions.
|
|
31693
|
-
* @member {Array.<TW.
|
|
31694
|
-
* @memberof TW.
|
|
32985
|
+
* @member {Array.<TW.BizPasskeySession.Proto.IExecution>} executions
|
|
32986
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
32987
|
+
* @instance
|
|
32988
|
+
*/
|
|
32989
|
+
ExecuteWithPasskeySessionInput.prototype.executions = $util.emptyArray;
|
|
32990
|
+
|
|
32991
|
+
/**
|
|
32992
|
+
* ExecuteWithPasskeySessionInput validAfter.
|
|
32993
|
+
* @member {Long} validAfter
|
|
32994
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
32995
|
+
* @instance
|
|
32996
|
+
*/
|
|
32997
|
+
ExecuteWithPasskeySessionInput.prototype.validAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
32998
|
+
|
|
32999
|
+
/**
|
|
33000
|
+
* ExecuteWithPasskeySessionInput validUntil.
|
|
33001
|
+
* @member {Long} validUntil
|
|
33002
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33003
|
+
* @instance
|
|
33004
|
+
*/
|
|
33005
|
+
ExecuteWithPasskeySessionInput.prototype.validUntil = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
33006
|
+
|
|
33007
|
+
/**
|
|
33008
|
+
* ExecuteWithPasskeySessionInput passkeySignature.
|
|
33009
|
+
* @member {Uint8Array} passkeySignature
|
|
33010
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33011
|
+
* @instance
|
|
33012
|
+
*/
|
|
33013
|
+
ExecuteWithPasskeySessionInput.prototype.passkeySignature = $util.newBuffer([]);
|
|
33014
|
+
|
|
33015
|
+
/**
|
|
33016
|
+
* Creates a new ExecuteWithPasskeySessionInput instance using the specified properties.
|
|
33017
|
+
* @function create
|
|
33018
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33019
|
+
* @static
|
|
33020
|
+
* @param {TW.BizPasskeySession.Proto.IExecuteWithPasskeySessionInput=} [properties] Properties to set
|
|
33021
|
+
* @returns {TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput} ExecuteWithPasskeySessionInput instance
|
|
33022
|
+
*/
|
|
33023
|
+
ExecuteWithPasskeySessionInput.create = function create(properties) {
|
|
33024
|
+
return new ExecuteWithPasskeySessionInput(properties);
|
|
33025
|
+
};
|
|
33026
|
+
|
|
33027
|
+
/**
|
|
33028
|
+
* Encodes the specified ExecuteWithPasskeySessionInput message. Does not implicitly {@link TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput.verify|verify} messages.
|
|
33029
|
+
* @function encode
|
|
33030
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33031
|
+
* @static
|
|
33032
|
+
* @param {TW.BizPasskeySession.Proto.IExecuteWithPasskeySessionInput} message ExecuteWithPasskeySessionInput message or plain object to encode
|
|
33033
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
33034
|
+
* @returns {$protobuf.Writer} Writer
|
|
33035
|
+
*/
|
|
33036
|
+
ExecuteWithPasskeySessionInput.encode = function encode(message, writer) {
|
|
33037
|
+
if (!writer)
|
|
33038
|
+
writer = $Writer.create();
|
|
33039
|
+
if (message.executions != null && message.executions.length)
|
|
33040
|
+
for (var i = 0; i < message.executions.length; ++i)
|
|
33041
|
+
$root.TW.BizPasskeySession.Proto.Execution.encode(message.executions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
33042
|
+
if (message.validAfter != null && Object.hasOwnProperty.call(message, "validAfter"))
|
|
33043
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.validAfter);
|
|
33044
|
+
if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil"))
|
|
33045
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.validUntil);
|
|
33046
|
+
if (message.passkeySignature != null && Object.hasOwnProperty.call(message, "passkeySignature"))
|
|
33047
|
+
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.passkeySignature);
|
|
33048
|
+
return writer;
|
|
33049
|
+
};
|
|
33050
|
+
|
|
33051
|
+
/**
|
|
33052
|
+
* Decodes an ExecuteWithPasskeySessionInput message from the specified reader or buffer.
|
|
33053
|
+
* @function decode
|
|
33054
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33055
|
+
* @static
|
|
33056
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
33057
|
+
* @param {number} [length] Message length if known beforehand
|
|
33058
|
+
* @returns {TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput} ExecuteWithPasskeySessionInput
|
|
33059
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
33060
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
33061
|
+
*/
|
|
33062
|
+
ExecuteWithPasskeySessionInput.decode = function decode(reader, length) {
|
|
33063
|
+
if (!(reader instanceof $Reader))
|
|
33064
|
+
reader = $Reader.create(reader);
|
|
33065
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput();
|
|
33066
|
+
while (reader.pos < end) {
|
|
33067
|
+
var tag = reader.uint32();
|
|
33068
|
+
switch (tag >>> 3) {
|
|
33069
|
+
case 1:
|
|
33070
|
+
if (!(message.executions && message.executions.length))
|
|
33071
|
+
message.executions = [];
|
|
33072
|
+
message.executions.push($root.TW.BizPasskeySession.Proto.Execution.decode(reader, reader.uint32()));
|
|
33073
|
+
break;
|
|
33074
|
+
case 2:
|
|
33075
|
+
message.validAfter = reader.uint64();
|
|
33076
|
+
break;
|
|
33077
|
+
case 3:
|
|
33078
|
+
message.validUntil = reader.uint64();
|
|
33079
|
+
break;
|
|
33080
|
+
case 4:
|
|
33081
|
+
message.passkeySignature = reader.bytes();
|
|
33082
|
+
break;
|
|
33083
|
+
default:
|
|
33084
|
+
reader.skipType(tag & 7);
|
|
33085
|
+
break;
|
|
33086
|
+
}
|
|
33087
|
+
}
|
|
33088
|
+
return message;
|
|
33089
|
+
};
|
|
33090
|
+
|
|
33091
|
+
/**
|
|
33092
|
+
* Verifies an ExecuteWithPasskeySessionInput message.
|
|
33093
|
+
* @function verify
|
|
33094
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33095
|
+
* @static
|
|
33096
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
33097
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
33098
|
+
*/
|
|
33099
|
+
ExecuteWithPasskeySessionInput.verify = function verify(message) {
|
|
33100
|
+
if (typeof message !== "object" || message === null)
|
|
33101
|
+
return "object expected";
|
|
33102
|
+
if (message.executions != null && message.hasOwnProperty("executions")) {
|
|
33103
|
+
if (!Array.isArray(message.executions))
|
|
33104
|
+
return "executions: array expected";
|
|
33105
|
+
for (var i = 0; i < message.executions.length; ++i) {
|
|
33106
|
+
var error = $root.TW.BizPasskeySession.Proto.Execution.verify(message.executions[i]);
|
|
33107
|
+
if (error)
|
|
33108
|
+
return "executions." + error;
|
|
33109
|
+
}
|
|
33110
|
+
}
|
|
33111
|
+
if (message.validAfter != null && message.hasOwnProperty("validAfter"))
|
|
33112
|
+
if (!$util.isInteger(message.validAfter) && !(message.validAfter && $util.isInteger(message.validAfter.low) && $util.isInteger(message.validAfter.high)))
|
|
33113
|
+
return "validAfter: integer|Long expected";
|
|
33114
|
+
if (message.validUntil != null && message.hasOwnProperty("validUntil"))
|
|
33115
|
+
if (!$util.isInteger(message.validUntil) && !(message.validUntil && $util.isInteger(message.validUntil.low) && $util.isInteger(message.validUntil.high)))
|
|
33116
|
+
return "validUntil: integer|Long expected";
|
|
33117
|
+
if (message.passkeySignature != null && message.hasOwnProperty("passkeySignature"))
|
|
33118
|
+
if (!(message.passkeySignature && typeof message.passkeySignature.length === "number" || $util.isString(message.passkeySignature)))
|
|
33119
|
+
return "passkeySignature: buffer expected";
|
|
33120
|
+
return null;
|
|
33121
|
+
};
|
|
33122
|
+
|
|
33123
|
+
/**
|
|
33124
|
+
* Creates an ExecuteWithPasskeySessionInput message from a plain object. Also converts values to their respective internal types.
|
|
33125
|
+
* @function fromObject
|
|
33126
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33127
|
+
* @static
|
|
33128
|
+
* @param {Object.<string,*>} object Plain object
|
|
33129
|
+
* @returns {TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput} ExecuteWithPasskeySessionInput
|
|
33130
|
+
*/
|
|
33131
|
+
ExecuteWithPasskeySessionInput.fromObject = function fromObject(object) {
|
|
33132
|
+
if (object instanceof $root.TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput)
|
|
33133
|
+
return object;
|
|
33134
|
+
var message = new $root.TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput();
|
|
33135
|
+
if (object.executions) {
|
|
33136
|
+
if (!Array.isArray(object.executions))
|
|
33137
|
+
throw TypeError(".TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput.executions: array expected");
|
|
33138
|
+
message.executions = [];
|
|
33139
|
+
for (var i = 0; i < object.executions.length; ++i) {
|
|
33140
|
+
if (typeof object.executions[i] !== "object")
|
|
33141
|
+
throw TypeError(".TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput.executions: object expected");
|
|
33142
|
+
message.executions[i] = $root.TW.BizPasskeySession.Proto.Execution.fromObject(object.executions[i]);
|
|
33143
|
+
}
|
|
33144
|
+
}
|
|
33145
|
+
if (object.validAfter != null)
|
|
33146
|
+
if ($util.Long)
|
|
33147
|
+
(message.validAfter = $util.Long.fromValue(object.validAfter)).unsigned = true;
|
|
33148
|
+
else if (typeof object.validAfter === "string")
|
|
33149
|
+
message.validAfter = parseInt(object.validAfter, 10);
|
|
33150
|
+
else if (typeof object.validAfter === "number")
|
|
33151
|
+
message.validAfter = object.validAfter;
|
|
33152
|
+
else if (typeof object.validAfter === "object")
|
|
33153
|
+
message.validAfter = new $util.LongBits(object.validAfter.low >>> 0, object.validAfter.high >>> 0).toNumber(true);
|
|
33154
|
+
if (object.validUntil != null)
|
|
33155
|
+
if ($util.Long)
|
|
33156
|
+
(message.validUntil = $util.Long.fromValue(object.validUntil)).unsigned = true;
|
|
33157
|
+
else if (typeof object.validUntil === "string")
|
|
33158
|
+
message.validUntil = parseInt(object.validUntil, 10);
|
|
33159
|
+
else if (typeof object.validUntil === "number")
|
|
33160
|
+
message.validUntil = object.validUntil;
|
|
33161
|
+
else if (typeof object.validUntil === "object")
|
|
33162
|
+
message.validUntil = new $util.LongBits(object.validUntil.low >>> 0, object.validUntil.high >>> 0).toNumber(true);
|
|
33163
|
+
if (object.passkeySignature != null)
|
|
33164
|
+
if (typeof object.passkeySignature === "string")
|
|
33165
|
+
$util.base64.decode(object.passkeySignature, message.passkeySignature = $util.newBuffer($util.base64.length(object.passkeySignature)), 0);
|
|
33166
|
+
else if (object.passkeySignature.length)
|
|
33167
|
+
message.passkeySignature = object.passkeySignature;
|
|
33168
|
+
return message;
|
|
33169
|
+
};
|
|
33170
|
+
|
|
33171
|
+
/**
|
|
33172
|
+
* Creates a plain object from an ExecuteWithPasskeySessionInput message. Also converts values to other types if specified.
|
|
33173
|
+
* @function toObject
|
|
33174
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33175
|
+
* @static
|
|
33176
|
+
* @param {TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput} message ExecuteWithPasskeySessionInput
|
|
33177
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
33178
|
+
* @returns {Object.<string,*>} Plain object
|
|
33179
|
+
*/
|
|
33180
|
+
ExecuteWithPasskeySessionInput.toObject = function toObject(message, options) {
|
|
33181
|
+
if (!options)
|
|
33182
|
+
options = {};
|
|
33183
|
+
var object = {};
|
|
33184
|
+
if (options.arrays || options.defaults)
|
|
33185
|
+
object.executions = [];
|
|
33186
|
+
if (options.defaults) {
|
|
33187
|
+
if ($util.Long) {
|
|
33188
|
+
var long = new $util.Long(0, 0, true);
|
|
33189
|
+
object.validAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
33190
|
+
} else
|
|
33191
|
+
object.validAfter = options.longs === String ? "0" : 0;
|
|
33192
|
+
if ($util.Long) {
|
|
33193
|
+
var long = new $util.Long(0, 0, true);
|
|
33194
|
+
object.validUntil = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
33195
|
+
} else
|
|
33196
|
+
object.validUntil = options.longs === String ? "0" : 0;
|
|
33197
|
+
if (options.bytes === String)
|
|
33198
|
+
object.passkeySignature = "";
|
|
33199
|
+
else {
|
|
33200
|
+
object.passkeySignature = [];
|
|
33201
|
+
if (options.bytes !== Array)
|
|
33202
|
+
object.passkeySignature = $util.newBuffer(object.passkeySignature);
|
|
33203
|
+
}
|
|
33204
|
+
}
|
|
33205
|
+
if (message.executions && message.executions.length) {
|
|
33206
|
+
object.executions = [];
|
|
33207
|
+
for (var j = 0; j < message.executions.length; ++j)
|
|
33208
|
+
object.executions[j] = $root.TW.BizPasskeySession.Proto.Execution.toObject(message.executions[j], options);
|
|
33209
|
+
}
|
|
33210
|
+
if (message.validAfter != null && message.hasOwnProperty("validAfter"))
|
|
33211
|
+
if (typeof message.validAfter === "number")
|
|
33212
|
+
object.validAfter = options.longs === String ? String(message.validAfter) : message.validAfter;
|
|
33213
|
+
else
|
|
33214
|
+
object.validAfter = options.longs === String ? $util.Long.prototype.toString.call(message.validAfter) : options.longs === Number ? new $util.LongBits(message.validAfter.low >>> 0, message.validAfter.high >>> 0).toNumber(true) : message.validAfter;
|
|
33215
|
+
if (message.validUntil != null && message.hasOwnProperty("validUntil"))
|
|
33216
|
+
if (typeof message.validUntil === "number")
|
|
33217
|
+
object.validUntil = options.longs === String ? String(message.validUntil) : message.validUntil;
|
|
33218
|
+
else
|
|
33219
|
+
object.validUntil = options.longs === String ? $util.Long.prototype.toString.call(message.validUntil) : options.longs === Number ? new $util.LongBits(message.validUntil.low >>> 0, message.validUntil.high >>> 0).toNumber(true) : message.validUntil;
|
|
33220
|
+
if (message.passkeySignature != null && message.hasOwnProperty("passkeySignature"))
|
|
33221
|
+
object.passkeySignature = options.bytes === String ? $util.base64.encode(message.passkeySignature, 0, message.passkeySignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.passkeySignature) : message.passkeySignature;
|
|
33222
|
+
return object;
|
|
33223
|
+
};
|
|
33224
|
+
|
|
33225
|
+
/**
|
|
33226
|
+
* Converts this ExecuteWithPasskeySessionInput to JSON.
|
|
33227
|
+
* @function toJSON
|
|
33228
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithPasskeySessionInput
|
|
33229
|
+
* @instance
|
|
33230
|
+
* @returns {Object.<string,*>} JSON object
|
|
33231
|
+
*/
|
|
33232
|
+
ExecuteWithPasskeySessionInput.prototype.toJSON = function toJSON() {
|
|
33233
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
33234
|
+
};
|
|
33235
|
+
|
|
33236
|
+
return ExecuteWithPasskeySessionInput;
|
|
33237
|
+
})();
|
|
33238
|
+
|
|
33239
|
+
Proto.ExecuteWithSignatureInput = (function() {
|
|
33240
|
+
|
|
33241
|
+
/**
|
|
33242
|
+
* Properties of an ExecuteWithSignatureInput.
|
|
33243
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
33244
|
+
* @interface IExecuteWithSignatureInput
|
|
33245
|
+
* @property {Array.<TW.BizPasskeySession.Proto.IExecution>|null} [executions] ExecuteWithSignatureInput executions
|
|
33246
|
+
* @property {Uint8Array|null} [privateKey] ExecuteWithSignatureInput privateKey
|
|
33247
|
+
* @property {Uint8Array|null} [nonce] ExecuteWithSignatureInput nonce
|
|
33248
|
+
* @property {Long|null} [validAfter] ExecuteWithSignatureInput validAfter
|
|
33249
|
+
* @property {Long|null} [validUntil] ExecuteWithSignatureInput validUntil
|
|
33250
|
+
* @property {TW.BizPasskeySession.Proto.IEncodingHashParams|null} [encodingHashParams] ExecuteWithSignatureInput encodingHashParams
|
|
33251
|
+
*/
|
|
33252
|
+
|
|
33253
|
+
/**
|
|
33254
|
+
* Constructs a new ExecuteWithSignatureInput.
|
|
33255
|
+
* @memberof TW.BizPasskeySession.Proto
|
|
33256
|
+
* @classdesc Represents an ExecuteWithSignatureInput.
|
|
33257
|
+
* @implements IExecuteWithSignatureInput
|
|
33258
|
+
* @constructor
|
|
33259
|
+
* @param {TW.BizPasskeySession.Proto.IExecuteWithSignatureInput=} [properties] Properties to set
|
|
33260
|
+
*/
|
|
33261
|
+
function ExecuteWithSignatureInput(properties) {
|
|
33262
|
+
this.executions = [];
|
|
33263
|
+
if (properties)
|
|
33264
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
33265
|
+
if (properties[keys[i]] != null)
|
|
33266
|
+
this[keys[i]] = properties[keys[i]];
|
|
33267
|
+
}
|
|
33268
|
+
|
|
33269
|
+
/**
|
|
33270
|
+
* ExecuteWithSignatureInput executions.
|
|
33271
|
+
* @member {Array.<TW.BizPasskeySession.Proto.IExecution>} executions
|
|
33272
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
33273
|
+
* @instance
|
|
33274
|
+
*/
|
|
33275
|
+
ExecuteWithSignatureInput.prototype.executions = $util.emptyArray;
|
|
33276
|
+
|
|
33277
|
+
/**
|
|
33278
|
+
* ExecuteWithSignatureInput privateKey.
|
|
33279
|
+
* @member {Uint8Array} privateKey
|
|
33280
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
33281
|
+
* @instance
|
|
33282
|
+
*/
|
|
33283
|
+
ExecuteWithSignatureInput.prototype.privateKey = $util.newBuffer([]);
|
|
33284
|
+
|
|
33285
|
+
/**
|
|
33286
|
+
* ExecuteWithSignatureInput nonce.
|
|
33287
|
+
* @member {Uint8Array} nonce
|
|
33288
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31695
33289
|
* @instance
|
|
31696
33290
|
*/
|
|
31697
|
-
|
|
33291
|
+
ExecuteWithSignatureInput.prototype.nonce = $util.newBuffer([]);
|
|
31698
33292
|
|
|
31699
33293
|
/**
|
|
31700
|
-
*
|
|
33294
|
+
* ExecuteWithSignatureInput validAfter.
|
|
31701
33295
|
* @member {Long} validAfter
|
|
31702
|
-
* @memberof TW.
|
|
33296
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31703
33297
|
* @instance
|
|
31704
33298
|
*/
|
|
31705
|
-
|
|
33299
|
+
ExecuteWithSignatureInput.prototype.validAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
31706
33300
|
|
|
31707
33301
|
/**
|
|
31708
|
-
*
|
|
33302
|
+
* ExecuteWithSignatureInput validUntil.
|
|
31709
33303
|
* @member {Long} validUntil
|
|
31710
|
-
* @memberof TW.
|
|
33304
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31711
33305
|
* @instance
|
|
31712
33306
|
*/
|
|
31713
|
-
|
|
33307
|
+
ExecuteWithSignatureInput.prototype.validUntil = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
31714
33308
|
|
|
31715
33309
|
/**
|
|
31716
|
-
*
|
|
31717
|
-
* @member {
|
|
31718
|
-
* @memberof TW.
|
|
33310
|
+
* ExecuteWithSignatureInput encodingHashParams.
|
|
33311
|
+
* @member {TW.BizPasskeySession.Proto.IEncodingHashParams|null|undefined} encodingHashParams
|
|
33312
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31719
33313
|
* @instance
|
|
31720
33314
|
*/
|
|
31721
|
-
|
|
33315
|
+
ExecuteWithSignatureInput.prototype.encodingHashParams = null;
|
|
31722
33316
|
|
|
31723
33317
|
/**
|
|
31724
|
-
* Creates a new
|
|
33318
|
+
* Creates a new ExecuteWithSignatureInput instance using the specified properties.
|
|
31725
33319
|
* @function create
|
|
31726
|
-
* @memberof TW.
|
|
33320
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31727
33321
|
* @static
|
|
31728
|
-
* @param {TW.
|
|
31729
|
-
* @returns {TW.
|
|
33322
|
+
* @param {TW.BizPasskeySession.Proto.IExecuteWithSignatureInput=} [properties] Properties to set
|
|
33323
|
+
* @returns {TW.BizPasskeySession.Proto.ExecuteWithSignatureInput} ExecuteWithSignatureInput instance
|
|
31730
33324
|
*/
|
|
31731
|
-
|
|
31732
|
-
return new
|
|
33325
|
+
ExecuteWithSignatureInput.create = function create(properties) {
|
|
33326
|
+
return new ExecuteWithSignatureInput(properties);
|
|
31733
33327
|
};
|
|
31734
33328
|
|
|
31735
33329
|
/**
|
|
31736
|
-
* Encodes the specified
|
|
33330
|
+
* Encodes the specified ExecuteWithSignatureInput message. Does not implicitly {@link TW.BizPasskeySession.Proto.ExecuteWithSignatureInput.verify|verify} messages.
|
|
31737
33331
|
* @function encode
|
|
31738
|
-
* @memberof TW.
|
|
33332
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31739
33333
|
* @static
|
|
31740
|
-
* @param {TW.
|
|
33334
|
+
* @param {TW.BizPasskeySession.Proto.IExecuteWithSignatureInput} message ExecuteWithSignatureInput message or plain object to encode
|
|
31741
33335
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
31742
33336
|
* @returns {$protobuf.Writer} Writer
|
|
31743
33337
|
*/
|
|
31744
|
-
|
|
33338
|
+
ExecuteWithSignatureInput.encode = function encode(message, writer) {
|
|
31745
33339
|
if (!writer)
|
|
31746
33340
|
writer = $Writer.create();
|
|
31747
33341
|
if (message.executions != null && message.executions.length)
|
|
31748
33342
|
for (var i = 0; i < message.executions.length; ++i)
|
|
31749
|
-
$root.TW.
|
|
33343
|
+
$root.TW.BizPasskeySession.Proto.Execution.encode(message.executions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
33344
|
+
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
|
33345
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.privateKey);
|
|
33346
|
+
if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
|
|
33347
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.nonce);
|
|
31750
33348
|
if (message.validAfter != null && Object.hasOwnProperty.call(message, "validAfter"))
|
|
31751
|
-
writer.uint32(/* id
|
|
33349
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.validAfter);
|
|
31752
33350
|
if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil"))
|
|
31753
|
-
writer.uint32(/* id
|
|
31754
|
-
if (message.
|
|
31755
|
-
writer.uint32(/* id
|
|
33351
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.validUntil);
|
|
33352
|
+
if (message.encodingHashParams != null && Object.hasOwnProperty.call(message, "encodingHashParams"))
|
|
33353
|
+
$root.TW.BizPasskeySession.Proto.EncodingHashParams.encode(message.encodingHashParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
31756
33354
|
return writer;
|
|
31757
33355
|
};
|
|
31758
33356
|
|
|
31759
33357
|
/**
|
|
31760
|
-
* Decodes an
|
|
33358
|
+
* Decodes an ExecuteWithSignatureInput message from the specified reader or buffer.
|
|
31761
33359
|
* @function decode
|
|
31762
|
-
* @memberof TW.
|
|
33360
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31763
33361
|
* @static
|
|
31764
33362
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
31765
33363
|
* @param {number} [length] Message length if known beforehand
|
|
31766
|
-
* @returns {TW.
|
|
33364
|
+
* @returns {TW.BizPasskeySession.Proto.ExecuteWithSignatureInput} ExecuteWithSignatureInput
|
|
31767
33365
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
31768
33366
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
31769
33367
|
*/
|
|
31770
|
-
|
|
33368
|
+
ExecuteWithSignatureInput.decode = function decode(reader, length) {
|
|
31771
33369
|
if (!(reader instanceof $Reader))
|
|
31772
33370
|
reader = $Reader.create(reader);
|
|
31773
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.
|
|
33371
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BizPasskeySession.Proto.ExecuteWithSignatureInput();
|
|
31774
33372
|
while (reader.pos < end) {
|
|
31775
33373
|
var tag = reader.uint32();
|
|
31776
33374
|
switch (tag >>> 3) {
|
|
31777
33375
|
case 1:
|
|
31778
33376
|
if (!(message.executions && message.executions.length))
|
|
31779
33377
|
message.executions = [];
|
|
31780
|
-
message.executions.push($root.TW.
|
|
33378
|
+
message.executions.push($root.TW.BizPasskeySession.Proto.Execution.decode(reader, reader.uint32()));
|
|
31781
33379
|
break;
|
|
31782
33380
|
case 2:
|
|
31783
|
-
message.
|
|
33381
|
+
message.privateKey = reader.bytes();
|
|
31784
33382
|
break;
|
|
31785
33383
|
case 3:
|
|
31786
|
-
message.
|
|
33384
|
+
message.nonce = reader.bytes();
|
|
31787
33385
|
break;
|
|
31788
33386
|
case 4:
|
|
31789
|
-
message.
|
|
33387
|
+
message.validAfter = reader.uint64();
|
|
33388
|
+
break;
|
|
33389
|
+
case 5:
|
|
33390
|
+
message.validUntil = reader.uint64();
|
|
33391
|
+
break;
|
|
33392
|
+
case 6:
|
|
33393
|
+
message.encodingHashParams = $root.TW.BizPasskeySession.Proto.EncodingHashParams.decode(reader, reader.uint32());
|
|
31790
33394
|
break;
|
|
31791
33395
|
default:
|
|
31792
33396
|
reader.skipType(tag & 7);
|
|
@@ -31797,59 +33401,77 @@
|
|
|
31797
33401
|
};
|
|
31798
33402
|
|
|
31799
33403
|
/**
|
|
31800
|
-
* Verifies an
|
|
33404
|
+
* Verifies an ExecuteWithSignatureInput message.
|
|
31801
33405
|
* @function verify
|
|
31802
|
-
* @memberof TW.
|
|
33406
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31803
33407
|
* @static
|
|
31804
33408
|
* @param {Object.<string,*>} message Plain object to verify
|
|
31805
33409
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
31806
33410
|
*/
|
|
31807
|
-
|
|
33411
|
+
ExecuteWithSignatureInput.verify = function verify(message) {
|
|
31808
33412
|
if (typeof message !== "object" || message === null)
|
|
31809
33413
|
return "object expected";
|
|
31810
33414
|
if (message.executions != null && message.hasOwnProperty("executions")) {
|
|
31811
33415
|
if (!Array.isArray(message.executions))
|
|
31812
33416
|
return "executions: array expected";
|
|
31813
33417
|
for (var i = 0; i < message.executions.length; ++i) {
|
|
31814
|
-
var error = $root.TW.
|
|
33418
|
+
var error = $root.TW.BizPasskeySession.Proto.Execution.verify(message.executions[i]);
|
|
31815
33419
|
if (error)
|
|
31816
33420
|
return "executions." + error;
|
|
31817
33421
|
}
|
|
31818
33422
|
}
|
|
33423
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
|
33424
|
+
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
|
33425
|
+
return "privateKey: buffer expected";
|
|
33426
|
+
if (message.nonce != null && message.hasOwnProperty("nonce"))
|
|
33427
|
+
if (!(message.nonce && typeof message.nonce.length === "number" || $util.isString(message.nonce)))
|
|
33428
|
+
return "nonce: buffer expected";
|
|
31819
33429
|
if (message.validAfter != null && message.hasOwnProperty("validAfter"))
|
|
31820
33430
|
if (!$util.isInteger(message.validAfter) && !(message.validAfter && $util.isInteger(message.validAfter.low) && $util.isInteger(message.validAfter.high)))
|
|
31821
33431
|
return "validAfter: integer|Long expected";
|
|
31822
33432
|
if (message.validUntil != null && message.hasOwnProperty("validUntil"))
|
|
31823
33433
|
if (!$util.isInteger(message.validUntil) && !(message.validUntil && $util.isInteger(message.validUntil.low) && $util.isInteger(message.validUntil.high)))
|
|
31824
33434
|
return "validUntil: integer|Long expected";
|
|
31825
|
-
if (message.
|
|
31826
|
-
|
|
31827
|
-
|
|
33435
|
+
if (message.encodingHashParams != null && message.hasOwnProperty("encodingHashParams")) {
|
|
33436
|
+
var error = $root.TW.BizPasskeySession.Proto.EncodingHashParams.verify(message.encodingHashParams);
|
|
33437
|
+
if (error)
|
|
33438
|
+
return "encodingHashParams." + error;
|
|
33439
|
+
}
|
|
31828
33440
|
return null;
|
|
31829
33441
|
};
|
|
31830
33442
|
|
|
31831
33443
|
/**
|
|
31832
|
-
* Creates an
|
|
33444
|
+
* Creates an ExecuteWithSignatureInput message from a plain object. Also converts values to their respective internal types.
|
|
31833
33445
|
* @function fromObject
|
|
31834
|
-
* @memberof TW.
|
|
33446
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31835
33447
|
* @static
|
|
31836
33448
|
* @param {Object.<string,*>} object Plain object
|
|
31837
|
-
* @returns {TW.
|
|
33449
|
+
* @returns {TW.BizPasskeySession.Proto.ExecuteWithSignatureInput} ExecuteWithSignatureInput
|
|
31838
33450
|
*/
|
|
31839
|
-
|
|
31840
|
-
if (object instanceof $root.TW.
|
|
33451
|
+
ExecuteWithSignatureInput.fromObject = function fromObject(object) {
|
|
33452
|
+
if (object instanceof $root.TW.BizPasskeySession.Proto.ExecuteWithSignatureInput)
|
|
31841
33453
|
return object;
|
|
31842
|
-
var message = new $root.TW.
|
|
33454
|
+
var message = new $root.TW.BizPasskeySession.Proto.ExecuteWithSignatureInput();
|
|
31843
33455
|
if (object.executions) {
|
|
31844
33456
|
if (!Array.isArray(object.executions))
|
|
31845
|
-
throw TypeError(".TW.
|
|
33457
|
+
throw TypeError(".TW.BizPasskeySession.Proto.ExecuteWithSignatureInput.executions: array expected");
|
|
31846
33458
|
message.executions = [];
|
|
31847
33459
|
for (var i = 0; i < object.executions.length; ++i) {
|
|
31848
33460
|
if (typeof object.executions[i] !== "object")
|
|
31849
|
-
throw TypeError(".TW.
|
|
31850
|
-
message.executions[i] = $root.TW.
|
|
33461
|
+
throw TypeError(".TW.BizPasskeySession.Proto.ExecuteWithSignatureInput.executions: object expected");
|
|
33462
|
+
message.executions[i] = $root.TW.BizPasskeySession.Proto.Execution.fromObject(object.executions[i]);
|
|
31851
33463
|
}
|
|
31852
33464
|
}
|
|
33465
|
+
if (object.privateKey != null)
|
|
33466
|
+
if (typeof object.privateKey === "string")
|
|
33467
|
+
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
|
33468
|
+
else if (object.privateKey.length)
|
|
33469
|
+
message.privateKey = object.privateKey;
|
|
33470
|
+
if (object.nonce != null)
|
|
33471
|
+
if (typeof object.nonce === "string")
|
|
33472
|
+
$util.base64.decode(object.nonce, message.nonce = $util.newBuffer($util.base64.length(object.nonce)), 0);
|
|
33473
|
+
else if (object.nonce.length)
|
|
33474
|
+
message.nonce = object.nonce;
|
|
31853
33475
|
if (object.validAfter != null)
|
|
31854
33476
|
if ($util.Long)
|
|
31855
33477
|
(message.validAfter = $util.Long.fromValue(object.validAfter)).unsigned = true;
|
|
@@ -31868,30 +33490,44 @@
|
|
|
31868
33490
|
message.validUntil = object.validUntil;
|
|
31869
33491
|
else if (typeof object.validUntil === "object")
|
|
31870
33492
|
message.validUntil = new $util.LongBits(object.validUntil.low >>> 0, object.validUntil.high >>> 0).toNumber(true);
|
|
31871
|
-
if (object.
|
|
31872
|
-
if (typeof object.
|
|
31873
|
-
|
|
31874
|
-
|
|
31875
|
-
|
|
33493
|
+
if (object.encodingHashParams != null) {
|
|
33494
|
+
if (typeof object.encodingHashParams !== "object")
|
|
33495
|
+
throw TypeError(".TW.BizPasskeySession.Proto.ExecuteWithSignatureInput.encodingHashParams: object expected");
|
|
33496
|
+
message.encodingHashParams = $root.TW.BizPasskeySession.Proto.EncodingHashParams.fromObject(object.encodingHashParams);
|
|
33497
|
+
}
|
|
31876
33498
|
return message;
|
|
31877
33499
|
};
|
|
31878
33500
|
|
|
31879
33501
|
/**
|
|
31880
|
-
* Creates a plain object from an
|
|
33502
|
+
* Creates a plain object from an ExecuteWithSignatureInput message. Also converts values to other types if specified.
|
|
31881
33503
|
* @function toObject
|
|
31882
|
-
* @memberof TW.
|
|
33504
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31883
33505
|
* @static
|
|
31884
|
-
* @param {TW.
|
|
33506
|
+
* @param {TW.BizPasskeySession.Proto.ExecuteWithSignatureInput} message ExecuteWithSignatureInput
|
|
31885
33507
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
31886
33508
|
* @returns {Object.<string,*>} Plain object
|
|
31887
33509
|
*/
|
|
31888
|
-
|
|
33510
|
+
ExecuteWithSignatureInput.toObject = function toObject(message, options) {
|
|
31889
33511
|
if (!options)
|
|
31890
33512
|
options = {};
|
|
31891
33513
|
var object = {};
|
|
31892
33514
|
if (options.arrays || options.defaults)
|
|
31893
33515
|
object.executions = [];
|
|
31894
33516
|
if (options.defaults) {
|
|
33517
|
+
if (options.bytes === String)
|
|
33518
|
+
object.privateKey = "";
|
|
33519
|
+
else {
|
|
33520
|
+
object.privateKey = [];
|
|
33521
|
+
if (options.bytes !== Array)
|
|
33522
|
+
object.privateKey = $util.newBuffer(object.privateKey);
|
|
33523
|
+
}
|
|
33524
|
+
if (options.bytes === String)
|
|
33525
|
+
object.nonce = "";
|
|
33526
|
+
else {
|
|
33527
|
+
object.nonce = [];
|
|
33528
|
+
if (options.bytes !== Array)
|
|
33529
|
+
object.nonce = $util.newBuffer(object.nonce);
|
|
33530
|
+
}
|
|
31895
33531
|
if ($util.Long) {
|
|
31896
33532
|
var long = new $util.Long(0, 0, true);
|
|
31897
33533
|
object.validAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
@@ -31902,19 +33538,17 @@
|
|
|
31902
33538
|
object.validUntil = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
31903
33539
|
} else
|
|
31904
33540
|
object.validUntil = options.longs === String ? "0" : 0;
|
|
31905
|
-
|
|
31906
|
-
object.passkeySignature = "";
|
|
31907
|
-
else {
|
|
31908
|
-
object.passkeySignature = [];
|
|
31909
|
-
if (options.bytes !== Array)
|
|
31910
|
-
object.passkeySignature = $util.newBuffer(object.passkeySignature);
|
|
31911
|
-
}
|
|
33541
|
+
object.encodingHashParams = null;
|
|
31912
33542
|
}
|
|
31913
33543
|
if (message.executions && message.executions.length) {
|
|
31914
33544
|
object.executions = [];
|
|
31915
33545
|
for (var j = 0; j < message.executions.length; ++j)
|
|
31916
|
-
object.executions[j] = $root.TW.
|
|
33546
|
+
object.executions[j] = $root.TW.BizPasskeySession.Proto.Execution.toObject(message.executions[j], options);
|
|
31917
33547
|
}
|
|
33548
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
|
33549
|
+
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;
|
|
33550
|
+
if (message.nonce != null && message.hasOwnProperty("nonce"))
|
|
33551
|
+
object.nonce = options.bytes === String ? $util.base64.encode(message.nonce, 0, message.nonce.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonce) : message.nonce;
|
|
31918
33552
|
if (message.validAfter != null && message.hasOwnProperty("validAfter"))
|
|
31919
33553
|
if (typeof message.validAfter === "number")
|
|
31920
33554
|
object.validAfter = options.longs === String ? String(message.validAfter) : message.validAfter;
|
|
@@ -31925,250 +33559,29 @@
|
|
|
31925
33559
|
object.validUntil = options.longs === String ? String(message.validUntil) : message.validUntil;
|
|
31926
33560
|
else
|
|
31927
33561
|
object.validUntil = options.longs === String ? $util.Long.prototype.toString.call(message.validUntil) : options.longs === Number ? new $util.LongBits(message.validUntil.low >>> 0, message.validUntil.high >>> 0).toNumber(true) : message.validUntil;
|
|
31928
|
-
if (message.
|
|
31929
|
-
object.
|
|
33562
|
+
if (message.encodingHashParams != null && message.hasOwnProperty("encodingHashParams"))
|
|
33563
|
+
object.encodingHashParams = $root.TW.BizPasskeySession.Proto.EncodingHashParams.toObject(message.encodingHashParams, options);
|
|
31930
33564
|
return object;
|
|
31931
33565
|
};
|
|
31932
33566
|
|
|
31933
33567
|
/**
|
|
31934
|
-
* Converts this
|
|
33568
|
+
* Converts this ExecuteWithSignatureInput to JSON.
|
|
31935
33569
|
* @function toJSON
|
|
31936
|
-
* @memberof TW.
|
|
33570
|
+
* @memberof TW.BizPasskeySession.Proto.ExecuteWithSignatureInput
|
|
31937
33571
|
* @instance
|
|
31938
33572
|
* @returns {Object.<string,*>} JSON object
|
|
31939
33573
|
*/
|
|
31940
|
-
|
|
33574
|
+
ExecuteWithSignatureInput.prototype.toJSON = function toJSON() {
|
|
31941
33575
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
31942
33576
|
};
|
|
31943
33577
|
|
|
31944
|
-
|
|
31945
|
-
|
|
31946
|
-
/**
|
|
31947
|
-
* Properties of an Execution.
|
|
31948
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
|
|
31949
|
-
* @interface IExecution
|
|
31950
|
-
* @property {string|null} [address] Execution address
|
|
31951
|
-
* @property {Uint8Array|null} [amount] Execution amount
|
|
31952
|
-
* @property {Uint8Array|null} [payload] Execution payload
|
|
31953
|
-
*/
|
|
31954
|
-
|
|
31955
|
-
/**
|
|
31956
|
-
* Constructs a new Execution.
|
|
31957
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
|
|
31958
|
-
* @classdesc Represents an Execution.
|
|
31959
|
-
* @implements IExecution
|
|
31960
|
-
* @constructor
|
|
31961
|
-
* @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution=} [properties] Properties to set
|
|
31962
|
-
*/
|
|
31963
|
-
function Execution(properties) {
|
|
31964
|
-
if (properties)
|
|
31965
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
31966
|
-
if (properties[keys[i]] != null)
|
|
31967
|
-
this[keys[i]] = properties[keys[i]];
|
|
31968
|
-
}
|
|
31969
|
-
|
|
31970
|
-
/**
|
|
31971
|
-
* Execution address.
|
|
31972
|
-
* @member {string} address
|
|
31973
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
31974
|
-
* @instance
|
|
31975
|
-
*/
|
|
31976
|
-
Execution.prototype.address = "";
|
|
31977
|
-
|
|
31978
|
-
/**
|
|
31979
|
-
* Execution amount.
|
|
31980
|
-
* @member {Uint8Array} amount
|
|
31981
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
31982
|
-
* @instance
|
|
31983
|
-
*/
|
|
31984
|
-
Execution.prototype.amount = $util.newBuffer([]);
|
|
31985
|
-
|
|
31986
|
-
/**
|
|
31987
|
-
* Execution payload.
|
|
31988
|
-
* @member {Uint8Array} payload
|
|
31989
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
31990
|
-
* @instance
|
|
31991
|
-
*/
|
|
31992
|
-
Execution.prototype.payload = $util.newBuffer([]);
|
|
31993
|
-
|
|
31994
|
-
/**
|
|
31995
|
-
* Creates a new Execution instance using the specified properties.
|
|
31996
|
-
* @function create
|
|
31997
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
31998
|
-
* @static
|
|
31999
|
-
* @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution=} [properties] Properties to set
|
|
32000
|
-
* @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} Execution instance
|
|
32001
|
-
*/
|
|
32002
|
-
Execution.create = function create(properties) {
|
|
32003
|
-
return new Execution(properties);
|
|
32004
|
-
};
|
|
32005
|
-
|
|
32006
|
-
/**
|
|
32007
|
-
* Encodes the specified Execution message. Does not implicitly {@link TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.verify|verify} messages.
|
|
32008
|
-
* @function encode
|
|
32009
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
32010
|
-
* @static
|
|
32011
|
-
* @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution} message Execution message or plain object to encode
|
|
32012
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32013
|
-
* @returns {$protobuf.Writer} Writer
|
|
32014
|
-
*/
|
|
32015
|
-
Execution.encode = function encode(message, writer) {
|
|
32016
|
-
if (!writer)
|
|
32017
|
-
writer = $Writer.create();
|
|
32018
|
-
if (message.address != null && Object.hasOwnProperty.call(message, "address"))
|
|
32019
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.address);
|
|
32020
|
-
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
|
32021
|
-
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.amount);
|
|
32022
|
-
if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
|
|
32023
|
-
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload);
|
|
32024
|
-
return writer;
|
|
32025
|
-
};
|
|
32026
|
-
|
|
32027
|
-
/**
|
|
32028
|
-
* Decodes an Execution message from the specified reader or buffer.
|
|
32029
|
-
* @function decode
|
|
32030
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
32031
|
-
* @static
|
|
32032
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32033
|
-
* @param {number} [length] Message length if known beforehand
|
|
32034
|
-
* @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} Execution
|
|
32035
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32036
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32037
|
-
*/
|
|
32038
|
-
Execution.decode = function decode(reader, length) {
|
|
32039
|
-
if (!(reader instanceof $Reader))
|
|
32040
|
-
reader = $Reader.create(reader);
|
|
32041
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution();
|
|
32042
|
-
while (reader.pos < end) {
|
|
32043
|
-
var tag = reader.uint32();
|
|
32044
|
-
switch (tag >>> 3) {
|
|
32045
|
-
case 1:
|
|
32046
|
-
message.address = reader.string();
|
|
32047
|
-
break;
|
|
32048
|
-
case 2:
|
|
32049
|
-
message.amount = reader.bytes();
|
|
32050
|
-
break;
|
|
32051
|
-
case 3:
|
|
32052
|
-
message.payload = reader.bytes();
|
|
32053
|
-
break;
|
|
32054
|
-
default:
|
|
32055
|
-
reader.skipType(tag & 7);
|
|
32056
|
-
break;
|
|
32057
|
-
}
|
|
32058
|
-
}
|
|
32059
|
-
return message;
|
|
32060
|
-
};
|
|
32061
|
-
|
|
32062
|
-
/**
|
|
32063
|
-
* Verifies an Execution message.
|
|
32064
|
-
* @function verify
|
|
32065
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
32066
|
-
* @static
|
|
32067
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
32068
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
32069
|
-
*/
|
|
32070
|
-
Execution.verify = function verify(message) {
|
|
32071
|
-
if (typeof message !== "object" || message === null)
|
|
32072
|
-
return "object expected";
|
|
32073
|
-
if (message.address != null && message.hasOwnProperty("address"))
|
|
32074
|
-
if (!$util.isString(message.address))
|
|
32075
|
-
return "address: string expected";
|
|
32076
|
-
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
32077
|
-
if (!(message.amount && typeof message.amount.length === "number" || $util.isString(message.amount)))
|
|
32078
|
-
return "amount: buffer expected";
|
|
32079
|
-
if (message.payload != null && message.hasOwnProperty("payload"))
|
|
32080
|
-
if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
|
|
32081
|
-
return "payload: buffer expected";
|
|
32082
|
-
return null;
|
|
32083
|
-
};
|
|
32084
|
-
|
|
32085
|
-
/**
|
|
32086
|
-
* Creates an Execution message from a plain object. Also converts values to their respective internal types.
|
|
32087
|
-
* @function fromObject
|
|
32088
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
32089
|
-
* @static
|
|
32090
|
-
* @param {Object.<string,*>} object Plain object
|
|
32091
|
-
* @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} Execution
|
|
32092
|
-
*/
|
|
32093
|
-
Execution.fromObject = function fromObject(object) {
|
|
32094
|
-
if (object instanceof $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution)
|
|
32095
|
-
return object;
|
|
32096
|
-
var message = new $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution();
|
|
32097
|
-
if (object.address != null)
|
|
32098
|
-
message.address = String(object.address);
|
|
32099
|
-
if (object.amount != null)
|
|
32100
|
-
if (typeof object.amount === "string")
|
|
32101
|
-
$util.base64.decode(object.amount, message.amount = $util.newBuffer($util.base64.length(object.amount)), 0);
|
|
32102
|
-
else if (object.amount.length)
|
|
32103
|
-
message.amount = object.amount;
|
|
32104
|
-
if (object.payload != null)
|
|
32105
|
-
if (typeof object.payload === "string")
|
|
32106
|
-
$util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
|
|
32107
|
-
else if (object.payload.length)
|
|
32108
|
-
message.payload = object.payload;
|
|
32109
|
-
return message;
|
|
32110
|
-
};
|
|
32111
|
-
|
|
32112
|
-
/**
|
|
32113
|
-
* Creates a plain object from an Execution message. Also converts values to other types if specified.
|
|
32114
|
-
* @function toObject
|
|
32115
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
32116
|
-
* @static
|
|
32117
|
-
* @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} message Execution
|
|
32118
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
32119
|
-
* @returns {Object.<string,*>} Plain object
|
|
32120
|
-
*/
|
|
32121
|
-
Execution.toObject = function toObject(message, options) {
|
|
32122
|
-
if (!options)
|
|
32123
|
-
options = {};
|
|
32124
|
-
var object = {};
|
|
32125
|
-
if (options.defaults) {
|
|
32126
|
-
object.address = "";
|
|
32127
|
-
if (options.bytes === String)
|
|
32128
|
-
object.amount = "";
|
|
32129
|
-
else {
|
|
32130
|
-
object.amount = [];
|
|
32131
|
-
if (options.bytes !== Array)
|
|
32132
|
-
object.amount = $util.newBuffer(object.amount);
|
|
32133
|
-
}
|
|
32134
|
-
if (options.bytes === String)
|
|
32135
|
-
object.payload = "";
|
|
32136
|
-
else {
|
|
32137
|
-
object.payload = [];
|
|
32138
|
-
if (options.bytes !== Array)
|
|
32139
|
-
object.payload = $util.newBuffer(object.payload);
|
|
32140
|
-
}
|
|
32141
|
-
}
|
|
32142
|
-
if (message.address != null && message.hasOwnProperty("address"))
|
|
32143
|
-
object.address = message.address;
|
|
32144
|
-
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
32145
|
-
object.amount = options.bytes === String ? $util.base64.encode(message.amount, 0, message.amount.length) : options.bytes === Array ? Array.prototype.slice.call(message.amount) : message.amount;
|
|
32146
|
-
if (message.payload != null && message.hasOwnProperty("payload"))
|
|
32147
|
-
object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
|
|
32148
|
-
return object;
|
|
32149
|
-
};
|
|
32150
|
-
|
|
32151
|
-
/**
|
|
32152
|
-
* Converts this Execution to JSON.
|
|
32153
|
-
* @function toJSON
|
|
32154
|
-
* @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
|
|
32155
|
-
* @instance
|
|
32156
|
-
* @returns {Object.<string,*>} JSON object
|
|
32157
|
-
*/
|
|
32158
|
-
Execution.prototype.toJSON = function toJSON() {
|
|
32159
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
32160
|
-
};
|
|
32161
|
-
|
|
32162
|
-
return Execution;
|
|
32163
|
-
})();
|
|
32164
|
-
|
|
32165
|
-
return ExecuteWithPasskeySessionInput;
|
|
33578
|
+
return ExecuteWithSignatureInput;
|
|
32166
33579
|
})();
|
|
32167
33580
|
|
|
32168
33581
|
return Proto;
|
|
32169
33582
|
})();
|
|
32170
33583
|
|
|
32171
|
-
return
|
|
33584
|
+
return BizPasskeySession;
|
|
32172
33585
|
})();
|
|
32173
33586
|
|
|
32174
33587
|
TW.Cardano = (function() {
|