SameChain
If reading docs isn't your thing, just check out our example code for integration
We are currently updating the repository with more examples, so please hold on.
Same Chain Swap
1. SwapQuotes function
SameChainSwapParams
Description
inputToken
The input token for the swap operation.
outputToken
The output token to receive after the swap.
amountIn
The amount of input tokens to be swapped.
slippage
The allowed slippage percentage for the swap.
network
The network ID for the swap operation.
options
(Optional) Additional options for the swap.
2. ExecuteSwapInstruction
executeSwapInstruction
Description
quote
A CommonRouteInterface representing the quote response format.
address
The address related to the instruction.
options
(Optional) An object containing additional options.
options.provider
(Optional) The connection provider to use.
options.integrator
(Optional) A string identifying the integrator.
options.recipient
(Optional) Address of the recipient.
1 . APTOS :
1.1 .Initialising The SDK
NOTE : SIGNER CAN BE A APTOS ACCOUNT INSTANCE DERIVED FROM PRIVATE KEY OR A SIGN AND SUBMIT FUNCTION FROM APTOS WALLET ADAPTER
1.2 .Getting Swap Quotes
1.3 .Executing Swap Quotes
2 . SUI :
2.1 .Initialising The SDK```typescript
2.2 .Getting Swap Quotes
2.3 .Executing Swap Quotes
3 . SOLANA :
3.1 .Initialising The SDK```typescript
3.2 .Getting Swap Quotes
3.3 .Executing Swap Quotes
4 . EVM CHAINS :
4.1 .Initialising The SDK
4.2 .Getting Swap Quotes
4.3 .Executing Swap Quotes
Last updated