Giter VIP home page Giter VIP logo

thorswap / swapkit Goto Github PK

View Code? Open in Web Editor NEW
40.0 4.0 15.0 16.11 MB

SwapKit SDK - Integrate blockchains easily. Docs - https://docs.thorswap.finance/swapkit-docs

Home Page: https://swapkit.dev

License: Apache License 2.0

JavaScript 4.13% TypeScript 95.75% HTML 0.03% CSS 0.04% Handlebars 0.05%
blockchain web3 avalanche-c-chain bitcoin dogecoin ethereum thorchain bitcoin-cash hdwallet ledger

swapkit's People

Contributors

0x-general avatar 0xepicode avatar 0xmillz avatar bithighlander avatar blockjayn avatar chillios-dev avatar dependabot[bot] avatar gima-maya avatar github-actions[bot] avatar hey avatar mfaizan1 avatar ochhii1337 avatar olegpetroveth avatar omahs avatar phips28 avatar towantg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

swapkit's Issues

Error submitting deposits on Maya

Current behavior

All deposit transactions on the Maya chain are currently failing with the error below:

Error: Broadcasting transaction failed with code 6 (codespace: sdk). Log: all coins must be native to BASEChain: unknown request
at GA.broadcastTxSync
at async GA.broadcastTx
at async BA
at async Je$1.eval [as deposit]

How to reproduce:

const client = createSwapKit();
await client.connectKeystore(Chain.Maya, phrase);
const hash = await client.deposit({
    assetValue: new AssetValue({
      value: 1,
      decimal: 10,
      chain: Chain.Maya,
      symbol: 'CACAO',
    }),
    memo: test,
    recipient: '',
});

Also fails when registering a MayaName since it also a deposit:

const hash = await client.registerMayaname({
  name: 'test1',
  chain: Chain.Maya,
  assetValue: new AssetValue({
    value: getMAYANameCost(1),
    decimal: 10,
    chain: Chain.Maya,
    symbol: 'CACAO',
  }),
  address: 'maya1.....',
});

Expected behavior

It should work like it does for THORChain.

Functionality

  • Swap
  • Liquidity
  • Savers
  • Loan
  • Wallet
  • Transactions
  • Api
  • Other

Packages

  • @swapkit/sdk
  • @swapkit/core
  • @swapkit/api
  • @swapkit/helpers
  • @swapkit/tokens
  • @swapkit/types
  • @swapkit/toolbox-cosmos
  • @swapkit/toolbox-evm
  • @swapkit/toolbox-utxo
  • @swapkit/wallet-evm-extensions
  • @swapkit/wallet-keepkey
  • @swapkit/wallet-keplr
  • @swapkit/wallet-keystore
  • @swapkit/wallet-ledger
  • @swapkit/wallet-okx
  • @swapkit/wallet-trezor
  • @swapkit/wallet-wc
  • @swapkit/wallet-xdefi

Details

Package versions:

# Paste the output of `<npm|yarn|pnpm|bun pm> ls --depth=0 | grep @swapkit` here

swapkit(sdk): `dist` folder is not in the released

Current behavior

"@swapkit/sdk": "1.0.0-rc.129"

dist folder is not in the sdk
CleanShot 2024-03-11 at 12 20 43

and therefore the import fails:
image

Expected behavior

dist folder exists

Functionality

  • Swap
  • Liquidity
  • Savers
  • Loan
  • Wallet
  • Transactions
  • Api
  • Other

Packages

  • @swapkit/sdk
  • @swapkit/core
  • @swapkit/api
  • @swapkit/helpers
  • @swapkit/tokens
  • @swapkit/types
  • @swapkit/toolbox-cosmos
  • @swapkit/toolbox-evm
  • @swapkit/toolbox-utxo
  • @swapkit/wallet-evm-extensions
  • @swapkit/wallet-keepkey
  • @swapkit/wallet-keplr
  • @swapkit/wallet-keystore
  • @swapkit/wallet-ledger
  • @swapkit/wallet-okx
  • @swapkit/wallet-trezor
  • @swapkit/wallet-wc
  • @swapkit/wallet-xdefi

Details

"@swapkit/sdk": "1.0.0-rc.129"

☂️ Missing Chains for Wallets

Missing Chains for currently implemented Wallets

Wallet Connect:

  • THORChain
  • MAYAChain
  • Gaia
  • Kujira
  • Polkadot

Keplr:

  • Kujira

Keystore:

  • Arbitrum
  • Polygon
  • Optimism
  • Polkadot
  • Dash

Ledger:

  • Dash
  • Polkadot ⏳ (Taken by: @towanTG - #646)
  • Arbitrum
  • Polygon
  • Optimism

OKX:

  • Kujira
  • Doge
  • LTC
  • Polkadot

Trezor:

  • Dash

Details

Not all wallets support all chains they can support. Chain support for the following wallets is missing:

[BUG] Playground mixed EVM network pairing

Describe the bug
ARB and BSC being intermingled on network selection via metamask. unable to test ARB

To Reproduce
Select ARB, select Metamask as wallet, see network switching to BSC then ARB, then see results show BSC

Expected behavior
Playground should pair arbitrium with a single network switch and show ARB assets

Screenshots
Screen Shot 2023-09-11 at 1 19 00 PM

Screen Shot 2023-09-11 at 1 19 35 PM

Info

  • *Chain: ARB
  • *Versions: Playground dev branch
  • Wallet (if applicable): Metamask
  • Browser (if applicable): Chrome

Additional context
Im running into this same network select issue when debugging KeepKey

[BUG] playground, unable to pair multiple network

Describe the bug
Unable to pair multiple networks. aka BSC + BTC via vite playground and trezor

To Reproduce
connect trezor, select BSC and BTC, select connect. see only 1 network pair

Expected behavior
both networks should pair and show balances

Screenshots
Screen Shot 2023-09-11 at 2 05 30 PM

Info

  • *Chain: BSC BTC
  • *Versions: Develop
  • Wallet (if applicable): Trezor
  • Browser (if applicable): Chrome

Additional context
I am running into this same error debugging KeepKey

I am trying to Integrate the SwapKit in Our App

I'm currently working on integrating SwapKit into my project, and I've come across a few challenges that I could use some guidance on. I've thoroughly reviewed the SDK code and explored the available APIs, but a couple of points are still unclear to me.
ThorName Integration:
I'm trying to understand how to add our ThorName in the SDK. The provided example lacks integration for this feature, and I'm unsure about the correct approach.
-where to get thorName (the mentioned website in the doc is not working )
Functionality Testing:
How can we effectively test the functionalities of SwapKit? Is any testnet available for testing, I'm looking for insights into a suitable testing strategy.
Service Fees :
I'm also seeking clarity on the fees associated with using SwapKit. Specifically, I'd like to know about our affiliate fee and whether there's a 30% fee mentioned in the documentation (uncertain if this is included or not)
If anyone has experience with these aspects of SwapKit or can provide guidance, I would greatly appreciate your insights. Additionally, i
Thank you in advance for your help!

[BUG] update crypto-js to >= 4.2.0

there was a recent security issue in crypto-js, not sure if this library is affected at all, but currently using swapkit/sdk1.0.0-rc.43 breaks my github security checks. You might also want to enable them in Github for your repos.

see:
brix/crypto-js#467

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.