@across-protocol/sdk 4.3.140-alpha.1 → 4.3.140
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.
|
@@ -122,12 +122,12 @@ class Address {
|
|
|
122
122
|
return this.toBytes32();
|
|
123
123
|
}
|
|
124
124
|
isValidOn(chainId) {
|
|
125
|
+
if ((0, _1.chainIsTvm)(chainId))
|
|
126
|
+
return TvmAddress.validate(this.rawAddress);
|
|
125
127
|
if ((0, _1.chainIsEvm)(chainId))
|
|
126
128
|
return EvmAddress.validate(this.rawAddress);
|
|
127
129
|
if ((0, _1.chainIsSvm)(chainId))
|
|
128
130
|
return SvmAddress.validate(this.rawAddress);
|
|
129
|
-
if ((0, _1.chainIsTvm)(chainId))
|
|
130
|
-
return TvmAddress.validate(this.rawAddress);
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
133
|
toString() {
|
|
@@ -164,12 +164,12 @@ export class Address {
|
|
|
164
164
|
}
|
|
165
165
|
// Checks if the address is valid on the given chain ID.
|
|
166
166
|
isValidOn(chainId) {
|
|
167
|
+
if (chainIsTvm(chainId))
|
|
168
|
+
return TvmAddress.validate(this.rawAddress);
|
|
167
169
|
if (chainIsEvm(chainId))
|
|
168
170
|
return EvmAddress.validate(this.rawAddress);
|
|
169
171
|
if (chainIsSvm(chainId))
|
|
170
172
|
return SvmAddress.validate(this.rawAddress);
|
|
171
|
-
if (chainIsTvm(chainId))
|
|
172
|
-
return TvmAddress.validate(this.rawAddress);
|
|
173
173
|
return false;
|
|
174
174
|
}
|
|
175
175
|
// Converts the input address to a 32-byte hex data string.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@across-protocol/sdk",
|
|
3
3
|
"author": "UMA Team",
|
|
4
|
-
"version": "4.3.140
|
|
4
|
+
"version": "4.3.140",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"homepage": "https://docs.across.to/reference/sdk",
|
|
7
7
|
"repository": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@across-protocol/contracts": "5.0.5",
|
|
106
|
-
"@across-protocol/constants": "^3.1.
|
|
106
|
+
"@across-protocol/constants": "^3.1.109",
|
|
107
107
|
"@coral-xyz/anchor": "^0.30.1",
|
|
108
108
|
"@eth-optimism/sdk": "^3.3.1",
|
|
109
109
|
"@ethersproject/bignumber": "^5.7.0",
|
|
@@ -187,9 +187,9 @@ export abstract class Address {
|
|
|
187
187
|
|
|
188
188
|
// Checks if the address is valid on the given chain ID.
|
|
189
189
|
isValidOn(chainId: number): boolean {
|
|
190
|
+
if (chainIsTvm(chainId)) return TvmAddress.validate(this.rawAddress);
|
|
190
191
|
if (chainIsEvm(chainId)) return EvmAddress.validate(this.rawAddress);
|
|
191
192
|
if (chainIsSvm(chainId)) return SvmAddress.validate(this.rawAddress);
|
|
192
|
-
if (chainIsTvm(chainId)) return TvmAddress.validate(this.rawAddress);
|
|
193
193
|
return false;
|
|
194
194
|
}
|
|
195
195
|
|