Skip to content
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

chore: api module #1133

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .changeset/dry-actors-bathe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"@coinbase/onchainkit": patch
---

**feat**: add `useSendCall` and `useSendCalls` hooks to support call-type transactions in `Transaction` component by @0xAlec #1130
- **feat**: exported `buildSwapTransaction`, `getSwapQuote` and `getTokens` from API module. By @zizzamia #1133
- **feat**: added `useSendCall` and `useSendCalls` hooks to support call-type transactions in `Transaction` component. By @0xAlec #1130
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "vocs preview"
},
"dependencies": {
"@coinbase/onchainkit": "0.29.3",
"@coinbase/onchainkit": "0.29.4",
"@types/react": "latest",
"@vercel/edge": "^1.1.1",
"permissionless": "^0.1.29",
Expand Down
52 changes: 31 additions & 21 deletions site/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,33 @@ export const sidebar = [
},
],
},
{
text: 'API',
items: [
{
text: 'Swap',
items: [
{
text: 'buildSwapTransaction',
link: '/swap/build-swap-transaction',
},
{
text: 'getSwapQuote',
link: '/swap/get-swap-quote',
},
],
},
{
text: 'Token',
items: [
{
text: 'getTokens',
link: '/token/get-tokens',
},
],
},
],
},
{
text: 'Utilities',
collapsed: true,
Expand Down Expand Up @@ -212,18 +239,13 @@ export const sidebar = [
text: 'getName',
link: '/identity/get-name',
},
],
},
{
text: 'Swap',
items: [
{
text: 'buildSwapTransaction',
link: '/swap/build-swap-transaction',
text: 'useAvatar',
link: '/identity/use-avatar',
},
{
text: 'getSwapQuote',
link: '/swap/get-swap-quote',
text: 'useName',
link: '/identity/use-name',
},
],
},
Expand All @@ -234,18 +256,6 @@ export const sidebar = [
text: 'formatAmount',
link: '/token/format-amount',
},
{
text: 'getTokens',
link: '/token/get-tokens',
},
{
text: 'useAvatar',
link: '/identity/use-avatar',
},
{
text: 'useName',
link: '/identity/use-name',
},
],
},
{
Expand Down
10 changes: 5 additions & 5 deletions site/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ __metadata:
languageName: node
linkType: hard

"@coinbase/onchainkit@npm:0.29.3":
version: 0.29.3
resolution: "@coinbase/onchainkit@npm:0.29.3"
"@coinbase/onchainkit@npm:0.29.4":
version: 0.29.4
resolution: "@coinbase/onchainkit@npm:0.29.4"
dependencies:
"@rainbow-me/rainbowkit": "npm:^2.1.3"
"@tanstack/react-query": "npm:^5"
Expand All @@ -496,7 +496,7 @@ __metadata:
"@xmtp/frames-validator": ^0.6.0
react: ^18
react-dom: ^18
checksum: c5b30bb00446cdbfc3a2b1e716c137c2d22a3283db2f9384c846b17b8218a3ac6f33d248612f37b2160f45cdeda4fafb4533c5d907331d51a51ea4a9cd6473b6
checksum: 5aee92b10dc9f7d44b6efc68bf504dc46f93ddb8391eaaaa5e8db4b95d63744f52cc968dd89d28c91f1bcb89bb85d5bb42f4d555474987d0b841c67228d15320
languageName: node
linkType: hard

Expand Down Expand Up @@ -7836,7 +7836,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "onchainkit@workspace:."
dependencies:
"@coinbase/onchainkit": "npm:0.29.3"
"@coinbase/onchainkit": "npm:0.29.4"
"@types/react": "npm:latest"
"@vercel/edge": "npm:^1.1.1"
permissionless: "npm:^0.1.29"
Expand Down
6 changes: 5 additions & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
// 🌲☀️🌲
// api
// Swap
export { buildSwapTransaction } from '../swap/utils/buildSwapTransaction';
export { getSwapQuote } from '../swap/utils/getSwapQuote';
// Token
export { getTokens } from '../token/utils/getTokens';
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '0.29.4';
export const version = '0.29.5';