@trustwallet/wallet-core 4.1.4 → 4.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.
@@ -6485,6 +6485,9 @@ export namespace TW {
|
|
6485
6485
|
|
6486
6486
|
/** error description */
|
6487
6487
|
errorMessage?: (string|null);
|
6488
|
+
|
6489
|
+
/** PreSigningOutput preSigningResultV2 */
|
6490
|
+
preSigningResultV2?: (TW.BitcoinV2.Proto.IPreSigningOutput|null);
|
6488
6491
|
}
|
6489
6492
|
|
6490
6493
|
/** Transaction pre-signing output */
|
@@ -6505,6 +6508,9 @@ export namespace TW {
|
|
6505
6508
|
/** error description */
|
6506
6509
|
public errorMessage: string;
|
6507
6510
|
|
6511
|
+
/** PreSigningOutput preSigningResultV2. */
|
6512
|
+
public preSigningResultV2?: (TW.BitcoinV2.Proto.IPreSigningOutput|null);
|
6513
|
+
|
6508
6514
|
/**
|
6509
6515
|
* Creates a new PreSigningOutput instance using the specified properties.
|
6510
6516
|
* @param [properties] Properties to set
|
@@ -35664,6 +35670,12 @@ export namespace TW {
|
|
35664
35670
|
public toJSON(): { [k: string]: any };
|
35665
35671
|
}
|
35666
35672
|
|
35673
|
+
/** TokenProgramId enum. */
|
35674
|
+
enum TokenProgramId {
|
35675
|
+
TokenProgram = 0,
|
35676
|
+
Token2022Program = 1
|
35677
|
+
}
|
35678
|
+
|
35667
35679
|
/** Properties of a CreateTokenAccount. */
|
35668
35680
|
interface ICreateTokenAccount {
|
35669
35681
|
|
@@ -35675,6 +35687,9 @@ export namespace TW {
|
|
35675
35687
|
|
35676
35688
|
/** CreateTokenAccount tokenAddress */
|
35677
35689
|
tokenAddress?: (string|null);
|
35690
|
+
|
35691
|
+
/** CreateTokenAccount tokenProgramId */
|
35692
|
+
tokenProgramId?: (TW.Solana.Proto.TokenProgramId|null);
|
35678
35693
|
}
|
35679
35694
|
|
35680
35695
|
/** Represents a CreateTokenAccount. */
|
@@ -35695,6 +35710,9 @@ export namespace TW {
|
|
35695
35710
|
/** CreateTokenAccount tokenAddress. */
|
35696
35711
|
public tokenAddress: string;
|
35697
35712
|
|
35713
|
+
/** CreateTokenAccount tokenProgramId. */
|
35714
|
+
public tokenProgramId: TW.Solana.Proto.TokenProgramId;
|
35715
|
+
|
35698
35716
|
/**
|
35699
35717
|
* Creates a new CreateTokenAccount instance using the specified properties.
|
35700
35718
|
* @param [properties] Properties to set
|
@@ -35772,6 +35790,9 @@ export namespace TW {
|
|
35772
35790
|
|
35773
35791
|
/** TokenTransfer references */
|
35774
35792
|
references?: (string[]|null);
|
35793
|
+
|
35794
|
+
/** TokenTransfer tokenProgramId */
|
35795
|
+
tokenProgramId?: (TW.Solana.Proto.TokenProgramId|null);
|
35775
35796
|
}
|
35776
35797
|
|
35777
35798
|
/** Represents a TokenTransfer. */
|
@@ -35804,6 +35825,9 @@ export namespace TW {
|
|
35804
35825
|
/** TokenTransfer references. */
|
35805
35826
|
public references: string[];
|
35806
35827
|
|
35828
|
+
/** TokenTransfer tokenProgramId. */
|
35829
|
+
public tokenProgramId: TW.Solana.Proto.TokenProgramId;
|
35830
|
+
|
35807
35831
|
/**
|
35808
35832
|
* Creates a new TokenTransfer instance using the specified properties.
|
35809
35833
|
* @param [properties] Properties to set
|
@@ -35884,6 +35908,9 @@ export namespace TW {
|
|
35884
35908
|
|
35885
35909
|
/** CreateAndTransferToken references */
|
35886
35910
|
references?: (string[]|null);
|
35911
|
+
|
35912
|
+
/** CreateAndTransferToken tokenProgramId */
|
35913
|
+
tokenProgramId?: (TW.Solana.Proto.TokenProgramId|null);
|
35887
35914
|
}
|
35888
35915
|
|
35889
35916
|
/** Represents a CreateAndTransferToken. */
|
@@ -35919,6 +35946,9 @@ export namespace TW {
|
|
35919
35946
|
/** CreateAndTransferToken references. */
|
35920
35947
|
public references: string[];
|
35921
35948
|
|
35949
|
+
/** CreateAndTransferToken tokenProgramId. */
|
35950
|
+
public tokenProgramId: TW.Solana.Proto.TokenProgramId;
|
35951
|
+
|
35922
35952
|
/**
|
35923
35953
|
* Creates a new CreateAndTransferToken instance using the specified properties.
|
35924
35954
|
* @param [properties] Properties to set
|
@@ -19663,6 +19663,7 @@
|
|
19663
19663
|
* @property {Array.<TW.Bitcoin.Proto.IHashPublicKey>|null} [hashPublicKeys] hash, public key list
|
19664
19664
|
* @property {TW.Common.Proto.SigningError|null} [error] error code, 0 is ok, other codes will be treated as errors
|
19665
19665
|
* @property {string|null} [errorMessage] error description
|
19666
|
+
* @property {TW.BitcoinV2.Proto.IPreSigningOutput|null} [preSigningResultV2] PreSigningOutput preSigningResultV2
|
19666
19667
|
*/
|
19667
19668
|
|
19668
19669
|
/**
|
@@ -19705,6 +19706,14 @@
|
|
19705
19706
|
*/
|
19706
19707
|
PreSigningOutput.prototype.errorMessage = "";
|
19707
19708
|
|
19709
|
+
/**
|
19710
|
+
* PreSigningOutput preSigningResultV2.
|
19711
|
+
* @member {TW.BitcoinV2.Proto.IPreSigningOutput|null|undefined} preSigningResultV2
|
19712
|
+
* @memberof TW.Bitcoin.Proto.PreSigningOutput
|
19713
|
+
* @instance
|
19714
|
+
*/
|
19715
|
+
PreSigningOutput.prototype.preSigningResultV2 = null;
|
19716
|
+
|
19708
19717
|
/**
|
19709
19718
|
* Creates a new PreSigningOutput instance using the specified properties.
|
19710
19719
|
* @function create
|
@@ -19736,6 +19745,8 @@
|
|
19736
19745
|
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
|
19737
19746
|
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
19738
19747
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
|
19748
|
+
if (message.preSigningResultV2 != null && Object.hasOwnProperty.call(message, "preSigningResultV2"))
|
19749
|
+
$root.TW.BitcoinV2.Proto.PreSigningOutput.encode(message.preSigningResultV2, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
19739
19750
|
return writer;
|
19740
19751
|
};
|
19741
19752
|
|
@@ -19768,6 +19779,9 @@
|
|
19768
19779
|
case 3:
|
19769
19780
|
message.errorMessage = reader.string();
|
19770
19781
|
break;
|
19782
|
+
case 7:
|
19783
|
+
message.preSigningResultV2 = $root.TW.BitcoinV2.Proto.PreSigningOutput.decode(reader, reader.uint32());
|
19784
|
+
break;
|
19771
19785
|
default:
|
19772
19786
|
reader.skipType(tag & 7);
|
19773
19787
|
break;
|
@@ -19831,6 +19845,11 @@
|
|
19831
19845
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
19832
19846
|
if (!$util.isString(message.errorMessage))
|
19833
19847
|
return "errorMessage: string expected";
|
19848
|
+
if (message.preSigningResultV2 != null && message.hasOwnProperty("preSigningResultV2")) {
|
19849
|
+
var error = $root.TW.BitcoinV2.Proto.PreSigningOutput.verify(message.preSigningResultV2);
|
19850
|
+
if (error)
|
19851
|
+
return "preSigningResultV2." + error;
|
19852
|
+
}
|
19834
19853
|
return null;
|
19835
19854
|
};
|
19836
19855
|
|
@@ -19964,6 +19983,11 @@
|
|
19964
19983
|
}
|
19965
19984
|
if (object.errorMessage != null)
|
19966
19985
|
message.errorMessage = String(object.errorMessage);
|
19986
|
+
if (object.preSigningResultV2 != null) {
|
19987
|
+
if (typeof object.preSigningResultV2 !== "object")
|
19988
|
+
throw TypeError(".TW.Bitcoin.Proto.PreSigningOutput.preSigningResultV2: object expected");
|
19989
|
+
message.preSigningResultV2 = $root.TW.BitcoinV2.Proto.PreSigningOutput.fromObject(object.preSigningResultV2);
|
19990
|
+
}
|
19967
19991
|
return message;
|
19968
19992
|
};
|
19969
19993
|
|
@@ -19985,6 +20009,7 @@
|
|
19985
20009
|
if (options.defaults) {
|
19986
20010
|
object.error = options.enums === String ? "OK" : 0;
|
19987
20011
|
object.errorMessage = "";
|
20012
|
+
object.preSigningResultV2 = null;
|
19988
20013
|
}
|
19989
20014
|
if (message.hashPublicKeys && message.hashPublicKeys.length) {
|
19990
20015
|
object.hashPublicKeys = [];
|
@@ -19995,6 +20020,8 @@
|
|
19995
20020
|
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
19996
20021
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
19997
20022
|
object.errorMessage = message.errorMessage;
|
20023
|
+
if (message.preSigningResultV2 != null && message.hasOwnProperty("preSigningResultV2"))
|
20024
|
+
object.preSigningResultV2 = $root.TW.BitcoinV2.Proto.PreSigningOutput.toObject(message.preSigningResultV2, options);
|
19998
20025
|
return object;
|
19999
20026
|
};
|
20000
20027
|
|
@@ -105570,6 +105597,20 @@
|
|
105570
105597
|
return WithdrawAllStake;
|
105571
105598
|
})();
|
105572
105599
|
|
105600
|
+
/**
|
105601
|
+
* TokenProgramId enum.
|
105602
|
+
* @name TW.Solana.Proto.TokenProgramId
|
105603
|
+
* @enum {number}
|
105604
|
+
* @property {number} TokenProgram=0 TokenProgram value
|
105605
|
+
* @property {number} Token2022Program=1 Token2022Program value
|
105606
|
+
*/
|
105607
|
+
Proto.TokenProgramId = (function() {
|
105608
|
+
var valuesById = {}, values = Object.create(valuesById);
|
105609
|
+
values[valuesById[0] = "TokenProgram"] = 0;
|
105610
|
+
values[valuesById[1] = "Token2022Program"] = 1;
|
105611
|
+
return values;
|
105612
|
+
})();
|
105613
|
+
|
105573
105614
|
Proto.CreateTokenAccount = (function() {
|
105574
105615
|
|
105575
105616
|
/**
|
@@ -105579,6 +105620,7 @@
|
|
105579
105620
|
* @property {string|null} [mainAddress] CreateTokenAccount mainAddress
|
105580
105621
|
* @property {string|null} [tokenMintAddress] CreateTokenAccount tokenMintAddress
|
105581
105622
|
* @property {string|null} [tokenAddress] CreateTokenAccount tokenAddress
|
105623
|
+
* @property {TW.Solana.Proto.TokenProgramId|null} [tokenProgramId] CreateTokenAccount tokenProgramId
|
105582
105624
|
*/
|
105583
105625
|
|
105584
105626
|
/**
|
@@ -105620,6 +105662,14 @@
|
|
105620
105662
|
*/
|
105621
105663
|
CreateTokenAccount.prototype.tokenAddress = "";
|
105622
105664
|
|
105665
|
+
/**
|
105666
|
+
* CreateTokenAccount tokenProgramId.
|
105667
|
+
* @member {TW.Solana.Proto.TokenProgramId} tokenProgramId
|
105668
|
+
* @memberof TW.Solana.Proto.CreateTokenAccount
|
105669
|
+
* @instance
|
105670
|
+
*/
|
105671
|
+
CreateTokenAccount.prototype.tokenProgramId = 0;
|
105672
|
+
|
105623
105673
|
/**
|
105624
105674
|
* Creates a new CreateTokenAccount instance using the specified properties.
|
105625
105675
|
* @function create
|
@@ -105650,6 +105700,8 @@
|
|
105650
105700
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.tokenMintAddress);
|
105651
105701
|
if (message.tokenAddress != null && Object.hasOwnProperty.call(message, "tokenAddress"))
|
105652
105702
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.tokenAddress);
|
105703
|
+
if (message.tokenProgramId != null && Object.hasOwnProperty.call(message, "tokenProgramId"))
|
105704
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.tokenProgramId);
|
105653
105705
|
return writer;
|
105654
105706
|
};
|
105655
105707
|
|
@@ -105680,6 +105732,9 @@
|
|
105680
105732
|
case 3:
|
105681
105733
|
message.tokenAddress = reader.string();
|
105682
105734
|
break;
|
105735
|
+
case 4:
|
105736
|
+
message.tokenProgramId = reader.int32();
|
105737
|
+
break;
|
105683
105738
|
default:
|
105684
105739
|
reader.skipType(tag & 7);
|
105685
105740
|
break;
|
@@ -105708,6 +105763,14 @@
|
|
105708
105763
|
if (message.tokenAddress != null && message.hasOwnProperty("tokenAddress"))
|
105709
105764
|
if (!$util.isString(message.tokenAddress))
|
105710
105765
|
return "tokenAddress: string expected";
|
105766
|
+
if (message.tokenProgramId != null && message.hasOwnProperty("tokenProgramId"))
|
105767
|
+
switch (message.tokenProgramId) {
|
105768
|
+
default:
|
105769
|
+
return "tokenProgramId: enum value expected";
|
105770
|
+
case 0:
|
105771
|
+
case 1:
|
105772
|
+
break;
|
105773
|
+
}
|
105711
105774
|
return null;
|
105712
105775
|
};
|
105713
105776
|
|
@@ -105729,6 +105792,16 @@
|
|
105729
105792
|
message.tokenMintAddress = String(object.tokenMintAddress);
|
105730
105793
|
if (object.tokenAddress != null)
|
105731
105794
|
message.tokenAddress = String(object.tokenAddress);
|
105795
|
+
switch (object.tokenProgramId) {
|
105796
|
+
case "TokenProgram":
|
105797
|
+
case 0:
|
105798
|
+
message.tokenProgramId = 0;
|
105799
|
+
break;
|
105800
|
+
case "Token2022Program":
|
105801
|
+
case 1:
|
105802
|
+
message.tokenProgramId = 1;
|
105803
|
+
break;
|
105804
|
+
}
|
105732
105805
|
return message;
|
105733
105806
|
};
|
105734
105807
|
|
@@ -105749,6 +105822,7 @@
|
|
105749
105822
|
object.mainAddress = "";
|
105750
105823
|
object.tokenMintAddress = "";
|
105751
105824
|
object.tokenAddress = "";
|
105825
|
+
object.tokenProgramId = options.enums === String ? "TokenProgram" : 0;
|
105752
105826
|
}
|
105753
105827
|
if (message.mainAddress != null && message.hasOwnProperty("mainAddress"))
|
105754
105828
|
object.mainAddress = message.mainAddress;
|
@@ -105756,6 +105830,8 @@
|
|
105756
105830
|
object.tokenMintAddress = message.tokenMintAddress;
|
105757
105831
|
if (message.tokenAddress != null && message.hasOwnProperty("tokenAddress"))
|
105758
105832
|
object.tokenAddress = message.tokenAddress;
|
105833
|
+
if (message.tokenProgramId != null && message.hasOwnProperty("tokenProgramId"))
|
105834
|
+
object.tokenProgramId = options.enums === String ? $root.TW.Solana.Proto.TokenProgramId[message.tokenProgramId] : message.tokenProgramId;
|
105759
105835
|
return object;
|
105760
105836
|
};
|
105761
105837
|
|
@@ -105786,6 +105862,7 @@
|
|
105786
105862
|
* @property {number|null} [decimals] TokenTransfer decimals
|
105787
105863
|
* @property {string|null} [memo] TokenTransfer memo
|
105788
105864
|
* @property {Array.<string>|null} [references] TokenTransfer references
|
105865
|
+
* @property {TW.Solana.Proto.TokenProgramId|null} [tokenProgramId] TokenTransfer tokenProgramId
|
105789
105866
|
*/
|
105790
105867
|
|
105791
105868
|
/**
|
@@ -105860,6 +105937,14 @@
|
|
105860
105937
|
*/
|
105861
105938
|
TokenTransfer.prototype.references = $util.emptyArray;
|
105862
105939
|
|
105940
|
+
/**
|
105941
|
+
* TokenTransfer tokenProgramId.
|
105942
|
+
* @member {TW.Solana.Proto.TokenProgramId} tokenProgramId
|
105943
|
+
* @memberof TW.Solana.Proto.TokenTransfer
|
105944
|
+
* @instance
|
105945
|
+
*/
|
105946
|
+
TokenTransfer.prototype.tokenProgramId = 0;
|
105947
|
+
|
105863
105948
|
/**
|
105864
105949
|
* Creates a new TokenTransfer instance using the specified properties.
|
105865
105950
|
* @function create
|
@@ -105899,6 +105984,8 @@
|
|
105899
105984
|
if (message.references != null && message.references.length)
|
105900
105985
|
for (var i = 0; i < message.references.length; ++i)
|
105901
105986
|
writer.uint32(/* id 7, wireType 2 =*/58).string(message.references[i]);
|
105987
|
+
if (message.tokenProgramId != null && Object.hasOwnProperty.call(message, "tokenProgramId"))
|
105988
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.tokenProgramId);
|
105902
105989
|
return writer;
|
105903
105990
|
};
|
105904
105991
|
|
@@ -105943,6 +106030,9 @@
|
|
105943
106030
|
message.references = [];
|
105944
106031
|
message.references.push(reader.string());
|
105945
106032
|
break;
|
106033
|
+
case 8:
|
106034
|
+
message.tokenProgramId = reader.int32();
|
106035
|
+
break;
|
105946
106036
|
default:
|
105947
106037
|
reader.skipType(tag & 7);
|
105948
106038
|
break;
|
@@ -105987,6 +106077,14 @@
|
|
105987
106077
|
if (!$util.isString(message.references[i]))
|
105988
106078
|
return "references: string[] expected";
|
105989
106079
|
}
|
106080
|
+
if (message.tokenProgramId != null && message.hasOwnProperty("tokenProgramId"))
|
106081
|
+
switch (message.tokenProgramId) {
|
106082
|
+
default:
|
106083
|
+
return "tokenProgramId: enum value expected";
|
106084
|
+
case 0:
|
106085
|
+
case 1:
|
106086
|
+
break;
|
106087
|
+
}
|
105990
106088
|
return null;
|
105991
106089
|
};
|
105992
106090
|
|
@@ -106028,6 +106126,16 @@
|
|
106028
106126
|
for (var i = 0; i < object.references.length; ++i)
|
106029
106127
|
message.references[i] = String(object.references[i]);
|
106030
106128
|
}
|
106129
|
+
switch (object.tokenProgramId) {
|
106130
|
+
case "TokenProgram":
|
106131
|
+
case 0:
|
106132
|
+
message.tokenProgramId = 0;
|
106133
|
+
break;
|
106134
|
+
case "Token2022Program":
|
106135
|
+
case 1:
|
106136
|
+
message.tokenProgramId = 1;
|
106137
|
+
break;
|
106138
|
+
}
|
106031
106139
|
return message;
|
106032
106140
|
};
|
106033
106141
|
|
@@ -106057,6 +106165,7 @@
|
|
106057
106165
|
object.amount = options.longs === String ? "0" : 0;
|
106058
106166
|
object.decimals = 0;
|
106059
106167
|
object.memo = "";
|
106168
|
+
object.tokenProgramId = options.enums === String ? "TokenProgram" : 0;
|
106060
106169
|
}
|
106061
106170
|
if (message.tokenMintAddress != null && message.hasOwnProperty("tokenMintAddress"))
|
106062
106171
|
object.tokenMintAddress = message.tokenMintAddress;
|
@@ -106078,6 +106187,8 @@
|
|
106078
106187
|
for (var j = 0; j < message.references.length; ++j)
|
106079
106188
|
object.references[j] = message.references[j];
|
106080
106189
|
}
|
106190
|
+
if (message.tokenProgramId != null && message.hasOwnProperty("tokenProgramId"))
|
106191
|
+
object.tokenProgramId = options.enums === String ? $root.TW.Solana.Proto.TokenProgramId[message.tokenProgramId] : message.tokenProgramId;
|
106081
106192
|
return object;
|
106082
106193
|
};
|
106083
106194
|
|
@@ -106109,6 +106220,7 @@
|
|
106109
106220
|
* @property {number|null} [decimals] CreateAndTransferToken decimals
|
106110
106221
|
* @property {string|null} [memo] CreateAndTransferToken memo
|
106111
106222
|
* @property {Array.<string>|null} [references] CreateAndTransferToken references
|
106223
|
+
* @property {TW.Solana.Proto.TokenProgramId|null} [tokenProgramId] CreateAndTransferToken tokenProgramId
|
106112
106224
|
*/
|
106113
106225
|
|
106114
106226
|
/**
|
@@ -106191,6 +106303,14 @@
|
|
106191
106303
|
*/
|
106192
106304
|
CreateAndTransferToken.prototype.references = $util.emptyArray;
|
106193
106305
|
|
106306
|
+
/**
|
106307
|
+
* CreateAndTransferToken tokenProgramId.
|
106308
|
+
* @member {TW.Solana.Proto.TokenProgramId} tokenProgramId
|
106309
|
+
* @memberof TW.Solana.Proto.CreateAndTransferToken
|
106310
|
+
* @instance
|
106311
|
+
*/
|
106312
|
+
CreateAndTransferToken.prototype.tokenProgramId = 0;
|
106313
|
+
|
106194
106314
|
/**
|
106195
106315
|
* Creates a new CreateAndTransferToken instance using the specified properties.
|
106196
106316
|
* @function create
|
@@ -106232,6 +106352,8 @@
|
|
106232
106352
|
if (message.references != null && message.references.length)
|
106233
106353
|
for (var i = 0; i < message.references.length; ++i)
|
106234
106354
|
writer.uint32(/* id 8, wireType 2 =*/66).string(message.references[i]);
|
106355
|
+
if (message.tokenProgramId != null && Object.hasOwnProperty.call(message, "tokenProgramId"))
|
106356
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.tokenProgramId);
|
106235
106357
|
return writer;
|
106236
106358
|
};
|
106237
106359
|
|
@@ -106279,6 +106401,9 @@
|
|
106279
106401
|
message.references = [];
|
106280
106402
|
message.references.push(reader.string());
|
106281
106403
|
break;
|
106404
|
+
case 9:
|
106405
|
+
message.tokenProgramId = reader.int32();
|
106406
|
+
break;
|
106282
106407
|
default:
|
106283
106408
|
reader.skipType(tag & 7);
|
106284
106409
|
break;
|
@@ -106326,6 +106451,14 @@
|
|
106326
106451
|
if (!$util.isString(message.references[i]))
|
106327
106452
|
return "references: string[] expected";
|
106328
106453
|
}
|
106454
|
+
if (message.tokenProgramId != null && message.hasOwnProperty("tokenProgramId"))
|
106455
|
+
switch (message.tokenProgramId) {
|
106456
|
+
default:
|
106457
|
+
return "tokenProgramId: enum value expected";
|
106458
|
+
case 0:
|
106459
|
+
case 1:
|
106460
|
+
break;
|
106461
|
+
}
|
106329
106462
|
return null;
|
106330
106463
|
};
|
106331
106464
|
|
@@ -106369,6 +106502,16 @@
|
|
106369
106502
|
for (var i = 0; i < object.references.length; ++i)
|
106370
106503
|
message.references[i] = String(object.references[i]);
|
106371
106504
|
}
|
106505
|
+
switch (object.tokenProgramId) {
|
106506
|
+
case "TokenProgram":
|
106507
|
+
case 0:
|
106508
|
+
message.tokenProgramId = 0;
|
106509
|
+
break;
|
106510
|
+
case "Token2022Program":
|
106511
|
+
case 1:
|
106512
|
+
message.tokenProgramId = 1;
|
106513
|
+
break;
|
106514
|
+
}
|
106372
106515
|
return message;
|
106373
106516
|
};
|
106374
106517
|
|
@@ -106399,6 +106542,7 @@
|
|
106399
106542
|
object.amount = options.longs === String ? "0" : 0;
|
106400
106543
|
object.decimals = 0;
|
106401
106544
|
object.memo = "";
|
106545
|
+
object.tokenProgramId = options.enums === String ? "TokenProgram" : 0;
|
106402
106546
|
}
|
106403
106547
|
if (message.recipientMainAddress != null && message.hasOwnProperty("recipientMainAddress"))
|
106404
106548
|
object.recipientMainAddress = message.recipientMainAddress;
|
@@ -106422,6 +106566,8 @@
|
|
106422
106566
|
for (var j = 0; j < message.references.length; ++j)
|
106423
106567
|
object.references[j] = message.references[j];
|
106424
106568
|
}
|
106569
|
+
if (message.tokenProgramId != null && message.hasOwnProperty("tokenProgramId"))
|
106570
|
+
object.tokenProgramId = options.enums === String ? $root.TW.Solana.Proto.TokenProgramId[message.tokenProgramId] : message.tokenProgramId;
|
106425
106571
|
return object;
|
106426
106572
|
};
|
106427
106573
|
|
package/dist/lib/wallet-core.js
CHANGED
@@ -34,7 +34,7 @@ function Ra(){H++;g.monitorRunDependencies&&g.monitorRunDependencies(H);assert(!
|
|
34
34
|
function Sa(){return K.startsWith("data:application/octet-stream;base64,")}function ma(a){return a.startsWith("file://")}function M(a){return function(){var b=g.asm;assert(Na,"native function `"+a+"` called before runtime initialization");b[a]||assert(b[a],"exported native function `"+a+"` not found");return b[a].apply(null,arguments)}}var K;K="wallet-core.wasm";if(!Sa()){var Ta=K;K=g.locateFile?g.locateFile(Ta,x):x+Ta}
|
35
35
|
function Ua(){var a=K;try{if(a==K&&qa)return new Uint8Array(qa);if(ka)return ka(a);throw"both async and sync fetching of the wasm failed";}catch(b){n(b)}}
|
36
36
|
function Va(){if(!qa&&(ea||fa)){if("function"==typeof fetch&&!ma(K))return fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Ua()});if(ja)return new Promise(function(a,b){ja(K,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Ua()})}
|
37
|
-
var Wa,Xa,Ya={
|
37
|
+
var Wa,Xa,Ya={2063380:()=>{if(void 0===g.ea)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.ea=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.ea=a}catch(e){throw"No secure random number generator found";}}},2064102:()=>g.ea()};function Za(a){for(;0<a.length;)a.shift()(g)}
|
38
38
|
function va(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function pa(a){$a||($a={});$a[a]||($a[a]=1,v&&(a="warning: "+a),y(a))}var $a;function ab(a){this.l=a-24;this.Na=function(b){G[this.l+4>>2]=b};this.Ia=function(b){G[this.l+8>>2]=b};this.Ja=function(){F[this.l>>2]=0};this.Ea=function(){D[this.l+12>>0]=0};this.Ka=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Da();this.Na(b);this.Ia(c);this.Ja();this.Ea();this.Ka()};this.Da=function(){G[this.l+16>>2]=0}}
|
39
39
|
var bb=0,cb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},db=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=cb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},eb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},fb=
|
40
40
|
a=>{if("/"===a)return"/";a=db(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};
|
Binary file
|
@@ -977,6 +977,9 @@ export class TONAddressConverter {
|
|
977
977
|
static fromBoc(boc: string): string;
|
978
978
|
static toUserFriendly(address: string, bounceable: boolean, testnet: boolean): string;
|
979
979
|
}
|
980
|
+
export class TONMessageSigner {
|
981
|
+
static signMessage(privateKey: PrivateKey, message: string): string;
|
982
|
+
}
|
980
983
|
export class TONWallet {
|
981
984
|
static buildV4R2StateInit(publicKey: PublicKey, workchain: number, walletId: number): string;
|
982
985
|
}
|
@@ -1078,6 +1081,7 @@ export interface WalletCore {
|
|
1078
1081
|
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
1079
1082
|
THORChainSwap: typeof THORChainSwap;
|
1080
1083
|
TONAddressConverter: typeof TONAddressConverter;
|
1084
|
+
TONMessageSigner: typeof TONMessageSigner;
|
1081
1085
|
TONWallet: typeof TONWallet;
|
1082
1086
|
TezosMessageSigner: typeof TezosMessageSigner;
|
1083
1087
|
TransactionCompiler: typeof TransactionCompiler;
|