@mysten/zksend 0.12.25 → 0.12.27

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 (44) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/wallet/channel/index.js +2 -2
  3. package/dist/cjs/wallet/channel/index.js.map +2 -2
  4. package/dist/esm/wallet/channel/index.js +2 -2
  5. package/dist/esm/wallet/channel/index.js.map +2 -2
  6. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  7. package/dist/tsconfig.tsbuildinfo +1 -1
  8. package/package.json +5 -3
  9. package/dist/cjs/experimental/index.d.ts +0 -2
  10. package/dist/cjs/experimental/index.js +0 -30
  11. package/dist/cjs/experimental/index.js.map +0 -7
  12. package/dist/cjs/experimental/utils/withResolvers.d.ts +0 -6
  13. package/dist/cjs/experimental/utils/withResolvers.js +0 -33
  14. package/dist/cjs/experimental/utils/withResolvers.js.map +0 -7
  15. package/dist/cjs/experimental/wallet/channel/events.d.ts +0 -144
  16. package/dist/cjs/experimental/wallet/channel/events.js +0 -108
  17. package/dist/cjs/experimental/wallet/channel/events.js.map +0 -7
  18. package/dist/cjs/experimental/wallet/channel/index.d.ts +0 -56
  19. package/dist/cjs/experimental/wallet/channel/index.js +0 -198
  20. package/dist/cjs/experimental/wallet/channel/index.js.map +0 -7
  21. package/dist/cjs/experimental/wallet/index.d.ts +0 -36
  22. package/dist/cjs/experimental/wallet/index.js +0 -344
  23. package/dist/cjs/experimental/wallet/index.js.map +0 -7
  24. package/dist/cjs/utils/withResolvers.d.ts +0 -6
  25. package/dist/cjs/utils/withResolvers.js +0 -33
  26. package/dist/cjs/utils/withResolvers.js.map +0 -7
  27. package/dist/esm/experimental/index.d.ts +0 -2
  28. package/dist/esm/experimental/index.js +0 -10
  29. package/dist/esm/experimental/index.js.map +0 -7
  30. package/dist/esm/experimental/utils/withResolvers.d.ts +0 -6
  31. package/dist/esm/experimental/utils/withResolvers.js +0 -13
  32. package/dist/esm/experimental/utils/withResolvers.js.map +0 -7
  33. package/dist/esm/experimental/wallet/channel/events.d.ts +0 -144
  34. package/dist/esm/experimental/wallet/channel/events.js +0 -100
  35. package/dist/esm/experimental/wallet/channel/events.js.map +0 -7
  36. package/dist/esm/experimental/wallet/channel/index.d.ts +0 -56
  37. package/dist/esm/experimental/wallet/channel/index.js +0 -178
  38. package/dist/esm/experimental/wallet/channel/index.js.map +0 -7
  39. package/dist/esm/experimental/wallet/index.d.ts +0 -36
  40. package/dist/esm/experimental/wallet/index.js +0 -319
  41. package/dist/esm/experimental/wallet/index.js.map +0 -7
  42. package/dist/esm/utils/withResolvers.d.ts +0 -6
  43. package/dist/esm/utils/withResolvers.js +0 -13
  44. package/dist/esm/utils/withResolvers.js.map +0 -7
