-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: kado plugin * fix: Correct function name and update parameters in offRampQuote * fix: update the on and off ramp quote functions in the Kado plugin The commit message is: fix: update the on and off ramp quote functions in the Kado plugin * fix: update Kado plugin to use new API endpoints * feat: add KadoQuoteResponse type * feat: Update onRampQuote and offRampQuote functions in Kado plugin * feat: Extend KadoQuoteRequest type with additional fiat methods and currencies * feat: add getOrderStatus with GET * feat: adds kado quoting * feat: adds kado tokenlist * feat: WIP kado plugin updates * feat: fix kado quote mapping * feat: kado plugin * chore: fix lint issues * chore: remove aider files --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
be50199
commit d88fe02
Showing
34 changed files
with
1,039 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
"@swapkit/plugin-thorchain": minor | ||
"@swapkit/helpers": minor | ||
"@swapkit/tokens": minor | ||
"@swapkit/wallet-ledger": minor | ||
"@swapkit/plugin-radix": minor | ||
"@swapkit/plugin-kado": minor | ||
"@swapkit/core": minor | ||
"@swapkit/sdk": minor | ||
--- | ||
|
||
Adds Kado plugin |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { buildPackage } from "../../../tools/builder"; | ||
import { dependencies } from "./package.json"; | ||
|
||
buildPackage({ dependencies }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"author": "swapkit-oss", | ||
"dependencies": { | ||
"@swapkit/api": "workspace:*", | ||
"@swapkit/helpers": "workspace:*" | ||
}, | ||
"description": "SwapKit Plugin - Kado", | ||
"files": [ | ||
"src/", | ||
"dist/" | ||
], | ||
"homepage": "https://github.com/thorswap/SwapKit", | ||
"license": "Apache-2.0", | ||
"main": "./dist/index.js", | ||
"name": "@swapkit/plugin-kado", | ||
"react-native": "./src/index.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/thorswap/SwapKit.git" | ||
}, | ||
"scripts": { | ||
"build": "bun run ./build.ts", | ||
"clean": "rm -rf dist node_modules *.tsbuildinfo", | ||
"lint": "biome check --write ./src", | ||
"test": "echo 'bun test'", | ||
"test:coverage": "bun test --coverage", | ||
"type-check": "tsc --noEmit" | ||
}, | ||
"type": "module", | ||
"types": "./src/index.ts", | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Chain } from "@swapkit/helpers"; | ||
|
||
export const SupportedKadoChain = { | ||
thorchain: Chain.THORChain, | ||
solana: Chain.Solana, | ||
polygon: Chain.Polygon, | ||
Optimism: Chain.Optimism, | ||
litecoin: Chain.Litecoin, | ||
kujira: Chain.Kujira, | ||
ethereum: Chain.Ethereum, | ||
"cosmos hub": Chain.Cosmos, | ||
bitcoin: Chain.Bitcoin, | ||
base: Chain.Base, | ||
Avalanche: Chain.Avalanche, | ||
Arbitrum: Chain.Arbitrum, | ||
}; | ||
|
||
export const ChainToKadoChain = (chain: Chain) => { | ||
const entries = Object.entries(SupportedKadoChain); | ||
const found = entries.find(([_, value]) => value === chain); | ||
if (!found) throw new Error(`Chain ${chain} not supported`); | ||
return found[0]; | ||
}; | ||
|
||
export const KadoChainToChain = (kadoChain: string) => { | ||
const found = Object.keys(SupportedKadoChain).includes(kadoChain); | ||
if (!found) throw new Error(`KadoChain ${kadoChain} not supported`); | ||
return SupportedKadoChain[kadoChain as keyof typeof SupportedKadoChain]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./plugin"; |
Oops, something went wrong.