@alephium/web3 1.2.0 → 1.2.1-rc.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/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/address/address.d.ts +1 -0
- package/dist/src/address/address.js +11 -1
- package/dist/src/api/api-explorer.d.ts +814 -641
- package/dist/src/api/api-explorer.js +337 -310
- package/package.json +2 -2
- package/src/address/address.ts +9 -0
- package/src/api/api-explorer.ts +1022 -846
- package/std/nft_interface.ral +20 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "1.2.0",
|
|
3
|
+
"version": "1.2.1-rc.0",
|
|
4
4
|
"description": "A JS/TS library to interact with the Alephium platform",
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"author": "Alephium dev <dev@alephium.org>",
|
|
35
35
|
"config": {
|
|
36
36
|
"alephium_version": "3.3.0",
|
|
37
|
-
"explorer_backend_version": "
|
|
37
|
+
"explorer_backend_version": "2.0.0"
|
|
38
38
|
},
|
|
39
39
|
"type": "commonjs",
|
|
40
40
|
"dependencies": {
|
package/src/address/address.ts
CHANGED
|
@@ -41,6 +41,15 @@ export function validateAddress(address: string) {
|
|
|
41
41
|
decodeAndValidateAddress(address)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
export function isValidAddress(address: string): boolean {
|
|
45
|
+
try {
|
|
46
|
+
validateAddress(address)
|
|
47
|
+
return true
|
|
48
|
+
} catch {
|
|
49
|
+
return false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
function decodeAndValidateAddress(address: string): Uint8Array {
|
|
45
54
|
let decoded: Uint8Array
|
|
46
55
|
try {
|