Types
Table of contents
Enumerations
- ActiveRouteStatus
- BridgeErrorStatus
- BridgeName
- ChainId
- PrepareActiveRouteStatus
- SortOptions
- TxStatus
- TxType
- UserTxType
Classes
- ApiError
- Approvals
- Balances
- CancelError
- CancelablePromise
- Chain
- Path
- Quotes
- Routes
- Server
- Socket
- SocketTx
- Supported
- TokenList
- TokenLists
- Web3ConnectedSocket
Interfaces
- ActiveRoutesRequest
- AddEthereumChainParameters
- EventCallbacks
- NextTxResponse
- QuoteParams
- QuotePreferences
- QuoteRequest
- RefuelData
- SocketOptions
- SocketPreferences
- SocketQuote
- TokenListRequest
Type Aliases
- ActiveRouteOutputDTO
- ActiveRouteResponse
- ActiveRoutesOutputDTO
- ApprovalData
- ApprovalOutputDTO
- ApprovalTxOutputDTO
- Balance
- BalanceResult
- BridgeDetails
- BridgeRouteErrors
- BridgeStatusResponse
- BridgeStatusResponseDTO
- ChainDetails
- ChainGasBalances
- ChainSwitchDoneCallback
- Dexes
- GasFee
- GasPriceResponseDTO
- GasTokenDetails
- HealthResponseDTO
- MinGasBalances
- NextTxOutputDTO
- OpenAPIConfig
- Quote
- QuoteOutputDTO
- Route
- RouteStatusOutputDTO
- SingleTxDTO
- SingleTxOutputDTO
- SingleTxResponse
- SocketTxDoneCallback
- StartActiveRouteInputDTO
- Step
- SupportedBridgesOutputDTO
- SupportedChainsOutputDTO
- Token
- TokenBalanceReponseDTO
- TokenListOutputDTO
- TokenPriceResponseDTO
- TransactionReceiptResponseDTO
- TxDoneCallback
- UserTx
Variables
Type Aliases
ActiveRouteOutputDTO
Ƭ ActiveRouteOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | ActiveRouteResponse | - |
success | boolean | Status of API response. |
Defined in
socket-v2-sdk/src/client/models/ActiveRouteOutputDTO.ts:3
ActiveRouteResponse
Ƭ ActiveRouteResponse: Object
Type declaration
Name | Type | Description |
---|---|---|
activeRouteId | number | Id of the Active Route. |
createdAt | string | Timestamp of Route start. |
currentUserTxIndex | number | Index of current tx in userTxs array. |
fromAmount | string | Amount of sending tokens. |
fromAsset | Token | - |
fromAssetAddress | string | Address of token on source chain. |
fromChainId | number | Id of source chain. |
routeStatus | ActiveRouteStatus | Status of the Active Route. |
toAmount | string | Approximate amount of receiving tokens. |
toAsset | Token | - |
toAssetAddress | string | Address of token on destination chain. |
toChainId | number | Id of destination chain. |
totalUserTx | number | Total number of txs required in Active Route. |
updatedAt | string | Timestamp of last route update. |
userAddress | string | Address of user doing the Active Route. |
userTxs | UserTx [] | Array of user txs. |
Defined in
socket-v2-sdk/src/client/models/ActiveRouteResponse.ts:9
ActiveRoutesOutputDTO
Ƭ ActiveRoutesOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | { activeRoutes : ActiveRouteResponse [] ; pagination : { limit : number ; offset : number ; totalRecords : number } } | - |
result.activeRoutes | ActiveRouteResponse [] | - |
result.pagination | { limit : number ; offset : number ; totalRecords : number } | - |
result.pagination.limit | number | - |
result.pagination.offset | number | - |
result.pagination.totalRecords | number | - |
success | boolean | Status of API response. |
Defined in
socket-v2-sdk/src/client/models/ActiveRoutesOutputDTO.ts:3
ApprovalData
Ƭ ApprovalData: Object
Type declaration
Name | Type | Description |
---|---|---|
allowanceTarget | string | Contract address that needs approval. |
approvalTokenAddress | string | Address of token for which approval is required. |
minimumApprovalAmount | string | Minimum amount of approval needed. |
owner | string | Address of owner. |
Defined in
socket-v2-sdk/src/client/models/ApprovalData.ts:1
ApprovalOutputDTO
Ƭ ApprovalOutputDTO: Object
Type declaration
Name | Type |
---|---|
result | { tokenAddress : string ; value : string } |
result.tokenAddress | string |
result.value | string |
success | boolean |
Defined in
socket-v2-sdk/src/client/models/ApprovalOutputDTO.ts:1
ApprovalTxOutputDTO
Ƭ ApprovalTxOutputDTO: Object
Type declaration
Name | Type |
---|---|
result | { data? : string ; from? : string ; to? : string } |
result.data? | string |
result.from? | string |
result.to? | string |
success | boolean |
Defined in
socket-v2-sdk/src/client/models/ApprovalTxOutputDTO.ts:1
Balance
Ƭ Balance: Object
Type declaration
Name | Type |
---|---|
result | BalanceResult [] |
success | boolean |
Defined in
socket-v2-sdk/src/client/models/Balance.ts:3
BalanceResult
Ƭ BalanceResult: Object
Type declaration
Name | Type |
---|---|
address | string |
amount | number |
chainId | ChainId |
currency | string |
decimals | number |
name | string |
price | number |
symbol | string |
Defined in
socket-v2-sdk/src/client/models/BalanceResult.ts:3
BridgeDetails
Ƭ BridgeDetails: Object
Type declaration
Name | Type | Description |
---|---|---|
displayName | string | Display name of bridge. |
icon? | string | URL for icon of bridge. |
name | BridgeName | Name of bridge. |
serviceTime | number | Approx time for bridging in seconds. |
Defined in
socket-v2-sdk/src/client/models/BridgeDetails.ts:5
BridgeRouteErrors
Ƭ BridgeRouteErrors: { [bridge in BridgeName]?: Object }
Defined in
socket-v2-sdk/src/client/models/BridgeRouteErrors.ts:8
BridgeStatusResponse
Ƭ BridgeStatusResponse: Object
Type declaration
Name | Type | Description |
---|---|---|
destinationTransactionHash? | string | Destination Transaction hash. |
destinationTxStatus | TxStatus | Status of destination transaction while bridging. |
fromChainId | number | Source Chain Id |
sourceTx | string | Source Transaction. |
sourceTxStatus | TxStatus | Status of source transaction while bridging. |
toChainId | number | Destination Chain Id. |
Defined in
socket-v2-sdk/src/client/models/BridgeStatusResponse.ts:3
BridgeStatusResponseDTO
Ƭ BridgeStatusResponseDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | BridgeStatusResponse | - |
success | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/BridgeStatusResponseDTO.ts:3
ChainDetails
Ƭ ChainDetails: Object
Type declaration
Name | Type | Description |
---|---|---|
chainId | ChainId | Id of chain. |
currency | GasTokenDetails | - |
explorers | string [] | - |
icon | string | URL for icon of chain. |
isL1 | boolean | Flag indicating whether the chain is L1. |
name | string | Name of chain. |
receivingEnabled | boolean | Flag indicating whether receiving of tokens is supported to chain. |
rpcs | string [] | - |
sendingEnabled | boolean | Flag indicating whether sending of tokens is supported from chain. |
Defined in
socket-v2-sdk/src/client/models/ChainDetails.ts:4
ChainGasBalances
Ƭ ChainGasBalances: any
Defined in
socket-v2-sdk/src/client/models/ChainGasBalances.ts:1
ChainSwitchDoneCallback
Ƭ ChainSwitchDoneCallback: (chainId
: ChainId
) => void
Type declaration
▸ (chainId
): void
Callback when chain switch has completed.
Parameters
Name | Type |
---|---|
chainId | ChainId |
Returns
void
Defined in
socket-v2-sdk/src/web3ConnectedSocket.ts:26
Dexes
Ƭ Dexes: Middleware.OneInch
| Middleware.ZeroX
Defined in
socket-v2-sdk/src/client/models/Dexes.ts:3
GasFee
Ƭ GasFee: Object
Type declaration
Name | Type | Description |
---|---|---|
asset | Token | Gas token details. |
feesInUsd | number | USD value of gas fees at current gas price. |
gasAmount | string | Estimated Amount of gas token will be used |
gasLimit | number | Approx Gas Limit of the transaction. |
Defined in
socket-v2-sdk/src/client/models/GasFee.ts:3
GasPriceResponseDTO
Ƭ GasPriceResponseDTO: Object
Type declaration
Name | Type |
---|---|
result | { chainId? : ChainId ; fast? : { estimatedSeconds? : number ; gasPrice? : number } ; normal? : { estimatedSeconds? : number ; gasPrice? : number } ; slow? : { estimatedSeconds? : number ; gasPrice? : number } ; txType? : number } |
result.chainId? | ChainId |
result.fast? | { estimatedSeconds? : number ; gasPrice? : number } |
result.fast.estimatedSeconds? | number |
result.fast.gasPrice? | number |
result.normal? | { estimatedSeconds? : number ; gasPrice? : number } |
result.normal.estimatedSeconds? | number |
result.normal.gasPrice? | number |
result.slow? | { estimatedSeconds? : number ; gasPrice? : number } |
result.slow.estimatedSeconds? | number |
result.slow.gasPrice? | number |
result.txType? | number |
success | boolean |
Defined in
socket-v2-sdk/src/client/models/GasPriceResponseDTO.ts:3
GasTokenDetails
Ƭ GasTokenDetails: Object
Type declaration
Name | Type | Description |
---|---|---|
address | string | Address of gas token. |
decimals | number | Decimals of gas token. |
icon | string | URL for icon of gas token. |
minNativeCurrencyForGas | string | Minimum amount to be left for gas while using max amount. |
name | string | Name of gas token. |
symbol | string | Symbol of gas token. |
Defined in
socket-v2-sdk/src/client/models/GasTokenDetails.ts:1
HealthResponseDTO
Ƭ HealthResponseDTO: Object
Type declaration
Name | Type |
---|---|
ok | boolean |
Defined in
socket-v2-sdk/src/client/models/HealthResponseDTO.ts:1
MinGasBalances
Ƭ MinGasBalances: any
Defined in
socket-v2-sdk/src/client/models/MinGasBalances.ts:1
NextTxOutputDTO
Ƭ NextTxOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | NextTxResponse | - |
status | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/NextTxOutputDTO.ts:3
OpenAPIConfig
Ƭ OpenAPIConfig: Object
Type declaration
Name | Type |
---|---|
API_KEY? | string | Resolver <string > |
BASE | string |
CREDENTIALS | "include" | "omit" | "same-origin" |
HEADERS? | Headers | Resolver <Headers > |
PASSWORD? | string | Resolver <string > |
TOKEN? | string | Resolver <string > |
USERNAME? | string | Resolver <string > |
VERSION | string |
WITH_CREDENTIALS | boolean |
ENCODE_PATH? | (path : string ) => string |
Defined in
socket-v2-sdk/src/client/core/OpenAPI.ts:6
Quote
Ƭ Quote: Object
Type declaration
Name | Type |
---|---|
bridgeRouteErrors | BridgeRouteErrors |
fromAsset? | Token |
fromChainId? | number |
refuel? | RefuelData |
routes? | Route [] |
toAsset? | Token |
toChainId? | number |
Defined in
socket-v2-sdk/src/client/models/QuoteOutputDTO.ts:6
QuoteOutputDTO
Ƭ QuoteOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | Quote | - |
success | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/QuoteOutputDTO.ts:16
Route
Ƭ Route: Object
Type declaration
Name | Type | Description |
---|---|---|
chainGasBalances | ChainGasBalances | - |
fromAmount | string | Sending token amount. |
minimumGasBalances | MinGasBalances | - |
recipient | string | Address of user receiving the amount. |
routeId | string | Unique id for each route. |
sender | string | Address of user making the transactions. |
serviceTime | number | Estimate of total time in seconds, excluding the transaction time. |
toAmount | string | Approximate receiving token amount. |
totalGasFeesInUsd | number | Combined USD gas fees for all transactions in the route. |
totalUserTx | number | Total number of transactions for the route. |
usedBridgeNames | BridgeName [] | Array of bridges used in the route |
userTxs | UserTx [] | Array of user transactions. |
Defined in
socket-v2-sdk/src/client/models/Route.ts:6
RouteStatusOutputDTO
Ƭ RouteStatusOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | PrepareActiveRouteStatus | - |
status | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/RouteStatusOutputDTO.ts:12
SingleTxDTO
Ƭ SingleTxDTO: Object
Type declaration
Name | Type |
---|---|
refuel | RefuelData |
route | Route |
Defined in
socket-v2-sdk/src/client/models/SingleTxDTO.ts:4
SingleTxOutputDTO
Ƭ SingleTxOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | SingleTxResponse | - |
status | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/SingleTxOutputDTO.ts:3
SingleTxResponse
Ƭ SingleTxResponse: Object
Type declaration
Name | Type | Description |
---|---|---|
approvalData | ApprovalData | null | - |
chainId | ChainId | Id of chain where transaction has to be sent. |
totalUserTx | number | Total number of transactions in Active Route. |
txData | string | Calldata for transaction. |
txTarget | string | Address to which transaction has to be sent. |
txType | TxType | Type of transaction. |
userTxType | UserTxType | Type of user transaction. |
value | string | Native token amount to be sent with transaction. |
Defined in
socket-v2-sdk/src/client/models/SingleTxResponse.ts:6
SocketTxDoneCallback
Ƭ SocketTxDoneCallback: (tx
: SocketTx
) => void
Type declaration
▸ (tx
): void
Callback when a socket transaction is complete.
Parameters
Name | Type |
---|---|
tx | SocketTx |
Returns
void
Defined in
socket-v2-sdk/src/web3ConnectedSocket.ts:22
StartActiveRouteInputDTO
Ƭ StartActiveRouteInputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
fromAssetAddress | string | Token address on source chain. |
fromChainId | number | Chain id of source chain. |
includeFirstTxDetails? | boolean | Include the tx details for the first user transaction. If true it will return the txData txType etc. If false, it will only return the active route Id of the selected route. |
refuel? | RefuelData | Refuel data for if the user have selected bridge with gas option |
route | Route | Selected route by the user to bridge tokens from one chain to another. |
toAssetAddress | string | Token address on destination chain. |
toChainId | number | Chain id of destination chain. |
Defined in
socket-v2-sdk/src/client/models/StartActiveRouteInputDTO.ts:4
Step
Ƭ Step: Object
Type declaration
Name | Type |
---|---|
fromAmount | string |
fromAsset | Token |
fromChainId | number |
gasFees | GasFee |
protocol | BridgeDetails |
serviceTime | number |
toAmount | string |
toAsset | Token |
toChainId | number |
type | string |
Defined in
socket-v2-sdk/src/client/models/UserTx.ts:9
SupportedBridgesOutputDTO
Ƭ SupportedBridgesOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | BridgeDetails [] | - |
success | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/SupportedBridgesOutputDTO.ts:3
SupportedChainsOutputDTO
Ƭ SupportedChainsOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | ChainDetails [] | - |
success | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/SupportedChainsOutputDTO.ts:3
Token
Ƭ Token: Object
Type declaration
Name | Type | Description |
---|---|---|
address | string | Address of token. |
chainAgnosticId? | string | null | Unique Id over all chains |
chainId | ChainId | Chain id of the token |
decimals? | number | Decimal used for token. |
icon? | string | URL for icon of token. |
logoURI? | string | URL for icon of token. |
name? | string | Name of token. |
symbol | string | Symbol of token. |
Defined in
socket-v2-sdk/src/client/models/Token.ts:3
TokenBalanceReponseDTO
Ƭ TokenBalanceReponseDTO: Object
Type declaration
Name | Type |
---|---|
result | { balance? : string ; chainId? : ChainId ; decimals? : number ; icon? : string ; name? : string ; symbol? : string ; tokenAddress? : string ; userAddress? : string } |
result.balance? | string |
result.chainId? | ChainId |
result.decimals? | number |
result.icon? | string |
result.name? | string |
result.symbol? | string |
result.tokenAddress? | string |
result.userAddress? | string |
success | boolean |
Defined in
socket-v2-sdk/src/client/models/TokenBalanceReponseDTO.ts:3
TokenListOutputDTO
Ƭ TokenListOutputDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | Token [] | - |
success | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/TokenListOutputDTO.ts:3
TokenPriceResponseDTO
Ƭ TokenPriceResponseDTO: Object
Type declaration
Name | Type |
---|---|
result | { chainId? : ChainId ; currency? : string ; tokenAddress? : string ; tokenPrice? : number } |
result.chainId? | ChainId |
result.currency? | string |
result.tokenAddress? | string |
result.tokenPrice? | number |
success | boolean |
Defined in
socket-v2-sdk/src/client/models/TokenPriceResponseDTO.ts:3
TransactionReceiptResponseDTO
Ƭ TransactionReceiptResponseDTO: Object
Type declaration
Name | Type | Description |
---|---|---|
result | any | - |
success | boolean | Status of API. |
Defined in
socket-v2-sdk/src/client/models/TransactionReceiptResponseDTO.ts:1
TxDoneCallback
Ƭ TxDoneCallback: (tx
: SocketTx
, hash
: string
) => void
Type declaration
▸ (tx
, hash
): void
Callback when a transaction for send/approval has completed.
Parameters
Name | Type |
---|---|
tx | SocketTx |
hash | string |
Returns
void
Defined in
socket-v2-sdk/src/web3ConnectedSocket.ts:24
UserTx
Ƭ UserTx: Object
Type declaration
Name | Type |
---|---|
approvalData? | ApprovalData |
chainId | ChainId |
destinationTxHash? | string |
destinationTxReceipt? | TransactionReceipt |
gasFees | GasFee |
recipient | string |
routePath | string |
sender | string |
serviceTime | number |
sourceTransactionHash? | string |
sourceTransactionReceipt? | TransactionReceipt |
stepCount | number |
steps | Step [] |
toAmount | string |
toAsset | Token |
txType | TxType |
userTxIndex | number |
userTxStatus? | PrepareActiveRouteStatus |
userTxType | UserTxType |
Defined in
socket-v2-sdk/src/client/models/UserTx.ts:22
Variables
OpenAPI
• Const
OpenAPI: OpenAPIConfig