//native
type Clerk = {
apiKey: string;
};
/**
* Delete a user web3 wallet
* Delete the web3 wallet identification for a given user.
*/
export async function main(
auth: Clerk,
user_id: string,
web3_wallet_identification_id: string,
) {
const url = new URL(
`https://api.clerk.com/v1/users/${user_id}/web3_wallets/${web3_wallet_identification_id}`,
);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: "Bearer " + auth.apiKey,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 428 days ago