From 4f2ded50392ba4f620a2face405b461fd81f3e7d Mon Sep 17 00:00:00 2001 From: emmaodia Date: Wed, 6 Dec 2023 10:01:44 +0100 Subject: [PATCH 01/10] update: Smart Wallet API v2 --- api-references/fuse-smart-wallet-v2-api.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api-references/fuse-smart-wallet-v2-api.yaml b/api-references/fuse-smart-wallet-v2-api.yaml index c74fd39..84c920f 100644 --- a/api-references/fuse-smart-wallet-v2-api.yaml +++ b/api-references/fuse-smart-wallet-v2-api.yaml @@ -331,7 +331,7 @@ paths: get: tags: - Smart Wallets - summary: Get Historical Transactions + summary: Get Wallet Actions security: - bearerAuth: [] parameters: @@ -630,7 +630,7 @@ paths: statusCode: 401 message: Unauthorized path: >- - /api/v1/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee + /api/v2/smart-wallet/actions?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee "403": description: Forbidden content: @@ -644,4 +644,4 @@ paths: message: Forbidden resource error: Forbidden path: >- - /api/v1/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee + /api/v2/smart-wallet/actions?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee From 3f15a480464e3d22a2a54ae64630c35cb6a41858 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Mon, 11 Dec 2023 08:30:24 +0100 Subject: [PATCH 02/10] update: Smart Wallet API v2 --- api-references/fuse-smart-wallet-v2-api.yaml | 252 +----------------- .../smart-wallet-v2-api.mdx | 17 ++ 2 files changed, 19 insertions(+), 250 deletions(-) diff --git a/api-references/fuse-smart-wallet-v2-api.yaml b/api-references/fuse-smart-wallet-v2-api.yaml index 84c920f..ba21113 100644 --- a/api-references/fuse-smart-wallet-v2-api.yaml +++ b/api-references/fuse-smart-wallet-v2-api.yaml @@ -64,7 +64,7 @@ paths: example: statusCode: 400 errorMessage: Owner Address does not match recovered address in signature - path: /api/v1/smart-wallets/auth?apiKey={{publicKey}} + path: /api/v2/smart-wallets/auth?apiKey={{publicKey}} "403": description: Forbidden content: @@ -78,255 +78,7 @@ paths: message: Forbidden resource error: Forbidden path: >- - /api/v1/smart-wallets/auth?apiKey={{publicKey}} - /api/v1/smart-wallets/create: - post: - tags: - - Smart Wallets - summary: Create Wallet - description: Create a smart wallet for the authenticated user - requestBody: - content: - application/json: - schema: - type: object - security: - - bearerAuth: [] - parameters: - - name: apiKey - in: query - schema: - type: string - description: (Required) Your Public API key - example: "{{publicKey}}" - responses: - "201": - description: Created - content: - application/json: - schema: - type: object - example: - connectionUrl: ws://localhost:5007 - transactionId: >- - 0x06515e558ba48471b24096015ef763ae034ad933ddae1800a4e79459bd310ffb - "401": - description: Unauthorized - content: - application/json: - schema: - type: object - example: - statusCode: 401 - errorMessage: - statusCode: 401 - message: Unauthorized - path: >- - /api/v1/smart-wallets/create?apiKey={{publicKey}} - "403": - description: Forbidden - content: - application/json: - schema: - type: object - example: - statusCode: 403 - errorMessage: - statusCode: 403 - message: Forbidden resource - error: Forbidden - path: >- - /api/v1/smart-wallets/create?apiKey={{publicKey}} - /api/v1/smart-wallets: - get: - tags: - - Smart Wallets - summary: Get Wallet - description: Get the smart wallet of the authenticated user - security: - - bearerAuth: [] - parameters: - - name: apiKey - in: query - schema: - type: string - description: (Required) Your Public API key - example: "{{publicKey}}" - responses: - "200": - description: Successful response - content: - application/json: - schema: - type: object - example: - ownerAddress: "0x199DC49d8187EeA58649F7cA387e2226d4155C94" - smartWalletAddress: "0x545d3dD729d848023938D5F94af2346868EED7b9" - walletModules: - GuardianManager: "0xC1254443B6b9E5b5714D57ae3Af16FE9D220775D" - LockManager: "0x370672167439e399cE753963E31E26EEB5bfaf6c" - RecoveryManager: "0xA85aA96857cBdEb5C7e88a59772E6E7170986f02" - ApprovedTransfer: "0x959f0fF280EAF7BB1b57ec75AC777aB863f82736" - TransferManager: "0xF66e26Fd99F4687CC29148BE2e331df2e49E249E" - NftTransfer: "0xe713Ec7D3516d65966c5DeA3CF78EFE1DcaDd47B" - TokenExchanger: "0xd636460D8866430EbDeDb5A3AE4f19D0735fD1B7" - CommunityManager: "0x9585db67ab966Ec8dfDdc47bAD9cE46905A5a0e1" - WalletOwnershipManager: "0xfE0B31C96FE5929849D8D48C56c428d935dDfE00" - networks: - - fuse - version: 1.7.0 - paddedVersion: 0001.0007.0000 - "401": - description: Unauthorized - content: - application/json: - schema: - type: object - example: - statusCode: 401 - errorMessage: - statusCode: 401 - message: Unauthorized - path: >- - /api/v1/smart-wallets?apiKey={{publicKey}} - "403": - description: Forbidden - content: - application/json: - schema: - type: object - example: - statusCode: 403 - errorMessage: - statusCode: 403 - message: Forbidden resource - error: Forbidden - path: >- - /api/v1/smart-wallets?apiKey={{publicKey}} - /api/v1/smart-wallets/relay: - post: - tags: - - Smart Wallets - summary: Relay - requestBody: - content: - application/json: - schema: - type: object - properties: - gasPrice: - type: number - example: 0 - gasLimit: - type: string - example: 700000 - transactionBody: - type: object - example: - status: pending - from: "0x545d3dD729d848023938D5F94af2346868EED7b9" - to: "0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088" - value: 1000000000000000 - type: SEND - asset: FUSE - tokenName: FuseToken - tokenSymbol: FUSE - tokenDecimal: 18 - tokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" - walletAddress: - type: string - example: "0x545d3dD729d848023938D5F94af2346868EED7b9" - walletModuleAddress: - type: string - example: "0xF66e26Fd99F4687CC29148BE2e331df2e49E249E" - data: - type: string - example: "0x2df546f4000000000000000000000000545d3dd729d848023938d5f94af2346868eed7b9000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000007ceabc27b1dc6a065fad85a86afbaf97f769208800000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000" - nonce: - type: string - example: "0x000000000000000000000000008800ae000000000000000000000186127a87f6" - methodName: - type: string - example: "transferToken" - signature: - type: string - example: "0x0943cb68c40fe495be75dca17ee4e577a5aa7051949cd837f073d470694705cc75013e034e1dba7a799f432a9be3ed45305d5b299a2ed8c61c8581f1a868099c1c" - walletModule: - type: string - example: "TransferManager" - example: - gasPrice: 0 - gasLimit: 700000 - relayBody: null - txMetadata: null - transactionBody: - status: pending - from: "0x545d3dD729d848023938D5F94af2346868EED7b9" - to: "0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088" - value: 1000000000000000 - type: SEND - asset: FUSE - tokenName: FuseToken - tokenSymbol: FUSE - tokenDecimal: 18 - tokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" - walletAddress: "0x545d3dD729d848023938D5F94af2346868EED7b9" - walletModuleAddress: "0xF66e26Fd99F4687CC29148BE2e331df2e49E249E" - data: >- - 0x2df546f4000000000000000000000000545d3dd729d848023938d5f94af2346868eed7b9000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000007ceabc27b1dc6a065fad85a86afbaf97f769208800000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000 - nonce: >- - 0x000000000000000000000000008800ae000000000000000000000186127a87f6 - methodName: transferToken - signature: >- - 0x0943cb68c40fe495be75dca17ee4e577a5aa7051949cd837f073d470694705cc75013e034e1dba7a799f432a9be3ed45305d5b299a2ed8c61c8581f1a868099c1c - walletModule: TransferManager - security: - - bearerAuth: [] - parameters: - - name: apiKey - in: query - schema: - type: string - description: (Required) Your Public API key - example: "{{publicKey}}" - responses: - "201": - description: Created - content: - application/json: - schema: - type: object - example: - connectionUrl: ws://localhost:5007 - transactionId: >- - 0xc314fe5bcf9cf5dcb600da9673b779972e63622af73f62629700dfb04c1cb853 - "401": - description: Unauthorized - content: - application/json: - schema: - type: object - example: - statusCode: 401 - errorMessage: - statusCode: 401 - message: Unauthorized - path: >- - /api/v1/smart-wallets/relay?apiKey={{publicKey}} - "403": - description: Forbidden - content: - application/json: - schema: - type: object - example: - statusCode: 403 - errorMessage: - statusCode: 403 - message: Forbidden resource - error: Forbidden - path: >- - /api/v1/smart-wallets/relay?apiKey={{publicKey}} + /api/v2/smart-wallet/auth?apiKey={{publicKey}} /api/v1/smart-wallets/historical_txs: get: tags: diff --git a/docs/smart-wallet-api-v/smart-wallet-v2-api.mdx b/docs/smart-wallet-api-v/smart-wallet-v2-api.mdx index 8b4c4cf..2d2c6e4 100644 --- a/docs/smart-wallet-api-v/smart-wallet-v2-api.mdx +++ b/docs/smart-wallet-api-v/smart-wallet-v2-api.mdx @@ -19,3 +19,20 @@ import Export from "@theme/ApiDemoPanel/Export"; # Smart Wallets API v2 +Smart Wallets API provides a Wallets as a Service (WaaS) API for your cross-platform applications. As a developer, you can access the Smart Wallets API via the [fuse-sdk](developers/fuse-sdk/README.mdx) or refer to the [Smart Wallets API reference](/docs/category/smart-wallet-api) directly. + +Smart Wallets API lets you authenticate users with their Externally Owned Accounts (EOAs) and create Smart Contract wallets, execute gasless transactions through the relay service, fetch balances and tokens, get transaction history, and much more. + +Each wallet created through the Smart Wallets API is an upgradable Smart Contract wallet deployed on the Fuse network. The wallet is non-custodial. Thus it has an owner in charge of the wallet. The owner controls the wallet funds and can perform other transactions by signing messages and sending them to the relayer. + +## Working with Smart Wallets API + +Before working with Smart Wallets API, if you haven't done so, please follow the guide [Getting Started](developers/fuse-sdk/getting-started.mdx). + +#### Ready to start! + +> #### 📘Remember +> +> For all Smart Wallets API requests, you will need to add your Public API Key to the request query params under the key `apiKey`. + +Once you have your project set and access to your Public API key, you can start working with the Smart Wallets API. Check out the [Smart Wallets API Reference](/docs/category/smart-wallet-api) for usage. From a732013e20851815c753af86bd5919aad114d9e0 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Mon, 11 Dec 2023 17:27:04 +0100 Subject: [PATCH 03/10] fix: API Reference v2 --- ...-api.yaml => fuse-smart-wallet-v-api.yaml} | 6 +- docs/smart-wallet-api-v/auth.api.mdx | 223 +++++++++--------- .../get-wallet-actions.api.mdx | 6 +- docs/smart-wallet-api-v/sidebar.js | 2 +- ...2-api.mdx => smart-wallets-api-v.info.mdx} | 37 ++- docusaurus.config.js | 212 +++++++++-------- 6 files changed, 261 insertions(+), 225 deletions(-) rename api-references/{fuse-smart-wallet-v2-api.yaml => fuse-smart-wallet-v-api.yaml} (99%) rename docs/smart-wallet-api-v/{smart-wallet-v2-api.mdx => smart-wallets-api-v.info.mdx} (61%) diff --git a/api-references/fuse-smart-wallet-v2-api.yaml b/api-references/fuse-smart-wallet-v-api.yaml similarity index 99% rename from api-references/fuse-smart-wallet-v2-api.yaml rename to api-references/fuse-smart-wallet-v-api.yaml index ba21113..4653d9e 100644 --- a/api-references/fuse-smart-wallet-v2-api.yaml +++ b/api-references/fuse-smart-wallet-v-api.yaml @@ -11,10 +11,10 @@ components: type: http scheme: bearer paths: - /api/v1/smart-wallets/auth: + /api/v2/smart-wallets/auth: post: tags: - - Smart Wallets + - Smart Wallet summary: Auth description: Authenticate user using signed data standard EIP-191 requestBody: @@ -79,7 +79,7 @@ paths: error: Forbidden path: >- /api/v2/smart-wallet/auth?apiKey={{publicKey}} - /api/v1/smart-wallets/historical_txs: + /api/v2/smart-wallets/actions: get: tags: - Smart Wallets diff --git a/docs/smart-wallet-api-v/auth.api.mdx b/docs/smart-wallet-api-v/auth.api.mdx index 80afaa8..5aaac60 100644 --- a/docs/smart-wallet-api-v/auth.api.mdx +++ b/docs/smart-wallet-api-v/auth.api.mdx @@ -1,199 +1,199 @@ --- id: auth -title: 'Auth' -description: 'Authenticate user using signed data standard EIP-191' -sidebar_label: 'Auth' +title: "Auth" +description: "Authenticate user using signed data standard EIP-191" +sidebar_label: "Auth" hide_title: true hide_table_of_contents: true api: { - 'tags': ['Smart Wallets'], - 'description': 'Authenticate user using signed data standard EIP-191', - 'requestBody': + "tags": ["Smart Wallets"], + "description": "Authenticate user using signed data standard EIP-191", + "requestBody": { - 'content': + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'hash': + "hash": { - 'type': 'string', - 'example': '0xf9054fd2b85014d5abf30608cf2d8f9712232d203b427a7c46c6785710f880d9', + "type": "string", + "example": "0xf9054fd2b85014d5abf30608cf2d8f9712232d203b427a7c46c6785710f880d9", }, - 'signature': + "signature": { - 'type': 'string', - 'example': '0x387810a84b3f39d9b79d08c7a2095e0a60c200199b0355e1199630ca1e623cf7564a4e3126a01ff43472399cf7087a361c44a3c125f216ed82cae175951243431b', + "type": "string", + "example": "0x387810a84b3f39d9b79d08c7a2095e0a60c200199b0355e1199630ca1e623cf7564a4e3126a01ff43472399cf7087a361c44a3c125f216ed82cae175951243431b", }, - 'ownerAddress': + "ownerAddress": { - 'type': 'string', - 'example': '0x199DC49d8187EeA58649F7cA387e2226d4155C94', + "type": "string", + "example": "0x199DC49d8187EeA58649F7cA387e2226d4155C94", }, }, - 'example': + "example": { - 'hash': '0xf9054fd2b85014d5abf30608cf2d8f9712232d203b427a7c46c6785710f880d9', - 'signature': '0x387810a84b3f39d9b79d08c7a2095e0a60c200199b0355e1199630ca1e623cf7564a4e3126a01ff43472399cf7087a361c44a3c125f216ed82cae175951243431b', - 'ownerAddress': '0x199DC49d8187EeA58649F7cA387e2226d4155C94', + "hash": "0xf9054fd2b85014d5abf30608cf2d8f9712232d203b427a7c46c6785710f880d9", + "signature": "0x387810a84b3f39d9b79d08c7a2095e0a60c200199b0355e1199630ca1e623cf7564a4e3126a01ff43472399cf7087a361c44a3c125f216ed82cae175951243431b", + "ownerAddress": "0x199DC49d8187EeA58649F7cA387e2226d4155C94", }, }, }, }, }, - 'parameters': + "parameters": [ { - 'name': 'apiKey', - 'in': 'query', - 'schema': { 'type': 'string' }, - 'description': '(Required) Your Public API key', - 'example': '{{publicKey}}', + "name": "apiKey", + "in": "query", + "schema": { "type": "string" }, + "description": "(Required) Your Public API key", + "example": "{{publicKey}}", }, ], - 'responses': + "responses": { - '201': + "201": { - 'description': 'Created', - 'content': + "description": "Created", + "content": { - 'application/json': + "application/json": { - 'schema': { 'type': 'object' }, - 'example': + "schema": { "type": "object" }, + "example": { - 'jwt': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvd25lckFkZHJlc3MiOiIweDgwOUI3ODM3MWY1MGYyOEQyQzYxRjYzZTQ4YjU4YjdFZTA1M0UzRWEiLCJwcm9qZWN0SWQiOiI2M2NkMWJjMWQxOGMxNjQyMmJiOGMwYzMiLCJpYXQiOjE2NzUzMjcxOTR9.-iWIEN6OLyCI4j5WOA8V2mH3KQtrmEoUGhIS4migV9g', + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvd25lckFkZHJlc3MiOiIweDgwOUI3ODM3MWY1MGYyOEQyQzYxRjYzZTQ4YjU4YjdFZTA1M0UzRWEiLCJwcm9qZWN0SWQiOiI2M2NkMWJjMWQxOGMxNjQyMmJiOGMwYzMiLCJpYXQiOjE2NzUzMjcxOTR9.-iWIEN6OLyCI4j5WOA8V2mH3KQtrmEoUGhIS4migV9g", }, }, }, }, - '400': + "400": { - 'description': 'Bad Request', - 'content': + "description": "Bad Request", + "content": { - 'application/json': + "application/json": { - 'schema': { 'type': 'object' }, - 'example': + "schema": { "type": "object" }, + "example": { - 'statusCode': 400, - 'errorMessage': 'Owner Address does not match recovered address in signature', - 'path': '/api/v1/smart-wallets/auth?apiKey={{publicKey}}', + "statusCode": 400, + "errorMessage": "Owner Address does not match recovered address in signature", + "path": "/api/v2/smart-wallets/auth?apiKey={{publicKey}}", }, }, }, }, - '403': + "403": { - 'description': 'Forbidden', - 'content': + "description": "Forbidden", + "content": { - 'application/json': + "application/json": { - 'schema': { 'type': 'object' }, - 'example': + "schema": { "type": "object" }, + "example": { - 'statusCode': 403, - 'errorMessage': + "statusCode": 403, + "errorMessage": { - 'statusCode': 403, - 'message': 'Forbidden resource', - 'error': 'Forbidden', + "statusCode": 403, + "message": "Forbidden resource", + "error": "Forbidden", }, - 'path': '/api/v1/smart-wallets/auth?apiKey={{publicKey}}', + "path": "/api/v2/smart-wallets/auth?apiKey={{publicKey}}", }, }, }, }, }, - 'method': 'post', - 'path': '/api/v1/smart-wallets/auth', - 'servers': [{ 'url': 'https://api.fuse.io' }], - 'securitySchemes': + "method": "post", + "path": "/api/v2/smart-wallets/auth", + "servers": [{ "url": "https://api.fuse.io" }], + "securitySchemes": { - 'bearerAuth': - { 'bearerFormat': 'JWT', 'type': 'http', 'scheme': 'bearer' }, + "bearerAuth": + { "bearerFormat": "JWT", "type": "http", "scheme": "bearer" }, }, - 'jsonRequestBodyExample': + "jsonRequestBodyExample": { - 'hash': '0xf9054fd2b85014d5abf30608cf2d8f9712232d203b427a7c46c6785710f880d9', - 'signature': '0x387810a84b3f39d9b79d08c7a2095e0a60c200199b0355e1199630ca1e623cf7564a4e3126a01ff43472399cf7087a361c44a3c125f216ed82cae175951243431b', - 'ownerAddress': '0x199DC49d8187EeA58649F7cA387e2226d4155C94', + "hash": "0xf9054fd2b85014d5abf30608cf2d8f9712232d203b427a7c46c6785710f880d9", + "signature": "0x387810a84b3f39d9b79d08c7a2095e0a60c200199b0355e1199630ca1e623cf7564a4e3126a01ff43472399cf7087a361c44a3c125f216ed82cae175951243431b", + "ownerAddress": "0x199DC49d8187EeA58649F7cA387e2226d4155C94", }, - 'info': { 'title': 'Smart Wallets API', 'version': '1.0.0' }, - 'postman': + "info": { "title": "Smart Wallets API", "version": "1.0.0" }, + "postman": { - 'name': 'Auth', - 'description': + "name": "Auth", + "description": { - 'content': 'Authenticate user using signed data standard EIP-191', - 'type': 'text/plain', + "content": "Authenticate user using signed data standard EIP-191", + "type": "text/plain", }, - 'url': + "url": { - 'path': ['api', 'v1', 'smart-wallets', 'auth'], - 'host': ['{{baseUrl}}'], - 'query': + "path": ["api", "v2", "smart-wallets", "auth"], + "host": ["{{baseUrl}}"], + "query": [ { - 'disabled': false, - 'description': + "disabled": false, + "description": { - 'content': '(Required) Your Public API key', - 'type': 'text/plain', + "content": "(Required) Your Public API key", + "type": "text/plain", }, - 'key': 'apiKey', - 'value': '', + "key": "apiKey", + "value": "", }, ], - 'variable': [], + "variable": [], }, - 'header': + "header": [ - { 'key': 'Content-Type', 'value': 'application/json' }, - { 'key': 'Accept', 'value': 'application/json' }, + { "key": "Content-Type", "value": "application/json" }, + { "key": "Accept", "value": "application/json" }, ], - 'method': 'POST', - 'body': + "method": "POST", + "body": { - 'mode': 'raw', - 'raw': '""', - 'options': { 'raw': { 'language': 'json' } }, + "mode": "raw", + "raw": '""', + "options": { "raw": { "language": "json" } }, }, }, } -sidebar_class_name: 'post api-method' +sidebar_class_name: "post api-method" info_path: docs/smart-wallet-api/smart-wallets-api custom_edit_url: null --- -import ApiTabs from '@theme/ApiTabs' -import DiscriminatorTabs from '@theme/DiscriminatorTabs' -import MethodEndpoint from '@theme/ApiDemoPanel/MethodEndpoint' -import SecuritySchemes from '@theme/ApiDemoPanel/SecuritySchemes' -import MimeTabs from '@theme/MimeTabs' -import ParamsItem from '@theme/ParamsItem' -import ResponseSamples from '@theme/ResponseSamples' -import SchemaItem from '@theme/SchemaItem' -import SchemaTabs from '@theme/SchemaTabs' -import TabItem from '@theme/TabItem' +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiDemoPanel/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiDemoPanel/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import TabItem from "@theme/TabItem"; -

