-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreateVCCollection.js
22 lines (21 loc) · 1.01 KB
/
createVCCollection.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const options = {
method: "POST",
headers: {
"X-API-KEY": "sk_staging_AGQCMCiEigeFJttJ3BbSjyBDbaxjMW4DB6kQ9vW2hLVaLKc36QQUWdYZHnhYvfTXS4Y9Y4w7VNke1qRStay1nkqCCK2KDpjHa2RdLx54Sm3qUfFUP4AKq5qXQLZcs5SNsFxohxZqgde8rVnJi9WGsDFVnsdVH8ABeq17m4qkGVTfYXxpyFa4CJ16V9rEUgb9SuWsTeob386JVrvQ5q5XZrrV", // Replace with your actual API key
"Content-Type": "application/json",
},
body: JSON.stringify({
chain: "polygon",
credentials: {
type: "urn:uuid:7d2c35d9-6b14-49e5-bb6d-3966c11c597b" // Replace with the ID obtained after creating a credential type
},
metadata: {
name: "Voter Verification Credentials 2024", // Example name, adjust as needed
description: "Collection of verifiable credentials for voter authentication in the 2024 elections." // Example description, adjust as needed
}
}),
};
fetch("https://staging.crossmint.com/api/unstable/collections/", options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));