@@ -1,144 +0,0 @@
1
- import type { InferOutput } from 'valibot';
2
- export declare const StashedRequestData: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
3
- readonly type: import("valibot").LiteralSchema<"connect", undefined>;
4
- }, undefined>, import("valibot").ObjectSchema<{
5
- readonly type: import("valibot").LiteralSchema<"sign-transaction", undefined>;
6
- readonly transaction: import("valibot").StringSchema<"`transaction` is required">;
7
- readonly address: import("valibot").StringSchema<"`address` is required">;
8
- readonly chain: import("valibot").StringSchema<"`chain` is required">;
9
- readonly session: import("valibot").StringSchema<"`session` is required">;
10
- }, undefined>, import("valibot").ObjectSchema<{
11
- readonly type: import("valibot").LiteralSchema<"sign-and-execute-transaction", undefined>;
12
- readonly transaction: import("valibot").StringSchema<"`transaction` is required">;
13
- readonly address: import("valibot").StringSchema<"`address` is required">;
14
- readonly chain: import("valibot").StringSchema<"`chain` is required">;
15
- readonly session: import("valibot").StringSchema<"`session` is required">;
16
- }, undefined>, import("valibot").ObjectSchema<{
17
- readonly type: import("valibot").LiteralSchema<"sign-personal-message", undefined>;
18
- readonly chain: import("valibot").OptionalSchema<import("valibot").StringSchema<"`chain` is required">, never>;
19
- readonly message: import("valibot").StringSchema<"`message` is required">;
20
- readonly address: import("valibot").StringSchema<"`address` is required">;
21
- readonly session: import("valibot").StringSchema<"`session` is required">;
22
- }, undefined>], undefined>;
23
- export type StashedRequestData = InferOutput<typeof StashedRequestData>;
24
- export declare const StashedRequest: import("valibot").ObjectSchema<{
25
- readonly version: import("valibot").LiteralSchema<"v1", undefined>;
26
- readonly requestId: import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"`requestId` is required">, import("valibot").UuidAction<string, undefined>]>;
27
- readonly appUrl: import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").UrlAction<string, "`appUrl` must be a valid URL">]>;
28
- readonly appName: import("valibot").StringSchema<"`appName` is required">;
29
- readonly payload: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
30
- readonly type: import("valibot").LiteralSchema<"connect", undefined>;
31
- }, undefined>, import("valibot").ObjectSchema<{
32
- readonly type: import("valibot").LiteralSchema<"sign-transaction", undefined>;
33
- readonly transaction: import("valibot").StringSchema<"`transaction` is required">;
34
- readonly address: import("valibot").StringSchema<"`address` is required">;
35
- readonly chain: import("valibot").StringSchema<"`chain` is required">;
36
- readonly session: import("valibot").StringSchema<"`session` is required">;
37
- }, undefined>, import("valibot").ObjectSchema<{
38
- readonly type: import("valibot").LiteralSchema<"sign-and-execute-transaction", undefined>;
39
- readonly transaction: import("valibot").StringSchema<"`transaction` is required">;
40
- readonly address: import("valibot").StringSchema<"`address` is required">;
41
- readonly chain: import("valibot").StringSchema<"`chain` is required">;
42
- readonly session: import("valibot").StringSchema<"`session` is required">;
43
- }, undefined>, import("valibot").ObjectSchema<{
44
- readonly type: import("valibot").LiteralSchema<"sign-personal-message", undefined>;
45
- readonly chain: import("valibot").OptionalSchema<import("valibot").StringSchema<"`chain` is required">, never>;
46
- readonly message: import("valibot").StringSchema<"`message` is required">;
47
- readonly address: import("valibot").StringSchema<"`address` is required">;
48
- readonly session: import("valibot").StringSchema<"`session` is required">;
49
- }, undefined>], undefined>;
50
- readonly metadata: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").AnySchema, undefined>, never>;
51
- }, undefined>;
52
- export type StashedRequest = InferOutput<typeof StashedRequest>;
53
- export declare const StashedResponseData: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
54
- readonly type: import("valibot").LiteralSchema<"connect", undefined>;
55
- readonly accounts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
56
- readonly address: import("valibot").StringSchema<"`address` is required">;
57
- readonly publicKey: import("valibot").OptionalSchema<import("valibot").StringSchema<"`publicKey` must be a string">, never>;
58
- }, undefined>, undefined>;
59
- readonly session: import("valibot").StringSchema<"`session` is required">;
60
- }, undefined>, import("valibot").ObjectSchema<{
61
- readonly type: import("valibot").LiteralSchema<"sign-transaction", undefined>;
62
- readonly bytes: import("valibot").StringSchema<undefined>;
63
- readonly signature: import("valibot").StringSchema<undefined>;
64
- }, undefined>, import("valibot").ObjectSchema<{
65
- readonly type: import("valibot").LiteralSchema<"sign-and-execute-transaction", undefined>;
66
- readonly bytes: import("valibot").StringSchema<undefined>;
67
- readonly signature: import("valibot").StringSchema<undefined>;
68
- readonly digest: import("valibot").StringSchema<undefined>;
69
- readonly effects: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, never>;
70
- }, undefined>, import("valibot").ObjectSchema<{
71
- readonly type: import("valibot").LiteralSchema<"sign-personal-message", undefined>;
72
- readonly bytes: import("valibot").StringSchema<undefined>;
73
- readonly signature: import("valibot").StringSchema<undefined>;
74
- }, undefined>], undefined>;
75
- export type StashedResponseData = InferOutput<typeof StashedResponseData>;
76
- export declare const StashedResponsePayload: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
77
- readonly type: import("valibot").LiteralSchema<"reject", undefined>;
78
- readonly reason: import("valibot").OptionalSchema<import("valibot").StringSchema<"`reason` must be a string">, never>;
79
- }, undefined>, import("valibot").ObjectSchema<{
80
- readonly type: import("valibot").LiteralSchema<"resolve", undefined>;
81
- readonly data: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
82
- readonly type: import("valibot").LiteralSchema<"connect", undefined>;
83
- readonly accounts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
84
- readonly address: import("valibot").StringSchema<"`address` is required">;
85
- readonly publicKey: import("valibot").OptionalSchema<import("valibot").StringSchema<"`publicKey` must be a string">, never>;
86
- }, undefined>, undefined>;
87
- readonly session: import("valibot").StringSchema<"`session` is required">;
88
- }, undefined>, import("valibot").ObjectSchema<{
89
- readonly type: import("valibot").LiteralSchema<"sign-transaction", undefined>;
90
- readonly bytes: import("valibot").StringSchema<undefined>;
91
- readonly signature: import("valibot").StringSchema<undefined>;
92
- }, undefined>, import("valibot").ObjectSchema<{
93
- readonly type: import("valibot").LiteralSchema<"sign-and-execute-transaction", undefined>;
94
- readonly bytes: import("valibot").StringSchema<undefined>;
95
- readonly signature: import("valibot").StringSchema<undefined>;
96
- readonly digest: import("valibot").StringSchema<undefined>;
97
- readonly effects: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, never>;
98
- }, undefined>, import("valibot").ObjectSchema<{
99
- readonly type: import("valibot").LiteralSchema<"sign-personal-message", undefined>;
100
- readonly bytes: import("valibot").StringSchema<undefined>;
101
- readonly signature: import("valibot").StringSchema<undefined>;
102
- }, undefined>], undefined>;
103
- }, undefined>], undefined>;
104
- export type StashedResponsePayload = InferOutput<typeof StashedResponsePayload>;
105
- export declare const StashedResponse: import("valibot").ObjectSchema<{
106
- readonly id: import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
107
- readonly source: import("valibot").LiteralSchema<"stashed-channel", undefined>;
108
- readonly payload: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
109
- readonly type: import("valibot").LiteralSchema<"reject", undefined>;
110
- readonly reason: import("valibot").OptionalSchema<import("valibot").StringSchema<"`reason` must be a string">, never>;
111
- }, undefined>, import("valibot").ObjectSchema<{
112
- readonly type: import("valibot").LiteralSchema<"resolve", undefined>;
113
- readonly data: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
114
- readonly type: import("valibot").LiteralSchema<"connect", undefined>;
115
- readonly accounts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
116
- readonly address: import("valibot").StringSchema<"`address` is required">;
117
- readonly publicKey: import("valibot").OptionalSchema<import("valibot").StringSchema<"`publicKey` must be a string">, never>;
118
- }, undefined>, undefined>;
119
- readonly session: import("valibot").StringSchema<"`session` is required">;
120
- }, undefined>, import("valibot").ObjectSchema<{
121
- readonly type: import("valibot").LiteralSchema<"sign-transaction", undefined>;
122
- readonly bytes: import("valibot").StringSchema<undefined>;
123
- readonly signature: import("valibot").StringSchema<undefined>;
124
- }, undefined>, import("valibot").ObjectSchema<{
125
- readonly type: import("valibot").LiteralSchema<"sign-and-execute-transaction", undefined>;
126
- readonly bytes: import("valibot").StringSchema<undefined>;
127
- readonly signature: import("valibot").StringSchema<undefined>;
128
- readonly digest: import("valibot").StringSchema<undefined>;
129
- readonly effects: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, never>;
130
- }, undefined>, import("valibot").ObjectSchema<{
131
- readonly type: import("valibot").LiteralSchema<"sign-personal-message", undefined>;
132
- readonly bytes: import("valibot").StringSchema<undefined>;
133
- readonly signature: import("valibot").StringSchema<undefined>;
134
- }, undefined>], undefined>;
135
- }, undefined>], undefined>;
136
- readonly version: import("valibot").LiteralSchema<"v1", undefined>;
137
- }, undefined>;
138
- export type StashedResponse = InferOutput<typeof StashedResponse>;
139
- export type StashedRequestTypes = Record<string, any> & {
140
- [P in StashedRequestData as P['type']]: P;
141
- };
142
- export type StashedResponseTypes = {
143
- [P in StashedResponseData as P['type']]: P;
144
- };
@@ -1,100 +0,0 @@
1
- import {
2
- any,
3
- array,
4
- literal,
5
- object,
6
- optional,
7
- pipe,
8
- record,
9
- string,
10
- url,
11
- uuid,
12
- variant
13
- } from "valibot";
14
- const StashedRequestData = variant("type", [
15
- object({
16
- type: literal("connect")
17
- }),
18
- object({
19
- type: literal("sign-transaction"),
20
- transaction: string("`transaction` is required"),
21
- address: string("`address` is required"),
22
- chain: string("`chain` is required"),
23
- session: string("`session` is required")
24
- }),
25
- object({
26
- type: literal("sign-and-execute-transaction"),
27
- transaction: string("`transaction` is required"),
28
- address: string("`address` is required"),
29
- chain: string("`chain` is required"),
30
- session: string("`session` is required")
31
- }),
32
- object({
33
- type: literal("sign-personal-message"),
34
- chain: optional(string("`chain` is required")),
35
- message: string("`message` is required"),
36
- address: string("`address` is required"),
37
- session: string("`session` is required")
38
- })
39
- ]);
40
- const StashedRequest = object({
41
- version: literal("v1"),
42
- requestId: pipe(string("`requestId` is required"), uuid()),
43
- appUrl: pipe(string(), url("`appUrl` must be a valid URL")),
44
- appName: string("`appName` is required"),
45
- payload: StashedRequestData,
46
- metadata: optional(record(string(), any()))
47
- });
48
- const StashedResponseData = variant("type", [
49
- object({
50
- type: literal("connect"),
51
- accounts: array(
52
- object({
53
- address: string("`address` is required"),
54
- publicKey: optional(string("`publicKey` must be a string"))
55
- })
56
- ),
57
- session: string("`session` is required")
58
- }),
59
- object({
60
- type: literal("sign-transaction"),
61
- bytes: string(),
62
- signature: string()
63
- }),
64
- object({
65
- type: literal("sign-and-execute-transaction"),
66
- bytes: string(),
67
- signature: string(),
68
- digest: string(),
69
- effects: optional(string())
70
- }),
71
- object({
72
- type: literal("sign-personal-message"),
73
- bytes: string(),
74
- signature: string()
75
- })
76
- ]);
77
- const StashedResponsePayload = variant("type", [
78
- object({
79
- type: literal("reject"),
80
- reason: optional(string("`reason` must be a string"))
81
- }),
82
- object({
83
- type: literal("resolve"),
84
- data: StashedResponseData
85
- })
86
- ]);
87
- const StashedResponse = object({
88
- id: pipe(string(), uuid()),
89
- source: literal("stashed-channel"),
90
- payload: StashedResponsePayload,
91
- version: literal("v1")
92
- });
93
- export {
94
- StashedRequest,
95
- StashedRequestData,
96
- StashedResponse,
97
- StashedResponseData,
98
- StashedResponsePayload
99
- };
100
- //# sourceMappingURL=events.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/experimental/wallet/channel/events.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { InferOutput } from 'valibot';\nimport {\n\tany,\n\tarray,\n\tliteral,\n\tobject,\n\toptional,\n\tpipe,\n\trecord,\n\tstring,\n\turl,\n\tuuid,\n\tvariant,\n} from 'valibot';\n\nexport const StashedRequestData = variant('type', [\n\tobject({\n\t\ttype: literal('connect'),\n\t}),\n\tobject({\n\t\ttype: literal('sign-transaction'),\n\t\ttransaction: string('`transaction` is required'),\n\t\taddress: string('`address` is required'),\n\t\tchain: string('`chain` is required'),\n\t\tsession: string('`session` is required'),\n\t}),\n\tobject({\n\t\ttype: literal('sign-and-execute-transaction'),\n\t\ttransaction: string('`transaction` is required'),\n\t\taddress: string('`address` is required'),\n\t\tchain: string('`chain` is required'),\n\t\tsession: string('`session` is required'),\n\t}),\n\tobject({\n\t\ttype: literal('sign-personal-message'),\n\t\tchain: optional(string('`chain` is required')),\n\t\tmessage: string('`message` is required'),\n\t\taddress: string('`address` is required'),\n\t\tsession: string('`session` is required'),\n\t}),\n]);\nexport type StashedRequestData = InferOutput<typeof StashedRequestData>;\n\nexport const StashedRequest = object({\n\tversion: literal('v1'),\n\trequestId: pipe(string('`requestId` is required'), uuid()),\n\tappUrl: pipe(string(), url('`appUrl` must be a valid URL')),\n\tappName: string('`appName` is required'),\n\tpayload: StashedRequestData,\n\tmetadata: optional(record(string(), any())),\n});\n\nexport type StashedRequest = InferOutput<typeof StashedRequest>;\n\nexport const StashedResponseData = variant('type', [\n\tobject({\n\t\ttype: literal('connect'),\n\t\taccounts: array(\n\t\t\tobject({\n\t\t\t\taddress: string('`address` is required'),\n\t\t\t\tpublicKey: optional(string('`publicKey` must be a string')),\n\t\t\t}),\n\t\t),\n\t\tsession: string('`session` is required'),\n\t}),\n\tobject({\n\t\ttype: literal('sign-transaction'),\n\t\tbytes: string(),\n\t\tsignature: string(),\n\t}),\n\tobject({\n\t\ttype: literal('sign-and-execute-transaction'),\n\t\tbytes: string(),\n\t\tsignature: string(),\n\t\tdigest: string(),\n\t\teffects: optional(string()),\n\t}),\n\tobject({\n\t\ttype: literal('sign-personal-message'),\n\t\tbytes: string(),\n\t\tsignature: string(),\n\t}),\n]);\nexport type StashedResponseData = InferOutput<typeof StashedResponseData>;\n\nexport const StashedResponsePayload = variant('type', [\n\tobject({\n\t\ttype: literal('reject'),\n\t\treason: optional(string('`reason` must be a string')),\n\t}),\n\tobject({\n\t\ttype: literal('resolve'),\n\t\tdata: StashedResponseData,\n\t}),\n]);\nexport type StashedResponsePayload = InferOutput<typeof StashedResponsePayload>;\n\nexport const StashedResponse = object({\n\tid: pipe(string(), uuid()),\n\tsource: literal('stashed-channel'),\n\tpayload: StashedResponsePayload,\n\tversion: literal('v1'),\n});\nexport type StashedResponse = InferOutput<typeof StashedResponse>;\n\nexport type StashedRequestTypes = Record<string, any> & {\n\t[P in StashedRequestData as P['type']]: P;\n};\n\nexport type StashedResponseTypes = {\n\t[P in StashedResponseData as P['type']]: P;\n};\n"],
5
- "mappings": "AAIA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEA,MAAM,qBAAqB,QAAQ,QAAQ;AAAA,EACjD,OAAO;AAAA,IACN,MAAM,QAAQ,SAAS;AAAA,EACxB,CAAC;AAAA,EACD,OAAO;AAAA,IACN,MAAM,QAAQ,kBAAkB;AAAA,IAChC,aAAa,OAAO,2BAA2B;AAAA,IAC/C,SAAS,OAAO,uBAAuB;AAAA,IACvC,OAAO,OAAO,qBAAqB;AAAA,IACnC,SAAS,OAAO,uBAAuB;AAAA,EACxC,CAAC;AAAA,EACD,OAAO;AAAA,IACN,MAAM,QAAQ,8BA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AAC;AAAA,EACD,OAAO;AAAA,IACN,MAAM,QAAQ,uBAAuB;AAAA,IACrC,OAAO,OAAO;AAAA,IACd,WAAW,OAAO;AAAA,EACnB,CAAC;AACF,CAAC;AAGM,MAAM,yBAAyB,QAAQ,QAAQ;AAAA,EACrD,OAAO;AAAA,IACN,MAAM,QAAQ,QAAQ;AAAA,IACtB,QAAQ,SAAS,OAAO,2BAA2B,CAAC;AAAA,EACrD,CAAC;AAAA,EACD,OAAO;AAAA,IACN,MAAM,QAAQ,SAAS;AAAA,IACvB,MAAM;AAAA,EACP,CAAC;AACF,CAAC;AAGM,MAAM,kBAAkB,OAAO;AAAA,EACrC,IAAI,KAAK,OAAO,GAAG,KAAK,CAAC;AAAA,EACzB,QAAQ,QAAQ,iBAAiB;AAAA,EACjC,SAAS;AAAA,EACT,SAAS,QAAQ,IAAI;AACtB,CAAC;",
6
- "names": []
7
- }
@@ -1,56 +0,0 @@
1
- import type { InferOutput } from 'valibot';
2
- import type { StashedRequestData, StashedResponsePayload, StashedResponseTypes } from './events.js';
3
- import { StashedRequest, StashedResponse } from './events.js';
4
- export declare const DEFAULT_STASHED_ORIGIN = "https://getstashed.com";
5
- export { StashedRequest, StashedResponse };
6
- export declare class StashedPopup {
7
- #private;
8
- constructor({ name, origin, chain, }: {
9
- name: string;
10
- origin?: string;
11
- chain?: string;
12
- });
13
- send<T extends StashedRequestData['type']>({ type, ...data }: {
14
- type: T;
15
- } & Extract<StashedRequestData, {
16
- type: T;
17
- }>): Promise<StashedResponseTypes[T]>;
18
- close(): void;
19
- }
20
- export declare class StashedHost {
21
- #private;
22
- constructor(request: InferOutput<typeof StashedRequest>);
23
- static fromPayload(payload: StashedRequest): StashedHost;
24
- getRequestData(): {
25
- version: "v1";
26
- payload: {
27
- type: "connect";
28
- } | {
29
- type: "sign-transaction";
30
- address: string;
31
- transaction: string;
32
- chain: string;
33
- session: string;
34
- } | {
35
- type: "sign-and-execute-transaction";
36
- address: string;
37
- transaction: string;
38
- chain: string;
39
- session: string;
40
- } | {
41
- type: "sign-personal-message";
42
- message: string;
43
- address: string;
44
- session: string;
45
- chain?: string | undefined;
46
- };
47
- requestId: string;
48
- appUrl: string;
49
- appName: string;
50
- metadata?: {
51
- [x: string]: any;
52
- } | undefined;
53
- };
54
- sendMessage(payload: StashedResponsePayload): void;
55
- close(payload?: StashedResponsePayload): void;
56
- }
@@ -1,178 +0,0 @@
1
- var __typeError = (msg) => {
2
- throw TypeError(msg);
3
- };
4
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
6
- 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);
7
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
9
- var _popup, _version, _id, _origin, _name, _chain, _promise, _resolve, _reject, _interval, _listener, _StashedPopup_instances, cleanup_fn, _request;
10
- import { parse, safeParse } from "valibot";
11
- import { withResolvers } from "../../utils/withResolvers.js";
12
- import { StashedRequest, StashedResponse } from "./events.js";
13
- const DEFAULT_STASHED_ORIGIN = "https://getstashed.com";
14
- const getClientMetadata = () => {
15
- return {
16
- version: "v1",
17
- originUrl: window.location.href,
18
- userAgent: navigator.userAgent,
19
- screenResolution: `${window.screen.width}x${window.screen.height}`,
20
- language: navigator.language,
21
- platform: navigator.platform,
22
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
23
- timestamp: Date.now()
24
- };
25
- };
26
- class StashedPopup {
27
- constructor({
28
- name,
29
- origin = DEFAULT_STASHED_ORIGIN,
30
- chain
31
- }) {
32
- __privateAdd(this, _StashedPopup_instances);
33
- __privateAdd(this, _popup);
34
- __privateAdd(this, _version);
35
- __privateAdd(this, _id);
36
- __privateAdd(this, _origin);
37
- __privateAdd(this, _name);
38
- __privateAdd(this, _chain);
39
- __privateAdd(this, _promise);
40
- __privateAdd(this, _resolve);
41
- __privateAdd(this, _reject);
42
- __privateAdd(this, _interval, null);
43
- __privateAdd(this, _listener, (event) => {
44
- if (event.origin !== __privateGet(this, _origin)) {
45
- return;
46
- }
47
- const { success, output } = safeParse(StashedResponse, event.data);
48
- if (!success || output.id !== __privateGet(this, _id)) return;
49
- __privateMethod(this, _StashedPopup_instances, cleanup_fn).call(this);
50
- if (output.payload.type === "reject") {
51
- __privateGet(this, _reject).call(this, new Error("User rejected the request"));
52
- } else if (output.payload.type === "resolve") {
53
- __privateGet(this, _resolve).call(this, output.payload.data);
54
- }
55
- });
56
- const popup = window.open("about:blank", "_blank");
57
- if (!popup) {
58
- throw new Error("Failed to open new window");
59
- }
60
- __privateSet(this, _popup, popup);
61
- __privateSet(this, _id, crypto.randomUUID());
62
- __privateSet(this, _origin, origin);
63
- __privateSet(this, _name, name);
64
- __privateSet(this, _version, "v1");
65
- __privateSet(this, _chain, chain);
66
- const { promise, resolve, reject } = withResolvers();
67
- __privateSet(this, _promise, promise);
68
- __privateSet(this, _resolve, resolve);
69
- __privateSet(this, _reject, reject);
70
- __privateSet(this, _interval, setInterval(() => {
71
- try {
72
- if (__privateGet(this, _popup).closed) {
73
- __privateMethod(this, _StashedPopup_instances, cleanup_fn).call(this);
74
- reject(new Error("User closed the Stashed window"));
75
- }
76
- } catch {
77
- }
78
- }, 1e3));
79
- }
80
- send({
81
- type,
82
- ...data
83
- }) {
84
- window.addEventListener("message", __privateGet(this, _listener));
85
- const requestData = {
86
- version: __privateGet(this, _version),
87
- requestId: __privateGet(this, _id),
88
- appUrl: window.location.href.split("#")[0],
89
- appName: __privateGet(this, _name),
90
- payload: {
91
- type,
92
- chain: __privateGet(this, _chain),
93
- ...data
94
- },
95
- metadata: getClientMetadata()
96
- };
97
- const encodedRequestData = btoa(JSON.stringify(requestData));
98
- __privateGet(this, _popup).location.assign(
99
- `${__privateGet(this, _origin)}/dapp-request${data ? `#${encodedRequestData}` : ""}`
100
- );
101
- return __privateGet(this, _promise);
102
- }
103
- close() {
104
- __privateMethod(this, _StashedPopup_instances, cleanup_fn).call(this);
105
- __privateGet(this, _popup).close();
106
- }
107
- }
108
- _popup = new WeakMap();
109
- _version = new WeakMap();
110
- _id = new WeakMap();
111
- _origin = new WeakMap();
112
- _name = new WeakMap();
113
- _chain = new WeakMap();
114
- _promise = new WeakMap();
115
- _resolve = new WeakMap();
116
- _reject = new WeakMap();
117
- _interval = new WeakMap();
118
- _listener = new WeakMap();
119
- _StashedPopup_instances = new WeakSet();
120
- cleanup_fn = function() {
121
- if (__privateGet(this, _interval)) {
122
- clearInterval(__privateGet(this, _interval));
123
- __privateSet(this, _interval, null);
124
- }
125
- window.removeEventListener("message", __privateGet(this, _listener));
126
- };
127
- const _StashedHost = class _StashedHost {
128
- constructor(request) {
129
- __privateAdd(this, _request);
130
- if (typeof window === "undefined" || !window.opener) {
131
- throw new Error(
132
- "StashedHost can only be used in a window opened through `window.open`. `window.opener` is not available."
133
- );
134
- }
135
- __privateSet(this, _request, request);
136
- }
137
- static fromPayload(payload) {
138
- const { requestId, appUrl, appName, version, ...rest } = payload;
139
- const request = parse(StashedRequest, {
140
- version,
141
- requestId,
142
- appUrl,
143
- appName,
144
- ...rest
145
- });
146
- return new _StashedHost(request);
147
- }
148
- getRequestData() {
149
- return __privateGet(this, _request);
150
- }
151
- sendMessage(payload) {
152
- window.opener.postMessage(
153
- {
154
- id: __privateGet(this, _request).requestId,
155
- source: "stashed-channel",
156
- payload,
157
- version: __privateGet(this, _request).version
158
- },
159
- __privateGet(this, _request).appUrl
160
- );
161
- }
162
- close(payload) {
163
- if (payload) {
164
- this.sendMessage(payload);
165
- }
166
- window.close();
167
- }
168
- };
169
- _request = new WeakMap();
170
- let StashedHost = _StashedHost;
171
- export {
172
- DEFAULT_STASHED_ORIGIN,
173
- StashedHost,
174
- StashedPopup,
175
- StashedRequest,
176
- StashedResponse
177
- };
178
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/experimental/wallet/channel/index.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { InferOutput } from 'valibot';\nimport { parse, safeParse } from 'valibot';\n\nimport { withResolvers } from '../../utils/withResolvers.js';\nimport type { StashedRequestData, StashedResponsePayload, StashedResponseTypes } from './events.js';\nimport { StashedRequest, StashedResponse } from './events.js';\n\nexport const DEFAULT_STASHED_ORIGIN = 'https://getstashed.com';\n\nexport { StashedRequest, StashedResponse };\n\nconst getClientMetadata = () => {\n\treturn {\n\t\tversion: 'v1',\n\t\toriginUrl: window.location.href,\n\t\tuserAgent: navigator.userAgent,\n\t\tscreenResolution: `${window.screen.width}x${window.screen.height}`,\n\t\tlanguage: navigator.language,\n\t\tplatform: navigator.platform,\n\t\ttimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n\t\ttimestamp: Date.now(),\n\t};\n};\n\nexport class StashedPopup {\n\t#popup: Window;\n\n\t#version: string;\n\t#id: string;\n\t#origin: string;\n\t#name: string;\n\t#chain: string | undefined;\n\n\t#promise: Promise<unknown>;\n\t#resolve: (data: unknown) => void;\n\t#reject: (error: Error) => void;\n\n\t#interval: ReturnType<typeof setInterval> | null = null;\n\n\tconstructor({\n\t\tname,\n\t\torigin = DEFAULT_STASHED_ORIGIN,\n\t\tchain,\n\t}: {\n\t\tname: string;\n\t\torigin?: string;\n\t\tchain?: string;\n\t}) {\n\t\tconst popup = window.open('about:blank', '_blank');\n\n\t\tif (!popup) {\n\t\t\tthrow new Error('Failed to open new window');\n\t\t}\n\t\tthis.#popup = popup;\n\n\t\tthis.#id = crypto.randomUUID();\n\t\tthis.#origin = origin;\n\t\tthis.#name = name;\n\t\tthis.#version = 'v1';\n\t\tthis.#chain = chain;\n\t\tconst { promise, resolve, reject } = withResolvers();\n\t\tthis.#promise = promise;\n\t\tthis.#resolve = resolve;\n\t\tthis.#reject = reject;\n\n\t\tthis.#interval = setInterval(() => {\n\t\t\ttry {\n\t\t\t\tif (this.#popup.closed) {\n\t\t\t\t\tthis.#cleanup();\n\t\t\t\t\treject(new Error('User closed the Stashed window'));\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// This can error during the login flow, but that's fine.\n\t\t\t}\n\t\t}, 1000);\n\t}\n\n\tsend<T extends StashedRequestData['type']>({\n\t\ttype,\n\t\t...data\n\t}: {\n\t\ttype: T;\n\t} & Extract<StashedRequestData, { type: T }>): Promise<StashedResponseTypes[T]> {\n\t\twindow.addEventListener('message', this.#listener);\n\n\t\tconst requestData = {\n\t\t\tversion: this.#version,\n\t\t\trequestId: this.#id,\n\t\t\tappUrl: window.location.href.split('#')[0],\n\t\t\tappName: this.#name,\n\t\t\tpayload: {\n\t\t\t\ttype,\n\t\t\t\tchain: this.#chain,\n\t\t\t\t...data,\n\t\t\t},\n\t\t\tmetadata: getClientMetadata(),\n\t\t};\n\t\tconst encodedRequestData = btoa(JSON.stringify(requestData));\n\n\t\tthis.#popup.location.assign(\n\t\t\t`${this.#origin}/dapp-request${data ? `#${encodedRequestData}` : ''}`,\n\t\t);\n\n\t\treturn this.#promise as Promise<StashedResponseTypes[T]>;\n\t}\n\n\tclose() {\n\t\tthis.#cleanup();\n\t\tthis.#popup.close();\n\t}\n\n\t#listener = (event: MessageEvent) => {\n\t\tif (event.origin !== this.#origin) {\n\t\t\treturn;\n\t\t}\n\t\tconst { success, output } = safeParse(StashedResponse, event.data);\n\t\tif (!success || output.id !== this.#id) return;\n\n\t\tthis.#cleanup();\n\n\t\tif (output.payload.type === 'reject') {\n\t\t\tthis.#reject(new Error('User rejected the request'));\n\t\t} else if (output.payload.type === 'resolve') {\n\t\t\tthis.#resolve(output.payload.data);\n\t\t}\n\t};\n\n\t#cleanup() {\n\t\tif (this.#interval) {\n\t\t\tclearInterval(this.#interval);\n\t\t\tthis.#interval = null;\n\t\t}\n\t\twindow.removeEventListener('message', this.#listener);\n\t}\n}\n\nexport class StashedHost {\n\t#request: InferOutput<typeof StashedRequest>;\n\n\tconstructor(request: InferOutput<typeof StashedRequest>) {\n\t\tif (typeof window === 'undefined' || !window.opener) {\n\t\t\tthrow new Error(\n\t\t\t\t'StashedHost can only be used in a window opened through `window.open`. `window.opener` is not available.',\n\t\t\t);\n\t\t}\n\n\t\tthis.#request = request;\n\t}\n\n\tstatic fromPayload(payload: StashedRequest) {\n\t\tconst { requestId, appUrl, appName, version, ...rest } = payload;\n\n\t\tconst request = parse(StashedRequest, {\n\t\t\tversion,\n\t\t\trequestId,\n\t\t\tappUrl,\n\t\t\tappName,\n\t\t\t...rest,\n\t\t});\n\n\t\treturn new StashedHost(request);\n\t}\n\n\tgetRequestData() {\n\t\treturn this.#request;\n\t}\n\n\tsendMessage(payload: StashedResponsePayload) {\n\t\twindow.opener.postMessage(\n\t\t\t{\n\t\t\t\tid: this.#request.requestId,\n\t\t\t\tsource: 'stashed-channel',\n\t\t\t\tpayload,\n\t\t\t\tversion: this.#request.version,\n\t\t\t} satisfies StashedResponse,\n\t\t\tthis.#request.appUrl,\n\t\t);\n\t}\n\n\tclose(payload?: StashedResponsePayload) {\n\t\tif (payload) {\n\t\t\tthis.sendMessage(payload);\n\t\t}\n\t\twindow.close();\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;AAAA;AAIA,SAAS,OAAO,iBAAiB;AAEjC,SAAS,qBAAqB;AAE9B,SAAS,gBAAgB,uBAAuB;AAEzC,MAAM,yBAAyB;AAItC,MAAM,oBAAoB,MAAM;AAC/B,SAAO;AAAA,IACN,SAAS;AAAA,IACT,WAAW,OAAO,SAAS;AAAA,IAC3B,WAAW,UAAU;AAAA,IACrB,kBAAkB,GAAG,OAAO,OAAO,KAAK,IAAI,OAAO,OAAO,MAAM;AAAA,IAChE,UAAU,UAAU;AAAA,IACpB,UAAU,UAAU;AAAA,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G;AAAA,IACJ,CAAC;AAED,WAAO,IAAI,aAAY,OAAO;AAAA,EAC/B;AAAA,EAEA,iBAAiB;AAChB,WAAO,mBAAK;AAAA,EACb;AAAA,EAEA,YAAY,SAAiC;AAC5C,WAAO,OAAO;AAAA,MACb;AAAA,QACC,IAAI,mBAAK,UAAS;AAAA,QAClB,QAAQ;AAAA,QACR;AAAA,QACA,SAAS,mBAAK,UAAS;AAAA,MACxB;AAAA,MACA,mBAAK,UAAS;AAAA,IACf;AAAA,EACD;AAAA,EAEA,MAAM,SAAkC;AACvC,QAAI,SAAS;AACZ,WAAK,YAAY,OAAO;AAAA,IACzB;AACA,WAAO,MAAM;AAAA,EACd;AACD;AAhDC;AADM,IAAM,cAAN;",
6
- "names": []
7
- }
@@ -1,36 +0,0 @@
1
- import type { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature, SuiChain, SuiSignAndExecuteTransactionFeature, SuiSignPersonalMessageFeature, SuiSignTransactionBlockFeature, SuiSignTransactionFeature, Wallet } from '@mysten/wallet-standard';
2
- import { ReadonlyWalletAccount } from '@mysten/wallet-standard';
3
- import type { InferOutput } from 'valibot';
4
- export declare const STASHED_WALLET_NAME: "Stashed";
5
- declare const WalletMetadataSchema: import("valibot").ObjectSchema<{
6
- readonly id: import("valibot").StringSchema<"Wallet ID is required">;
7
- readonly walletName: import("valibot").StringSchema<"Wallet name is required">;
8
- readonly icon: import("valibot").StringSchema<"Icon must be a valid wallet icon format">;
9
- readonly enabled: import("valibot").BooleanSchema<"Enabled is required">;
10
- }, undefined>;
11
- type WalletMetadata = InferOutput<typeof WalletMetadataSchema>;
12
- export declare class StashedWallet implements Wallet {
13
- #private;
14
- get name(): string;
15
- get id(): string;
16
- get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
17
- get version(): "1.0.0";
18
- get chains(): readonly ["sui:devnet", "sui:testnet", "sui:localnet", "sui:mainnet"];
19
- get accounts(): ReadonlyWalletAccount[];
20
- get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SuiSignTransactionBlockFeature & SuiSignTransactionFeature & SuiSignPersonalMessageFeature & SuiSignAndExecuteTransactionFeature;
21
- constructor({ name, origin, metadata, }: {
22
- name: string;
23
- origin?: string;
24
- chain?: SuiChain;
25
- metadata: WalletMetadata;
26
- });
27
- removeAccount(address: string): void;
28
- }
29
- export declare function registerStashedWallet(name: string, { origin, metadataApiUrl, }?: {
30
- origin?: string;
31
- metadataApiUrl?: string;
32
- }): Promise<{
33
- wallet: StashedWallet;
34
- unregister: () => void;
35
- } | undefined>;
36
- export {};