@avalabs/bridge-unified 4.4.2 → 4.5.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 +4 -0
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
A package for routing tokens from Chain A to Chain B, and unifying multiple bridge tools into one.
|
|
11
11
|
<p>
|
|
12
12
|
|
|
13
|
+
> [!IMPORTANT]
|
|
14
|
+
> This package is **deprecated** and is no longer the recommended SDK for new integrations.
|
|
15
|
+
> Please migrate to **@avalabs/fusion-sdk**.
|
|
16
|
+
|
|
13
17
|
## What is this?
|
|
14
18
|
|
|
15
19
|
The bridging ecosystem is complex. There are often multiple tools that can be used to bridge tokens from one chain to another, and sometimes to get a token from chain A to C you need to use multiple bridging tools and route through chain B first. This package simplifies that process by creating the _Unified Bridge API_, a standard interface for bridging tokens from one chain to another without having to worry about the underlying tools or the underlying intermediary chains.
|
package/dist/index.d.cts
CHANGED
|
@@ -183,23 +183,23 @@ declare enum ErrorCode {
|
|
|
183
183
|
NOTARIZATION_FAILED = 5006
|
|
184
184
|
}
|
|
185
185
|
declare enum ErrorReason {
|
|
186
|
-
ASSET_NOT_SUPPORTED = "ASSET_NOT_SUPPORTED"
|
|
187
|
-
CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED"
|
|
188
|
-
CONFIG_NOT_AVAILABLE = "CONFIG_NOT_AVAILABLE"
|
|
189
|
-
CONFIRMATION_COUNT_UNKNOWN = "CONFIRMATION_COUNT_UNKNOWN"
|
|
190
|
-
ENVIRONMENT_NOT_SUPPORTED = "ENVIRONMENT_NOT_SUPPORTED"
|
|
191
|
-
IDENTICAL_CHAINS_PROVIDED = "IDENTICAL_CHAINS_PROVIDED"
|
|
192
|
-
INCORRECT_ADDRESS_PROVIDED = "INCORRECT_ADDRESS_PROVIDED"
|
|
193
|
-
INCORRECT_AMOUNT_PROVIDED = "INCORRECT_AMOUNT_PROVIDED"
|
|
194
|
-
INCORRECT_HASH_PROVIDED = "INCORRECT_HASH_PROVIDED"
|
|
195
|
-
INCORRECT_PROVIDER_PROVIDED = "INCORRECT_PROVIDER_PROVIDED"
|
|
196
|
-
INCORRECT_SIGNER_PROVIDED = "INCORRECT_SIGNER_PROVIDED"
|
|
197
|
-
INCORRECT_TXHASH_PROVIDED = "INCORRECT_TXHASH_PROVIDED"
|
|
198
|
-
INVALID_PARAMS = "INVALID_PARAMS"
|
|
199
|
-
UNKNOWN = "UNKNOWN",
|
|
200
|
-
VULNERABLE_TOKEN_APPROVAL_ADDRESS = "VULNERABLE_TOKEN_APPROVAL_ADDRESS"
|
|
201
|
-
WARDEN_CONFIG_MISMATCH = "WARDEN_CONFIG_MISMATCH"
|
|
202
|
-
WARDEN_CONFIG_MISSING_NETWORK = "WARDEN_CONFIG_MISSING_NETWORK"
|
|
186
|
+
ASSET_NOT_SUPPORTED = "ASSET_NOT_SUPPORTED",// the provided asset is not supported by the bridge
|
|
187
|
+
CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED",// the provided source or target chain is not supported by the bridge
|
|
188
|
+
CONFIG_NOT_AVAILABLE = "CONFIG_NOT_AVAILABLE",// error while fetching or parsing the config
|
|
189
|
+
CONFIRMATION_COUNT_UNKNOWN = "CONFIRMATION_COUNT_UNKNOWN",// required confirmation count of the source or target chain is unknown
|
|
190
|
+
ENVIRONMENT_NOT_SUPPORTED = "ENVIRONMENT_NOT_SUPPORTED",// bridge does not support specified environment
|
|
191
|
+
IDENTICAL_CHAINS_PROVIDED = "IDENTICAL_CHAINS_PROVIDED",// provided source and target chains are the same
|
|
192
|
+
INCORRECT_ADDRESS_PROVIDED = "INCORRECT_ADDRESS_PROVIDED",// the sender or recipient address is incorrect
|
|
193
|
+
INCORRECT_AMOUNT_PROVIDED = "INCORRECT_AMOUNT_PROVIDED",// the transfer amount is incorrect (e.g.: lesser than or equal to zero)
|
|
194
|
+
INCORRECT_HASH_PROVIDED = "INCORRECT_HASH_PROVIDED",// the transaction is not hex
|
|
195
|
+
INCORRECT_PROVIDER_PROVIDED = "INCORRECT_PROVIDER_PROVIDED",// The provided provider is incorrect type (Provider VS BitcoinProvider)
|
|
196
|
+
INCORRECT_SIGNER_PROVIDED = "INCORRECT_SIGNER_PROVIDED",// The provided signer is incorrect type
|
|
197
|
+
INCORRECT_TXHASH_PROVIDED = "INCORRECT_TXHASH_PROVIDED",// the sourceTxHash or targetTxHash is incorrect
|
|
198
|
+
INVALID_PARAMS = "INVALID_PARAMS",// generic error with the params
|
|
199
|
+
UNKNOWN = "UNKNOWN",// generic, not specified error
|
|
200
|
+
VULNERABLE_TOKEN_APPROVAL_ADDRESS = "VULNERABLE_TOKEN_APPROVAL_ADDRESS",// error when the address has token approvals for addresses involved in the multichain incident
|
|
201
|
+
WARDEN_CONFIG_MISMATCH = "WARDEN_CONFIG_MISMATCH",// error when warden config was not found or it is over the mismatch threshold
|
|
202
|
+
WARDEN_CONFIG_MISSING_NETWORK = "WARDEN_CONFIG_MISSING_NETWORK",// fetched warden config does not contain network IDs
|
|
203
203
|
ADDRESS_IS_BLOCKED = "ADDRESS_IS_BLOCKED"
|
|
204
204
|
}
|
|
205
205
|
|
package/dist/index.d.ts
CHANGED
|
@@ -183,23 +183,23 @@ declare enum ErrorCode {
|
|
|
183
183
|
NOTARIZATION_FAILED = 5006
|
|
184
184
|
}
|
|
185
185
|
declare enum ErrorReason {
|
|
186
|
-
ASSET_NOT_SUPPORTED = "ASSET_NOT_SUPPORTED"
|
|
187
|
-
CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED"
|
|
188
|
-
CONFIG_NOT_AVAILABLE = "CONFIG_NOT_AVAILABLE"
|
|
189
|
-
CONFIRMATION_COUNT_UNKNOWN = "CONFIRMATION_COUNT_UNKNOWN"
|
|
190
|
-
ENVIRONMENT_NOT_SUPPORTED = "ENVIRONMENT_NOT_SUPPORTED"
|
|
191
|
-
IDENTICAL_CHAINS_PROVIDED = "IDENTICAL_CHAINS_PROVIDED"
|
|
192
|
-
INCORRECT_ADDRESS_PROVIDED = "INCORRECT_ADDRESS_PROVIDED"
|
|
193
|
-
INCORRECT_AMOUNT_PROVIDED = "INCORRECT_AMOUNT_PROVIDED"
|
|
194
|
-
INCORRECT_HASH_PROVIDED = "INCORRECT_HASH_PROVIDED"
|
|
195
|
-
INCORRECT_PROVIDER_PROVIDED = "INCORRECT_PROVIDER_PROVIDED"
|
|
196
|
-
INCORRECT_SIGNER_PROVIDED = "INCORRECT_SIGNER_PROVIDED"
|
|
197
|
-
INCORRECT_TXHASH_PROVIDED = "INCORRECT_TXHASH_PROVIDED"
|
|
198
|
-
INVALID_PARAMS = "INVALID_PARAMS"
|
|
199
|
-
UNKNOWN = "UNKNOWN",
|
|
200
|
-
VULNERABLE_TOKEN_APPROVAL_ADDRESS = "VULNERABLE_TOKEN_APPROVAL_ADDRESS"
|
|
201
|
-
WARDEN_CONFIG_MISMATCH = "WARDEN_CONFIG_MISMATCH"
|
|
202
|
-
WARDEN_CONFIG_MISSING_NETWORK = "WARDEN_CONFIG_MISSING_NETWORK"
|
|
186
|
+
ASSET_NOT_SUPPORTED = "ASSET_NOT_SUPPORTED",// the provided asset is not supported by the bridge
|
|
187
|
+
CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED",// the provided source or target chain is not supported by the bridge
|
|
188
|
+
CONFIG_NOT_AVAILABLE = "CONFIG_NOT_AVAILABLE",// error while fetching or parsing the config
|
|
189
|
+
CONFIRMATION_COUNT_UNKNOWN = "CONFIRMATION_COUNT_UNKNOWN",// required confirmation count of the source or target chain is unknown
|
|
190
|
+
ENVIRONMENT_NOT_SUPPORTED = "ENVIRONMENT_NOT_SUPPORTED",// bridge does not support specified environment
|
|
191
|
+
IDENTICAL_CHAINS_PROVIDED = "IDENTICAL_CHAINS_PROVIDED",// provided source and target chains are the same
|
|
192
|
+
INCORRECT_ADDRESS_PROVIDED = "INCORRECT_ADDRESS_PROVIDED",// the sender or recipient address is incorrect
|
|
193
|
+
INCORRECT_AMOUNT_PROVIDED = "INCORRECT_AMOUNT_PROVIDED",// the transfer amount is incorrect (e.g.: lesser than or equal to zero)
|
|
194
|
+
INCORRECT_HASH_PROVIDED = "INCORRECT_HASH_PROVIDED",// the transaction is not hex
|
|
195
|
+
INCORRECT_PROVIDER_PROVIDED = "INCORRECT_PROVIDER_PROVIDED",// The provided provider is incorrect type (Provider VS BitcoinProvider)
|
|
196
|
+
INCORRECT_SIGNER_PROVIDED = "INCORRECT_SIGNER_PROVIDED",// The provided signer is incorrect type
|
|
197
|
+
INCORRECT_TXHASH_PROVIDED = "INCORRECT_TXHASH_PROVIDED",// the sourceTxHash or targetTxHash is incorrect
|
|
198
|
+
INVALID_PARAMS = "INVALID_PARAMS",// generic error with the params
|
|
199
|
+
UNKNOWN = "UNKNOWN",// generic, not specified error
|
|
200
|
+
VULNERABLE_TOKEN_APPROVAL_ADDRESS = "VULNERABLE_TOKEN_APPROVAL_ADDRESS",// error when the address has token approvals for addresses involved in the multichain incident
|
|
201
|
+
WARDEN_CONFIG_MISMATCH = "WARDEN_CONFIG_MISMATCH",// error when warden config was not found or it is over the mismatch threshold
|
|
202
|
+
WARDEN_CONFIG_MISSING_NETWORK = "WARDEN_CONFIG_MISSING_NETWORK",// fetched warden config does not contain network IDs
|
|
203
203
|
ADDRESS_IS_BLOCKED = "ADDRESS_IS_BLOCKED"
|
|
204
204
|
}
|
|
205
205
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avalabs/bridge-unified",
|
|
3
3
|
"license": "Limited Ecosystem License",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.5.0",
|
|
5
|
+
"deprecated": "This package is deprecated. Please use @avalabs/fusion-sdk instead.",
|
|
5
6
|
"main": "dist/index.cjs",
|
|
6
7
|
"module": "dist/index.js",
|
|
7
8
|
"typings": "dist/index.d.ts",
|
|
@@ -33,9 +34,9 @@
|
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "tsup",
|
|
36
|
-
"build:watch": "tsup --watch",
|
|
37
|
-
"lint": "eslint \"src/**/*.ts\"",
|
|
38
|
-
"test": "jest",
|
|
39
|
-
"test:watch": "jest --watch"
|
|
37
|
+
"deprecated:build:watch": "tsup --watch",
|
|
38
|
+
"deprecated:lint": "eslint \"src/**/*.ts\"",
|
|
39
|
+
"deprecated:test": "jest",
|
|
40
|
+
"deprecated:test:watch": "jest --watch"
|
|
40
41
|
}
|
|
41
42
|
}
|