From 5d1d2d54a75a8a9a58c56b6b2ce57e63e78bee2c Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Wed, 21 Aug 2024 16:24:49 -0700 Subject: [PATCH 1/3] chore: api module --- .changeset/dry-actors-bathe.md | 2 +- site/package.json | 2 +- site/sidebar.ts | 52 ++++++++++++++++++++-------------- site/yarn.lock | 10 +++---- src/api/index.ts | 6 +++- src/version.ts | 2 +- 6 files changed, 44 insertions(+), 30 deletions(-) diff --git a/.changeset/dry-actors-bathe.md b/.changeset/dry-actors-bathe.md index e371277d6c..71c24da1a2 100644 --- a/.changeset/dry-actors-bathe.md +++ b/.changeset/dry-actors-bathe.md @@ -2,4 +2,4 @@ "@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 diff --git a/site/package.json b/site/package.json index e96a3331f8..fce7ca6bb2 100644 --- a/site/package.json +++ b/site/package.json @@ -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", diff --git a/site/sidebar.ts b/site/sidebar.ts index 9e1eccdbe8..026585873e 100644 --- a/site/sidebar.ts +++ b/site/sidebar.ts @@ -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, @@ -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', }, ], }, @@ -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', - }, ], }, { diff --git a/site/yarn.lock b/site/yarn.lock index 63643c8ad4..0a42fe2e09 100644 --- a/site/yarn.lock +++ b/site/yarn.lock @@ -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" @@ -496,7 +496,7 @@ __metadata: "@xmtp/frames-validator": ^0.6.0 react: ^18 react-dom: ^18 - checksum: c5b30bb00446cdbfc3a2b1e716c137c2d22a3283db2f9384c846b17b8218a3ac6f33d248612f37b2160f45cdeda4fafb4533c5d907331d51a51ea4a9cd6473b6 + checksum: 5aee92b10dc9f7d44b6efc68bf504dc46f93ddb8391eaaaa5e8db4b95d63744f52cc968dd89d28c91f1bcb89bb85d5bb42f4d555474987d0b841c67228d15320 languageName: node linkType: hard @@ -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" diff --git a/src/api/index.ts b/src/api/index.ts index d21013fc96..477d8275e1 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -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'; diff --git a/src/version.ts b/src/version.ts index 28a8ee7a7f..30706568cc 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '0.29.4'; +export const version = '0.29.5'; From b7680bd6a8f39db983be03e85a6631b48a26a0b1 Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Wed, 21 Aug 2024 16:26:14 -0700 Subject: [PATCH 2/3] dope --- .changeset/dry-actors-bathe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/dry-actors-bathe.md b/.changeset/dry-actors-bathe.md index 71c24da1a2..0618dafc0b 100644 --- a/.changeset/dry-actors-bathe.md +++ b/.changeset/dry-actors-bathe.md @@ -2,4 +2,4 @@ "@coinbase/onchainkit": patch --- -- **feat**: exported `buildSwapTransaction`, `getSwapQuote` and `getTokens` from API module. By @zizzamia +- **feat**: exported `buildSwapTransaction`, `getSwapQuote` and `getTokens` from API module. By @zizzamia #1133 From 1788ff852b8351fe3456a66032240a9659e8d67d Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Wed, 21 Aug 2024 16:30:57 -0700 Subject: [PATCH 3/3] ok --- .changeset/dry-actors-bathe.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/dry-actors-bathe.md b/.changeset/dry-actors-bathe.md index 0618dafc0b..ae0f5567cb 100644 --- a/.changeset/dry-actors-bathe.md +++ b/.changeset/dry-actors-bathe.md @@ -3,3 +3,4 @@ --- - **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