@domino-sdk/relay 1.0.0-next.6 → 1.0.0-next.7
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.
- package/README.md +13 -1
- package/build.mjs +18 -1
- package/dist/authoring.d.ts +316 -14
- package/dist/authoring.js +177 -23
- package/dist/avatar.d.ts +29 -0
- package/dist/avatar.js +21 -0
- package/dist/browser.d.ts +168 -165
- package/dist/browser.js +6 -6
- package/dist/catalog-C09gnPYT.d.ts +3948 -0
- package/dist/chunk-7HSTFBMO.js +24 -0
- package/dist/{chunk-5IIWKDFX.js → chunk-ADSP377G.js} +1 -1
- package/dist/{chunk-RTHN22KO.js → chunk-AWLLGCKU.js} +2 -2
- package/dist/chunk-DJZB5RY5.js +901 -0
- package/dist/chunk-SKETUPST.js +171 -0
- package/dist/chunk-UFXBQ6FN.js +257 -0
- package/dist/{chunk-BRESOTKV.js → chunk-UW6R2QGT.js} +604 -723
- package/dist/chunk-V7UKZLHA.js +35 -0
- package/dist/{chunk-ERBVT7GE.js → chunk-X6FJIPXR.js} +166 -724
- package/dist/client-BufGakEt.d.ts +4577 -0
- package/dist/collection-BGneJ6Bk.d.ts +114 -0
- package/dist/images-e6FW9QSx.d.ts +234 -0
- package/dist/index.d.ts +11 -13132
- package/dist/index.js +11 -693
- package/dist/integrations-C3Sp558f.d.ts +1297 -0
- package/dist/internal.d.ts +109 -0
- package/dist/internal.js +104 -0
- package/dist/point-ledgers-iS00Z_v0.d.ts +37 -0
- package/dist/portal-proxy.js +5 -6
- package/dist/profiles-BtOXMGcC.d.ts +297 -0
- package/dist/react/index.d.ts +37 -34
- package/dist/react/index.js +7 -13
- package/dist/schema-DCapSPHz.d.ts +3396 -0
- package/dist/schema.d.ts +3194 -2372
- package/dist/schema.js +539 -3
- package/dist/streaks-CwGReWGt.d.ts +73 -0
- package/dist/submission-input-Bter6XiI.d.ts +2672 -0
- package/dist/units-CwgsPB_r.d.ts +9 -0
- package/dist/wallet-Bu6sqJvQ.d.ts +231 -0
- package/package.json +17 -4
- package/dist/chunk-XEQDW7FM.js +0 -373
- package/dist/chunk-ZKJBCQNI.js +0 -624
- package/dist/submission-input-CZDukyb3.d.ts +0 -4998
package/dist/avatar.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { L as LinkedWallet } from './wallet-Bu6sqJvQ.js';
|
|
2
|
+
import { P as ProfileAvatar } from './profiles-BtOXMGcC.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
|
+
};
|