You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to implement the /get_teen_accounts endpoint in the Vault backend. This endpoint is responsible for retrieving all the teen accounts controlled by a specific account.
Details
Method: GET
Path: /get_teen_accounts
Summary: Get all the teen accounts controlled by this account.
Request Parameters:
address: The StarkNet address for which the teen accounts are to be retrieved.
Response:
Status Code: 200
Description: Successful retrieval of teen accounts
The teen accounts are represented as an array of hexadecimal strings.
Example
// Import necessary modulesimportfastifyfrom'fastify';// Create Fastify instanceconstapp=fastify({logger: true});// Define the get_teen_accounts endpointapp.get('/get_teen_accounts',async(request,reply)=>{try{// Logic to retrieve the teen accounts goes here// Return the teen accountsreturn["0x0123456789abcdefABCDEF0123456789abcdefABCDEF0123456789abcdefABCD","0x1234567890abcdefABCDEF0123456789abcdefABCDEF0123456789abcdefABC","0xABCDEF0123456789abcdef0123456789abcdefABCDEF0123456789abcdef0123",
...
];}catch(error){// Handle errorsconsole.error('Error while retrieving teen accounts:',error);returnreply.status(500).send({error: 'Internal Server Error'});}});
Tasks:
Implement the /get_teen_accounts endpoint.
The text was updated successfully, but these errors were encountered:
Description
We need to implement the
/get_teen_accounts
endpoint in the Vault backend. This endpoint is responsible for retrieving all the teen accounts controlled by a specific account.Details
Request Parameters:
Response:
Notes:
The teen accounts are represented as an array of hexadecimal strings.
Example
Tasks:
/get_teen_accounts
endpoint.The text was updated successfully, but these errors were encountered: