Skip to content

Commit

Permalink
js: add number art custom background
Browse files Browse the repository at this point in the history
  • Loading branch information
dr497 committed Aug 28, 2024
1 parent 51ef34c commit 342605b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions js/src/custom-bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const RETARDIO_KEY = new PublicKey(
"J2Q2j6kpSg7tq8JzueCHNTQNcyNnQkvr85RhsFnYZWeG",
);

const NUMBER_ART_KEY = new PublicKey(
"6vwnZJZNQjtY4zR93YUuyeDUBhacLLH2mQaZiJAvVwzu",
);

export const getCustomBgKeys = (domain: string, customBg: CustomBg) => {
const hashedBg = getHashedNameSync(customBg);
const hashedDomain = getHashedNameSync(domain);
Expand All @@ -41,6 +45,17 @@ export const getArtistPubkey = (bg: CustomBg): PublicKey => {
return RETARDIO_KEY;
case CustomBg.Retardio3:
return RETARDIO_KEY;
case CustomBg.NumberArt0:
case CustomBg.NumberArt1:
case CustomBg.NumberArt2:
case CustomBg.NumberArt3:
case CustomBg.NumberArt4:
case CustomBg.NumberArt5:
case CustomBg.NumberArt6:
case CustomBg.NumberArt7:
case CustomBg.NumberArt8:
case CustomBg.NumberArt9:
return NUMBER_ART_KEY;
default:
throw new InvalidCustomBgError("The given background is invalid");
}
Expand Down
10 changes: 10 additions & 0 deletions js/src/types/custom-bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@ export enum CustomBg {
Retardio1 = "Retardio#1",
Retardio2 = "Retardio#2",
Retardio3 = "Retardio#3",
NumberArt0 = "NumberArt#0",
NumberArt1 = "NumberArt#1",
NumberArt2 = "NumberArt#2",
NumberArt3 = "NumberArt#3",
NumberArt4 = "NumberArt#4",
NumberArt5 = "NumberArt#5",
NumberArt6 = "NumberArt#6",
NumberArt7 = "NumberArt#7",
NumberArt8 = "NumberArt#8",
NumberArt9 = "NumberArt#9",
}

0 comments on commit 342605b

Please sign in to comment.