-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ts-sdk): create transfers sdk #1017
Conversation
WalkthroughThe recent changes encompass a broad expansion of the project, including the addition of new terms to the dictionary, updates to the TypeScript SDK, and the introduction of new scripts and configuration files. Notably, the TypeScript SDK has seen significant enhancements with the addition of various modules, functions, and type declarations, along with the expansion of allowed file extensions in Changes
Note Pull Request Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai TipsChat with CodeRabbit Bot (
|
@coderabbitai review |
@KaiserKarel & @cor not sure who will be reviewing but this is ready for review. Readme shows available actions: https://github.com/unionlabs/union/blob/ts-transfer-client/lib/typescript/README.md and this script can run a little demo: https://github.com/unionlabs/union/blob/ts-transfer-client/lib/typescript/scripts/demo.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we have a client object like:
let client = Client.new();
client.send({chain_id, asset_id, amount});
This way, we treat all chains through a similar interface, and inside the client handle the overhead of detection. The client should autodetect wallets; and allow being instantiated with a configuration.
@KaiserKarel API interface updated to
|
@KaiserKarel Incorporated this feedback: updated the interface to have Re auto-detection: in browser environment, we use Aside: I favor keeping the client instantiation the same as For example, if they're using a public client: import { unionActions } from '@unionlabs/client'
import { createPublicClient, walletActions } from 'viem'
export const client = createPublicClient({
// ...
})
.extend(walletActions)
.extend(unionActions) if they're using a wallet client: import { unionActions } from '@unionlabs/client'
import { createWalletClient, publicActions } from 'viem'
export const client = createWalletClient({
// ...
})
.extend(publicActions)
.extend(unionActions) Same thing for |
0edc3c2
to
a50d7c7
Compare
a50d7c7
to
d998887
Compare
Docs Preview URL |
Summary by CodeRabbit
erc20abi
variable insite/src/lib/constants.ts