@haneullabs/enoki-connect 0.1.0

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.
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __typeError = (msg) => {
7
+ throw TypeError(msg);
8
+ };
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ var __decorateClass = (decorators, target, key, kind) => {
23
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
24
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
25
+ if (decorator = decorators[i])
26
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
27
+ if (kind && result) __defProp(target, key, result);
28
+ return result;
29
+ };
30
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
31
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
32
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
33
+ var modal_exports = {};
34
+ __export(modal_exports, {
35
+ EnokiConnectModal: () => EnokiConnectModal
36
+ });
37
+ module.exports = __toCommonJS(modal_exports);
38
+ var import_lit = require("lit");
39
+ var import_decorators = require("lit/decorators.js");
40
+ var import_base_modal = require("./base-modal.js");
41
+ var _EnokiConnectModal_instances, handleContinue_fn;
42
+ let EnokiConnectModal = class extends import_base_modal.BaseModal {
43
+ constructor() {
44
+ super(...arguments);
45
+ __privateAdd(this, _EnokiConnectModal_instances);
46
+ this.walletName = "";
47
+ this.dappName = "";
48
+ }
49
+ render() {
50
+ return import_lit.html`<dialog
51
+ @click=${this.handleDialogClick}
52
+ @cancel=${this.handleCancel}
53
+ class="modal${this._isClosing ? " closing" : ""}"
54
+ @animationend=${this.handleAnimationEnd}
55
+ >
56
+ <div class="content" @click=${this.handleContentClick}>
57
+ <button
58
+ class="close"
59
+ @click=${this.handleCancel}
60
+ ?disabled=${this.disabled || this._isClosing}
61
+ >
62
+ <svg
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ viewBox="0 0 24 24"
65
+ fill="none"
66
+ stroke="currentColor"
67
+ stroke-width="2"
68
+ stroke-linecap="round"
69
+ stroke-linejoin="round"
70
+ class="lucide lucide-x"
71
+ >
72
+ <path d="M18 6 6 18" />
73
+ <path d="m6 6 12 12" />
74
+ </svg>
75
+ </button>
76
+ <h1 class="title capitalize">${this.walletName} Operation Request</h1>
77
+ <p class="description">
78
+ <span class="capitalize bold">${this.dappName}</span> requested a wallet operation. Click
79
+ continue to open <span class="wallet-name bold">${this.walletName}</span> (in a new tab)
80
+ and review the request.
81
+ </p>
82
+ <div class="footer">
83
+ <button
84
+ class="btn secondary"
85
+ @click=${this.handleCancel}
86
+ ?disabled=${this.disabled || this._isClosing}
87
+ >
88
+ Cancel
89
+ </button>
90
+ <button
91
+ class="btn primary"
92
+ @click=${__privateMethod(this, _EnokiConnectModal_instances, handleContinue_fn)}
93
+ ?disabled=${this.disabled || this._isClosing}
94
+ >
95
+ Continue
96
+ </button>
97
+ </div>
98
+ </div>
99
+ </dialog>`;
100
+ }
101
+ };
102
+ _EnokiConnectModal_instances = new WeakSet();
103
+ handleContinue_fn = function() {
104
+ this.dispatchEvent(new CustomEvent("approved"));
105
+ };
106
+ EnokiConnectModal.styles = import_lit.css`
107
+ :host {
108
+ --modal-font-family: var(
109
+ --font-family,
110
+ ui-sans-serif,
111
+ system-ui,
112
+ -apple-system,
113
+ BlinkMacSystemFont,
114
+ 'Segoe UI',
115
+ Roboto,
116
+ 'Helvetica Neue',
117
+ Arial,
118
+ 'Noto Sans',
119
+ sans-serif,
120
+ 'Apple Color Emoji',
121
+ 'Segoe UI Emoji',
122
+ 'Segoe UI Symbol',
123
+ 'Noto Color Emoji'
124
+ );
125
+ --modal-radius: var(--radius, 0.625rem);
126
+ --modal-background: var(--popover, oklch(1 0 0));
127
+ --modal-foreground: var(--popover-foreground, oklch(0.145 0 0));
128
+ --modal-backdrop: oklch(from var(--modal-background) l c h / 0.4);
129
+ --modal-box-shadow: 0 1px 10px oklch(from var(--modal-foreground) l c h / 0.01);
130
+ --modal-primary: var(--primary, oklch(0.205 0 0));
131
+ --modal-primary-foreground: var(--primary-foreground, oklch(0.985 0 0));
132
+ --modal-primary-hover: color-mix(in oklch, var(--modal-primary) 85%, white);
133
+ --modal-secondary: var(--secondary, oklch(0.97 0 0));
134
+ --modal-secondary-foreground: var(--secondary-foreground, oklch(0.205 0 0));
135
+ --modal-secondary-hover: color-mix(in oklch, var(--modal-secondary) 85%, white);
136
+ --modal-muted-foreground: var(--muted-foreground, oklch(0.556 0 0));
137
+ --modal-accent: var(--accent, oklch(0.97 0 0));
138
+ --modal-accent-foreground: var(--accent-foreground, oklch(0.205 0 0));
139
+ }
140
+ .modal {
141
+ color: var(--modal-foreground);
142
+ border: none;
143
+ animation: fadeIn 250ms ease-in-out forwards;
144
+ max-width: 320px;
145
+ background-color: var(--modal-background);
146
+ border-radius: var(--modal-radius);
147
+ box-shadow: var(--modal-box-shadow);
148
+ padding: 0;
149
+ font-family: var(--modal-font-family);
150
+ }
151
+ .modal::backdrop {
152
+ background-color: var(--modal-backdrop);
153
+ }
154
+ .content {
155
+ padding: 20px;
156
+ display: flex;
157
+ flex-direction: column;
158
+ gap: 10px;
159
+ }
160
+ .capitalize {
161
+ text-transform: capitalize;
162
+ }
163
+ .bold {
164
+ font-weight: 800;
165
+ }
166
+ .title {
167
+ font-size: 16px;
168
+ font-weight: 600;
169
+ line-height: 1.5;
170
+ color: var(--modal-foreground);
171
+ margin: 0;
172
+ }
173
+ .description {
174
+ font-size: 14px;
175
+ line-height: 1.5;
176
+ color: var(--modal-muted-foreground);
177
+ margin: 0;
178
+ }
179
+ .footer {
180
+ display: flex;
181
+ justify-content: flex-end;
182
+ align-items: center;
183
+ gap: 10px;
184
+ }
185
+ .btn {
186
+ border: none;
187
+ border-radius: 6px;
188
+ padding: 8px 14px;
189
+ cursor: pointer;
190
+ transition: background 0.2s;
191
+ font-size: 13px;
192
+ font-weight: 600;
193
+ }
194
+ .btn.primary {
195
+ background: var(--modal-primary);
196
+ color: var(--modal-primary-foreground);
197
+ }
198
+ .btn.primary:hover,
199
+ .btn.primary:focus,
200
+ .btn.primary:active {
201
+ background: var(--modal-primary-hover);
202
+ }
203
+ .btn.secondary {
204
+ background: var(--modal-secondary);
205
+ color: var(--modal-secondary-foreground);
206
+ }
207
+ .btn.secondary:hover,
208
+ .btn.secondary:focus,
209
+ .btn.secondary:active {
210
+ background: var(--modal-secondary-hover);
211
+ }
212
+ button:disabled {
213
+ opacity: 0.5;
214
+ cursor: default;
215
+ }
216
+ .close {
217
+ all: unset;
218
+ position: absolute;
219
+ top: 5px;
220
+ right: 5px;
221
+ background: transparent;
222
+ color: var(--modal-muted-foreground);
223
+ border: none;
224
+ cursor: pointer;
225
+ width: 18px;
226
+ height: 18px;
227
+ border-radius: var(--modal-radius);
228
+ padding: 3px;
229
+ transition: background 0.2s;
230
+ }
231
+ .close:hover,
232
+ .close:focus,
233
+ .close:active {
234
+ background: var(--modal-accent);
235
+ color: var(--modal-accent-foreground);
236
+ }
237
+ .modal.closing {
238
+ animation: fadeOut 250ms ease-in-out forwards;
239
+ }
240
+
241
+ @keyframes fadeIn {
242
+ from {
243
+ transform: translateY(-20px) scale(0.8);
244
+ opacity: 0;
245
+ }
246
+ to {
247
+ opacity: 1;
248
+ }
249
+ }
250
+ @keyframes fadeOut {
251
+ from {
252
+ opacity: 1;
253
+ }
254
+ to {
255
+ transform: translateY(20px) scale(0.8);
256
+ opacity: 0;
257
+ }
258
+ }
259
+ `;
260
+ __decorateClass([
261
+ (0, import_decorators.property)()
262
+ ], EnokiConnectModal.prototype, "walletName", 2);
263
+ __decorateClass([
264
+ (0, import_decorators.property)()
265
+ ], EnokiConnectModal.prototype, "dappName", 2);
266
+ EnokiConnectModal = __decorateClass([
267
+ (0, import_decorators.customElement)("enoki-connect-modal")
268
+ ], EnokiConnectModal);
269
+ //# sourceMappingURL=modal.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/modal.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport { css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { BaseModal } from './base-modal.js';\n\n/**\n * A modal component for displaying wallet operation request fallback UI.\n *\n * @element enoki-connect-modal\n *\n * @prop {string} walletName - The name of the wallet.\n * @prop {string} dappName - The name of the dapp.\n * @prop {boolean} disabled - Whether the modal is disabled.\n * @prop {boolean} open - Whether the modal is open.\n *\n */\n@customElement('enoki-connect-modal')\nexport class EnokiConnectModal extends BaseModal {\n\tstatic styles = css`\n\t\t:host {\n\t\t\t--modal-font-family: var(\n\t\t\t\t--font-family,\n\t\t\t\tui-sans-serif,\n\t\t\t\tsystem-ui,\n\t\t\t\t-apple-system,\n\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t'Segoe UI',\n\t\t\t\tRoboto,\n\t\t\t\t'Helvetica Neue',\n\t\t\t\tArial,\n\t\t\t\t'Noto Sans',\n\t\t\t\tsans-serif,\n\t\t\t\t'Apple Color Emoji',\n\t\t\t\t'Segoe UI Emoji',\n\t\t\t\t'Segoe UI Symbol',\n\t\t\t\t'Noto Color Emoji'\n\t\t\t);\n\t\t\t--modal-radius: var(--radius, 0.625rem);\n\t\t\t--modal-background: var(--popover, oklch(1 0 0));\n\t\t\t--modal-foreground: var(--popover-foreground, oklch(0.145 0 0));\n\t\t\t--modal-backdrop: oklch(from var(--modal-background) l c h / 0.4);\n\t\t\t--modal-box-shadow: 0 1px 10px oklch(from var(--modal-foreground) l c h / 0.01);\n\t\t\t--modal-primary: var(--primary, oklch(0.205 0 0));\n\t\t\t--modal-primary-foreground: var(--primary-foreground, oklch(0.985 0 0));\n\t\t\t--modal-primary-hover: color-mix(in oklch, var(--modal-primary) 85%, white);\n\t\t\t--modal-secondary: var(--secondary, oklch(0.97 0 0));\n\t\t\t--modal-secondary-foreground: var(--secondary-foreground, oklch(0.205 0 0));\n\t\t\t--modal-secondary-hover: color-mix(in oklch, var(--modal-secondary) 85%, white);\n\t\t\t--modal-muted-foreground: var(--muted-foreground, oklch(0.556 0 0));\n\t\t\t--modal-accent: var(--accent, oklch(0.97 0 0));\n\t\t\t--modal-accent-foreground: var(--accent-foreground, oklch(0.205 0 0));\n\t\t}\n\t\t.modal {\n\t\t\tcolor: var(--modal-foreground);\n\t\t\tborder: none;\n\t\t\tanimation: fadeIn 250ms ease-in-out forwards;\n\t\t\tmax-width: 320px;\n\t\t\tbackground-color: var(--modal-background);\n\t\t\tborder-radius: var(--modal-radius);\n\t\t\tbox-shadow: var(--modal-box-shadow);\n\t\t\tpadding: 0;\n\t\t\tfont-family: var(--modal-font-family);\n\t\t}\n\t\t.modal::backdrop {\n\t\t\tbackground-color: var(--modal-backdrop);\n\t\t}\n\t\t.content {\n\t\t\tpadding: 20px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 10px;\n\t\t}\n\t\t.capitalize {\n\t\t\ttext-transform: capitalize;\n\t\t}\n\t\t.bold {\n\t\t\tfont-weight: 800;\n\t\t}\n\t\t.title {\n\t\t\tfont-size: 16px;\n\t\t\tfont-weight: 600;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--modal-foreground);\n\t\t\tmargin: 0;\n\t\t}\n\t\t.description {\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--modal-muted-foreground);\n\t\t\tmargin: 0;\n\t\t}\n\t\t.footer {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\talign-items: center;\n\t\t\tgap: 10px;\n\t\t}\n\t\t.btn {\n\t\t\tborder: none;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 8px 14px;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background 0.2s;\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.btn.primary {\n\t\t\tbackground: var(--modal-primary);\n\t\t\tcolor: var(--modal-primary-foreground);\n\t\t}\n\t\t.btn.primary:hover,\n\t\t.btn.primary:focus,\n\t\t.btn.primary:active {\n\t\t\tbackground: var(--modal-primary-hover);\n\t\t}\n\t\t.btn.secondary {\n\t\t\tbackground: var(--modal-secondary);\n\t\t\tcolor: var(--modal-secondary-foreground);\n\t\t}\n\t\t.btn.secondary:hover,\n\t\t.btn.secondary:focus,\n\t\t.btn.secondary:active {\n\t\t\tbackground: var(--modal-secondary-hover);\n\t\t}\n\t\tbutton:disabled {\n\t\t\topacity: 0.5;\n\t\t\tcursor: default;\n\t\t}\n\t\t.close {\n\t\t\tall: unset;\n\t\t\tposition: absolute;\n\t\t\ttop: 5px;\n\t\t\tright: 5px;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--modal-muted-foreground);\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\twidth: 18px;\n\t\t\theight: 18px;\n\t\t\tborder-radius: var(--modal-radius);\n\t\t\tpadding: 3px;\n\t\t\ttransition: background 0.2s;\n\t\t}\n\t\t.close:hover,\n\t\t.close:focus,\n\t\t.close:active {\n\t\t\tbackground: var(--modal-accent);\n\t\t\tcolor: var(--modal-accent-foreground);\n\t\t}\n\t\t.modal.closing {\n\t\t\tanimation: fadeOut 250ms ease-in-out forwards;\n\t\t}\n\n\t\t@keyframes fadeIn {\n\t\t\tfrom {\n\t\t\t\ttransform: translateY(-20px) scale(0.8);\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tto {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t\t@keyframes fadeOut {\n\t\t\tfrom {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tto {\n\t\t\t\ttransform: translateY(20px) scale(0.8);\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t}\n\t`;\n\n\t@property()\n\twalletName: string = '';\n\t@property()\n\tdappName: string = '';\n\n\t#handleContinue() {\n\t\tthis.dispatchEvent(new CustomEvent('approved'));\n\t}\n\n\toverride render() {\n\t\treturn html`<dialog\n\t\t\t@click=${this.handleDialogClick}\n\t\t\t@cancel=${this.handleCancel}\n\t\t\tclass=\"modal${this._isClosing ? ' closing' : ''}\"\n\t\t\t@animationend=${this.handleAnimationEnd}\n\t\t>\n\t\t\t<div class=\"content\" @click=${this.handleContentClick}>\n\t\t\t\t<button\n\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t@click=${this.handleCancel}\n\t\t\t\t\t?disabled=${this.disabled || this._isClosing}\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\tclass=\"lucide lucide-x\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path d=\"M18 6 6 18\" />\n\t\t\t\t\t\t<path d=\"m6 6 12 12\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t\t<h1 class=\"title capitalize\">${this.walletName} Operation Request</h1>\n\t\t\t\t<p class=\"description\">\n\t\t\t\t\t<span class=\"capitalize bold\">${this.dappName}</span> requested a wallet operation. Click\n\t\t\t\t\tcontinue to open <span class=\"wallet-name bold\">${this.walletName}</span> (in a new tab)\n\t\t\t\t\tand review the request.\n\t\t\t\t</p>\n\t\t\t\t<div class=\"footer\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"btn secondary\"\n\t\t\t\t\t\t@click=${this.handleCancel}\n\t\t\t\t\t\t?disabled=${this.disabled || this._isClosing}\n\t\t\t\t\t>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"btn primary\"\n\t\t\t\t\t\t@click=${this.#handleContinue}\n\t\t\t\t\t\t?disabled=${this.disabled || this._isClosing}\n\t\t\t\t\t>\n\t\t\t\t\t\tContinue\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</dialog>`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'enoki-connect-modal': EnokiConnectModal;\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAA0B;AAC1B,wBAAwC;AACxC,wBAA0B;AAJ1B;AAkBO,IAAM,oBAAN,cAAgC,4BAAU;AAAA,EAA1C;AAAA;AAAA;AA6JN,sBAAqB;AAErB,oBAAmB;AAAA;AAAA,EAMV,SAAS;AACjB,WAAO;AAAA,YACG,KAAK,iBAAiB;AAAA,aACrB,KAAK,YAAY;AAAA,iBACb,KAAK,aAAa,aAAa,EAAE;AAAA,mBAC/B,KAAK,kBAAkB;AAAA;AAAA,iCAET,KAAK,kBAAkB;AAAA;AAAA;AAAA,cAG1C,KAAK,YAAY;AAAA,iBACd,KAAK,YAAY,KAAK,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAgBd,KAAK,UAAU;AAAA;AAAA,qCAEb,KAAK,QAAQ;AAAA,uDACK,KAAK,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAMvD,KAAK,YAAY;AAAA,kBACd,KAAK,YAAY,KAAK,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAMnC,sBAAK,gDAAe;AAAA,kBACjB,KAAK,YAAY,KAAK,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOjD;AACD;AAzNO;AAiKN,oBAAe,WAAG;AACjB,OAAK,cAAc,IAAI,YAAY,UAAU,CAAC;AAC/C;AAnKY,kBACL,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4JhB;AAAA,MADC,4BAAS;AAAA,GA5JE,kBA6JZ;AAEA;AAAA,MADC,4BAAS;AAAA,GA9JE,kBA+JZ;AA/JY,oBAAN;AAAA,MADN,iCAAc,qBAAqB;AAAA,GACvB;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ export { EnokiConnectWallet, registerEnokiConnectWallets, type SupportedNetwork, } from './wallet/index.js';
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
+ EnokiConnectWallet: () => import_wallet.EnokiConnectWallet,
22
+ registerEnokiConnectWallets: () => import_wallet.registerEnokiConnectWallets
23
+ });
24
+ module.exports = __toCommonJS(index_exports);
25
+ var import_wallet = require("./wallet/index.js");
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport {\n\tEnokiConnectWallet,\n\tregisterEnokiConnectWallets,\n\ttype SupportedNetwork,\n} from './wallet/index.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAIO;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "private": true,
3
+ "type": "commonjs"
4
+ }
@@ -0,0 +1,55 @@
1
+ import type { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature, HaneulSignAndExecuteTransactionFeature, HaneulSignPersonalMessageFeature, HaneulSignTransactionBlockFeature, HaneulSignTransactionFeature, Wallet, WalletIcon } from '@haneullabs/wallet-standard';
2
+ import { ReadonlyWalletAccount } from '@haneullabs/wallet-standard';
3
+ import '../components/modal.js';
4
+ export type SupportedNetwork = 'mainnet' | 'testnet' | 'devnet';
5
+ export declare class EnokiConnectWallet implements Wallet {
6
+ #private;
7
+ readonly id: string;
8
+ get name(): string;
9
+ get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
10
+ get version(): "1.0.0";
11
+ get chains(): readonly ["haneul:mainnet", "haneul:testnet", "haneul:devnet"];
12
+ get accounts(): ReadonlyWalletAccount[];
13
+ get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & HaneulSignTransactionBlockFeature & HaneulSignTransactionFeature & HaneulSignPersonalMessageFeature & HaneulSignAndExecuteTransactionFeature;
14
+ constructor({ publicAppSlug, walletName, dappName, hostOrigin, icon, network, }: {
15
+ publicAppSlug: string;
16
+ walletName: string;
17
+ dappName: string;
18
+ network: SupportedNetwork;
19
+ hostOrigin: string;
20
+ icon: WalletIcon;
21
+ });
22
+ }
23
+ /**
24
+ * Registers Enoki Connect wallets for your dApp.
25
+ *
26
+ * This function fetches wallet metadata for the provided public app slugs and registers
27
+ * them with the wallet standard. It returns the registered wallet instances and an
28
+ * `unregister` function to remove them if needed.
29
+ *
30
+ * @param publicAppSlugs - An array of public app slugs to register. You can obtain these slugs from the wallet developer.
31
+ * @param dappName - The display name of your dApp. This will be shown to users in wallet UIs.
32
+ * @param network - (Optional) The default Haneul network to use for wallet operations (when chain is not specified in the wallet method). Accepts 'mainnet', 'testnet', or 'devnet'. Defaults to 'mainnet' if not specified.
33
+ * @param enokiApiUrl - (Optional) The Enoki API endpoint to use for fetching wallet metadata. Defaults to the public Enoki API at 'https://api.enoki.haneullabs.com'. (Override this if you are running a local or custom Enoki API instance.)
34
+ *
35
+ * @returns An object containing:
36
+ * - `wallets`: The array of registered EnokiConnectWallet instances.
37
+ * - `unregister`: A function to unregister all registered wallets.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const { wallets, unregister } = await registerEnokiConnectWallets({
42
+ * publicAppSlugs: ['an-app-slug'],
43
+ * dappName: 'My Dapp',
44
+ * });
45
+ * ```
46
+ */
47
+ export declare function registerEnokiConnectWallets({ publicAppSlugs, dappName, network, enokiApiUrl, }: {
48
+ publicAppSlugs: string[];
49
+ dappName: string;
50
+ network?: SupportedNetwork;
51
+ enokiApiUrl?: string;
52
+ }): Promise<{
53
+ wallets: EnokiConnectWallet[];
54
+ unregister: () => void;
55
+ }>;