import { auth, get, post } from "$lib/utils";
import { env } from "$env/dynamic/private";
import tickets from "$lib/tickets";
export const createTicket = async (cookies, username) => {
const { ticket } = await get("/ticket");
const { address } = await post(
`/${username}/invoice`,
{ invoice: { network: "liquid" }, user: { username } },
auth(cookies),
);
const { asset } = await post(
"/assets",
{
address,
name: `Launch Party Ticket ${ticket}`,
ticker: "LPT",
precision: 0,
asset_amount: "1",
token_amount: 0,
domain: "coinos.io",
filename: tickets[ticket],
},
{ authorization: `Bearer ${env.LAUNCH}` },
);
await post("/ticket", { asset }, { authorization: `Bearer ${env.LAUNCH}` });
return asset;
};
='id' value='4bc319a709d27bcdb805294e019d53e25f6e00c5'/>
| coinos ui — legacy coinos.io web app (SvelteKit) | coinos |
blob: 6d9d42306a8dc9f07106602452c04017b5f7ed5d (
plain) (
blame)