Auth

+

Auth

Authenticate user using signed data standard EIP-191 @@ -208,9 +208,8 @@ Created Bad Request -
Schema
  • object
+
Schema
  • object
Forbidden -
Schema
  • object
- +
Schema
  • object
diff --git a/docs/smart-wallet-api-v/get-wallet-actions.api.mdx b/docs/smart-wallet-api-v/get-wallet-actions.api.mdx index 7ac19bf..a56c25e 100644 --- a/docs/smart-wallet-api-v/get-wallet-actions.api.mdx +++ b/docs/smart-wallet-api-v/get-wallet-actions.api.mdx @@ -5,7 +5,7 @@ description: "Get Wallet Actions" sidebar_label: "Get Wallet Actions" hide_title: true hide_table_of_contents: true -api: {"tags":["Smart Wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"apiKey","in":"query","schema":{"type":"string"},"description":"(Required) Your Public API key","example":"{{publicKey}}"},{"name":"page","in":"query","schema":{"type":"integer"},"example":"1"},{"name":"updatedAt","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"tokenAddress","in":"query","schema":{"type":"string"},"example":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"data":{"docs":[{"_id":"63f488d2ad300586076c69a4","name":"createWallet","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":[],"job":"63f488d2ad300586076c69a2","data":{"value":"0","txHash":"0x29aa2d08050354e4d267c2d6c49fbd3c9fb1bfd8c8f69482b49a127e922ad1b0","status":"succeeded","blockNumber":21882367},"status":"succeeded","createdAt":"2023-02-21T09:03:14.148Z","updatedAt":"2023-02-21T09:03:15.492Z","__v":0},{"_id":"63f48944ad300586076c6b76","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x039968b2746fd3067ea972d50d602e9c4bd32ec807b6cddc77d8afa1baf5f762","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"1000000000000000000","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676970308"},"status":"succeeded","createdAt":"2023-02-21T09:05:08.388Z","updatedAt":"2023-02-21T09:05:08.388Z","__v":0},{"_id":"63f4cc9fad300586076cc66e","name":"receiveNFT","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xd08a296d68f553938b96de150f3f18a14be5629f"],"data":{"txHash":"0xda410fee6ad245c3cd1075f685b3f6d5bd82501e5fcc70688d349155d519bbfe","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"AmazingHorses","tokenSymbol":"AMZ","tokenDecimal":null,"asset":"AMZ","status":"succeeded","tokenType":"ERC-721","value":"NaN","tokenAddress":"0xd08a296d68f553938b96de150f3f18a14be5629f","timeStamp":"1676987552"},"status":"succeeded","createdAt":"2023-02-21T13:52:31.654Z","updatedAt":"2023-02-21T13:52:31.654Z","__v":0},{"_id":"63f4cd53ad300586076cc70a","name":"receiveNFT","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xd08a296d68f553938b96de150f3f18a14be5629f"],"data":{"txHash":"0xa5f5b763ecfd420e1e2a2db2726378637c27738e312fb951e1f91a5c6a3b652f","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"AmazingHorses","tokenSymbol":"AMZ","tokenDecimal":null,"asset":"AMZ","status":"succeeded","tokenType":"ERC-721","value":"NaN","tokenAddress":"0xd08a296d68f553938b96de150f3f18a14be5629f","timeStamp":"1676987732"},"status":"succeeded","createdAt":"2023-02-21T13:55:31.523Z","updatedAt":"2023-02-21T13:55:31.523Z","__v":0},{"_id":"63f4cff5ad300586076cc86d","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x93c197a6e6da7f2da7c232b5ab98be32c1cb60d514599ae3346b1dd6c97a4cfc","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"1000000000000000000","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676988406"},"status":"succeeded","createdAt":"2023-02-21T14:06:45.825Z","updatedAt":"2023-02-21T14:06:45.825Z","__v":0},{"_id":"63f4e08f20abbc6ed88e05c1","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5"],"data":{"txHash":"0x10432963a35696491dd98edd557c89ef581a756e8106d8336ad71609e192850e","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xc79983b0754ac688Bf54939aDd59BDF75916fDA2","tokenName":"USD Coin on Fuse","tokenSymbol":"USDC","tokenDecimal":6,"asset":"USDC","status":"succeeded","tokenType":"ERC-20","value":"81591","tokenAddress":"0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5","timeStamp":"1676992655"},"status":"succeeded","createdAt":"2023-02-21T15:17:35.139Z","updatedAt":"2023-02-21T15:17:35.139Z","__v":0},{"_id":"63f4e55520abbc6ed88e0ad5","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0xf1f3703c1167848db68dbdec850f2df9a4b80343618b61c9d8622c54032213b4","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"609144132954467250","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676993878"},"status":"succeeded","createdAt":"2023-02-21T15:37:57.607Z","updatedAt":"2023-02-21T15:37:57.607Z","__v":0},{"_id":"63f4e97720abbc6ed88e1020","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0xf256e0673eb65a7420cab562dd9b707e9a2013f29e8cf0f36525eb429e5b21e4","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"241942036554581990","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676994935"},"status":"succeeded","createdAt":"2023-02-21T15:55:35.101Z","updatedAt":"2023-02-21T15:55:35.101Z","__v":0},{"_id":"63f4e99e20abbc6ed88e108a","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x7b304ec2439e1c6cb5a7b27e564b3dd664367275a527f003216a7f86a7010819","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"120970389826859458","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676994974"},"status":"succeeded","createdAt":"2023-02-21T15:56:14.111Z","updatedAt":"2023-02-21T15:56:14.111Z","__v":0},{"_id":"63f50e5d0905cd0b768c55a2","name":"swapTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0x0BE9e53fd7EDaC9F859882AfdDa116645287C629","0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5"],"job":"63f50e5d0905cd0b768c559e","data":{"value":"0","tokenAddress":"0x0be9e53fd7edac9f859882afdda116645287c629","metadata":{"executionPrice":"0","nextMidPrice":"0","priceImpact":"0","route":["0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5","0x0BE9e53fd7EDaC9F859882AfdDa116645287C629"],"inputAmount":"0.01","outputAmount":"0.120627353584457792","inputToken":"USDC","outputToken":"FUSE"},"timestamp":"1677004382","txHash":"0x9cf5222cd2e744926a9bc732a6edc6ea604462050681fa5b3a426bcae5361396","status":"failed","blockNumber":21889191},"status":"failed","createdAt":"2023-02-21T18:33:01.717Z","updatedAt":"2023-02-21T18:33:05.881Z","__v":0,"failReason":"Transaction failed due to internal contract error. One possible reason might be that the wallet doesn't have sufficient funds.","failedAt":"2023-02-21T18:33:05.880Z"}],"totalDocs":18,"offset":0,"limit":10,"totalPages":2,"page":1,"pagingCounter":1,"hasPrevPage":false,"hasNextPage":true,"prevPage":null,"nextPage":2}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object"},"example":{"statusCode":401,"errorMessage":{"statusCode":401,"message":"Unauthorized"},"path":"/api/v1/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object"},"example":{"statusCode":403,"errorMessage":{"statusCode":403,"message":"Forbidden resource","error":"Forbidden"},"path":"/api/v1/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}}}},"description":"Get Historical Transactions","method":"get","path":"/api/v1/smart-wallets/historical_txs","servers":[{"url":"https://api.fuse.io"}],"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","type":"http","scheme":"bearer"}},"info":{"title":"Smart Wallets API","version":"1.0.0"},"postman":{"name":"Get Historical Transactions","description":{"type":"text/plain"},"url":{"path":["api","v1","smart-wallets","historical_txs"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Your Public API key","type":"text/plain"},"key":"apiKey","value":""},{"disabled":false,"key":"page","value":""},{"disabled":false,"key":"updatedAt","value":""},{"disabled":false,"key":"tokenAddress","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"","key":"token"}]}}} +api: {"tags":["Smart Wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"apiKey","in":"query","schema":{"type":"string"},"description":"(Required) Your Public API key","example":"{{publicKey}}"},{"name":"page","in":"query","schema":{"type":"integer"},"example":"1"},{"name":"updatedAt","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"tokenAddress","in":"query","schema":{"type":"string"},"example":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"data":{"docs":[{"_id":"63f488d2ad300586076c69a4","name":"createWallet","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":[],"job":"63f488d2ad300586076c69a2","data":{"value":"0","txHash":"0x29aa2d08050354e4d267c2d6c49fbd3c9fb1bfd8c8f69482b49a127e922ad1b0","status":"succeeded","blockNumber":21882367},"status":"succeeded","createdAt":"2023-02-21T09:03:14.148Z","updatedAt":"2023-02-21T09:03:15.492Z","__v":0},{"_id":"63f48944ad300586076c6b76","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x039968b2746fd3067ea972d50d602e9c4bd32ec807b6cddc77d8afa1baf5f762","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"1000000000000000000","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676970308"},"status":"succeeded","createdAt":"2023-02-21T09:05:08.388Z","updatedAt":"2023-02-21T09:05:08.388Z","__v":0},{"_id":"63f4cc9fad300586076cc66e","name":"receiveNFT","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xd08a296d68f553938b96de150f3f18a14be5629f"],"data":{"txHash":"0xda410fee6ad245c3cd1075f685b3f6d5bd82501e5fcc70688d349155d519bbfe","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"AmazingHorses","tokenSymbol":"AMZ","tokenDecimal":null,"asset":"AMZ","status":"succeeded","tokenType":"ERC-721","value":"NaN","tokenAddress":"0xd08a296d68f553938b96de150f3f18a14be5629f","timeStamp":"1676987552"},"status":"succeeded","createdAt":"2023-02-21T13:52:31.654Z","updatedAt":"2023-02-21T13:52:31.654Z","__v":0},{"_id":"63f4cd53ad300586076cc70a","name":"receiveNFT","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xd08a296d68f553938b96de150f3f18a14be5629f"],"data":{"txHash":"0xa5f5b763ecfd420e1e2a2db2726378637c27738e312fb951e1f91a5c6a3b652f","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"AmazingHorses","tokenSymbol":"AMZ","tokenDecimal":null,"asset":"AMZ","status":"succeeded","tokenType":"ERC-721","value":"NaN","tokenAddress":"0xd08a296d68f553938b96de150f3f18a14be5629f","timeStamp":"1676987732"},"status":"succeeded","createdAt":"2023-02-21T13:55:31.523Z","updatedAt":"2023-02-21T13:55:31.523Z","__v":0},{"_id":"63f4cff5ad300586076cc86d","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x93c197a6e6da7f2da7c232b5ab98be32c1cb60d514599ae3346b1dd6c97a4cfc","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"1000000000000000000","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676988406"},"status":"succeeded","createdAt":"2023-02-21T14:06:45.825Z","updatedAt":"2023-02-21T14:06:45.825Z","__v":0},{"_id":"63f4e08f20abbc6ed88e05c1","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5"],"data":{"txHash":"0x10432963a35696491dd98edd557c89ef581a756e8106d8336ad71609e192850e","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xc79983b0754ac688Bf54939aDd59BDF75916fDA2","tokenName":"USD Coin on Fuse","tokenSymbol":"USDC","tokenDecimal":6,"asset":"USDC","status":"succeeded","tokenType":"ERC-20","value":"81591","tokenAddress":"0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5","timeStamp":"1676992655"},"status":"succeeded","createdAt":"2023-02-21T15:17:35.139Z","updatedAt":"2023-02-21T15:17:35.139Z","__v":0},{"_id":"63f4e55520abbc6ed88e0ad5","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0xf1f3703c1167848db68dbdec850f2df9a4b80343618b61c9d8622c54032213b4","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"609144132954467250","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676993878"},"status":"succeeded","createdAt":"2023-02-21T15:37:57.607Z","updatedAt":"2023-02-21T15:37:57.607Z","__v":0},{"_id":"63f4e97720abbc6ed88e1020","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0xf256e0673eb65a7420cab562dd9b707e9a2013f29e8cf0f36525eb429e5b21e4","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"241942036554581990","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676994935"},"status":"succeeded","createdAt":"2023-02-21T15:55:35.101Z","updatedAt":"2023-02-21T15:55:35.101Z","__v":0},{"_id":"63f4e99e20abbc6ed88e108a","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x7b304ec2439e1c6cb5a7b27e564b3dd664367275a527f003216a7f86a7010819","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"120970389826859458","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676994974"},"status":"succeeded","createdAt":"2023-02-21T15:56:14.111Z","updatedAt":"2023-02-21T15:56:14.111Z","__v":0},{"_id":"63f50e5d0905cd0b768c55a2","name":"swapTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0x0BE9e53fd7EDaC9F859882AfdDa116645287C629","0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5"],"job":"63f50e5d0905cd0b768c559e","data":{"value":"0","tokenAddress":"0x0be9e53fd7edac9f859882afdda116645287c629","metadata":{"executionPrice":"0","nextMidPrice":"0","priceImpact":"0","route":["0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5","0x0BE9e53fd7EDaC9F859882AfdDa116645287C629"],"inputAmount":"0.01","outputAmount":"0.120627353584457792","inputToken":"USDC","outputToken":"FUSE"},"timestamp":"1677004382","txHash":"0x9cf5222cd2e744926a9bc732a6edc6ea604462050681fa5b3a426bcae5361396","status":"failed","blockNumber":21889191},"status":"failed","createdAt":"2023-02-21T18:33:01.717Z","updatedAt":"2023-02-21T18:33:05.881Z","__v":0,"failReason":"Transaction failed due to internal contract error. One possible reason might be that the wallet doesn't have sufficient funds.","failedAt":"2023-02-21T18:33:05.880Z"}],"totalDocs":18,"offset":0,"limit":10,"totalPages":2,"page":1,"pagingCounter":1,"hasPrevPage":false,"hasNextPage":true,"prevPage":null,"nextPage":2}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object"},"example":{"statusCode":401,"errorMessage":{"statusCode":401,"message":"Unauthorized"},"path":"/api/v2/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object"},"example":{"statusCode":403,"errorMessage":{"statusCode":403,"message":"Forbidden resource","error":"Forbidden"},"path":"/api/v2/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}}}},"description":"Get Historical Transactions","method":"get","path":"/api/v1/smart-wallets/historical_txs","servers":[{"url":"https://api.fuse.io"}],"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","type":"http","scheme":"bearer"}},"info":{"title":"Smart Wallets API","version":"1.0.0"},"postman":{"name":"Get Historical Transactions","description":{"type":"text/plain"},"url":{"path":["api","v2","smart-wallets","historical_txs"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Your Public API key","type":"text/plain"},"key":"apiKey","value":""},{"disabled":false,"key":"page","value":""},{"disabled":false,"key":"updatedAt","value":""},{"disabled":false,"key":"tokenAddress","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"","key":"token"}]}}} sidebar_class_name: "get api-method" info_path: docs/smart-wallet-api/smart-wallets-api custom_edit_url: null @@ -42,9 +42,9 @@ Successful response Unauthorized -
Schema
  • object
+
Schema
  • object
Forbidden -
Schema
  • object
+
Schema
  • object
\ No newline at end of file diff --git a/docs/smart-wallet-api-v/sidebar.js b/docs/smart-wallet-api-v/sidebar.js index 7a4563e..9ac2dd9 100644 --- a/docs/smart-wallet-api-v/sidebar.js +++ b/docs/smart-wallet-api-v/sidebar.js @@ -1,5 +1,5 @@ module.exports = [ - { type: "doc", id: "smart-wallet-api-v/smart-wallets-api-v2" }, + { type: "doc", id: "smart-wallet-api-v/smart-wallets-api-v" }, { type: "category", label: "Smart Wallets v2", diff --git a/docs/smart-wallet-api-v/smart-wallet-v2-api.mdx b/docs/smart-wallet-api-v/smart-wallets-api-v.info.mdx similarity index 61% rename from docs/smart-wallet-api-v/smart-wallet-v2-api.mdx rename to docs/smart-wallet-api-v/smart-wallets-api-v.info.mdx index 2d2c6e4..a5bc8bb 100644 --- a/docs/smart-wallet-api-v/smart-wallet-v2-api.mdx +++ b/docs/smart-wallet-api-v/smart-wallets-api-v.info.mdx @@ -1,7 +1,7 @@ --- -id: smart-wallets-api-v2 +id: smart-wallets-api-v title: "Smart Wallets API v2" -description: "Learn more about Smart Wallets API" +description: "" sidebar_label: Introduction sidebar_position: 0 hide_title: true @@ -11,15 +11,44 @@ custom_edit_url: null import ApiLogo from "@theme/ApiLogo"; import SchemaTabs from "@theme/SchemaTabs"; import TabItem from "@theme/TabItem"; -import Export from "@theme/ApiDemoPanel/Export"; Version: 1.0.0 +

Smart Wallets API v2

+ +
+

+ Authentication +

+ + +
+ + + + + + + + + + + + + + + +
Security Scheme Type:http
HTTP Authorization Scheme:bearer
Bearer format:JWT
+
+
+
+
+ # Smart Wallets API v2 -Smart Wallets API provides a Wallets as a Service (WaaS) API for your cross-platform applications. As a developer, you can access the Smart Wallets API via the [fuse-sdk](developers/fuse-sdk/README.mdx) or refer to the [Smart Wallets API reference](/docs/category/smart-wallet-api) directly. +Smart Wallets API provides a Wallets as a Service (WaaS) API for your cross-platform applications. Developers can also access the Smart Wallets API via the [fuse-sdk](/docs/developers/fuse-box/fuse-sdk/README.mdx). Smart Wallets API lets you authenticate users with their Externally Owned Accounts (EOAs) and create Smart Contract wallets, execute gasless transactions through the relay service, fetch balances and tokens, get transaction history, and much more. diff --git a/docusaurus.config.js b/docusaurus.config.js index 334bd91..c206b5a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,60 +1,60 @@ // @ts-check // Note: type annotations allow type checking and IDEs autocompletion -const lightCodeTheme = require('prism-react-renderer/themes/github') -const darkCodeTheme = require('prism-react-renderer/themes/dracula') +const lightCodeTheme = require("prism-react-renderer/themes/github"); +const darkCodeTheme = require("prism-react-renderer/themes/dracula"); /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'Fuse Documentation', - url: 'https://docs.fuse.io', - baseUrl: '/', - onBrokenLinks: 'log', - onBrokenMarkdownLinks: 'warn', - favicon: 'img/logo.svg', - staticDirectories: ['static'], + title: "Fuse Documentation", + url: "https://docs.fuse.io", + baseUrl: "/", + onBrokenLinks: "log", + onBrokenMarkdownLinks: "warn", + favicon: "img/logo.svg", + staticDirectories: ["static"], // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'fuse', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. + organizationName: "fuse", // Usually your GitHub org/user name. + projectName: "docusaurus", // Usually your repo name. // Even if you don't use internalization, you can use this field to set useful // metadata like html lang. For example, if your site is Chinese, you may want // to replace "en" with "zh-Hans". i18n: { - defaultLocale: 'en', - locales: ['en'], + defaultLocale: "en", + locales: ["en"], }, presets: [ [ - 'classic', + "classic", /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { - sidebarPath: require.resolve('./sidebars.js'), + sidebarPath: require.resolve("./sidebars.js"), // Please change this to your repo. // Remove this to remove the "edit this page" links. // exclude: ['**/developers/*/*README.md'], - docLayoutComponent: '@theme/DocPage', - docItemComponent: '@theme/ApiItem', + docLayoutComponent: "@theme/DocPage", + docItemComponent: "@theme/ApiItem", }, gtag: { - trackingID: 'G-ZQQQ9Q88VY', + trackingID: "G-ZQQQ9Q88VY", anonymizeIP: true, }, blog: { - blogTitle: 'Changelog', - blogSidebarTitle: 'Recent Changes', - postsPerPage: 'ALL', - routeBasePath: '/changelog', + blogTitle: "Changelog", + blogSidebarTitle: "Recent Changes", + postsPerPage: "ALL", + routeBasePath: "/changelog", showReadingTime: true, readingTime: ({ content, frontMatter, defaultReadingTime }) => defaultReadingTime({ content, options: { wordsPerMinute: 300 } }), }, theme: { - customCss: require.resolve('./src/css/custom.css'), + customCss: require.resolve("./src/css/custom.css"), }, }), ], @@ -65,31 +65,31 @@ const config = { ({ prism: { - additionalLanguages: ['dart', 'solidity'], + additionalLanguages: ["dart", "solidity"], theme: darkCodeTheme, }, colorMode: { - defaultMode: 'light', + defaultMode: "light", disableSwitch: true, respectPrefersColorScheme: false, }, // Replace with your project's social card - image: 'img/docusaurus-social-card.jpg', + image: "img/docusaurus-social-card.jpg", algolia: { // The application ID provided by Algolia - appId: 'NPQ4ZLHJEE', + appId: "NPQ4ZLHJEE", // Public API key: it is safe to commit it - apiKey: '634a56f04a07683a37e4462981e0a754', + apiKey: "634a56f04a07683a37e4462981e0a754", - indexName: 'fuseio', + indexName: "fuseio", // Optional: see doc section below contextualSearch: true, // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. - externalUrlRegex: 'external\\.com|domain\\.com', + externalUrlRegex: "external\\.com|domain\\.com", // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs @@ -97,107 +97,107 @@ const config = { searchParameters: {}, // Optional: path for search page that enabled by default (`false` to disable it) - searchPagePath: 'search', + searchPagePath: "search", //... other Algolia params }, navbar: { logo: { - alt: 'Fuse_logo', - src: 'img/fuse-logo.svg', + alt: "Fuse_logo", + src: "img/fuse-logo.svg", }, items: [ { - type: 'search', - position: 'right', + type: "search", + position: "right", }, { - type: 'docSidebar', - sidebarId: 'basicsSidebar', - position: 'left', - label: 'Basics', + type: "docSidebar", + sidebarId: "basicsSidebar", + position: "left", + label: "Basics", }, { - type: 'doc', - docId: 'developers/overview', - position: 'left', - label: 'Developers', + type: "doc", + docId: "developers/overview", + position: "left", + label: "Developers", }, { - type: 'docSidebar', - sidebarId: 'validatorsSidebar', - position: 'left', - label: 'Validators', + type: "docSidebar", + sidebarId: "validatorsSidebar", + position: "left", + label: "Validators", }, { - type: 'docSidebar', - sidebarId: 'tutorialsSidebar', - label: 'Tutorials', - position: 'left', + type: "docSidebar", + sidebarId: "tutorialsSidebar", + label: "Tutorials", + position: "left", }, { - type: 'docSidebar', - sidebarId: 'apiSidebar', - label: 'API references', - position: 'left', + type: "docSidebar", + sidebarId: "apiSidebar", + label: "API references", + position: "left", }, // {to: '/changelog', label: 'Changelog', position: 'left'} ], }, footer: { - style: 'light', + style: "light", links: [ { - title: 'Getting Started', + title: "Getting Started", items: [ - { label: 'Fuse Network', to: 'https://www.fuse.io/network' }, + { label: "Fuse Network", to: "https://www.fuse.io/network" }, { - label: 'Mobile Stack', - to: 'https://www.fuse.io/mobile', + label: "Mobile Stack", + to: "https://www.fuse.io/mobile", }, { - label: 'Voltage Finance', - to: 'https://voltage.finance/', + label: "Voltage Finance", + to: "https://voltage.finance/", }, ], }, { - title: 'Under the hood', + title: "Under the hood", items: [ { - label: 'Explorer', - to: 'https://explorer.fuse.io/', + label: "Explorer", + to: "https://explorer.fuse.io/", }, { - label: 'Documentation', - to: 'https://docs.fuse.io/', + label: "Documentation", + to: "https://docs.fuse.io/", }, { - label: 'Staking', - to: 'https://staking.fuse.io/', + label: "Staking", + to: "https://staking.fuse.io/", }, { - label: 'Governance', - to: 'https://forum.fuse.io/', + label: "Governance", + to: "https://forum.fuse.io/", }, { - label: 'Service Status', - to: 'https://status.fuse.io/', + label: "Service Status", + to: "https://status.fuse.io/", }, ], }, { - title: 'General', + title: "General", items: [ { - label: 'Brand kits', - to: 'https://uploads-ssl.webflow.com/63a6d0820bd1f472b4150067/63f758e4017a399398360f78_Brand%20kit.pdf', + label: "Brand kits", + to: "https://uploads-ssl.webflow.com/63a6d0820bd1f472b4150067/63f758e4017a399398360f78_Brand%20kit.pdf", }, { - label: 'Jobs', - to: 'https://fuse.freshteam.com/jobs', + label: "Jobs", + to: "https://fuse.freshteam.com/jobs", }, ], }, @@ -207,56 +207,64 @@ const config = { }), plugins: [ [ - 'docusaurus-plugin-yandex-metrica', + "docusaurus-plugin-yandex-metrica", { - counterID: '94018505', + counterID: "94018505", webvisor: true, }, ], [ - 'docusaurus-plugin-openapi-docs', + "docusaurus-plugin-openapi-docs", { - id: 'api', - docsPluginId: 'api', // e.g. "classic" or the plugin-content-docs id + id: "api", + docsPluginId: "api", // e.g. "classic" or the plugin-content-docs id config: { adminApi: { // "petstore" is considered the that you will reference in the CLI - specPath: 'api-references/fuse-admin-api.yaml', // path or URL to the OpenAPI spec - outputDir: 'docs/admin-api', // output directory for generated *.mdx and sidebar.js files + specPath: "api-references/fuse-admin-api.yaml", // path or URL to the OpenAPI spec + outputDir: "docs/admin-api", // output directory for generated *.mdx and sidebar.js files sidebarOptions: { - groupPathsBy: 'tag', // generate a sidebar.js slice that groups operations by tag - categoryLinkSource: 'tag', + groupPathsBy: "tag", // generate a sidebar.js slice that groups operations by tag + categoryLinkSource: "tag", }, }, notificationApi: { - specPath: 'api-references/fuse-notification-api.yaml', - outputDir: 'docs/notification-api', + specPath: "api-references/fuse-notification-api.yaml", + outputDir: "docs/notification-api", sidebarOptions: { - groupPathsBy: 'tag', - categoryLinkSource: 'tag', + groupPathsBy: "tag", + categoryLinkSource: "tag", }, }, smartWalletApi: { - specPath: 'api-references/fuse-smart-wallets-api.yaml', - outputDir: 'docs/smart-wallet-api', + specPath: "api-references/fuse-smart-wallets-api.yaml", + outputDir: "docs/smart-wallet-api", sidebarOptions: { - groupPathsBy: 'tag', - categoryLinkSource: 'tag', + groupPathsBy: "tag", + categoryLinkSource: "tag", + }, + }, + smartWalletvApi: { + specPath: "api-references/fuse-smart-wallet-v-api.yaml", + outputDir: "docs/smart-wallet-api-v", + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag", }, }, tradeApi: { - specPath: 'api-references/trade-api.yaml', - outputDir: 'docs/trade-api', + specPath: "api-references/trade-api.yaml", + outputDir: "docs/trade-api", sidebarOptions: { - groupPathsBy: 'tag', - categoryLinkSource: 'tag', + groupPathsBy: "tag", + categoryLinkSource: "tag", }, }, }, }, ], ], - themes: ['docusaurus-theme-openapi-docs'], -} + themes: ["docusaurus-theme-openapi-docs"], +}; -module.exports = config +module.exports = config; From 47ec217ff675f0bed1ee865daa3fc7934ce47b5f Mon Sep 17 00:00:00 2001 From: emmaodia Date: Tue, 12 Dec 2023 21:55:09 +0100 Subject: [PATCH 04/10] fix: Smart Wallets API reference v2 --- .../auth.api.mdx | 0 .../get-wallet-actions.api.mdx | 0 .../sidebar.js | 6 +++--- .../smart-wallets-v2-api.info.mdx} | 2 +- sidebars.js | 12 +++++++++--- 5 files changed, 13 insertions(+), 7 deletions(-) rename docs/{smart-wallet-api-v => smart-wallet-v2-api}/auth.api.mdx (100%) rename docs/{smart-wallet-api-v => smart-wallet-v2-api}/get-wallet-actions.api.mdx (100%) rename docs/{smart-wallet-api-v => smart-wallet-v2-api}/sidebar.js (89%) rename docs/{smart-wallet-api-v/smart-wallets-api-v.info.mdx => smart-wallet-v2-api/smart-wallets-v2-api.info.mdx} (99%) diff --git a/docs/smart-wallet-api-v/auth.api.mdx b/docs/smart-wallet-v2-api/auth.api.mdx similarity index 100% rename from docs/smart-wallet-api-v/auth.api.mdx rename to docs/smart-wallet-v2-api/auth.api.mdx diff --git a/docs/smart-wallet-api-v/get-wallet-actions.api.mdx b/docs/smart-wallet-v2-api/get-wallet-actions.api.mdx similarity index 100% rename from docs/smart-wallet-api-v/get-wallet-actions.api.mdx rename to docs/smart-wallet-v2-api/get-wallet-actions.api.mdx diff --git a/docs/smart-wallet-api-v/sidebar.js b/docs/smart-wallet-v2-api/sidebar.js similarity index 89% rename from docs/smart-wallet-api-v/sidebar.js rename to docs/smart-wallet-v2-api/sidebar.js index 9ac2dd9..813d8b1 100644 --- a/docs/smart-wallet-api-v/sidebar.js +++ b/docs/smart-wallet-v2-api/sidebar.js @@ -1,18 +1,18 @@ module.exports = [ - { type: "doc", id: "smart-wallet-api-v/smart-wallets-api-v" }, + { type: "doc", id: "smart-wallet-v2-api/smart-wallets-v2-api" }, { type: "category", label: "Smart Wallets v2", items: [ { type: "doc", - id: "smart-wallet-api-v/auth", + id: "smart-wallet-v2-api/auth", label: "Auth", className: "api-method post", }, { type: "doc", - id: "smart-wallet-api-v/get-wallet-actions", + id: "smart-wallet-v2-api/get-wallet-actions", label: "Get Wallet Actions", className: "api-method get", }, diff --git a/docs/smart-wallet-api-v/smart-wallets-api-v.info.mdx b/docs/smart-wallet-v2-api/smart-wallets-v2-api.info.mdx similarity index 99% rename from docs/smart-wallet-api-v/smart-wallets-api-v.info.mdx rename to docs/smart-wallet-v2-api/smart-wallets-v2-api.info.mdx index a5bc8bb..b559443 100644 --- a/docs/smart-wallet-api-v/smart-wallets-api-v.info.mdx +++ b/docs/smart-wallet-v2-api/smart-wallets-v2-api.info.mdx @@ -1,5 +1,5 @@ --- -id: smart-wallets-api-v +id: smart-wallets-v2-api title: "Smart Wallets API v2" description: "" sidebar_label: Introduction diff --git a/sidebars.js b/sidebars.js index eaa1714..faf18bb 100644 --- a/sidebars.js +++ b/sidebars.js @@ -37,16 +37,22 @@ const sidebars = { dirName: "tutorials", }, ], + integrationSidebar: [ + { + type: "autogenerated", + dirName: "tutorials", + }, + ], apiSidebar: [ - { + { type: "category", label: "Smart Wallet API v2", link: { type: "generated-index", title: "Smart Wallet API v2", }, - items: require("./docs/smart-wallet-api-v/sidebar.js"), + items: require("./docs/smart-wallet-v2-api/sidebar.js"), }, { type: "category", @@ -66,7 +72,7 @@ const sidebars = { }, items: require("./docs/notification-api/sidebar.js"), }, - { + { type: "category", label: "Admin API - DEPRECATED", link: { From 9e78040e34da6b0edaad71f04942abcb0dd41a4f Mon Sep 17 00:00:00 2001 From: emmaodia Date: Tue, 12 Dec 2023 21:55:47 +0100 Subject: [PATCH 05/10] fix: Smart Wallets API reference v2 --- ...fuse-smart-wallet-v-api.yaml => fuse-smart-wallet-v2-api.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api-references/{fuse-smart-wallet-v-api.yaml => fuse-smart-wallet-v2-api.yaml} (100%) diff --git a/api-references/fuse-smart-wallet-v-api.yaml b/api-references/fuse-smart-wallet-v2-api.yaml similarity index 100% rename from api-references/fuse-smart-wallet-v-api.yaml rename to api-references/fuse-smart-wallet-v2-api.yaml From 17b103e5a8a73f08d7f66b2c700a4affbc8a0f71 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Wed, 13 Dec 2023 14:03:28 +0100 Subject: [PATCH 06/10] fix: GET Wallet Actions --- .../get-wallet-actions.api.mdx | 460 +++++++++++++++++- 1 file changed, 452 insertions(+), 8 deletions(-) diff --git a/docs/smart-wallet-v2-api/get-wallet-actions.api.mdx b/docs/smart-wallet-v2-api/get-wallet-actions.api.mdx index a56c25e..d1544a3 100644 --- a/docs/smart-wallet-v2-api/get-wallet-actions.api.mdx +++ b/docs/smart-wallet-v2-api/get-wallet-actions.api.mdx @@ -5,7 +5,448 @@ description: "Get Wallet Actions" sidebar_label: "Get Wallet Actions" hide_title: true hide_table_of_contents: true -api: {"tags":["Smart Wallets"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"apiKey","in":"query","schema":{"type":"string"},"description":"(Required) Your Public API key","example":"{{publicKey}}"},{"name":"page","in":"query","schema":{"type":"integer"},"example":"1"},{"name":"updatedAt","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"tokenAddress","in":"query","schema":{"type":"string"},"example":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"data":{"docs":[{"_id":"63f488d2ad300586076c69a4","name":"createWallet","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":[],"job":"63f488d2ad300586076c69a2","data":{"value":"0","txHash":"0x29aa2d08050354e4d267c2d6c49fbd3c9fb1bfd8c8f69482b49a127e922ad1b0","status":"succeeded","blockNumber":21882367},"status":"succeeded","createdAt":"2023-02-21T09:03:14.148Z","updatedAt":"2023-02-21T09:03:15.492Z","__v":0},{"_id":"63f48944ad300586076c6b76","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x039968b2746fd3067ea972d50d602e9c4bd32ec807b6cddc77d8afa1baf5f762","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"1000000000000000000","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676970308"},"status":"succeeded","createdAt":"2023-02-21T09:05:08.388Z","updatedAt":"2023-02-21T09:05:08.388Z","__v":0},{"_id":"63f4cc9fad300586076cc66e","name":"receiveNFT","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xd08a296d68f553938b96de150f3f18a14be5629f"],"data":{"txHash":"0xda410fee6ad245c3cd1075f685b3f6d5bd82501e5fcc70688d349155d519bbfe","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"AmazingHorses","tokenSymbol":"AMZ","tokenDecimal":null,"asset":"AMZ","status":"succeeded","tokenType":"ERC-721","value":"NaN","tokenAddress":"0xd08a296d68f553938b96de150f3f18a14be5629f","timeStamp":"1676987552"},"status":"succeeded","createdAt":"2023-02-21T13:52:31.654Z","updatedAt":"2023-02-21T13:52:31.654Z","__v":0},{"_id":"63f4cd53ad300586076cc70a","name":"receiveNFT","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xd08a296d68f553938b96de150f3f18a14be5629f"],"data":{"txHash":"0xa5f5b763ecfd420e1e2a2db2726378637c27738e312fb951e1f91a5c6a3b652f","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"AmazingHorses","tokenSymbol":"AMZ","tokenDecimal":null,"asset":"AMZ","status":"succeeded","tokenType":"ERC-721","value":"NaN","tokenAddress":"0xd08a296d68f553938b96de150f3f18a14be5629f","timeStamp":"1676987732"},"status":"succeeded","createdAt":"2023-02-21T13:55:31.523Z","updatedAt":"2023-02-21T13:55:31.523Z","__v":0},{"_id":"63f4cff5ad300586076cc86d","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x93c197a6e6da7f2da7c232b5ab98be32c1cb60d514599ae3346b1dd6c97a4cfc","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"1000000000000000000","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676988406"},"status":"succeeded","createdAt":"2023-02-21T14:06:45.825Z","updatedAt":"2023-02-21T14:06:45.825Z","__v":0},{"_id":"63f4e08f20abbc6ed88e05c1","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5"],"data":{"txHash":"0x10432963a35696491dd98edd557c89ef581a756e8106d8336ad71609e192850e","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xc79983b0754ac688Bf54939aDd59BDF75916fDA2","tokenName":"USD Coin on Fuse","tokenSymbol":"USDC","tokenDecimal":6,"asset":"USDC","status":"succeeded","tokenType":"ERC-20","value":"81591","tokenAddress":"0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5","timeStamp":"1676992655"},"status":"succeeded","createdAt":"2023-02-21T15:17:35.139Z","updatedAt":"2023-02-21T15:17:35.139Z","__v":0},{"_id":"63f4e55520abbc6ed88e0ad5","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0xf1f3703c1167848db68dbdec850f2df9a4b80343618b61c9d8622c54032213b4","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"609144132954467250","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676993878"},"status":"succeeded","createdAt":"2023-02-21T15:37:57.607Z","updatedAt":"2023-02-21T15:37:57.607Z","__v":0},{"_id":"63f4e97720abbc6ed88e1020","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0xf256e0673eb65a7420cab562dd9b707e9a2013f29e8cf0f36525eb429e5b21e4","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"241942036554581990","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676994935"},"status":"succeeded","createdAt":"2023-02-21T15:55:35.101Z","updatedAt":"2023-02-21T15:55:35.101Z","__v":0},{"_id":"63f4e99e20abbc6ed88e108a","name":"receiveTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],"data":{"txHash":"0x7b304ec2439e1c6cb5a7b27e564b3dd664367275a527f003216a7f86a7010819","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","to":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","from":"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5","tokenName":"FUSE","tokenSymbol":"FUSE","tokenDecimal":18,"asset":"FUSE","status":"succeeded","tokenType":"FUSE","value":"120970389826859458","tokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","timeStamp":"1676994974"},"status":"succeeded","createdAt":"2023-02-21T15:56:14.111Z","updatedAt":"2023-02-21T15:56:14.111Z","__v":0},{"_id":"63f50e5d0905cd0b768c55a2","name":"swapTokens","walletAddress":"0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842","tokenAddress":["0x0BE9e53fd7EDaC9F859882AfdDa116645287C629","0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5"],"job":"63f50e5d0905cd0b768c559e","data":{"value":"0","tokenAddress":"0x0be9e53fd7edac9f859882afdda116645287c629","metadata":{"executionPrice":"0","nextMidPrice":"0","priceImpact":"0","route":["0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5","0x0BE9e53fd7EDaC9F859882AfdDa116645287C629"],"inputAmount":"0.01","outputAmount":"0.120627353584457792","inputToken":"USDC","outputToken":"FUSE"},"timestamp":"1677004382","txHash":"0x9cf5222cd2e744926a9bc732a6edc6ea604462050681fa5b3a426bcae5361396","status":"failed","blockNumber":21889191},"status":"failed","createdAt":"2023-02-21T18:33:01.717Z","updatedAt":"2023-02-21T18:33:05.881Z","__v":0,"failReason":"Transaction failed due to internal contract error. One possible reason might be that the wallet doesn't have sufficient funds.","failedAt":"2023-02-21T18:33:05.880Z"}],"totalDocs":18,"offset":0,"limit":10,"totalPages":2,"page":1,"pagingCounter":1,"hasPrevPage":false,"hasNextPage":true,"prevPage":null,"nextPage":2}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object"},"example":{"statusCode":401,"errorMessage":{"statusCode":401,"message":"Unauthorized"},"path":"/api/v2/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object"},"example":{"statusCode":403,"errorMessage":{"statusCode":403,"message":"Forbidden resource","error":"Forbidden"},"path":"/api/v2/smart-wallets/historical_txs?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}}}},"description":"Get Historical Transactions","method":"get","path":"/api/v1/smart-wallets/historical_txs","servers":[{"url":"https://api.fuse.io"}],"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","type":"http","scheme":"bearer"}},"info":{"title":"Smart Wallets API","version":"1.0.0"},"postman":{"name":"Get Historical Transactions","description":{"type":"text/plain"},"url":{"path":["api","v2","smart-wallets","historical_txs"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Your Public API key","type":"text/plain"},"key":"apiKey","value":""},{"disabled":false,"key":"page","value":""},{"disabled":false,"key":"updatedAt","value":""},{"disabled":false,"key":"tokenAddress","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"bearer","bearer":[{"type":"any","value":"","key":"token"}]}}} +api: + { + "tags": ["Smart Wallets"], + "security": [{ "bearerAuth": [] }], + "parameters": + [ + { + "name": "apiKey", + "in": "query", + "schema": { "type": "string" }, + "description": "(Required) Your Public API key", + "example": "{{publicKey}}", + }, + { + "name": "page", + "in": "query", + "schema": { "type": "integer" }, + "example": "1", + }, + { + "name": "updatedAt", + "in": "query", + "schema": { "type": "integer" }, + "example": "0", + }, + { + "name": "tokenAddress", + "in": "query", + "schema": { "type": "string" }, + "example": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + }, + ], + "responses": + { + "200": + { + "description": "Successful response", + "content": + { + "application/json": + { + "schema": { "type": "object" }, + "example": + { + "data": + { + "docs": + [ + { + "_id": "63f488d2ad300586076c69a4", + "name": "createWallet", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": [], + "job": "63f488d2ad300586076c69a2", + "data": + { + "value": "0", + "txHash": "0x29aa2d08050354e4d267c2d6c49fbd3c9fb1bfd8c8f69482b49a127e922ad1b0", + "status": "succeeded", + "blockNumber": 21882367, + }, + "status": "succeeded", + "createdAt": "2023-02-21T09:03:14.148Z", + "updatedAt": "2023-02-21T09:03:15.492Z", + "__v": 0, + }, + { + "_id": "63f48944ad300586076c6b76", + "name": "receiveTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + ], + "data": + { + "txHash": "0x039968b2746fd3067ea972d50d602e9c4bd32ec807b6cddc77d8afa1baf5f762", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088", + "tokenName": "FUSE", + "tokenSymbol": "FUSE", + "tokenDecimal": 18, + "asset": "FUSE", + "status": "succeeded", + "tokenType": "FUSE", + "value": "1000000000000000000", + "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "timeStamp": "1676970308", + }, + "status": "succeeded", + "createdAt": "2023-02-21T09:05:08.388Z", + "updatedAt": "2023-02-21T09:05:08.388Z", + "__v": 0, + }, + { + "_id": "63f4cc9fad300586076cc66e", + "name": "receiveNFT", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xd08a296d68f553938b96de150f3f18a14be5629f", + ], + "data": + { + "txHash": "0xda410fee6ad245c3cd1075f685b3f6d5bd82501e5fcc70688d349155d519bbfe", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088", + "tokenName": "AmazingHorses", + "tokenSymbol": "AMZ", + "tokenDecimal": null, + "asset": "AMZ", + "status": "succeeded", + "tokenType": "ERC-721", + "value": "NaN", + "tokenAddress": "0xd08a296d68f553938b96de150f3f18a14be5629f", + "timeStamp": "1676987552", + }, + "status": "succeeded", + "createdAt": "2023-02-21T13:52:31.654Z", + "updatedAt": "2023-02-21T13:52:31.654Z", + "__v": 0, + }, + { + "_id": "63f4cd53ad300586076cc70a", + "name": "receiveNFT", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xd08a296d68f553938b96de150f3f18a14be5629f", + ], + "data": + { + "txHash": "0xa5f5b763ecfd420e1e2a2db2726378637c27738e312fb951e1f91a5c6a3b652f", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088", + "tokenName": "AmazingHorses", + "tokenSymbol": "AMZ", + "tokenDecimal": null, + "asset": "AMZ", + "status": "succeeded", + "tokenType": "ERC-721", + "value": "NaN", + "tokenAddress": "0xd08a296d68f553938b96de150f3f18a14be5629f", + "timeStamp": "1676987732", + }, + "status": "succeeded", + "createdAt": "2023-02-21T13:55:31.523Z", + "updatedAt": "2023-02-21T13:55:31.523Z", + "__v": 0, + }, + { + "_id": "63f4cff5ad300586076cc86d", + "name": "receiveTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + ], + "data": + { + "txHash": "0x93c197a6e6da7f2da7c232b5ab98be32c1cb60d514599ae3346b1dd6c97a4cfc", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0x7Ceabc27B1dc6A065fAD85A86AFBaF97F7692088", + "tokenName": "FUSE", + "tokenSymbol": "FUSE", + "tokenDecimal": 18, + "asset": "FUSE", + "status": "succeeded", + "tokenType": "FUSE", + "value": "1000000000000000000", + "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "timeStamp": "1676988406", + }, + "status": "succeeded", + "createdAt": "2023-02-21T14:06:45.825Z", + "updatedAt": "2023-02-21T14:06:45.825Z", + "__v": 0, + }, + { + "_id": "63f4e08f20abbc6ed88e05c1", + "name": "receiveTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5", + ], + "data": + { + "txHash": "0x10432963a35696491dd98edd557c89ef581a756e8106d8336ad71609e192850e", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0xc79983b0754ac688Bf54939aDd59BDF75916fDA2", + "tokenName": "USD Coin on Fuse", + "tokenSymbol": "USDC", + "tokenDecimal": 6, + "asset": "USDC", + "status": "succeeded", + "tokenType": "ERC-20", + "value": "81591", + "tokenAddress": "0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5", + "timeStamp": "1676992655", + }, + "status": "succeeded", + "createdAt": "2023-02-21T15:17:35.139Z", + "updatedAt": "2023-02-21T15:17:35.139Z", + "__v": 0, + }, + { + "_id": "63f4e55520abbc6ed88e0ad5", + "name": "receiveTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + ], + "data": + { + "txHash": "0xf1f3703c1167848db68dbdec850f2df9a4b80343618b61c9d8622c54032213b4", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5", + "tokenName": "FUSE", + "tokenSymbol": "FUSE", + "tokenDecimal": 18, + "asset": "FUSE", + "status": "succeeded", + "tokenType": "FUSE", + "value": "609144132954467250", + "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "timeStamp": "1676993878", + }, + "status": "succeeded", + "createdAt": "2023-02-21T15:37:57.607Z", + "updatedAt": "2023-02-21T15:37:57.607Z", + "__v": 0, + }, + { + "_id": "63f4e97720abbc6ed88e1020", + "name": "receiveTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + ], + "data": + { + "txHash": "0xf256e0673eb65a7420cab562dd9b707e9a2013f29e8cf0f36525eb429e5b21e4", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5", + "tokenName": "FUSE", + "tokenSymbol": "FUSE", + "tokenDecimal": 18, + "asset": "FUSE", + "status": "succeeded", + "tokenType": "FUSE", + "value": "241942036554581990", + "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "timeStamp": "1676994935", + }, + "status": "succeeded", + "createdAt": "2023-02-21T15:55:35.101Z", + "updatedAt": "2023-02-21T15:55:35.101Z", + "__v": 0, + }, + { + "_id": "63f4e99e20abbc6ed88e108a", + "name": "receiveTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + ], + "data": + { + "txHash": "0x7b304ec2439e1c6cb5a7b27e564b3dd664367275a527f003216a7f86a7010819", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "to": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "from": "0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5", + "tokenName": "FUSE", + "tokenSymbol": "FUSE", + "tokenDecimal": 18, + "asset": "FUSE", + "status": "succeeded", + "tokenType": "FUSE", + "value": "120970389826859458", + "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "timeStamp": "1676994974", + }, + "status": "succeeded", + "createdAt": "2023-02-21T15:56:14.111Z", + "updatedAt": "2023-02-21T15:56:14.111Z", + "__v": 0, + }, + { + "_id": "63f50e5d0905cd0b768c55a2", + "name": "swapTokens", + "walletAddress": "0xbFF3E288219EBD83B1C4d09CC7a55F37b0B60842", + "tokenAddress": + [ + "0x0BE9e53fd7EDaC9F859882AfdDa116645287C629", + "0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5", + ], + "job": "63f50e5d0905cd0b768c559e", + "data": + { + "value": "0", + "tokenAddress": "0x0be9e53fd7edac9f859882afdda116645287c629", + "metadata": + { + "executionPrice": "0", + "nextMidPrice": "0", + "priceImpact": "0", + "route": + [ + "0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5", + "0x0BE9e53fd7EDaC9F859882AfdDa116645287C629", + ], + "inputAmount": "0.01", + "outputAmount": "0.120627353584457792", + "inputToken": "USDC", + "outputToken": "FUSE", + }, + "timestamp": "1677004382", + "txHash": "0x9cf5222cd2e744926a9bc732a6edc6ea604462050681fa5b3a426bcae5361396", + "status": "failed", + "blockNumber": 21889191, + }, + "status": "failed", + "createdAt": "2023-02-21T18:33:01.717Z", + "updatedAt": "2023-02-21T18:33:05.881Z", + "__v": 0, + "failReason": "Transaction failed due to internal contract error. One possible reason might be that the wallet doesn't have sufficient funds.", + "failedAt": "2023-02-21T18:33:05.880Z", + }, + ], + "totalDocs": 18, + "offset": 0, + "limit": 10, + "totalPages": 2, + "page": 1, + "pagingCounter": 1, + "hasPrevPage": false, + "hasNextPage": true, + "prevPage": null, + "nextPage": 2, + }, + }, + }, + }, + }, + "401": + { + "description": "Unauthorized", + "content": + { + "application/json": + { + "schema": { "type": "object" }, + "example": + { + "statusCode": 401, + "errorMessage": + { "statusCode": 401, "message": "Unauthorized" }, + "path": "/api/v2/smart-wallets/actions?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + }, + }, + }, + }, + "403": + { + "description": "Forbidden", + "content": + { + "application/json": + { + "schema": { "type": "object" }, + "example": + { + "statusCode": 403, + "errorMessage": + { + "statusCode": 403, + "message": "Forbidden resource", + "error": "Forbidden", + }, + "path": "/api/v2/smart-wallets/actions?apiKey={{publicKey}}&page=1&updatedAt=0&tokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + }, + }, + }, + }, + }, + "description": "Get Historical Transactions", + "method": "get", + "path": "/api/v1/smart-wallets/actions", + "servers": [{ "url": "https://api.fuse.io" }], + "securitySchemes": + { + "bearerAuth": + { "bearerFormat": "JWT", "type": "http", "scheme": "bearer" }, + }, + "info": { "title": "Smart Wallets API", "version": "1.0.0" }, + "postman": + { + "name": "Get Historical Transactions", + "description": { "type": "text/plain" }, + "url": + { + "path": ["api", "v2", "smart-wallets", "actions"], + "host": ["{{baseUrl}}"], + "query": + [ + { + "disabled": false, + "description": + { + "content": "(Required) Your Public API key", + "type": "text/plain", + }, + "key": "apiKey", + "value": "", + }, + { "disabled": false, "key": "page", "value": "" }, + { "disabled": false, "key": "updatedAt", "value": "" }, + { "disabled": false, "key": "tokenAddress", "value": "" }, + ], + "variable": [], + }, + "header": [{ "key": "Accept", "value": "application/json" }], + "method": "GET", + "auth": + { + "type": "bearer", + "bearer": + [{ "type": "any", "value": "", "key": "token" }], + }, + }, + } sidebar_class_name: "get api-method" info_path: docs/smart-wallet-api/smart-wallets-api custom_edit_url: null @@ -24,11 +465,14 @@ import TabItem from "@theme/TabItem";

Get Wallet Actions

- - - - + + Get Wallet Actions @@ -42,9 +486,9 @@ Successful response Unauthorized -
Schema
  • object
+
Schema
  • object
Forbidden -
Schema
  • object
- \ No newline at end of file +
Schema
  • object
+ From c5406171cc5cad4dec09591964d6650ff37aea18 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Wed, 13 Dec 2023 15:26:07 +0100 Subject: [PATCH 07/10] update: pokt rpc update --- docs/basics/getting-started-with-fuse/rpc.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basics/getting-started-with-fuse/rpc.mdx b/docs/basics/getting-started-with-fuse/rpc.mdx index be9f7d9..9fc61d3 100644 --- a/docs/basics/getting-started-with-fuse/rpc.mdx +++ b/docs/basics/getting-started-with-fuse/rpc.mdx @@ -9,7 +9,7 @@ title: RPC Node Providers | Fuse Labs\* | rpc.fuse.io | | [Liquify](https://www.liquify.com/) | fuse.liquify.com | | [Blockspaces](https://www.blockspaces.com/web3-infrastructure) | web3endpoints.com/fuse-mainnet | -| [Pocket Network](https://www.pokt.network/) | fuse-mainnet.gateway.pokt.network/v1/lb/6075e9510e2a131ca026e10d​ | +| [Pocket Network](https://www.pokt.network/) | https://fuse.rpc.grove.city/v1/{app_id} | | [GetBlock](https://getblock.io/) | fuse.getblock.io/mainnet | | [OnFinality](https://onfinality.io/) | fuse.api.onfinality.io/public | From f64a628f0bd6eddd2eaca9434768299b34b8b195 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Wed, 13 Dec 2023 15:34:13 +0100 Subject: [PATCH 08/10] update: pokt rpc update --- docs/basics/getting-started-with-fuse/rpc.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/basics/getting-started-with-fuse/rpc.mdx b/docs/basics/getting-started-with-fuse/rpc.mdx index 9fc61d3..092d8a4 100644 --- a/docs/basics/getting-started-with-fuse/rpc.mdx +++ b/docs/basics/getting-started-with-fuse/rpc.mdx @@ -4,14 +4,14 @@ title: RPC Node Providers # RPC -| Provider | RPC https URL | -| :------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------- | -| Fuse Labs\* | rpc.fuse.io | -| [Liquify](https://www.liquify.com/) | fuse.liquify.com | -| [Blockspaces](https://www.blockspaces.com/web3-infrastructure) | web3endpoints.com/fuse-mainnet | -| [Pocket Network](https://www.pokt.network/) | https://fuse.rpc.grove.city/v1/{app_id} | -| [GetBlock](https://getblock.io/) | fuse.getblock.io/mainnet | -| [OnFinality](https://onfinality.io/) | fuse.api.onfinality.io/public | +| Provider | RPC https URL | +| :------------------------------------------------------------- | :------------------------------------- | +| Fuse Labs\* | https://rpc.fuse.io | +| [Liquify](https://www.liquify.com/) | https://fuse.liquify.com | +| [Blockspaces](https://www.blockspaces.com/web3-infrastructure) | https://web3endpoints.com/fuse-mainnet | +| [Pocket Network](https://www.pokt.network/) | https://fuse.rpc.grove.city/v1/ | +| [GetBlock](https://getblock.io/) | https://fuse.getblock.io/mainnet | +| [OnFinality](https://onfinality.io/) | https://fuse.api.onfinality.io/public | Note\*: Developers are advised to use the Fuse RPC for the end users and wallets such as MetaMask. From 6f5c8b5b7230484beb16eb3a49a9969acc8b5fc2 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Wed, 13 Dec 2023 15:34:37 +0100 Subject: [PATCH 09/10] update: WebSocket --- .../network-details.mdx | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/docs/basics/getting-started-with-fuse/network-details.mdx b/docs/basics/getting-started-with-fuse/network-details.mdx index 7ccdcbb..362e454 100644 --- a/docs/basics/getting-started-with-fuse/network-details.mdx +++ b/docs/basics/getting-started-with-fuse/network-details.mdx @@ -10,29 +10,27 @@ title: Network Details | ---------- | ----------- | --------- | ------------ | ---------- | | 20,000,000 | 5 seconds | 10 GWei | FUSE | 122 | - -| **RPC** | [https://rpc.fuse.io/](https://rpc.fuse.io/)​ | -| :------------ | :----------------------------------------------------------------------------------------- | -| **Chain ID** | 122 | -| **Symbol** | FUSE | -| **Health** | [https://health.fuse.io/](https://health.fuse.io/) | -| **Explorer** | [https://explorer.fuse.io/](https://explorer.fuse.io/) | - +| **RPC** | [https://rpc.fuse.io/](https://rpc.fuse.io/)​ | +| :------------ | :----------------------------------------------------- | +| **Chain ID** | 122 | +| **Symbol** | FUSE | +| **Health** | [https://health.fuse.io/](https://health.fuse.io/) | +| **Explorer** | [https://explorer.fuse.io/](https://explorer.fuse.io/) | +| **WebSocket** | wss://explorer-node.fuse.io/ws |

 

- ### Fuse Spark Testnet | Block size | Block speed | Gas price | Native token | Network ID | | ---------- | ----------- | --------- | ------------ | ---------- | | 20,000,000 | 5 seconds | 10 GWei | FUSE | 123 | -| **RPC** | [https://rpc.fusespark.io](https://rpc.fusespark.io) | -| :------------ | :----------------------------------------------------------------------------------------- | -| **Chain ID** | 123 | -| **Symbol** | FUSE | -| **Health** | [https://health.fusespark.io](https://health.fusespark.io) | -| **Explorer** | [https://explorer.fusespark.io/](https://explorer.fusespark.io/) | -|**Faucet** | [ChainDrop faucet](https://chaindrop.org/?chainid=123\&token=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee "ChainDrop faucet")| - +| **RPC** | [https://rpc.fusespark.io](https://rpc.fusespark.io) | +| :------------ | :------------------------------------------------------------------------------------------------------------------------- | +| **Chain ID** | 123 | +| **Symbol** | FUSE | +| **Health** | [https://health.fusespark.io](https://health.fusespark.io) | +| **Explorer** | [https://explorer.fusespark.io/](https://explorer.fusespark.io/) | +| **Faucet** | [ChainDrop faucet](https://chaindrop.org/?chainid=123&token=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee "ChainDrop faucet") | +| **WebSocket** | wss://explorernode.fusespark.io/ws | From 8d4c4ae946886a0e62f9a6f9d479644537af1819 Mon Sep 17 00:00:00 2001 From: emmaodia Date: Thu, 14 Dec 2023 09:44:03 +0100 Subject: [PATCH 10/10] new section: Partner Integrations --- docs/partners/_category_.json | 7 ++ docs/partners/candide.mdx | 231 ++++++++++++++++++++++++++++++++++ docs/partners/intro.mdx | 73 +++++++++++ docs/partners/moonchute.mdx | 168 +++++++++++++++++++++++++ docs/partners/thirdweb.mdx | 4 + docusaurus.config.js | 6 + sidebars.js | 2 +- 7 files changed, 490 insertions(+), 1 deletion(-) create mode 100644 docs/partners/_category_.json create mode 100644 docs/partners/candide.mdx create mode 100644 docs/partners/intro.mdx create mode 100644 docs/partners/moonchute.mdx create mode 100644 docs/partners/thirdweb.mdx diff --git a/docs/partners/_category_.json b/docs/partners/_category_.json new file mode 100644 index 0000000..5e285b1 --- /dev/null +++ b/docs/partners/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Integration Partners", + "position": 1, + "link": { + "type": "generated-index" + } +} diff --git a/docs/partners/candide.mdx b/docs/partners/candide.mdx new file mode 100644 index 0000000..d95f1d8 --- /dev/null +++ b/docs/partners/candide.mdx @@ -0,0 +1,231 @@ +--- +title: Candide +sidebar_position: 2 +--- + +# Gasless Transactions with Candide Wallet on Fuse Blockchain + +## Introduction + +Gasless transactions have become increasingly popular in the blockchain space, providing a seamless experience for users by eliminating the need to pay transaction fees in the native cryptocurrency. In this tutorial, we will explore how to create gasless transactions using Candide Wallet on the Fuse Blockchain. Candide Wallet is a powerful tool that facilitates the creation and execution of transactions without requiring users to manage gas fees directly. + +## Prerequisites + +Before we begin, make sure you have the following prerequisites: + +1. Node.js installed on your machine. You can download it from [here](https://nodejs.org/). +2. Code Editor: Use your preferred code editor; VS Code is recommended. +3. An EOA wallet with a private key. You can use an existing one or create a new wallet. +4. Basic Understanding of JavaScript: Familiarity with JavaScript will be helpful. + +## Step 1: Set Up Your Project + +Create a new project folder and initialize it using Node.js: + +```bash +mkdir new-project && cc new-project +npm init -y +``` + +## Step 2: **Install Dependencies:** + +Ensure that you have the required dependencies installed. You can install them using the following command: + +```bash +npm install dotenv abstractionkit ethers@5.7.2 typescript ts-node +``` + +In this step, we import the necessary libraries for our gasless transaction, including Candide Wallet's abstraction kit which is a JS library for building ERC-4337 user operations. + +**Configure Environment Variables:** + +Create a `.env` file in your project directory and add the following variables: + +```bash +BUNDLER_URL= +ENTRYPOINT_ADDRESS= +PRIVATE_KEY= +JSON_RPC_NODE_PROVIDER= +CHAIN_ID= +``` + +## Step 3: **Code:** + +### Step 1: gasless_txns.ts + +Create a file gasless_txns.ts and start by importing the Libraries. + +```javascript +import * as dotenv from "dotenv"; +import { ethers } from "ethers"; +import { Bundler, CandideAccount } from "abstractionkit"; +``` + +In this step we import the dotenv Library to enable us parse env variables without exposing them. We will also use methods from the EthersJS package to create wallets and also handle Hex values. The abstractionkit provides us with methods to create an Account that will be connected to the Bundler of the particular network we are interacting with. + +### Step 2: Initializing Bundler and Wallet + +Start by creating a function in gasless_txns.ts + +```javascript +async function main(): Promise { + // Rest of the code will go here... +} + +main(); +``` + +Add the following code to initialize the bundler and create a Smart Contract Account using the EOA. + +```javascript +//get values from .env +dotenv.config(); +const bundlerUrl = process.env.BUNDLER_URL as string; +const entrypointAddress = process.env.ENTRYPOINT_ADDRESS as string; +const privateKey = process.env.PRIVATE_KEY as string; + +// Define our Bundler endpoint where we will be sending our userOp +const bundler: Bundler = new Bundler(bundlerUrl, entrypointAddress); + +// Initiate the owner of our Candide Account (EOA) +const eoaSigner = new Wallet(privateKey); + +const smartAccount = new CandideAccount(); +``` + +This segment initializes the Bundler and the wallet using the values from the environment variables. It also sets up the owner of the Candide Account, which is an externally owned account (EOA). + +### Step 3: Creating a Smart Contract Account + +```javascript +// Generate the new account address and initCode +let [newAccountAddress, initCode] = smartAccount.createNewAccount([ + eoaSigner.address, +]); + +console.log("Account address(sender) : " + newAccountAddress); +``` + +Here, we generate a new account address and initialization code for the Candide Account. The account address is then logged to the console. + +### Step 4: Sending Ether Gaslessly + +```javascript +//send 5 wei to 0x1a02592A3484c2077d2E5D24482497F85e1980C6 +let callData = smartAccount.createSendEthCallData( + "0xa42872B5359F6e3905BB031df62C3AADde532933", + 5 // 5 wei +); + +let user_operation: UserOperation = { + ...UserOperationEmptyValues, + sender: newAccountAddress, + nonce: "0x00", + initCode, + callData, +}; +``` + +In this step, we create the call data for sending 5 wei to an address. We then define the user operation object with the necessary values. + +### Step 5: Estimating Gas + +```javascript +let estimation = (await bundler.estimateUserOperationGas( + user_operation +)) as GasEstimationResult; + +// catch errors if there's any in the estimateUserOperationGas call +if ("code" in estimation) { + console.log(estimation); + return; +} + +user_operation.callGasLimit = ethers.utils.hexlify( + Math.round(Number(estimation.callGasLimit) * 1.2) +); + +user_operation.preVerificationGas = ethers.utils.hexlify( + Math.round(Number(estimation.preVerificationGas) * 1.2) +); + +console.log(estimation); +``` + +Here, we estimate the gas required for the user operation and adjust the gas limits accordingly. Errors are caught and logged if there are any issues with the gas estimation. + +### Step 6: Setting Fee Parameters + +```javascript +const jsonRpcNodeProvider = process.env.JSON_RPC_NODE_PROVIDER as string; +const provider = new ethers.providers.JsonRpcProvider(jsonRpcNodeProvider); +const feeData = await provider.getFeeData(); + +if (feeData.maxFeePerGas && feeData.maxPriorityFeePerGas) { + user_operation.maxFeePerGas = ethers.utils.hexlify( + Math.round(Number(feeData.maxFeePerGas) * 1.5) + ); + + user_operation.maxPriorityFeePerGas = ethers.utils.hexlify( + Math.round(Number(feeData.maxFeePerGas) * 1.5) + ); +} +``` + +This segment retrieves fee data from the JSON RPC node provider and sets the maximum fee per gas and maximum priority fee per gas in the user operation. + +### Step 7: Signing and Sending the Transaction + +```javascript +const chainId = process.env.CHAIN_ID as string; + +const user_operation_hash = getUserOperationHash( + user_operation, + entrypointAddress, + chainId +); + +user_operation.signature = await eoaSigner.signMessage( + ethers.utils.hexZeroPad(user_operation_hash, 32) +); + +const bundlerResponse = await bundler.sendUserOperation(user_operation); + +console.log(bundlerResponse, "bundlerResponse"); +``` + +In this step, we generate the user operation hash, sign it with the wallet, and send the gasless transaction to the Bundler. The response from the Bundler is then logged to the console. + +### Step 8: Handling Responses + +```javascript +if ( + "message" in bundlerResponse && + (bundlerResponse.message as string) == "AA21 didn't pay prefund" +) { + console.log( + "Please fund the new account address with some sepolia eth to pay for gas : " + + newAccountAddress + ); +} +``` + +Finally, we check the Bundler's response and prompt for funding if the message indicates that prefunding is required. + +This breakdown provides a clear understanding of each segment's purpose in the gasless transaction code using Candide Wallet on the Fuse Blockchain. + +## Step 4: Running the Code + +1. Save the provided code in a file (e.g., `gasless_transaction.js`). + +2. Run the script using the following command: + + ```bash + npx ts-node index.ts gasless_transaction.js + ``` + +3. Follow any prompts or logs to fund the new account address if required. + +## Conclusion + +Congratulations! You have successfully created a gasless transaction using Candide Wallet on the Fuse Blockchain. This tutorial has covered the essential steps to set up your environment, understand the provided code, and execute gasless transactions seamlessly. Feel free to explore and customize the code further based on your specific use cases and requirements. diff --git a/docs/partners/intro.mdx b/docs/partners/intro.mdx new file mode 100644 index 0000000..319e16d --- /dev/null +++ b/docs/partners/intro.mdx @@ -0,0 +1,73 @@ +--- +title: Introduction +sidebar_position: 0 +--- + +## Developer's Guide to Partner Integrations + +Welcome to the Fuse Blockchain Developer's Guide for Partner Integrations! This section is tailored to assist developers in seamlessly integrating their tools and libraries with the Fuse Blockchain. Whether you're working on a decentralized application (dApp) or aiming to leverage Fuse's capabilities for your project, this guide provides the essential information for a successful integration. + +### Overview + +Fuse Blockchain offers a versatile ecosystem for developers to integrate and extend functionalities. This section focuses on specific tools and libraries designed to enhance the capabilities of Fuse, enabling a smooth development experience for you and your projects. + +### Partner Tools and Libraries + +#### 1. [Tool/Library Name 1] + +- **Description:** A concise overview of the tool or library. +- **Use Cases:** Highlight scenarios where this tool/library proves particularly useful. +- **Integration Steps:** Step-by-step instructions on how to seamlessly integrate and utilize the tool/library with Fuse Blockchain. +- [Link to Tool/Library 1 Documentation] + +#### 2. [Tool/Library Name 2] + +- **Description:** A brief description of the tool or library. +- **Use Cases:** Illustrate scenarios where this tool/library excels. +- **Integration Steps:** Detailed instructions for integrating and utilizing the tool/library with Fuse Blockchain. +- [Link to Tool/Library 2 Documentation] + +#### 3. [Tool/Library Name 3] + +- **Description:** A succinct description of the tool or library. +- **Use Cases:** Outline scenarios where this tool/library shines. +- **Integration Steps:** Step-by-step guide for integrating and leveraging the tool/library with Fuse Blockchain. +- [Link to Tool/Library 3 Documentation] + +... (Add additional sections for each tool or library as needed) + +### Getting Started + +Before diving into the integration process, make sure you have the following prerequisites: + +- [ ] A Fuse Blockchain developer account. +- [ ] Access to the Fuse developer portal. +- [ ] Basic understanding of blockchain technology and smart contracts. + +### Integration Guidelines + +Follow these developer-centric guidelines to ensure a smooth integration process: + +1. **Documentation Review**: Thoroughly review the documentation for each tool or library. + +2. **Account Setup**: Ensure your Fuse Blockchain developer account is set up and verified. + +3. **Environment Configuration**: Set up your development environment with the necessary configurations for Fuse Blockchain. + +4. **API Keys and Authentication**: Obtain any required API keys or authentication credentials for the tools/libraries you plan to use. + +5. **Code Integration**: Implement the provided integration steps for each tool or library, adapting the code to suit your specific use case. + +6. **Testing**: Rigorously test your integration in a sandbox or test environment before deploying to a production environment. + +### Partner Tools and Libraries (Placeholder Section) + +This section will be populated with detailed information about each partner tool or library. Click on the respective links below to access documentation for each integration: + +- [Tool/Library 1 Documentation](#) +- [Tool/Library 2 Documentation](#) +- [Tool/Library 3 Documentation](#) + +Thank you for choosing Fuse Blockchain for your development journey. If you encounter any questions or need assistance during the integration process, feel free to reach out to our developer support team or engage with the Fuse developer community. + +Happy coding on Fuse Blockchain! diff --git a/docs/partners/moonchute.mdx b/docs/partners/moonchute.mdx new file mode 100644 index 0000000..dbcfffd --- /dev/null +++ b/docs/partners/moonchute.mdx @@ -0,0 +1,168 @@ +--- +title: MoonChute +sidebar_position: 3 +--- + +Tutorial: How to send UserOperations on Fuse with MoonChute. + +# Tutorial: Integrating Moonchute with Fuse Blockchain in a ReactJS Project + +## Introduction + +Moonchute is a powerful interface for managing account abstraction, overseeing smart accounts, and providing customized verification. In this tutorial, we will guide you through the process of integrating Moonchute with the Fuse Blockchain in a ReactJS project using the `wagmi` library. + +## Prerequisites + +Make sure you have the following installed: + +Before we begin, ensure you have the following: + +1. Node.js installed on your machine. You can download it from [here](https://nodejs.org/). +2. Code Editor: Use your preferred code editor; VS Code is recommended. +3. An EOA wallet with a private key. You can use an existing one or create a new wallet. +4. Basic Understanding of JavaScript: Familiarity with JavaScript will be helpful. + +## Step 1: Set Up Your Project + +Create a new project folder and initialize it using Node.js: + +```bash +mkdir fuse-moonchute-demo && cd fuse-moonchute-demo +``` + +We are going to use ViteJS to quickly set up a ReactJS project. Run the command + +```bash +npm create vite@latest . +``` + +Select the prompts…. + +Where dot . indicate deploying vitejs in the already created directory. Next Run + +```bash +npm install +npm run dev +``` + +The project will be available on localhost at http://localhost:5173/ + +Add the project to Code Editor, such as VSCode. Open the project and navigate to App.jsx + +## Step 2: **Install Dependencies:** + +Ensure that you have the required dependencies installed. You can install them using the following command: + +```bash +npm install dotenv abstractionkit ethers@5.7.2 typescript ts-node +``` + +## Step 1: Install Moonchute and Configure Wagmi + +Open your terminal and run the following command to add Moonchute to your ReactJS project: + +```bash +yarn add moonchute wagmi viem +``` + +Now, let's configure Wagmi in your project. In a file, for example, `wagmiConfig.ts`, add the following: + +```javascript +// wagmiConfig.ts +import { createConfig, configureChains, fuse } from "wagmi"; +import { publicProvider } from "wagmi/providers/public"; + +const { chains, publicClient, webSocketPublicClient } = configureChains( + [fuse], + [publicProvider()] +); + +export const wagmiConfig = createConfig({ + publicClient, + webSocketPublicClient, +}); +``` + +## Step 2: Configure Moonchute in the Main Application File + +In your main application file (e.g., `App.tsx`), import `createMoonChuteConfig` and `MoonChuteConfig`: + +```javascript +// App.tsx +import { MoonChuteConfig, createMoonChuteConfig } from "moonchute"; +import { wagmiConfig } from "./wagmiConfig"; // Import the Wagmi config + +const config = createMoonChuteConfig({ + appId: "YOUR_MOONCHUTE_APP_ID", +}); +``` + +## Step 3: Integrate Moonchute and Wagmi in the App Component + +Now, integrate Moonchute and Wagmi in your `App` component: + +```javascript +// App.tsx +import React from "react"; +import { WagmiConfig } from "wagmi"; +import { MoonChuteConfig } from "moonchute"; +import { wagmiConfig } from "./wagmiConfig"; + +function App() { + return ( + + + + + + ); +} + +export default App; +``` + +## Step 4: Sending User Operations to Fuse Blockchain with Moonchute + +Now, you can use Moonchute to send user operations to the Fuse Blockchain. Create a component, for example, `MyComponent.tsx`: + +```javascript +// MyComponent.tsx +import React from "react"; +import { + useSmartAccounts, + usePrepareUserOperation, + useSendUserOperation, +} from "moonchute"; + +const MyComponent: React.FC = () => { + const { data: accounts } = useSmartAccounts({ + address: "YOUR_ADDRESS", + chainId: "CHAIN_ID", + }); + + const { config } = usePrepareUserOperation({ + address: "YOUR_ADDRESS", + account: accounts.smartAccount[0].address, + abi: "NFT_ABI", + functionName: "mint", + args: ["address"], + }); + + const { data: userOpHash, write } = useSendUserOperation(config); + + return ( +
+ + {userOpHash &&

Transaction Hash: {userOpHash}

} +
+ ); +}; + +export default MyComponent; +``` + +## Conclusion + +Congratulations! You have successfully integrated Moonchute with the Fuse Blockchain in your ReactJS project using `wagmi`. This setup allows you to manage account abstraction, oversee smart accounts, and perform customized verification seamlessly. Feel free to explore more features and customize your application as needed. diff --git a/docs/partners/thirdweb.mdx b/docs/partners/thirdweb.mdx new file mode 100644 index 0000000..27f256c --- /dev/null +++ b/docs/partners/thirdweb.mdx @@ -0,0 +1,4 @@ +--- +title: ThirdWeb +sidebar_position: 1 +--- diff --git a/docusaurus.config.js b/docusaurus.config.js index c206b5a..17b71c6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -142,6 +142,12 @@ const config = { label: "API references", position: "left", }, + { + type: "docSidebar", + sidebarId: "integrationSidebar", + label: "Partner Integrations", + position: "left", + }, // {to: '/changelog', label: 'Changelog', position: 'left'} ], diff --git a/sidebars.js b/sidebars.js index faf18bb..adde541 100644 --- a/sidebars.js +++ b/sidebars.js @@ -40,7 +40,7 @@ const sidebars = { integrationSidebar: [ { type: "autogenerated", - dirName: "tutorials", + dirName: "partners", }, ],