@trustwallet/wallet-core 3.1.3 → 3.1.5
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 +4 -4
- package/dist/generated/core_proto.js +19 -37
- package/dist/lib/wallet-core.js +132 -128
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +607 -607
- package/package.json +1 -1
@@ -26634,8 +26634,8 @@ export namespace TW {
|
|
26634
26634
|
/** Properties of a SwapInput. */
|
26635
26635
|
interface ISwapInput {
|
26636
26636
|
|
26637
|
-
/** SwapInput
|
26638
|
-
|
26637
|
+
/** SwapInput fromAsset */
|
26638
|
+
fromAsset?: (TW.THORChainSwap.Proto.IAsset|null);
|
26639
26639
|
|
26640
26640
|
/** SwapInput fromAddress */
|
26641
26641
|
fromAddress?: (string|null);
|
@@ -26677,8 +26677,8 @@ export namespace TW {
|
|
26677
26677
|
*/
|
26678
26678
|
constructor(properties?: TW.THORChainSwap.Proto.ISwapInput);
|
26679
26679
|
|
26680
|
-
/** SwapInput
|
26681
|
-
public
|
26680
|
+
/** SwapInput fromAsset. */
|
26681
|
+
public fromAsset?: (TW.THORChainSwap.Proto.IAsset|null);
|
26682
26682
|
|
26683
26683
|
/** SwapInput fromAddress. */
|
26684
26684
|
public fromAddress: string;
|
@@ -76386,7 +76386,7 @@
|
|
76386
76386
|
* Properties of a SwapInput.
|
76387
76387
|
* @memberof TW.THORChainSwap.Proto
|
76388
76388
|
* @interface ISwapInput
|
76389
|
-
* @property {TW.THORChainSwap.Proto.
|
76389
|
+
* @property {TW.THORChainSwap.Proto.IAsset|null} [fromAsset] SwapInput fromAsset
|
76390
76390
|
* @property {string|null} [fromAddress] SwapInput fromAddress
|
76391
76391
|
* @property {TW.THORChainSwap.Proto.IAsset|null} [toAsset] SwapInput toAsset
|
76392
76392
|
* @property {string|null} [toAddress] SwapInput toAddress
|
@@ -76415,12 +76415,12 @@
|
|
76415
76415
|
}
|
76416
76416
|
|
76417
76417
|
/**
|
76418
|
-
* SwapInput
|
76419
|
-
* @member {TW.THORChainSwap.Proto.
|
76418
|
+
* SwapInput fromAsset.
|
76419
|
+
* @member {TW.THORChainSwap.Proto.IAsset|null|undefined} fromAsset
|
76420
76420
|
* @memberof TW.THORChainSwap.Proto.SwapInput
|
76421
76421
|
* @instance
|
76422
76422
|
*/
|
76423
|
-
SwapInput.prototype.
|
76423
|
+
SwapInput.prototype.fromAsset = null;
|
76424
76424
|
|
76425
76425
|
/**
|
76426
76426
|
* SwapInput fromAddress.
|
@@ -76526,8 +76526,8 @@
|
|
76526
76526
|
SwapInput.encode = function encode(message, writer) {
|
76527
76527
|
if (!writer)
|
76528
76528
|
writer = $Writer.create();
|
76529
|
-
if (message.
|
76530
|
-
writer.uint32(/* id 1, wireType
|
76529
|
+
if (message.fromAsset != null && Object.hasOwnProperty.call(message, "fromAsset"))
|
76530
|
+
$root.TW.THORChainSwap.Proto.Asset.encode(message.fromAsset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
76531
76531
|
if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress"))
|
76532
76532
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.fromAddress);
|
76533
76533
|
if (message.toAsset != null && Object.hasOwnProperty.call(message, "toAsset"))
|
@@ -76570,7 +76570,7 @@
|
|
76570
76570
|
var tag = reader.uint32();
|
76571
76571
|
switch (tag >>> 3) {
|
76572
76572
|
case 1:
|
76573
|
-
message.
|
76573
|
+
message.fromAsset = $root.TW.THORChainSwap.Proto.Asset.decode(reader, reader.uint32());
|
76574
76574
|
break;
|
76575
76575
|
case 2:
|
76576
76576
|
message.fromAddress = reader.string();
|
@@ -76621,16 +76621,11 @@
|
|
76621
76621
|
SwapInput.verify = function verify(message) {
|
76622
76622
|
if (typeof message !== "object" || message === null)
|
76623
76623
|
return "object expected";
|
76624
|
-
if (message.
|
76625
|
-
|
76626
|
-
|
76627
|
-
return "
|
76628
|
-
|
76629
|
-
case 1:
|
76630
|
-
case 2:
|
76631
|
-
case 3:
|
76632
|
-
break;
|
76633
|
-
}
|
76624
|
+
if (message.fromAsset != null && message.hasOwnProperty("fromAsset")) {
|
76625
|
+
var error = $root.TW.THORChainSwap.Proto.Asset.verify(message.fromAsset);
|
76626
|
+
if (error)
|
76627
|
+
return "fromAsset." + error;
|
76628
|
+
}
|
76634
76629
|
if (message.fromAddress != null && message.hasOwnProperty("fromAddress"))
|
76635
76630
|
if (!$util.isString(message.fromAddress))
|
76636
76631
|
return "fromAddress: string expected";
|
@@ -76678,23 +76673,10 @@
|
|
76678
76673
|
if (object instanceof $root.TW.THORChainSwap.Proto.SwapInput)
|
76679
76674
|
return object;
|
76680
76675
|
var message = new $root.TW.THORChainSwap.Proto.SwapInput();
|
76681
|
-
|
76682
|
-
|
76683
|
-
|
76684
|
-
message.
|
76685
|
-
break;
|
76686
|
-
case "BTC":
|
76687
|
-
case 1:
|
76688
|
-
message.fromChain = 1;
|
76689
|
-
break;
|
76690
|
-
case "ETH":
|
76691
|
-
case 2:
|
76692
|
-
message.fromChain = 2;
|
76693
|
-
break;
|
76694
|
-
case "BNB":
|
76695
|
-
case 3:
|
76696
|
-
message.fromChain = 3;
|
76697
|
-
break;
|
76676
|
+
if (object.fromAsset != null) {
|
76677
|
+
if (typeof object.fromAsset !== "object")
|
76678
|
+
throw TypeError(".TW.THORChainSwap.Proto.SwapInput.fromAsset: object expected");
|
76679
|
+
message.fromAsset = $root.TW.THORChainSwap.Proto.Asset.fromObject(object.fromAsset);
|
76698
76680
|
}
|
76699
76681
|
if (object.fromAddress != null)
|
76700
76682
|
message.fromAddress = String(object.fromAddress);
|
@@ -76736,7 +76718,7 @@
|
|
76736
76718
|
options = {};
|
76737
76719
|
var object = {};
|
76738
76720
|
if (options.defaults) {
|
76739
|
-
object.
|
76721
|
+
object.fromAsset = null;
|
76740
76722
|
object.fromAddress = "";
|
76741
76723
|
object.toAsset = null;
|
76742
76724
|
object.toAddress = "";
|
@@ -76748,8 +76730,8 @@
|
|
76748
76730
|
object.affiliateFeeRateBp = "";
|
76749
76731
|
object.extraMemo = "";
|
76750
76732
|
}
|
76751
|
-
if (message.
|
76752
|
-
object.
|
76733
|
+
if (message.fromAsset != null && message.hasOwnProperty("fromAsset"))
|
76734
|
+
object.fromAsset = $root.TW.THORChainSwap.Proto.Asset.toObject(message.fromAsset, options);
|
76753
76735
|
if (message.fromAddress != null && message.hasOwnProperty("fromAddress"))
|
76754
76736
|
object.fromAddress = message.fromAddress;
|
76755
76737
|
if (message.toAsset != null && message.hasOwnProperty("toAsset"))
|