@trustwallet/wallet-core 2.9.6 → 3.0.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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ Trust Wallet Core is an open source, cross platform and cross blockchain library, it adds beta support for WebAssembly recently, You can try it out now:
2
+
3
+ ```js
4
+ npm install @trustwallet/wallet-core
5
+ ```
6
+
7
+ Documentation will be added to [developer.trustwallet.com](https://developer.trustwallet.com/wallet-core) later, please check out [tests](https://github.com/trustwallet/wallet-core/tree/master/wasm/tests) here for API usages.
@@ -5496,6 +5496,18 @@ export namespace TW {
5496
5496
 
5497
5497
  /** Message wasmTerraExecuteContractGeneric */
5498
5498
  wasmTerraExecuteContractGeneric?: (TW.Cosmos.Proto.Message.IWasmTerraExecuteContractGeneric|null);
5499
+
5500
+ /** Message wasmExecuteContractTransferMessage */
5501
+ wasmExecuteContractTransferMessage?: (TW.Cosmos.Proto.Message.IWasmExecuteContractTransfer|null);
5502
+
5503
+ /** Message wasmExecuteContractSendMessage */
5504
+ wasmExecuteContractSendMessage?: (TW.Cosmos.Proto.Message.IWasmExecuteContractSend|null);
5505
+
5506
+ /** Message wasmExecuteContractGeneric */
5507
+ wasmExecuteContractGeneric?: (TW.Cosmos.Proto.Message.IWasmExecuteContractGeneric|null);
5508
+
5509
+ /** Message signDirectMessage */
5510
+ signDirectMessage?: (TW.Cosmos.Proto.Message.ISignDirect|null);
5499
5511
  }
5500
5512
 
5501
5513
  /** Represents a Message. */
@@ -5540,8 +5552,20 @@ export namespace TW {
5540
5552
  /** Message wasmTerraExecuteContractGeneric. */
5541
5553
  public wasmTerraExecuteContractGeneric?: (TW.Cosmos.Proto.Message.IWasmTerraExecuteContractGeneric|null);
5542
5554
 
5555
+ /** Message wasmExecuteContractTransferMessage. */
5556
+ public wasmExecuteContractTransferMessage?: (TW.Cosmos.Proto.Message.IWasmExecuteContractTransfer|null);
5557
+
5558
+ /** Message wasmExecuteContractSendMessage. */
5559
+ public wasmExecuteContractSendMessage?: (TW.Cosmos.Proto.Message.IWasmExecuteContractSend|null);
5560
+
5561
+ /** Message wasmExecuteContractGeneric. */
5562
+ public wasmExecuteContractGeneric?: (TW.Cosmos.Proto.Message.IWasmExecuteContractGeneric|null);
5563
+
5564
+ /** Message signDirectMessage. */
5565
+ public signDirectMessage?: (TW.Cosmos.Proto.Message.ISignDirect|null);
5566
+
5543
5567
  /** Message messageOneof. */
5544
- public messageOneof?: ("sendCoinsMessage"|"transferTokensMessage"|"stakeMessage"|"unstakeMessage"|"restakeMessage"|"withdrawStakeRewardMessage"|"rawJsonMessage"|"wasmTerraExecuteContractTransferMessage"|"wasmTerraExecuteContractSendMessage"|"thorchainSendMessage"|"wasmTerraExecuteContractGeneric");
5568
+ public messageOneof?: ("sendCoinsMessage"|"transferTokensMessage"|"stakeMessage"|"unstakeMessage"|"restakeMessage"|"withdrawStakeRewardMessage"|"rawJsonMessage"|"wasmTerraExecuteContractTransferMessage"|"wasmTerraExecuteContractSendMessage"|"thorchainSendMessage"|"wasmTerraExecuteContractGeneric"|"wasmExecuteContractTransferMessage"|"wasmExecuteContractSendMessage"|"wasmExecuteContractGeneric"|"signDirectMessage");
5545
5569
 
5546
5570
  /**
5547
5571
  * Creates a new Message instance using the specified properties.
@@ -6533,6 +6557,291 @@ export namespace TW {
6533
6557
  public toJSON(): { [k: string]: any };
6534
6558
  }
6535
6559
 
6560
+ /** Properties of a WasmExecuteContractTransfer. */
6561
+ interface IWasmExecuteContractTransfer {
6562
+
6563
+ /** WasmExecuteContractTransfer senderAddress */
6564
+ senderAddress?: (string|null);
6565
+
6566
+ /** WasmExecuteContractTransfer contractAddress */
6567
+ contractAddress?: (string|null);
6568
+
6569
+ /** WasmExecuteContractTransfer amount */
6570
+ amount?: (Uint8Array|null);
6571
+
6572
+ /** WasmExecuteContractTransfer recipientAddress */
6573
+ recipientAddress?: (string|null);
6574
+ }
6575
+
6576
+ /** Represents a WasmExecuteContractTransfer. */
6577
+ class WasmExecuteContractTransfer implements IWasmExecuteContractTransfer {
6578
+
6579
+ /**
6580
+ * Constructs a new WasmExecuteContractTransfer.
6581
+ * @param [properties] Properties to set
6582
+ */
6583
+ constructor(properties?: TW.Cosmos.Proto.Message.IWasmExecuteContractTransfer);
6584
+
6585
+ /** WasmExecuteContractTransfer senderAddress. */
6586
+ public senderAddress: string;
6587
+
6588
+ /** WasmExecuteContractTransfer contractAddress. */
6589
+ public contractAddress: string;
6590
+
6591
+ /** WasmExecuteContractTransfer amount. */
6592
+ public amount: Uint8Array;
6593
+
6594
+ /** WasmExecuteContractTransfer recipientAddress. */
6595
+ public recipientAddress: string;
6596
+
6597
+ /**
6598
+ * Creates a new WasmExecuteContractTransfer instance using the specified properties.
6599
+ * @param [properties] Properties to set
6600
+ * @returns WasmExecuteContractTransfer instance
6601
+ */
6602
+ public static create(properties?: TW.Cosmos.Proto.Message.IWasmExecuteContractTransfer): TW.Cosmos.Proto.Message.WasmExecuteContractTransfer;
6603
+
6604
+ /**
6605
+ * Encodes the specified WasmExecuteContractTransfer message. Does not implicitly {@link TW.Cosmos.Proto.Message.WasmExecuteContractTransfer.verify|verify} messages.
6606
+ * @param message WasmExecuteContractTransfer message or plain object to encode
6607
+ * @param [writer] Writer to encode to
6608
+ * @returns Writer
6609
+ */
6610
+ public static encode(message: TW.Cosmos.Proto.Message.IWasmExecuteContractTransfer, writer?: $protobuf.Writer): $protobuf.Writer;
6611
+
6612
+ /**
6613
+ * Decodes a WasmExecuteContractTransfer message from the specified reader or buffer.
6614
+ * @param reader Reader or buffer to decode from
6615
+ * @param [length] Message length if known beforehand
6616
+ * @returns WasmExecuteContractTransfer
6617
+ * @throws {Error} If the payload is not a reader or valid buffer
6618
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6619
+ */
6620
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cosmos.Proto.Message.WasmExecuteContractTransfer;
6621
+
6622
+ /**
6623
+ * Verifies a WasmExecuteContractTransfer message.
6624
+ * @param message Plain object to verify
6625
+ * @returns `null` if valid, otherwise the reason why it is not
6626
+ */
6627
+ public static verify(message: { [k: string]: any }): (string|null);
6628
+
6629
+ /**
6630
+ * Creates a WasmExecuteContractTransfer message from a plain object. Also converts values to their respective internal types.
6631
+ * @param object Plain object
6632
+ * @returns WasmExecuteContractTransfer
6633
+ */
6634
+ public static fromObject(object: { [k: string]: any }): TW.Cosmos.Proto.Message.WasmExecuteContractTransfer;
6635
+
6636
+ /**
6637
+ * Creates a plain object from a WasmExecuteContractTransfer message. Also converts values to other types if specified.
6638
+ * @param message WasmExecuteContractTransfer
6639
+ * @param [options] Conversion options
6640
+ * @returns Plain object
6641
+ */
6642
+ public static toObject(message: TW.Cosmos.Proto.Message.WasmExecuteContractTransfer, options?: $protobuf.IConversionOptions): { [k: string]: any };
6643
+
6644
+ /**
6645
+ * Converts this WasmExecuteContractTransfer to JSON.
6646
+ * @returns JSON object
6647
+ */
6648
+ public toJSON(): { [k: string]: any };
6649
+ }
6650
+
6651
+ /** Properties of a WasmExecuteContractSend. */
6652
+ interface IWasmExecuteContractSend {
6653
+
6654
+ /** WasmExecuteContractSend senderAddress */
6655
+ senderAddress?: (string|null);
6656
+
6657
+ /** WasmExecuteContractSend contractAddress */
6658
+ contractAddress?: (string|null);
6659
+
6660
+ /** WasmExecuteContractSend amount */
6661
+ amount?: (Uint8Array|null);
6662
+
6663
+ /** WasmExecuteContractSend recipientContractAddress */
6664
+ recipientContractAddress?: (string|null);
6665
+
6666
+ /** WasmExecuteContractSend msg */
6667
+ msg?: (string|null);
6668
+
6669
+ /** WasmExecuteContractSend coin */
6670
+ coin?: (string[]|null);
6671
+ }
6672
+
6673
+ /** Represents a WasmExecuteContractSend. */
6674
+ class WasmExecuteContractSend implements IWasmExecuteContractSend {
6675
+
6676
+ /**
6677
+ * Constructs a new WasmExecuteContractSend.
6678
+ * @param [properties] Properties to set
6679
+ */
6680
+ constructor(properties?: TW.Cosmos.Proto.Message.IWasmExecuteContractSend);
6681
+
6682
+ /** WasmExecuteContractSend senderAddress. */
6683
+ public senderAddress: string;
6684
+
6685
+ /** WasmExecuteContractSend contractAddress. */
6686
+ public contractAddress: string;
6687
+
6688
+ /** WasmExecuteContractSend amount. */
6689
+ public amount: Uint8Array;
6690
+
6691
+ /** WasmExecuteContractSend recipientContractAddress. */
6692
+ public recipientContractAddress: string;
6693
+
6694
+ /** WasmExecuteContractSend msg. */
6695
+ public msg: string;
6696
+
6697
+ /** WasmExecuteContractSend coin. */
6698
+ public coin: string[];
6699
+
6700
+ /**
6701
+ * Creates a new WasmExecuteContractSend instance using the specified properties.
6702
+ * @param [properties] Properties to set
6703
+ * @returns WasmExecuteContractSend instance
6704
+ */
6705
+ public static create(properties?: TW.Cosmos.Proto.Message.IWasmExecuteContractSend): TW.Cosmos.Proto.Message.WasmExecuteContractSend;
6706
+
6707
+ /**
6708
+ * Encodes the specified WasmExecuteContractSend message. Does not implicitly {@link TW.Cosmos.Proto.Message.WasmExecuteContractSend.verify|verify} messages.
6709
+ * @param message WasmExecuteContractSend message or plain object to encode
6710
+ * @param [writer] Writer to encode to
6711
+ * @returns Writer
6712
+ */
6713
+ public static encode(message: TW.Cosmos.Proto.Message.IWasmExecuteContractSend, writer?: $protobuf.Writer): $protobuf.Writer;
6714
+
6715
+ /**
6716
+ * Decodes a WasmExecuteContractSend message from the specified reader or buffer.
6717
+ * @param reader Reader or buffer to decode from
6718
+ * @param [length] Message length if known beforehand
6719
+ * @returns WasmExecuteContractSend
6720
+ * @throws {Error} If the payload is not a reader or valid buffer
6721
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6722
+ */
6723
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cosmos.Proto.Message.WasmExecuteContractSend;
6724
+
6725
+ /**
6726
+ * Verifies a WasmExecuteContractSend message.
6727
+ * @param message Plain object to verify
6728
+ * @returns `null` if valid, otherwise the reason why it is not
6729
+ */
6730
+ public static verify(message: { [k: string]: any }): (string|null);
6731
+
6732
+ /**
6733
+ * Creates a WasmExecuteContractSend message from a plain object. Also converts values to their respective internal types.
6734
+ * @param object Plain object
6735
+ * @returns WasmExecuteContractSend
6736
+ */
6737
+ public static fromObject(object: { [k: string]: any }): TW.Cosmos.Proto.Message.WasmExecuteContractSend;
6738
+
6739
+ /**
6740
+ * Creates a plain object from a WasmExecuteContractSend message. Also converts values to other types if specified.
6741
+ * @param message WasmExecuteContractSend
6742
+ * @param [options] Conversion options
6743
+ * @returns Plain object
6744
+ */
6745
+ public static toObject(message: TW.Cosmos.Proto.Message.WasmExecuteContractSend, options?: $protobuf.IConversionOptions): { [k: string]: any };
6746
+
6747
+ /**
6748
+ * Converts this WasmExecuteContractSend to JSON.
6749
+ * @returns JSON object
6750
+ */
6751
+ public toJSON(): { [k: string]: any };
6752
+ }
6753
+
6754
+ /** Properties of a WasmExecuteContractGeneric. */
6755
+ interface IWasmExecuteContractGeneric {
6756
+
6757
+ /** WasmExecuteContractGeneric senderAddress */
6758
+ senderAddress?: (string|null);
6759
+
6760
+ /** WasmExecuteContractGeneric contractAddress */
6761
+ contractAddress?: (string|null);
6762
+
6763
+ /** WasmExecuteContractGeneric executeMsg */
6764
+ executeMsg?: (string|null);
6765
+
6766
+ /** WasmExecuteContractGeneric coins */
6767
+ coins?: (TW.Cosmos.Proto.IAmount[]|null);
6768
+ }
6769
+
6770
+ /** Represents a WasmExecuteContractGeneric. */
6771
+ class WasmExecuteContractGeneric implements IWasmExecuteContractGeneric {
6772
+
6773
+ /**
6774
+ * Constructs a new WasmExecuteContractGeneric.
6775
+ * @param [properties] Properties to set
6776
+ */
6777
+ constructor(properties?: TW.Cosmos.Proto.Message.IWasmExecuteContractGeneric);
6778
+
6779
+ /** WasmExecuteContractGeneric senderAddress. */
6780
+ public senderAddress: string;
6781
+
6782
+ /** WasmExecuteContractGeneric contractAddress. */
6783
+ public contractAddress: string;
6784
+
6785
+ /** WasmExecuteContractGeneric executeMsg. */
6786
+ public executeMsg: string;
6787
+
6788
+ /** WasmExecuteContractGeneric coins. */
6789
+ public coins: TW.Cosmos.Proto.IAmount[];
6790
+
6791
+ /**
6792
+ * Creates a new WasmExecuteContractGeneric instance using the specified properties.
6793
+ * @param [properties] Properties to set
6794
+ * @returns WasmExecuteContractGeneric instance
6795
+ */
6796
+ public static create(properties?: TW.Cosmos.Proto.Message.IWasmExecuteContractGeneric): TW.Cosmos.Proto.Message.WasmExecuteContractGeneric;
6797
+
6798
+ /**
6799
+ * Encodes the specified WasmExecuteContractGeneric message. Does not implicitly {@link TW.Cosmos.Proto.Message.WasmExecuteContractGeneric.verify|verify} messages.
6800
+ * @param message WasmExecuteContractGeneric message or plain object to encode
6801
+ * @param [writer] Writer to encode to
6802
+ * @returns Writer
6803
+ */
6804
+ public static encode(message: TW.Cosmos.Proto.Message.IWasmExecuteContractGeneric, writer?: $protobuf.Writer): $protobuf.Writer;
6805
+
6806
+ /**
6807
+ * Decodes a WasmExecuteContractGeneric message from the specified reader or buffer.
6808
+ * @param reader Reader or buffer to decode from
6809
+ * @param [length] Message length if known beforehand
6810
+ * @returns WasmExecuteContractGeneric
6811
+ * @throws {Error} If the payload is not a reader or valid buffer
6812
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6813
+ */
6814
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cosmos.Proto.Message.WasmExecuteContractGeneric;
6815
+
6816
+ /**
6817
+ * Verifies a WasmExecuteContractGeneric message.
6818
+ * @param message Plain object to verify
6819
+ * @returns `null` if valid, otherwise the reason why it is not
6820
+ */
6821
+ public static verify(message: { [k: string]: any }): (string|null);
6822
+
6823
+ /**
6824
+ * Creates a WasmExecuteContractGeneric message from a plain object. Also converts values to their respective internal types.
6825
+ * @param object Plain object
6826
+ * @returns WasmExecuteContractGeneric
6827
+ */
6828
+ public static fromObject(object: { [k: string]: any }): TW.Cosmos.Proto.Message.WasmExecuteContractGeneric;
6829
+
6830
+ /**
6831
+ * Creates a plain object from a WasmExecuteContractGeneric message. Also converts values to other types if specified.
6832
+ * @param message WasmExecuteContractGeneric
6833
+ * @param [options] Conversion options
6834
+ * @returns Plain object
6835
+ */
6836
+ public static toObject(message: TW.Cosmos.Proto.Message.WasmExecuteContractGeneric, options?: $protobuf.IConversionOptions): { [k: string]: any };
6837
+
6838
+ /**
6839
+ * Converts this WasmExecuteContractGeneric to JSON.
6840
+ * @returns JSON object
6841
+ */
6842
+ public toJSON(): { [k: string]: any };
6843
+ }
6844
+
6536
6845
  /** Properties of a RawJSON. */
6537
6846
  interface IRawJSON {
6538
6847
 
@@ -6611,6 +6920,85 @@ export namespace TW {
6611
6920
  */
6612
6921
  public toJSON(): { [k: string]: any };
6613
6922
  }
6923
+
6924
+ /** Properties of a SignDirect. */
6925
+ interface ISignDirect {
6926
+
6927
+ /** SignDirect bodyBytes */
6928
+ bodyBytes?: (Uint8Array|null);
6929
+
6930
+ /** SignDirect authInfoBytes */
6931
+ authInfoBytes?: (Uint8Array|null);
6932
+ }
6933
+
6934
+ /** Represents a SignDirect. */
6935
+ class SignDirect implements ISignDirect {
6936
+
6937
+ /**
6938
+ * Constructs a new SignDirect.
6939
+ * @param [properties] Properties to set
6940
+ */
6941
+ constructor(properties?: TW.Cosmos.Proto.Message.ISignDirect);
6942
+
6943
+ /** SignDirect bodyBytes. */
6944
+ public bodyBytes: Uint8Array;
6945
+
6946
+ /** SignDirect authInfoBytes. */
6947
+ public authInfoBytes: Uint8Array;
6948
+
6949
+ /**
6950
+ * Creates a new SignDirect instance using the specified properties.
6951
+ * @param [properties] Properties to set
6952
+ * @returns SignDirect instance
6953
+ */
6954
+ public static create(properties?: TW.Cosmos.Proto.Message.ISignDirect): TW.Cosmos.Proto.Message.SignDirect;
6955
+
6956
+ /**
6957
+ * Encodes the specified SignDirect message. Does not implicitly {@link TW.Cosmos.Proto.Message.SignDirect.verify|verify} messages.
6958
+ * @param message SignDirect message or plain object to encode
6959
+ * @param [writer] Writer to encode to
6960
+ * @returns Writer
6961
+ */
6962
+ public static encode(message: TW.Cosmos.Proto.Message.ISignDirect, writer?: $protobuf.Writer): $protobuf.Writer;
6963
+
6964
+ /**
6965
+ * Decodes a SignDirect message from the specified reader or buffer.
6966
+ * @param reader Reader or buffer to decode from
6967
+ * @param [length] Message length if known beforehand
6968
+ * @returns SignDirect
6969
+ * @throws {Error} If the payload is not a reader or valid buffer
6970
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6971
+ */
6972
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cosmos.Proto.Message.SignDirect;
6973
+
6974
+ /**
6975
+ * Verifies a SignDirect message.
6976
+ * @param message Plain object to verify
6977
+ * @returns `null` if valid, otherwise the reason why it is not
6978
+ */
6979
+ public static verify(message: { [k: string]: any }): (string|null);
6980
+
6981
+ /**
6982
+ * Creates a SignDirect message from a plain object. Also converts values to their respective internal types.
6983
+ * @param object Plain object
6984
+ * @returns SignDirect
6985
+ */
6986
+ public static fromObject(object: { [k: string]: any }): TW.Cosmos.Proto.Message.SignDirect;
6987
+
6988
+ /**
6989
+ * Creates a plain object from a SignDirect message. Also converts values to other types if specified.
6990
+ * @param message SignDirect
6991
+ * @param [options] Conversion options
6992
+ * @returns Plain object
6993
+ */
6994
+ public static toObject(message: TW.Cosmos.Proto.Message.SignDirect, options?: $protobuf.IConversionOptions): { [k: string]: any };
6995
+
6996
+ /**
6997
+ * Converts this SignDirect to JSON.
6998
+ * @returns JSON object
6999
+ */
7000
+ public toJSON(): { [k: string]: any };
7001
+ }
6614
7002
  }
6615
7003
 
6616
7004
  /** SigningMode enum. */
@@ -13392,6 +13780,9 @@ export namespace TW {
13392
13780
 
13393
13781
  /** FunctionCallPermission receiverId */
13394
13782
  receiverId?: (string|null);
13783
+
13784
+ /** FunctionCallPermission methodNames */
13785
+ methodNames?: (string[]|null);
13395
13786
  }
13396
13787
 
13397
13788
  /** Represents a FunctionCallPermission. */
@@ -13409,6 +13800,9 @@ export namespace TW {
13409
13800
  /** FunctionCallPermission receiverId. */
13410
13801
  public receiverId: string;
13411
13802
 
13803
+ /** FunctionCallPermission methodNames. */
13804
+ public methodNames: string[];
13805
+
13412
13806
  /**
13413
13807
  * Creates a new FunctionCallPermission instance using the specified properties.
13414
13808
  * @param [properties] Properties to set
@@ -13929,7 +14323,7 @@ export namespace TW {
13929
14323
  stake?: (Uint8Array|null);
13930
14324
 
13931
14325
  /** Stake publicKey */
13932
- publicKey?: (string|null);
14326
+ publicKey?: (TW.NEAR.Proto.IPublicKey|null);
13933
14327
  }
13934
14328
 
13935
14329
  /** Represents a Stake. */
@@ -13945,7 +14339,7 @@ export namespace TW {
13945
14339
  public stake: Uint8Array;
13946
14340
 
13947
14341
  /** Stake publicKey. */
13948
- public publicKey: string;
14342
+ public publicKey?: (TW.NEAR.Proto.IPublicKey|null);
13949
14343
 
13950
14344
  /**
13951
14345
  * Creates a new Stake instance using the specified properties.