@trustwallet/wallet-core 4.1.8-rc2 → 4.1.9
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 +217 -50
- package/dist/generated/core_proto.js +770 -334
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/package.json +1 -1
@@ -7675,6 +7675,9 @@ export namespace TW {
|
|
7675
7675
|
|
7676
7676
|
/** ChainInfo p2shPrefix */
|
7677
7677
|
p2shPrefix?: (number|null);
|
7678
|
+
|
7679
|
+
/** ChainInfo hrp */
|
7680
|
+
hrp?: (string|null);
|
7678
7681
|
}
|
7679
7682
|
|
7680
7683
|
/** Represents a ChainInfo. */
|
@@ -7692,6 +7695,9 @@ export namespace TW {
|
|
7692
7695
|
/** ChainInfo p2shPrefix. */
|
7693
7696
|
public p2shPrefix: number;
|
7694
7697
|
|
7698
|
+
/** ChainInfo hrp. */
|
7699
|
+
public hrp: string;
|
7700
|
+
|
7695
7701
|
/**
|
7696
7702
|
* Creates a new ChainInfo instance using the specified properties.
|
7697
7703
|
* @param [properties] Properties to set
|
@@ -7753,99 +7759,254 @@ export namespace TW {
|
|
7753
7759
|
V2 = 2
|
7754
7760
|
}
|
7755
7761
|
|
7756
|
-
/** Properties of a
|
7757
|
-
interface
|
7762
|
+
/** Properties of a TransactionBuilder. */
|
7763
|
+
interface ITransactionBuilder {
|
7758
7764
|
|
7759
|
-
/**
|
7765
|
+
/** TransactionBuilder version */
|
7760
7766
|
version?: (TW.BitcoinV2.Proto.TransactionVersion|null);
|
7761
7767
|
|
7762
|
-
/**
|
7763
|
-
privateKeys?: (Uint8Array[]|null);
|
7764
|
-
|
7765
|
-
/** SigningInput publicKeys */
|
7766
|
-
publicKeys?: (Uint8Array[]|null);
|
7767
|
-
|
7768
|
-
/** SigningInput lockTime */
|
7768
|
+
/** TransactionBuilder lockTime */
|
7769
7769
|
lockTime?: (number|null);
|
7770
7770
|
|
7771
|
-
/**
|
7771
|
+
/** TransactionBuilder inputs */
|
7772
7772
|
inputs?: (TW.BitcoinV2.Proto.IInput[]|null);
|
7773
7773
|
|
7774
|
-
/**
|
7774
|
+
/** TransactionBuilder outputs */
|
7775
7775
|
outputs?: (TW.BitcoinV2.Proto.IOutput[]|null);
|
7776
7776
|
|
7777
|
-
/**
|
7777
|
+
/** TransactionBuilder inputSelector */
|
7778
7778
|
inputSelector?: (TW.BitcoinV2.Proto.InputSelector|null);
|
7779
7779
|
|
7780
|
-
/**
|
7780
|
+
/** TransactionBuilder feePerVb */
|
7781
7781
|
feePerVb?: (Long|null);
|
7782
7782
|
|
7783
|
-
/**
|
7783
|
+
/** TransactionBuilder changeOutput */
|
7784
7784
|
changeOutput?: (TW.BitcoinV2.Proto.IOutput|null);
|
7785
7785
|
|
7786
|
-
/**
|
7786
|
+
/** TransactionBuilder maxAmountOutput */
|
7787
7787
|
maxAmountOutput?: (TW.BitcoinV2.Proto.IOutput|null);
|
7788
7788
|
|
7789
|
-
/**
|
7790
|
-
chainInfo?: (TW.BitcoinV2.Proto.IChainInfo|null);
|
7791
|
-
|
7792
|
-
/** SigningInput fixedDustThreshold */
|
7789
|
+
/** TransactionBuilder fixedDustThreshold */
|
7793
7790
|
fixedDustThreshold?: (Long|null);
|
7794
|
-
|
7795
|
-
/** SigningInput dangerousUseFixedSchnorrRng */
|
7796
|
-
dangerousUseFixedSchnorrRng?: (boolean|null);
|
7797
7791
|
}
|
7798
7792
|
|
7799
|
-
/** Represents a
|
7800
|
-
class
|
7793
|
+
/** Represents a TransactionBuilder. */
|
7794
|
+
class TransactionBuilder implements ITransactionBuilder {
|
7801
7795
|
|
7802
7796
|
/**
|
7803
|
-
* Constructs a new
|
7797
|
+
* Constructs a new TransactionBuilder.
|
7804
7798
|
* @param [properties] Properties to set
|
7805
7799
|
*/
|
7806
|
-
constructor(properties?: TW.BitcoinV2.Proto.
|
7800
|
+
constructor(properties?: TW.BitcoinV2.Proto.ITransactionBuilder);
|
7807
7801
|
|
7808
|
-
/**
|
7802
|
+
/** TransactionBuilder version. */
|
7809
7803
|
public version: TW.BitcoinV2.Proto.TransactionVersion;
|
7810
7804
|
|
7811
|
-
/**
|
7812
|
-
public privateKeys: Uint8Array[];
|
7813
|
-
|
7814
|
-
/** SigningInput publicKeys. */
|
7815
|
-
public publicKeys: Uint8Array[];
|
7816
|
-
|
7817
|
-
/** SigningInput lockTime. */
|
7805
|
+
/** TransactionBuilder lockTime. */
|
7818
7806
|
public lockTime: number;
|
7819
7807
|
|
7820
|
-
/**
|
7808
|
+
/** TransactionBuilder inputs. */
|
7821
7809
|
public inputs: TW.BitcoinV2.Proto.IInput[];
|
7822
7810
|
|
7823
|
-
/**
|
7811
|
+
/** TransactionBuilder outputs. */
|
7824
7812
|
public outputs: TW.BitcoinV2.Proto.IOutput[];
|
7825
7813
|
|
7826
|
-
/**
|
7814
|
+
/** TransactionBuilder inputSelector. */
|
7827
7815
|
public inputSelector: TW.BitcoinV2.Proto.InputSelector;
|
7828
7816
|
|
7829
|
-
/**
|
7817
|
+
/** TransactionBuilder feePerVb. */
|
7830
7818
|
public feePerVb: Long;
|
7831
7819
|
|
7832
|
-
/**
|
7820
|
+
/** TransactionBuilder changeOutput. */
|
7833
7821
|
public changeOutput?: (TW.BitcoinV2.Proto.IOutput|null);
|
7834
7822
|
|
7835
|
-
/**
|
7823
|
+
/** TransactionBuilder maxAmountOutput. */
|
7836
7824
|
public maxAmountOutput?: (TW.BitcoinV2.Proto.IOutput|null);
|
7837
7825
|
|
7826
|
+
/** TransactionBuilder fixedDustThreshold. */
|
7827
|
+
public fixedDustThreshold?: (Long|null);
|
7828
|
+
|
7829
|
+
/** TransactionBuilder dustPolicy. */
|
7830
|
+
public dustPolicy?: "fixedDustThreshold";
|
7831
|
+
|
7832
|
+
/**
|
7833
|
+
* Creates a new TransactionBuilder instance using the specified properties.
|
7834
|
+
* @param [properties] Properties to set
|
7835
|
+
* @returns TransactionBuilder instance
|
7836
|
+
*/
|
7837
|
+
public static create(properties?: TW.BitcoinV2.Proto.ITransactionBuilder): TW.BitcoinV2.Proto.TransactionBuilder;
|
7838
|
+
|
7839
|
+
/**
|
7840
|
+
* Encodes the specified TransactionBuilder message. Does not implicitly {@link TW.BitcoinV2.Proto.TransactionBuilder.verify|verify} messages.
|
7841
|
+
* @param message TransactionBuilder message or plain object to encode
|
7842
|
+
* @param [writer] Writer to encode to
|
7843
|
+
* @returns Writer
|
7844
|
+
*/
|
7845
|
+
public static encode(message: TW.BitcoinV2.Proto.ITransactionBuilder, writer?: $protobuf.Writer): $protobuf.Writer;
|
7846
|
+
|
7847
|
+
/**
|
7848
|
+
* Decodes a TransactionBuilder message from the specified reader or buffer.
|
7849
|
+
* @param reader Reader or buffer to decode from
|
7850
|
+
* @param [length] Message length if known beforehand
|
7851
|
+
* @returns TransactionBuilder
|
7852
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
7853
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7854
|
+
*/
|
7855
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.BitcoinV2.Proto.TransactionBuilder;
|
7856
|
+
|
7857
|
+
/**
|
7858
|
+
* Verifies a TransactionBuilder message.
|
7859
|
+
* @param message Plain object to verify
|
7860
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
7861
|
+
*/
|
7862
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
7863
|
+
|
7864
|
+
/**
|
7865
|
+
* Creates a TransactionBuilder message from a plain object. Also converts values to their respective internal types.
|
7866
|
+
* @param object Plain object
|
7867
|
+
* @returns TransactionBuilder
|
7868
|
+
*/
|
7869
|
+
public static fromObject(object: { [k: string]: any }): TW.BitcoinV2.Proto.TransactionBuilder;
|
7870
|
+
|
7871
|
+
/**
|
7872
|
+
* Creates a plain object from a TransactionBuilder message. Also converts values to other types if specified.
|
7873
|
+
* @param message TransactionBuilder
|
7874
|
+
* @param [options] Conversion options
|
7875
|
+
* @returns Plain object
|
7876
|
+
*/
|
7877
|
+
public static toObject(message: TW.BitcoinV2.Proto.TransactionBuilder, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
7878
|
+
|
7879
|
+
/**
|
7880
|
+
* Converts this TransactionBuilder to JSON.
|
7881
|
+
* @returns JSON object
|
7882
|
+
*/
|
7883
|
+
public toJSON(): { [k: string]: any };
|
7884
|
+
}
|
7885
|
+
|
7886
|
+
/** Properties of a Psbt. */
|
7887
|
+
interface IPsbt {
|
7888
|
+
|
7889
|
+
/** Psbt psbt */
|
7890
|
+
psbt?: (Uint8Array|null);
|
7891
|
+
}
|
7892
|
+
|
7893
|
+
/** Represents a Psbt. */
|
7894
|
+
class Psbt implements IPsbt {
|
7895
|
+
|
7896
|
+
/**
|
7897
|
+
* Constructs a new Psbt.
|
7898
|
+
* @param [properties] Properties to set
|
7899
|
+
*/
|
7900
|
+
constructor(properties?: TW.BitcoinV2.Proto.IPsbt);
|
7901
|
+
|
7902
|
+
/** Psbt psbt. */
|
7903
|
+
public psbt: Uint8Array;
|
7904
|
+
|
7905
|
+
/**
|
7906
|
+
* Creates a new Psbt instance using the specified properties.
|
7907
|
+
* @param [properties] Properties to set
|
7908
|
+
* @returns Psbt instance
|
7909
|
+
*/
|
7910
|
+
public static create(properties?: TW.BitcoinV2.Proto.IPsbt): TW.BitcoinV2.Proto.Psbt;
|
7911
|
+
|
7912
|
+
/**
|
7913
|
+
* Encodes the specified Psbt message. Does not implicitly {@link TW.BitcoinV2.Proto.Psbt.verify|verify} messages.
|
7914
|
+
* @param message Psbt message or plain object to encode
|
7915
|
+
* @param [writer] Writer to encode to
|
7916
|
+
* @returns Writer
|
7917
|
+
*/
|
7918
|
+
public static encode(message: TW.BitcoinV2.Proto.IPsbt, writer?: $protobuf.Writer): $protobuf.Writer;
|
7919
|
+
|
7920
|
+
/**
|
7921
|
+
* Decodes a Psbt message from the specified reader or buffer.
|
7922
|
+
* @param reader Reader or buffer to decode from
|
7923
|
+
* @param [length] Message length if known beforehand
|
7924
|
+
* @returns Psbt
|
7925
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
7926
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7927
|
+
*/
|
7928
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.BitcoinV2.Proto.Psbt;
|
7929
|
+
|
7930
|
+
/**
|
7931
|
+
* Verifies a Psbt message.
|
7932
|
+
* @param message Plain object to verify
|
7933
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
7934
|
+
*/
|
7935
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
7936
|
+
|
7937
|
+
/**
|
7938
|
+
* Creates a Psbt message from a plain object. Also converts values to their respective internal types.
|
7939
|
+
* @param object Plain object
|
7940
|
+
* @returns Psbt
|
7941
|
+
*/
|
7942
|
+
public static fromObject(object: { [k: string]: any }): TW.BitcoinV2.Proto.Psbt;
|
7943
|
+
|
7944
|
+
/**
|
7945
|
+
* Creates a plain object from a Psbt message. Also converts values to other types if specified.
|
7946
|
+
* @param message Psbt
|
7947
|
+
* @param [options] Conversion options
|
7948
|
+
* @returns Plain object
|
7949
|
+
*/
|
7950
|
+
public static toObject(message: TW.BitcoinV2.Proto.Psbt, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
7951
|
+
|
7952
|
+
/**
|
7953
|
+
* Converts this Psbt to JSON.
|
7954
|
+
* @returns JSON object
|
7955
|
+
*/
|
7956
|
+
public toJSON(): { [k: string]: any };
|
7957
|
+
}
|
7958
|
+
|
7959
|
+
/** Properties of a SigningInput. */
|
7960
|
+
interface ISigningInput {
|
7961
|
+
|
7962
|
+
/** SigningInput privateKeys */
|
7963
|
+
privateKeys?: (Uint8Array[]|null);
|
7964
|
+
|
7965
|
+
/** SigningInput publicKeys */
|
7966
|
+
publicKeys?: (Uint8Array[]|null);
|
7967
|
+
|
7968
|
+
/** SigningInput chainInfo */
|
7969
|
+
chainInfo?: (TW.BitcoinV2.Proto.IChainInfo|null);
|
7970
|
+
|
7971
|
+
/** SigningInput dangerousUseFixedSchnorrRng */
|
7972
|
+
dangerousUseFixedSchnorrRng?: (boolean|null);
|
7973
|
+
|
7974
|
+
/** SigningInput builder */
|
7975
|
+
builder?: (TW.BitcoinV2.Proto.ITransactionBuilder|null);
|
7976
|
+
|
7977
|
+
/** SigningInput psbt */
|
7978
|
+
psbt?: (TW.BitcoinV2.Proto.IPsbt|null);
|
7979
|
+
}
|
7980
|
+
|
7981
|
+
/** Represents a SigningInput. */
|
7982
|
+
class SigningInput implements ISigningInput {
|
7983
|
+
|
7984
|
+
/**
|
7985
|
+
* Constructs a new SigningInput.
|
7986
|
+
* @param [properties] Properties to set
|
7987
|
+
*/
|
7988
|
+
constructor(properties?: TW.BitcoinV2.Proto.ISigningInput);
|
7989
|
+
|
7990
|
+
/** SigningInput privateKeys. */
|
7991
|
+
public privateKeys: Uint8Array[];
|
7992
|
+
|
7993
|
+
/** SigningInput publicKeys. */
|
7994
|
+
public publicKeys: Uint8Array[];
|
7995
|
+
|
7838
7996
|
/** SigningInput chainInfo. */
|
7839
7997
|
public chainInfo?: (TW.BitcoinV2.Proto.IChainInfo|null);
|
7840
7998
|
|
7841
|
-
/** SigningInput fixedDustThreshold. */
|
7842
|
-
public fixedDustThreshold?: (Long|null);
|
7843
|
-
|
7844
7999
|
/** SigningInput dangerousUseFixedSchnorrRng. */
|
7845
8000
|
public dangerousUseFixedSchnorrRng: boolean;
|
7846
8001
|
|
7847
|
-
/** SigningInput
|
7848
|
-
public
|
8002
|
+
/** SigningInput builder. */
|
8003
|
+
public builder?: (TW.BitcoinV2.Proto.ITransactionBuilder|null);
|
8004
|
+
|
8005
|
+
/** SigningInput psbt. */
|
8006
|
+
public psbt?: (TW.BitcoinV2.Proto.IPsbt|null);
|
8007
|
+
|
8008
|
+
/** SigningInput transaction. */
|
8009
|
+
public transaction?: ("builder"|"psbt");
|
7849
8010
|
|
7850
8011
|
/**
|
7851
8012
|
* Creates a new SigningInput instance using the specified properties.
|
@@ -8171,7 +8332,7 @@ export namespace TW {
|
|
8171
8332
|
/** TransactionPlan error */
|
8172
8333
|
error?: (TW.Common.Proto.SigningError|null);
|
8173
8334
|
|
8174
|
-
/**
|
8335
|
+
/** TransactionPlan errorMessage */
|
8175
8336
|
errorMessage?: (string|null);
|
8176
8337
|
|
8177
8338
|
/** TransactionPlan inputs */
|
@@ -8208,7 +8369,7 @@ export namespace TW {
|
|
8208
8369
|
/** TransactionPlan error. */
|
8209
8370
|
public error: TW.Common.Proto.SigningError;
|
8210
8371
|
|
8211
|
-
/**
|
8372
|
+
/** TransactionPlan errorMessage. */
|
8212
8373
|
public errorMessage: string;
|
8213
8374
|
|
8214
8375
|
/** TransactionPlan inputs. */
|
@@ -8295,7 +8456,7 @@ export namespace TW {
|
|
8295
8456
|
/** PreSigningOutput errorMessage */
|
8296
8457
|
errorMessage?: (string|null);
|
8297
8458
|
|
8298
|
-
/**
|
8459
|
+
/** PreSigningOutput sighashes */
|
8299
8460
|
sighashes?: (TW.BitcoinV2.Proto.PreSigningOutput.ISighash[]|null);
|
8300
8461
|
}
|
8301
8462
|
|
@@ -8314,7 +8475,7 @@ export namespace TW {
|
|
8314
8475
|
/** PreSigningOutput errorMessage. */
|
8315
8476
|
public errorMessage: string;
|
8316
8477
|
|
8317
|
-
/**
|
8478
|
+
/** PreSigningOutput sighashes. */
|
8318
8479
|
public sighashes: TW.BitcoinV2.Proto.PreSigningOutput.ISighash[];
|
8319
8480
|
|
8320
8481
|
/**
|
@@ -8571,6 +8732,9 @@ export namespace TW {
|
|
8571
8732
|
|
8572
8733
|
/** SigningOutput fee */
|
8573
8734
|
fee?: (Long|null);
|
8735
|
+
|
8736
|
+
/** SigningOutput psbt */
|
8737
|
+
psbt?: (TW.BitcoinV2.Proto.IPsbt|null);
|
8574
8738
|
}
|
8575
8739
|
|
8576
8740
|
/** Represents a SigningOutput. */
|
@@ -8606,6 +8770,9 @@ export namespace TW {
|
|
8606
8770
|
/** SigningOutput fee. */
|
8607
8771
|
public fee: Long;
|
8608
8772
|
|
8773
|
+
/** SigningOutput psbt. */
|
8774
|
+
public psbt?: (TW.BitcoinV2.Proto.IPsbt|null);
|
8775
|
+
|
8609
8776
|
/**
|
8610
8777
|
* Creates a new SigningOutput instance using the specified properties.
|
8611
8778
|
* @param [properties] Properties to set
|