@domino-sdk/relay 1.0.0-next.2 → 1.0.0-next.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +13 -1
  2. package/build.mjs +18 -1
  3. package/dist/activity-B8k9Sa_a.d.ts +9112 -0
  4. package/dist/authoring.d.ts +1355 -182
  5. package/dist/authoring.js +658 -225
  6. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  7. package/dist/avatar.d.ts +29 -0
  8. package/dist/avatar.js +21 -0
  9. package/dist/browser-J7tUpXxy.d.ts +4154 -0
  10. package/dist/browser.d.ts +11 -4580
  11. package/dist/browser.js +8 -6
  12. package/dist/capability-error-DNMwKmlL.d.ts +458 -0
  13. package/dist/chunk-36HTX2BM.js +1223 -0
  14. package/dist/chunk-6QJ3LADK.js +112 -0
  15. package/dist/chunk-BGGKNIRP.js +171 -0
  16. package/dist/chunk-EYH5RDIE.js +496 -0
  17. package/dist/chunk-GQKYAQM6.js +84 -0
  18. package/dist/chunk-GUP7YRR4.js +42 -0
  19. package/dist/chunk-GZ6FJAXN.js +1659 -0
  20. package/dist/chunk-JON5SESL.js +2986 -0
  21. package/dist/chunk-MC6V6VMG.js +49 -0
  22. package/dist/chunk-NPGENI7K.js +37 -0
  23. package/dist/chunk-V7UKZLHA.js +35 -0
  24. package/dist/chunk-VFHHLN6A.js +284 -0
  25. package/dist/chunk-WJSSJ7AF.js +151 -0
  26. package/dist/{chunk-VH4OQ5VX.js → chunk-XFMSUPNS.js} +26 -5
  27. package/dist/{chunk-FDWRBMB3.js → chunk-ZVIRG24J.js} +150 -33
  28. package/dist/client-XiuFnug_.d.ts +4262 -0
  29. package/dist/groups-Ck-OxzjD.d.ts +2449 -0
  30. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  31. package/dist/images-Dv-P5VBw.d.ts +234 -0
  32. package/dist/index.d.ts +15 -13115
  33. package/dist/index.js +30 -689
  34. package/dist/internal.d.ts +159 -0
  35. package/dist/internal.js +79 -0
  36. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  37. package/dist/outcomes-kVB-Juzs.d.ts +4902 -0
  38. package/dist/pages-BBYD21IE.d.ts +359 -0
  39. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  40. package/dist/portal-proxy.js +26 -9
  41. package/dist/profiles-D2aFcOxu.d.ts +297 -0
  42. package/dist/react/index.d.ts +3378 -3318
  43. package/dist/react/index.js +1635 -783
  44. package/dist/request-error-DWduJCGV.d.ts +62 -0
  45. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  46. package/dist/schema.d.ts +15 -3388
  47. package/dist/schema.js +790 -3
  48. package/dist/server/index.d.ts +81498 -0
  49. package/dist/server/index.js +2520 -0
  50. package/dist/streaks-CWyq8Px5.d.ts +71 -0
  51. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  52. package/dist/units-CwgsPB_r.d.ts +9 -0
  53. package/dist/vite.d.ts +1 -1
  54. package/dist/vite.js +1 -0
  55. package/dist/wallet-YssWxGg8.d.ts +228 -0
  56. package/package.json +24 -5
  57. package/dist/chunk-4KNTMNXA.js +0 -1847
  58. package/dist/chunk-B76BAJ25.js +0 -624
  59. package/dist/chunk-NKGJEYZM.js +0 -1833
  60. package/dist/chunk-ONDBQSMU.js +0 -373
  61. package/dist/submission-input-JDwq3EVK.d.ts +0 -4986
@@ -0,0 +1,29 @@
1
+ import { L as LinkedWallet } from './wallet-YssWxGg8.js';
2
+ import { P as ProfileAvatar } from './profiles-D2aFcOxu.js';
3
+ import 'zod';
4
+
5
+ /**
6
+ * The `<img src>` of a profile's avatar (`profile.avatar`). Pictures from accounts are hotlinked
7
+ * and can disappear: on the image's error event, fall back to `defaultAvatar(avatar.seed)`.
8
+ */
9
+ declare function avatarSrc(avatar: ProfileAvatar): string;
10
+ /**
11
+ * A deterministic SVG avatar for `seed`, as a data URI for an `<img src>`. The same seed always
12
+ * gives the same image.
13
+ *
14
+ * Seed avatars that other people see with a value that reveals nothing, such as the `avatarSeed`
15
+ * Relay returns (`relay.me.get()`), never with a wallet address: anyone could compute the avatar
16
+ * of every holder's address and match members to wallets. Use `walletAvatarSeed` only for a
17
+ * member's own wallets, in their own UI.
18
+ */
19
+ declare function defaultAvatar(seed: string): string;
20
+ /** `defaultAvatar` as raw SVG markup, for inlining during server rendering. */
21
+ declare function defaultAvatarSvg(seed: string): string;
22
+ /**
23
+ * The seed for a wallet shown to its own member, such as in their list of linked wallets. EVM and
24
+ * Cosmos addresses are case-folded, so a checksummed and a lowercase address give one image. Never
25
+ * use it on surfaces other people see (see `defaultAvatar`).
26
+ */
27
+ declare function walletAvatarSeed(wallet: Pick<LinkedWallet, "chain" | "address">): string;
28
+
29
+ export { avatarSrc, defaultAvatar, defaultAvatarSvg, walletAvatarSeed };
package/dist/avatar.js ADDED
@@ -0,0 +1,21 @@
1
+ // src/avatar.ts
2
+ import { createAvatar } from "@dicebear/core";
3
+ import * as shapes from "@dicebear/shapes";
4
+ function avatarSrc(avatar) {
5
+ return avatar.source === "generated" ? defaultAvatar(avatar.seed) : avatar.url;
6
+ }
7
+ function defaultAvatar(seed) {
8
+ return createAvatar(shapes, { seed }).toDataUri();
9
+ }
10
+ function defaultAvatarSvg(seed) {
11
+ return createAvatar(shapes, { seed }).toString();
12
+ }
13
+ function walletAvatarSeed(wallet) {
14
+ return `${wallet.chain}:${wallet.chain === "solana" ? wallet.address : wallet.address.toLowerCase()}`;
15
+ }
16
+ export {
17
+ avatarSrc,
18
+ defaultAvatar,
19
+ defaultAvatarSvg,
20
+ walletAvatarSeed
21
+ };