Skip to main content

Routes

Table of contents

Constructors

Methods

Constructors

constructor

new Routes()

Methods

getActiveRoute

Static getActiveRoute(__namedParameters): CancelablePromise<ActiveRouteOutputDTO>

throws ApiError

Parameters

NameTypeDescription
__namedParametersObject-
__namedParameters.activeRouteIdnumberId of the Active Route.

Returns

CancelablePromise<ActiveRouteOutputDTO>

ActiveRouteDTO Get active route details using active route id

Defined in

socket-v2-sdk/src/client/services/Routes.ts:43


getActiveRoutesForUser

Static getActiveRoutesForUser(request): CancelablePromise<ActiveRoutesOutputDTO>

throws ApiError

Parameters

NameType
requestActiveRoutesRequest

Returns

CancelablePromise<ActiveRoutesOutputDTO>

ActiveRoutesOutputDTO Get all the active routes from a user address. Filters like fromChainId, toChainId and token addresses can be used to get back specific active routes.

Defined in

socket-v2-sdk/src/client/services/Routes.ts:65


nextTx

Static nextTx(__namedParameters): CancelablePromise<NextTxOutputDTO>

throws ApiError

Parameters

NameTypeDescription
__namedParametersObject-
__namedParameters.activeRouteIdnumberId of Active Route.

Returns

CancelablePromise<NextTxOutputDTO>

NextTxOutputDTO Get next tx details of an active route

Defined in

socket-v2-sdk/src/client/services/Routes.ts:82


startActiveRoute

Static startActiveRoute(__namedParameters): CancelablePromise<NextTxOutputDTO>

Function that takes in a route and starts the selected route. Function is responsible for

  • Saving the selected route to bridge tokens from one chain to another.
  • Saving the fromChain, toChain, and fromAsssetAddress and toAssetAddress
  • Returns the Active Route Id, Current Tx, Total number of txs, txType

throws ApiError

Parameters

NameType
__namedParametersObject
__namedParameters.startRequestStartActiveRouteInputDTO

Returns

CancelablePromise<NextTxOutputDTO>

StartActiveRouteResponseDTO Starts the Active Route and gives back the data to start the route

Defined in

socket-v2-sdk/src/client/services/Routes.ts:23


updateActiveRoute

Static updateActiveRoute(__namedParameters): CancelablePromise<RouteStatusOutputDTO>

throws ApiError

Parameters

NameTypeDescription
__namedParametersObject-
__namedParameters.activeRouteIdnumberId of Active Route.
__namedParameters.signature?stringSignature to be sent in case the next transaction is dependant on the signature.
__namedParameters.txHash?stringTransaction hash that relates to the userTxIndex. Each object in the userTxs is a transaction that has to be done by the user to progress in the route. If all the transactions are completed in the route, it will be marked complete.
__namedParameters.userTxIndexnumberIndex of the userTxs in the Active Route. Every active route will have a userTxs array. userTxIndex is the index of the object in the userTxs array.

Returns

CancelablePromise<RouteStatusOutputDTO>

RouteStatusOutputDTO Get status of an active route while submitting transaction

Defined in

socket-v2-sdk/src/client/services/Routes.ts:104