@cartridge/controller 0.5.4 → 0.5.6
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/.turbo/turbo-build$colon$deps.log +39 -36
- package/.turbo/turbo-build.log +40 -37
- package/dist/account.d.ts +2 -2
- package/dist/account.js.map +1 -1
- package/dist/controller.d.ts +3 -3
- package/dist/controller.js +41 -12
- package/dist/controller.js.map +1 -1
- package/dist/iframe/base.d.ts +2 -2
- package/dist/iframe/base.js +13 -1
- package/dist/iframe/base.js.map +1 -1
- package/dist/iframe/index.d.ts +2 -2
- package/dist/iframe/index.js +20 -4
- package/dist/iframe/index.js.map +1 -1
- package/dist/iframe/keychain.d.ts +2 -2
- package/dist/iframe/keychain.js +13 -1
- package/dist/iframe/keychain.js.map +1 -1
- package/dist/iframe/profile.d.ts +2 -2
- package/dist/iframe/profile.js +20 -4
- package/dist/iframe/profile.js.map +1 -1
- package/dist/index.d-BbTUPBeO.d.ts +68 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8656 -14
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +2 -2
- package/dist/session/account.d.ts +2 -2
- package/dist/session/account.js.map +1 -1
- package/dist/session/index.d.ts +2 -2
- package/dist/session/index.js.map +1 -1
- package/dist/session/provider.d.ts +2 -2
- package/dist/session/provider.js.map +1 -1
- package/dist/telegram/provider.d.ts +2 -2
- package/dist/telegram/provider.js.map +1 -1
- package/dist/{types-1WsOoNO2.d.ts → types-BReKRAuh.d.ts} +11 -5
- package/dist/types.d.ts +2 -2
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +4 -2
- package/dist/utils.js +1 -0
- package/dist/utils.js.map +1 -1
- package/package.json +3 -4
- package/src/controller.ts +20 -7
- package/src/iframe/base.ts +17 -2
- package/src/iframe/profile.ts +9 -3
- package/src/types.ts +5 -2
- package/src/utils.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @cartridge/controller@0.5.
|
|
2
|
+
> @cartridge/controller@0.5.6 build:deps /home/runner/work/controller/controller/packages/controller
|
|
3
3
|
> tsup --dts-resolve
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/account.ts, src/constants.ts, src/controller.ts, src/errors.ts, src/icon.ts, src/index.ts, src/lookup.ts, src/provider.ts, src/types.ts, src/utils.ts, src/iframe/base.ts, src/iframe/index.ts, src/iframe/keychain.ts, src/iframe/profile.ts, src/session/account.ts, src/session/backend.ts, src/session/index.ts, src/session/provider.ts, src/telegram/backend.ts, src/telegram/provider.ts
|
|
@@ -10,46 +10,46 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[32mESM[39m [1mdist/account.js [22m[32m2.81 KB[39m
|
|
13
|
-
[32mESM[39m [1mdist/iframe/base.js [22m[32m3.
|
|
13
|
+
[32mESM[39m [1mdist/iframe/base.js [22m[32m3.64 KB[39m
|
|
14
14
|
[32mESM[39m [1mdist/session/account.js [22m[32m2.25 KB[39m
|
|
15
15
|
[32mESM[39m [1mdist/telegram/backend.js [22m[32m1.27 KB[39m
|
|
16
16
|
[32mESM[39m [1mdist/constants.js [22m[32m247.00 B[39m
|
|
17
|
-
[32mESM[39m [1mdist/controller.js [22m[
|
|
17
|
+
[32mESM[39m [1mdist/controller.js [22m[32m33.08 KB[39m
|
|
18
18
|
[32mESM[39m [1mdist/errors.js [22m[32m271.00 B[39m
|
|
19
19
|
[32mESM[39m [1mdist/icon.js [22m[32m15.15 KB[39m
|
|
20
|
-
[32mESM[39m [1mdist/index.js [22m[32m36.44 KB[39m
|
|
21
20
|
[32mESM[39m [1mdist/lookup.js [22m[32m1.59 KB[39m
|
|
22
21
|
[32mESM[39m [1mdist/provider.js [22m[32m19.16 KB[39m
|
|
23
22
|
[32mESM[39m [1mdist/types.js [22m[32m437.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist/utils.js [22m[32m2.
|
|
25
|
-
[32mESM[39m [1mdist/iframe/index.js [22m[
|
|
26
|
-
[32mESM[39m [1mdist/iframe/keychain.js [22m[
|
|
27
|
-
[32mESM[39m [1mdist/iframe/profile.js [22m[32m4.
|
|
23
|
+
[32mESM[39m [1mdist/utils.js [22m[32m2.77 KB[39m
|
|
24
|
+
[32mESM[39m [1mdist/iframe/index.js [22m[32m5.16 KB[39m
|
|
25
|
+
[32mESM[39m [1mdist/iframe/keychain.js [22m[32m4.12 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/iframe/profile.js [22m[32m4.69 KB[39m
|
|
28
27
|
[32mESM[39m [1mdist/session/backend.js [22m[32m1.18 KB[39m
|
|
29
28
|
[32mESM[39m [1mdist/session/index.js [22m[32m24.95 KB[39m
|
|
30
29
|
[32mESM[39m [1mdist/session/provider.js [22m[32m24.35 KB[39m
|
|
31
30
|
[32mESM[39m [1mdist/telegram/provider.js [22m[32m23.91 KB[39m
|
|
32
|
-
[32mESM[39m [1mdist/
|
|
33
|
-
[32mESM[39m [1mdist/
|
|
34
|
-
[32mESM[39m [1mdist/
|
|
31
|
+
[32mESM[39m [1mdist/index.js [22m[32m256.75 KB[39m
|
|
32
|
+
[32mESM[39m [1mdist/account.js.map [22m[32m8.82 KB[39m
|
|
33
|
+
[32mESM[39m [1mdist/iframe/base.js.map [22m[32m7.08 KB[39m
|
|
34
|
+
[32mESM[39m [1mdist/session/account.js.map [22m[32m11.19 KB[39m
|
|
35
35
|
[32mESM[39m [1mdist/telegram/backend.js.map [22m[32m1.98 KB[39m
|
|
36
36
|
[32mESM[39m [1mdist/constants.js.map [22m[32m315.00 B[39m
|
|
37
|
-
[32mESM[39m [1mdist/controller.js.map [22m[
|
|
37
|
+
[32mESM[39m [1mdist/controller.js.map [22m[32m53.64 KB[39m
|
|
38
38
|
[32mESM[39m [1mdist/errors.js.map [22m[32m385.00 B[39m
|
|
39
39
|
[32mESM[39m [1mdist/icon.js.map [22m[32m15.20 KB[39m
|
|
40
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m61.84 KB[39m
|
|
41
40
|
[32mESM[39m [1mdist/lookup.js.map [22m[32m3.49 KB[39m
|
|
42
|
-
[32mESM[39m [1mdist/types.js.map [22m[32m4.66 KB[39m
|
|
43
41
|
[32mESM[39m [1mdist/provider.js.map [22m[32m22.49 KB[39m
|
|
44
|
-
[32mESM[39m [1mdist/
|
|
45
|
-
[32mESM[39m [1mdist/
|
|
46
|
-
[32mESM[39m [1mdist/iframe/
|
|
47
|
-
[32mESM[39m [1mdist/iframe/
|
|
42
|
+
[32mESM[39m [1mdist/types.js.map [22m[32m4.75 KB[39m
|
|
43
|
+
[32mESM[39m [1mdist/utils.js.map [22m[32m5.65 KB[39m
|
|
44
|
+
[32mESM[39m [1mdist/iframe/index.js.map [22m[32m10.47 KB[39m
|
|
45
|
+
[32mESM[39m [1mdist/iframe/keychain.js.map [22m[32m8.27 KB[39m
|
|
46
|
+
[32mESM[39m [1mdist/iframe/profile.js.map [22m[32m9.47 KB[39m
|
|
48
47
|
[32mESM[39m [1mdist/session/backend.js.map [22m[32m2.88 KB[39m
|
|
49
|
-
[32mESM[39m [1mdist/session/index.js.map [22m[32m40.
|
|
50
|
-
[32mESM[39m [1mdist/session/provider.js.map [22m[32m35.
|
|
48
|
+
[32mESM[39m [1mdist/session/index.js.map [22m[32m40.19 KB[39m
|
|
49
|
+
[32mESM[39m [1mdist/session/provider.js.map [22m[32m35.19 KB[39m
|
|
51
50
|
[32mESM[39m [1mdist/telegram/provider.js.map [22m[32m34.36 KB[39m
|
|
52
|
-
[32mESM[39m
|
|
51
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m386.34 KB[39m
|
|
52
|
+
[32mESM[39m ⚡️ Build success in 115ms
|
|
53
53
|
[34mDTS[39m Build start
|
|
54
54
|
../tsconfig/base.json(6,25): error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
|
|
55
55
|
|
|
@@ -91,25 +91,28 @@
|
|
|
91
91
|
|
|
92
92
|
../tsconfig/base.json(6,25): error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
[32mDTS[39m
|
|
97
|
-
[32mDTS[39m [1mdist/
|
|
94
|
+
../tsconfig/base.json(6,25): error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
|
|
95
|
+
|
|
96
|
+
[32mDTS[39m ⚡️ Build success in 8658ms
|
|
97
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.29 KB[39m
|
|
98
|
+
[32mDTS[39m [1mdist/session/index.d.ts [22m[32m739.00 B[39m
|
|
99
|
+
[32mDTS[39m [1mdist/account.d.ts [22m[32m1.63 KB[39m
|
|
98
100
|
[32mDTS[39m [1mdist/constants.d.ts [22m[32m215.00 B[39m
|
|
99
101
|
[32mDTS[39m [1mdist/icon.d.ts [22m[32m15.11 KB[39m
|
|
100
|
-
[32mDTS[39m [1mdist/controller.d.ts [22m[32m1.
|
|
102
|
+
[32mDTS[39m [1mdist/controller.d.ts [22m[32m1.11 KB[39m
|
|
101
103
|
[32mDTS[39m [1mdist/lookup.d.ts [22m[32m216.00 B[39m
|
|
102
|
-
[32mDTS[39m [1mdist/utils.d.ts [22m[
|
|
104
|
+
[32mDTS[39m [1mdist/utils.d.ts [22m[32m725.00 B[39m
|
|
103
105
|
[32mDTS[39m [1mdist/session/account.d.ts [22m[32m1.83 KB[39m
|
|
104
106
|
[32mDTS[39m [1mdist/session/backend.d.ts [22m[32m2.29 KB[39m
|
|
105
107
|
[32mDTS[39m [1mdist/errors.d.ts [22m[32m100.00 B[39m
|
|
106
|
-
[32mDTS[39m [1mdist/session/provider.d.ts [22m[
|
|
108
|
+
[32mDTS[39m [1mdist/session/provider.d.ts [22m[32m980.00 B[39m
|
|
107
109
|
[32mDTS[39m [1mdist/telegram/backend.d.ts [22m[32m1.27 KB[39m
|
|
108
|
-
[32mDTS[39m [1mdist/telegram/provider.d.ts [22m[
|
|
109
|
-
[32mDTS[39m [1mdist/provider.d.ts [22m[
|
|
110
|
-
[32mDTS[39m [1mdist/iframe/base.d.ts [22m[
|
|
111
|
-
[32mDTS[39m [1mdist/iframe/keychain.d.ts [22m[
|
|
112
|
-
[32mDTS[39m [1mdist/iframe/profile.d.ts [22m[
|
|
113
|
-
[32mDTS[39m [1mdist/iframe/index.d.ts [22m[
|
|
114
|
-
[32mDTS[39m [1mdist/types.d.ts [22m[
|
|
115
|
-
[32mDTS[39m [1mdist/
|
|
110
|
+
[32mDTS[39m [1mdist/telegram/provider.d.ts [22m[32m840.00 B[39m
|
|
111
|
+
[32mDTS[39m [1mdist/provider.d.ts [22m[32m775.00 B[39m
|
|
112
|
+
[32mDTS[39m [1mdist/iframe/base.d.ts [22m[32m184.00 B[39m
|
|
113
|
+
[32mDTS[39m [1mdist/iframe/keychain.d.ts [22m[32m172.00 B[39m
|
|
114
|
+
[32mDTS[39m [1mdist/iframe/profile.d.ts [22m[32m198.00 B[39m
|
|
115
|
+
[32mDTS[39m [1mdist/iframe/index.d.ts [22m[32m252.00 B[39m
|
|
116
|
+
[32mDTS[39m [1mdist/types.d.ts [22m[32m605.00 B[39m
|
|
117
|
+
[32mDTS[39m [1mdist/index.d-BbTUPBeO.d.ts [22m[32m2.15 KB[39m
|
|
118
|
+
[32mDTS[39m [1mdist/types-BReKRAuh.d.ts [22m[32m6.22 KB[39m
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @cartridge/controller@0.5.
|
|
2
|
+
> @cartridge/controller@0.5.6 build /home/runner/work/controller/controller/packages/controller
|
|
3
3
|
> pnpm build:deps
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @cartridge/controller@0.5.
|
|
6
|
+
> @cartridge/controller@0.5.6 build:deps /home/runner/work/controller/controller/packages/controller
|
|
7
7
|
> tsup --dts-resolve
|
|
8
8
|
|
|
9
9
|
[34mCLI[39m Building entry: src/account.ts, src/constants.ts, src/controller.ts, src/errors.ts, src/icon.ts, src/index.ts, src/lookup.ts, src/provider.ts, src/types.ts, src/utils.ts, src/iframe/base.ts, src/iframe/index.ts, src/iframe/keychain.ts, src/iframe/profile.ts, src/session/account.ts, src/session/backend.ts, src/session/index.ts, src/session/provider.ts, src/telegram/backend.ts, src/telegram/provider.ts
|
|
@@ -15,45 +15,45 @@
|
|
|
15
15
|
[34mESM[39m Build start
|
|
16
16
|
[32mESM[39m [1mdist/account.js [22m[32m2.81 KB[39m
|
|
17
17
|
[32mESM[39m [1mdist/constants.js [22m[32m247.00 B[39m
|
|
18
|
-
[32mESM[39m [1mdist/controller.js [22m[
|
|
18
|
+
[32mESM[39m [1mdist/controller.js [22m[32m33.08 KB[39m
|
|
19
19
|
[32mESM[39m [1mdist/errors.js [22m[32m271.00 B[39m
|
|
20
20
|
[32mESM[39m [1mdist/icon.js [22m[32m15.15 KB[39m
|
|
21
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
21
|
+
[32mESM[39m [1mdist/index.js [22m[32m256.75 KB[39m
|
|
22
22
|
[32mESM[39m [1mdist/lookup.js [22m[32m1.59 KB[39m
|
|
23
23
|
[32mESM[39m [1mdist/provider.js [22m[32m19.16 KB[39m
|
|
24
24
|
[32mESM[39m [1mdist/types.js [22m[32m437.00 B[39m
|
|
25
|
-
[32mESM[39m [1mdist/utils.js [22m[32m2.
|
|
26
|
-
[32mESM[39m [1mdist/iframe/base.js [22m[32m3.
|
|
27
|
-
[32mESM[39m [1mdist/iframe/index.js [22m[
|
|
28
|
-
[32mESM[39m [1mdist/iframe/keychain.js [22m[
|
|
29
|
-
[32mESM[39m [1mdist/iframe/profile.js [22m[32m4.
|
|
25
|
+
[32mESM[39m [1mdist/utils.js [22m[32m2.77 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/iframe/base.js [22m[32m3.64 KB[39m
|
|
27
|
+
[32mESM[39m [1mdist/iframe/index.js [22m[32m5.16 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/iframe/keychain.js [22m[32m4.12 KB[39m
|
|
29
|
+
[32mESM[39m [1mdist/iframe/profile.js [22m[32m4.69 KB[39m
|
|
30
30
|
[32mESM[39m [1mdist/session/account.js [22m[32m2.25 KB[39m
|
|
31
31
|
[32mESM[39m [1mdist/session/backend.js [22m[32m1.18 KB[39m
|
|
32
32
|
[32mESM[39m [1mdist/session/index.js [22m[32m24.95 KB[39m
|
|
33
33
|
[32mESM[39m [1mdist/session/provider.js [22m[32m24.35 KB[39m
|
|
34
34
|
[32mESM[39m [1mdist/telegram/backend.js [22m[32m1.27 KB[39m
|
|
35
35
|
[32mESM[39m [1mdist/telegram/provider.js [22m[32m23.91 KB[39m
|
|
36
|
-
[32mESM[39m [1mdist/account.js.map [22m[32m8.
|
|
36
|
+
[32mESM[39m [1mdist/account.js.map [22m[32m8.82 KB[39m
|
|
37
37
|
[32mESM[39m [1mdist/constants.js.map [22m[32m315.00 B[39m
|
|
38
|
-
[32mESM[39m [1mdist/controller.js.map [22m[
|
|
38
|
+
[32mESM[39m [1mdist/controller.js.map [22m[32m53.64 KB[39m
|
|
39
39
|
[32mESM[39m [1mdist/errors.js.map [22m[32m385.00 B[39m
|
|
40
40
|
[32mESM[39m [1mdist/icon.js.map [22m[32m15.20 KB[39m
|
|
41
|
-
[32mESM[39m [1mdist/index.js.map [22m[
|
|
41
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m386.34 KB[39m
|
|
42
42
|
[32mESM[39m [1mdist/lookup.js.map [22m[32m3.49 KB[39m
|
|
43
43
|
[32mESM[39m [1mdist/provider.js.map [22m[32m22.49 KB[39m
|
|
44
|
-
[32mESM[39m [1mdist/types.js.map [22m[32m4.
|
|
45
|
-
[32mESM[39m [1mdist/utils.js.map [22m[32m5.
|
|
46
|
-
[32mESM[39m [1mdist/iframe/base.js.map [22m[
|
|
47
|
-
[32mESM[39m [1mdist/iframe/index.js.map [22m[
|
|
48
|
-
[32mESM[39m [1mdist/iframe/keychain.js.map [22m[
|
|
49
|
-
[32mESM[39m [1mdist/iframe/profile.js.map [22m[
|
|
50
|
-
[32mESM[39m [1mdist/session/account.js.map [22m[32m11.
|
|
44
|
+
[32mESM[39m [1mdist/types.js.map [22m[32m4.75 KB[39m
|
|
45
|
+
[32mESM[39m [1mdist/utils.js.map [22m[32m5.65 KB[39m
|
|
46
|
+
[32mESM[39m [1mdist/iframe/base.js.map [22m[32m7.08 KB[39m
|
|
47
|
+
[32mESM[39m [1mdist/iframe/index.js.map [22m[32m10.47 KB[39m
|
|
48
|
+
[32mESM[39m [1mdist/iframe/keychain.js.map [22m[32m8.27 KB[39m
|
|
49
|
+
[32mESM[39m [1mdist/iframe/profile.js.map [22m[32m9.47 KB[39m
|
|
50
|
+
[32mESM[39m [1mdist/session/account.js.map [22m[32m11.19 KB[39m
|
|
51
51
|
[32mESM[39m [1mdist/session/backend.js.map [22m[32m2.88 KB[39m
|
|
52
|
-
[32mESM[39m [1mdist/session/index.js.map [22m[32m40.
|
|
53
|
-
[32mESM[39m [1mdist/session/provider.js.map [22m[32m35.
|
|
52
|
+
[32mESM[39m [1mdist/session/index.js.map [22m[32m40.19 KB[39m
|
|
53
|
+
[32mESM[39m [1mdist/session/provider.js.map [22m[32m35.19 KB[39m
|
|
54
54
|
[32mESM[39m [1mdist/telegram/backend.js.map [22m[32m1.98 KB[39m
|
|
55
55
|
[32mESM[39m [1mdist/telegram/provider.js.map [22m[32m34.36 KB[39m
|
|
56
|
-
[32mESM[39m ⚡️ Build success in
|
|
56
|
+
[32mESM[39m ⚡️ Build success in 185ms
|
|
57
57
|
[34mDTS[39m Build start
|
|
58
58
|
../tsconfig/base.json(6,25): error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
|
|
59
59
|
|
|
@@ -95,25 +95,28 @@
|
|
|
95
95
|
|
|
96
96
|
../tsconfig/base.json(6,25): error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
[32mDTS[39m
|
|
101
|
-
[32mDTS[39m [1mdist/
|
|
98
|
+
../tsconfig/base.json(6,25): error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.
|
|
99
|
+
|
|
100
|
+
[32mDTS[39m ⚡️ Build success in 8311ms
|
|
101
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.29 KB[39m
|
|
102
|
+
[32mDTS[39m [1mdist/session/index.d.ts [22m[32m739.00 B[39m
|
|
103
|
+
[32mDTS[39m [1mdist/account.d.ts [22m[32m1.63 KB[39m
|
|
102
104
|
[32mDTS[39m [1mdist/constants.d.ts [22m[32m215.00 B[39m
|
|
103
105
|
[32mDTS[39m [1mdist/icon.d.ts [22m[32m15.11 KB[39m
|
|
104
|
-
[32mDTS[39m [1mdist/controller.d.ts [22m[32m1.
|
|
106
|
+
[32mDTS[39m [1mdist/controller.d.ts [22m[32m1.11 KB[39m
|
|
105
107
|
[32mDTS[39m [1mdist/lookup.d.ts [22m[32m216.00 B[39m
|
|
106
|
-
[32mDTS[39m [1mdist/utils.d.ts [22m[
|
|
108
|
+
[32mDTS[39m [1mdist/utils.d.ts [22m[32m725.00 B[39m
|
|
107
109
|
[32mDTS[39m [1mdist/session/account.d.ts [22m[32m1.83 KB[39m
|
|
108
110
|
[32mDTS[39m [1mdist/session/backend.d.ts [22m[32m2.29 KB[39m
|
|
109
111
|
[32mDTS[39m [1mdist/errors.d.ts [22m[32m100.00 B[39m
|
|
110
|
-
[32mDTS[39m [1mdist/session/provider.d.ts [22m[
|
|
112
|
+
[32mDTS[39m [1mdist/session/provider.d.ts [22m[32m980.00 B[39m
|
|
111
113
|
[32mDTS[39m [1mdist/telegram/backend.d.ts [22m[32m1.27 KB[39m
|
|
112
|
-
[32mDTS[39m [1mdist/telegram/provider.d.ts [22m[
|
|
113
|
-
[32mDTS[39m [1mdist/provider.d.ts [22m[
|
|
114
|
-
[32mDTS[39m [1mdist/iframe/base.d.ts [22m[
|
|
115
|
-
[32mDTS[39m [1mdist/iframe/keychain.d.ts [22m[
|
|
116
|
-
[32mDTS[39m [1mdist/iframe/profile.d.ts [22m[
|
|
117
|
-
[32mDTS[39m [1mdist/iframe/index.d.ts [22m[
|
|
118
|
-
[32mDTS[39m [1mdist/types.d.ts [22m[
|
|
119
|
-
[32mDTS[39m [1mdist/
|
|
114
|
+
[32mDTS[39m [1mdist/telegram/provider.d.ts [22m[32m840.00 B[39m
|
|
115
|
+
[32mDTS[39m [1mdist/provider.d.ts [22m[32m775.00 B[39m
|
|
116
|
+
[32mDTS[39m [1mdist/iframe/base.d.ts [22m[32m184.00 B[39m
|
|
117
|
+
[32mDTS[39m [1mdist/iframe/keychain.d.ts [22m[32m172.00 B[39m
|
|
118
|
+
[32mDTS[39m [1mdist/iframe/profile.d.ts [22m[32m198.00 B[39m
|
|
119
|
+
[32mDTS[39m [1mdist/iframe/index.d.ts [22m[32m252.00 B[39m
|
|
120
|
+
[32mDTS[39m [1mdist/types.d.ts [22m[32m605.00 B[39m
|
|
121
|
+
[32mDTS[39m [1mdist/index.d-BbTUPBeO.d.ts [22m[32m2.15 KB[39m
|
|
122
|
+
[32mDTS[39m [1mdist/types-BReKRAuh.d.ts [22m[32m6.22 KB[39m
|
package/dist/account.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WalletAccount, AllowArray, Call, InvokeFunctionResponse, TypedData } from 'starknet';
|
|
2
2
|
import { SPEC } from '@starknet-io/types-js';
|
|
3
|
-
import { K as Keychain, j as KeychainOptions, M as Modal } from './types-
|
|
3
|
+
import { K as Keychain, j as KeychainOptions, M as Modal } from './types-BReKRAuh.js';
|
|
4
4
|
import { AsyncMethodReturns } from '@cartridge/penpal';
|
|
5
5
|
import BaseProvider from './provider.js';
|
|
6
|
-
import '
|
|
6
|
+
import './index.d-BbTUPBeO.js';
|
|
7
7
|
|
|
8
8
|
declare class ControllerAccount extends WalletAccount {
|
|
9
9
|
address: string;
|
package/dist/account.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account.ts","../src/utils.ts"],"sourcesContent":["import {\n InvokeFunctionResponse,\n TypedData,\n WalletAccount,\n Call,\n AllowArray,\n} from \"starknet\";\n\nimport { SPEC } from \"@starknet-io/types-js\";\n\nimport {\n ConnectError,\n Keychain,\n KeychainOptions,\n Modal,\n ResponseCodes,\n} from \"./types\";\nimport { AsyncMethodReturns } from \"@cartridge/penpal\";\nimport BaseProvider from \"./provider\";\nimport { toArray } from \"./utils\";\n\nclass ControllerAccount extends WalletAccount {\n address: string;\n private keychain: AsyncMethodReturns<Keychain>;\n private modal: Modal;\n private options?: KeychainOptions;\n\n constructor(\n provider: BaseProvider,\n address: string,\n keychain: AsyncMethodReturns<Keychain>,\n options: KeychainOptions,\n modal: Modal,\n ) {\n super({ nodeUrl: provider.rpc.toString() }, provider);\n\n this.address = address;\n this.keychain = keychain;\n this.options = options;\n this.modal = modal;\n }\n\n /**\n * Invoke execute function in account contract\n *\n * @param calls the invocation object or an array of them, containing:\n * - contractAddress - the address of the contract\n * - entrypoint - the entrypoint of the contract\n * - calldata - (defaults to []) the calldata\n * - signature - (defaults to []) the signature\n * @param abis (optional) the abi of the contract for better displaying\n *\n * @returns response from addTransaction\n */\n async execute(calls: AllowArray<Call>): Promise<InvokeFunctionResponse> {\n calls = toArray(calls);\n\n return new Promise(async (resolve, reject) => {\n const sessionExecute = await this.keychain.execute(\n calls,\n undefined,\n undefined,\n false,\n );\n\n // Session call succeeded\n if (sessionExecute.code === ResponseCodes.SUCCESS) {\n resolve(sessionExecute as InvokeFunctionResponse);\n return;\n }\n\n // Propagates session txn error back to caller\n if (this.options?.propagateSessionErrors) {\n reject((sessionExecute as ConnectError).error);\n return;\n }\n\n // Session call or Paymaster flow failed.\n // Session not avaialble, manual flow fallback\n this.modal.open();\n const manualExecute = await this.keychain.execute(\n calls,\n undefined,\n undefined,\n true,\n (sessionExecute as ConnectError).error,\n );\n\n // Manual call succeeded\n if (manualExecute.code === ResponseCodes.SUCCESS) {\n resolve(manualExecute as InvokeFunctionResponse);\n this.modal.close();\n return;\n }\n\n reject((manualExecute as ConnectError).error);\n return;\n });\n }\n\n /**\n * Sign an JSON object for off-chain usage with the starknet private key and return the signature\n * This adds a message prefix so it cant be interchanged with transactions\n *\n * @param json - JSON object to be signed\n * @returns the signature of the JSON object\n * @throws {Error} if the JSON object is not a valid JSON\n */\n async signMessage(typedData: TypedData): Promise<SPEC.SIGNATURE> {\n return new Promise(async (resolve, reject) => {\n const sessionSign = await this.keychain.signMessage(typedData, \"\", true);\n\n // Session sign succeeded\n if (!(\"code\" in sessionSign)) {\n resolve(sessionSign as SPEC.SIGNATURE);\n return;\n }\n\n // Session not avaialble, manual flow fallback\n this.modal.open();\n const manualSign = await this.keychain.signMessage(typedData, \"\", false);\n\n if (!(\"code\" in manualSign)) {\n resolve(manualSign as SPEC.SIGNATURE);\n } else {\n reject((manualSign as ConnectError).error);\n }\n this.modal.close();\n });\n }\n}\n\nexport default ControllerAccount;\n","import {\n addAddressPadding,\n Call,\n CallData,\n getChecksumAddress,\n hash,\n typedData,\n TypedDataRevision,\n} from \"starknet\";\nimport wasm from \"@cartridge/account-wasm/controller\";\nimport { Policies, SessionPolicies } from \"@cartridge/presets\";\n\n// Whitelist of allowed property names to prevent prototype pollution\nconst ALLOWED_PROPERTIES = new Set([\n \"contracts\",\n \"messages\",\n \"target\",\n \"method\",\n \"name\",\n \"description\",\n \"types\",\n \"domain\",\n \"primaryType\",\n]);\n\nfunction validatePropertyName(prop: string): void {\n if (!ALLOWED_PROPERTIES.has(prop)) {\n throw new Error(`Invalid property name: ${prop}`);\n }\n}\n\nfunction safeObjectAccess<T>(obj: any, prop: string): T {\n validatePropertyName(prop);\n return obj[prop];\n}\n\nexport function normalizeCalls(calls: Call | Call[]) {\n return toArray(calls).map((call) => {\n return {\n entrypoint: call.entrypoint,\n contractAddress: addAddressPadding(call.contractAddress),\n calldata: CallData.toHex(call.calldata),\n };\n });\n}\n\nexport function toSessionPolicies(policies: Policies): SessionPolicies {\n return Array.isArray(policies)\n ? policies.reduce<SessionPolicies>(\n (prev, p) => {\n if (safeObjectAccess<string>(p, \"target\")) {\n const target = getChecksumAddress(\n safeObjectAccess<string>(p, \"target\"),\n );\n const entrypoint = safeObjectAccess<string>(p, \"method\");\n const contracts = safeObjectAccess<Record<string, any>>(\n prev,\n \"contracts\",\n );\n const item = {\n name: humanizeString(entrypoint),\n entrypoint: entrypoint,\n description: safeObjectAccess<string>(p, \"description\"),\n };\n\n if (target in contracts) {\n const methods = toArray(contracts[target].methods);\n contracts[target] = {\n methods: [...methods, item],\n };\n } else {\n contracts[target] = {\n methods: [item],\n };\n }\n } else {\n const messages = safeObjectAccess<any[]>(prev, \"messages\");\n messages.push(p);\n }\n\n return prev;\n },\n { contracts: {}, messages: [] },\n )\n : policies;\n}\n\nexport function toWasmPolicies(policies: SessionPolicies): wasm.Policy[] {\n return [\n ...Object.entries(policies.contracts ?? {}).flatMap(\n ([target, { methods }]) =>\n toArray(methods).map((m) => ({\n target,\n method: m.entrypoint,\n })),\n ),\n ...(policies.messages ?? []).map((p) => {\n const domainHash = typedData.getStructHash(\n p.types,\n \"StarknetDomain\",\n p.domain,\n TypedDataRevision.ACTIVE,\n );\n const typeHash = typedData.getTypeHash(\n p.types,\n p.primaryType,\n TypedDataRevision.ACTIVE,\n );\n\n return {\n scope_hash: hash.computePoseidonHash(domainHash, typeHash),\n };\n }),\n ];\n}\n\nexport function toArray<T>(val: T | T[]): T[] {\n return Array.isArray(val) ? val : [val];\n}\n\
|
|
1
|
+
{"version":3,"sources":["../src/account.ts","../src/utils.ts"],"sourcesContent":["import {\n InvokeFunctionResponse,\n TypedData,\n WalletAccount,\n Call,\n AllowArray,\n} from \"starknet\";\n\nimport { SPEC } from \"@starknet-io/types-js\";\n\nimport {\n ConnectError,\n Keychain,\n KeychainOptions,\n Modal,\n ResponseCodes,\n} from \"./types\";\nimport { AsyncMethodReturns } from \"@cartridge/penpal\";\nimport BaseProvider from \"./provider\";\nimport { toArray } from \"./utils\";\n\nclass ControllerAccount extends WalletAccount {\n address: string;\n private keychain: AsyncMethodReturns<Keychain>;\n private modal: Modal;\n private options?: KeychainOptions;\n\n constructor(\n provider: BaseProvider,\n address: string,\n keychain: AsyncMethodReturns<Keychain>,\n options: KeychainOptions,\n modal: Modal,\n ) {\n super({ nodeUrl: provider.rpc.toString() }, provider);\n\n this.address = address;\n this.keychain = keychain;\n this.options = options;\n this.modal = modal;\n }\n\n /**\n * Invoke execute function in account contract\n *\n * @param calls the invocation object or an array of them, containing:\n * - contractAddress - the address of the contract\n * - entrypoint - the entrypoint of the contract\n * - calldata - (defaults to []) the calldata\n * - signature - (defaults to []) the signature\n * @param abis (optional) the abi of the contract for better displaying\n *\n * @returns response from addTransaction\n */\n async execute(calls: AllowArray<Call>): Promise<InvokeFunctionResponse> {\n calls = toArray(calls);\n\n return new Promise(async (resolve, reject) => {\n const sessionExecute = await this.keychain.execute(\n calls,\n undefined,\n undefined,\n false,\n );\n\n // Session call succeeded\n if (sessionExecute.code === ResponseCodes.SUCCESS) {\n resolve(sessionExecute as InvokeFunctionResponse);\n return;\n }\n\n // Propagates session txn error back to caller\n if (this.options?.propagateSessionErrors) {\n reject((sessionExecute as ConnectError).error);\n return;\n }\n\n // Session call or Paymaster flow failed.\n // Session not avaialble, manual flow fallback\n this.modal.open();\n const manualExecute = await this.keychain.execute(\n calls,\n undefined,\n undefined,\n true,\n (sessionExecute as ConnectError).error,\n );\n\n // Manual call succeeded\n if (manualExecute.code === ResponseCodes.SUCCESS) {\n resolve(manualExecute as InvokeFunctionResponse);\n this.modal.close();\n return;\n }\n\n reject((manualExecute as ConnectError).error);\n return;\n });\n }\n\n /**\n * Sign an JSON object for off-chain usage with the starknet private key and return the signature\n * This adds a message prefix so it cant be interchanged with transactions\n *\n * @param json - JSON object to be signed\n * @returns the signature of the JSON object\n * @throws {Error} if the JSON object is not a valid JSON\n */\n async signMessage(typedData: TypedData): Promise<SPEC.SIGNATURE> {\n return new Promise(async (resolve, reject) => {\n const sessionSign = await this.keychain.signMessage(typedData, \"\", true);\n\n // Session sign succeeded\n if (!(\"code\" in sessionSign)) {\n resolve(sessionSign as SPEC.SIGNATURE);\n return;\n }\n\n // Session not avaialble, manual flow fallback\n this.modal.open();\n const manualSign = await this.keychain.signMessage(typedData, \"\", false);\n\n if (!(\"code\" in manualSign)) {\n resolve(manualSign as SPEC.SIGNATURE);\n } else {\n reject((manualSign as ConnectError).error);\n }\n this.modal.close();\n });\n }\n}\n\nexport default ControllerAccount;\n","import {\n addAddressPadding,\n Call,\n CallData,\n getChecksumAddress,\n hash,\n typedData,\n TypedDataRevision,\n} from \"starknet\";\nimport wasm from \"@cartridge/account-wasm/controller\";\nimport { Policies, SessionPolicies } from \"@cartridge/presets\";\n\n// Whitelist of allowed property names to prevent prototype pollution\nconst ALLOWED_PROPERTIES = new Set([\n \"contracts\",\n \"messages\",\n \"target\",\n \"method\",\n \"name\",\n \"description\",\n \"types\",\n \"domain\",\n \"primaryType\",\n]);\n\nfunction validatePropertyName(prop: string): void {\n if (!ALLOWED_PROPERTIES.has(prop)) {\n throw new Error(`Invalid property name: ${prop}`);\n }\n}\n\nfunction safeObjectAccess<T>(obj: any, prop: string): T {\n validatePropertyName(prop);\n return obj[prop];\n}\n\nexport function normalizeCalls(calls: Call | Call[]) {\n return toArray(calls).map((call) => {\n return {\n entrypoint: call.entrypoint,\n contractAddress: addAddressPadding(call.contractAddress),\n calldata: CallData.toHex(call.calldata),\n };\n });\n}\n\nexport function toSessionPolicies(policies: Policies): SessionPolicies {\n return Array.isArray(policies)\n ? policies.reduce<SessionPolicies>(\n (prev, p) => {\n if (safeObjectAccess<string>(p, \"target\")) {\n const target = getChecksumAddress(\n safeObjectAccess<string>(p, \"target\"),\n );\n const entrypoint = safeObjectAccess<string>(p, \"method\");\n const contracts = safeObjectAccess<Record<string, any>>(\n prev,\n \"contracts\",\n );\n const item = {\n name: humanizeString(entrypoint),\n entrypoint: entrypoint,\n description: safeObjectAccess<string>(p, \"description\"),\n };\n\n if (target in contracts) {\n const methods = toArray(contracts[target].methods);\n contracts[target] = {\n methods: [...methods, item],\n };\n } else {\n contracts[target] = {\n methods: [item],\n };\n }\n } else {\n const messages = safeObjectAccess<any[]>(prev, \"messages\");\n messages.push(p);\n }\n\n return prev;\n },\n { contracts: {}, messages: [] },\n )\n : policies;\n}\n\nexport function toWasmPolicies(policies: SessionPolicies): wasm.Policy[] {\n return [\n ...Object.entries(policies.contracts ?? {}).flatMap(\n ([target, { methods }]) =>\n toArray(methods).map((m) => ({\n target,\n method: m.entrypoint,\n })),\n ),\n ...(policies.messages ?? []).map((p) => {\n const domainHash = typedData.getStructHash(\n p.types,\n \"StarknetDomain\",\n p.domain,\n TypedDataRevision.ACTIVE,\n );\n const typeHash = typedData.getTypeHash(\n p.types,\n p.primaryType,\n TypedDataRevision.ACTIVE,\n );\n\n return {\n scope_hash: hash.computePoseidonHash(domainHash, typeHash),\n };\n }),\n ];\n}\n\nexport function toArray<T>(val: T | T[]): T[] {\n return Array.isArray(val) ? val : [val];\n}\n\nexport function humanizeString(str: string): string {\n return (\n str\n // Convert from camelCase or snake_case\n .replace(/([a-z])([A-Z])/g, \"$1 $2\") // camelCase to spaces\n .replace(/_/g, \" \") // snake_case to spaces\n .toLowerCase()\n // Capitalize first letter\n .replace(/^\\w/, (c) => c.toUpperCase())\n );\n}\n"],"mappings":";AAAA;AAAA,EAGE;AAAA,OAGK;;;ACNP;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA4GA,SAAS,QAAW,KAAmB;AAC5C,SAAO,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,GAAG;AACxC;;;ADjGA,IAAM,oBAAN,cAAgC,cAAc;AAAA,EAM5C,YACE,UACA,SACA,UACA,SACA,OACA;AACA,UAAM,EAAE,SAAS,SAAS,IAAI,SAAS,EAAE,GAAG,QAAQ;AAEpD,SAAK,UAAU;AACf,SAAK,WAAW;AAChB,SAAK,UAAU;AACf,SAAK,QAAQ;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAM,QAAQ,OAA0D;AACtE,YAAQ,QAAQ,KAAK;AAErB,WAAO,IAAI,QAAQ,OAAO,SAAS,WAAW;AAC5C,YAAM,iBAAiB,MAAM,KAAK,SAAS;AAAA,QACzC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAGA,UAAI,eAAe,kCAAgC;AACjD,gBAAQ,cAAwC;AAChD;AAAA,MACF;AAGA,UAAI,KAAK,SAAS,wBAAwB;AACxC,eAAQ,eAAgC,KAAK;AAC7C;AAAA,MACF;AAIA,WAAK,MAAM,KAAK;AAChB,YAAM,gBAAgB,MAAM,KAAK,SAAS;AAAA,QACxC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACC,eAAgC;AAAA,MACnC;AAGA,UAAI,cAAc,kCAAgC;AAChD,gBAAQ,aAAuC;AAC/C,aAAK,MAAM,MAAM;AACjB;AAAA,MACF;AAEA,aAAQ,cAA+B,KAAK;AAC5C;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,YAAYA,YAA+C;AAC/D,WAAO,IAAI,QAAQ,OAAO,SAAS,WAAW;AAC5C,YAAM,cAAc,MAAM,KAAK,SAAS,YAAYA,YAAW,IAAI,IAAI;AAGvE,UAAI,EAAE,UAAU,cAAc;AAC5B,gBAAQ,WAA6B;AACrC;AAAA,MACF;AAGA,WAAK,MAAM,KAAK;AAChB,YAAM,aAAa,MAAM,KAAK,SAAS,YAAYA,YAAW,IAAI,KAAK;AAEvE,UAAI,EAAE,UAAU,aAAa;AAC3B,gBAAQ,UAA4B;AAAA,MACtC,OAAO;AACL,eAAQ,WAA4B,KAAK;AAAA,MAC3C;AACA,WAAK,MAAM,MAAM;AAAA,IACnB,CAAC;AAAA,EACH;AACF;AAEA,IAAO,kBAAQ;","names":["typedData"]}
|
package/dist/controller.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as ControllerOptions, l as ProfileContextTypeVariant } from './types-
|
|
1
|
+
import { g as ControllerOptions, l as ProfileContextTypeVariant } from './types-BReKRAuh.js';
|
|
2
2
|
import BaseProvider from './provider.js';
|
|
3
3
|
import { WalletAccount } from 'starknet';
|
|
4
|
-
import { Policy } from '
|
|
4
|
+
import { i as Policy } from './index.d-BbTUPBeO.js';
|
|
5
5
|
import '@starknet-io/types-js';
|
|
6
6
|
import '@cartridge/penpal';
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ declare class ControllerProvider extends BaseProvider {
|
|
|
20
20
|
username(): Promise<string> | undefined;
|
|
21
21
|
fetchControllers(contractAddresses: string[]): Promise<Record<string, string>>;
|
|
22
22
|
openPurchaseCredits(): void;
|
|
23
|
-
|
|
23
|
+
openExecute(calls: any): Promise<boolean | undefined>;
|
|
24
24
|
delegateAccount(): Promise<string | null>;
|
|
25
25
|
private waitForKeychain;
|
|
26
26
|
}
|
package/dist/controller.js
CHANGED
|
@@ -105,6 +105,7 @@ var IFrame = class {
|
|
|
105
105
|
constructor({
|
|
106
106
|
id,
|
|
107
107
|
url,
|
|
108
|
+
preset,
|
|
108
109
|
theme,
|
|
109
110
|
colorMode,
|
|
110
111
|
onClose,
|
|
@@ -115,7 +116,10 @@ var IFrame = class {
|
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
118
|
if (theme) {
|
|
118
|
-
url.searchParams.set("theme",
|
|
119
|
+
url.searchParams.set("theme", theme);
|
|
120
|
+
}
|
|
121
|
+
if (preset) {
|
|
122
|
+
url.searchParams.set("preset", preset);
|
|
119
123
|
}
|
|
120
124
|
if (colorMode) {
|
|
121
125
|
url.searchParams.set("colorMode", colorMode);
|
|
@@ -191,6 +195,14 @@ var IFrame = class {
|
|
|
191
195
|
this.container.style.visibility = "hidden";
|
|
192
196
|
this.container.style.opacity = "0";
|
|
193
197
|
}
|
|
198
|
+
sendBackward() {
|
|
199
|
+
if (!this.container) return;
|
|
200
|
+
this.container.style.zIndex = "9999";
|
|
201
|
+
}
|
|
202
|
+
sendForward() {
|
|
203
|
+
if (!this.container) return;
|
|
204
|
+
this.container.style.zIndex = "10000";
|
|
205
|
+
}
|
|
194
206
|
resize() {
|
|
195
207
|
if (!this.iframe) return;
|
|
196
208
|
this.iframe.style.userSelect = "none";
|
|
@@ -233,20 +245,24 @@ var ProfileIFrame = class extends IFrame {
|
|
|
233
245
|
constructor({
|
|
234
246
|
profileUrl,
|
|
235
247
|
rpcUrl,
|
|
236
|
-
|
|
237
|
-
slot,
|
|
248
|
+
version,
|
|
238
249
|
username,
|
|
250
|
+
slot,
|
|
251
|
+
namespace,
|
|
239
252
|
tokens,
|
|
240
253
|
...iframeOptions
|
|
241
254
|
}) {
|
|
242
255
|
const _profileUrl = (profileUrl || PROFILE_URL).replace(/\/$/, "");
|
|
243
|
-
|
|
256
|
+
let _url = new URL(
|
|
244
257
|
slot ? namespace ? `${_profileUrl}/account/${username}/slot/${slot}?ps=${encodeURIComponent(
|
|
245
258
|
slot
|
|
246
259
|
)}&ns=${encodeURIComponent(namespace)}` : `${_profileUrl}/account/${username}/slot/${slot}?ps=${encodeURIComponent(
|
|
247
260
|
slot
|
|
248
261
|
)}` : `${_profileUrl}/account/${username}`
|
|
249
262
|
);
|
|
263
|
+
if (version) {
|
|
264
|
+
_url.searchParams.set("v", encodeURIComponent(version));
|
|
265
|
+
}
|
|
250
266
|
_url.searchParams.set("rpcUrl", encodeURIComponent(rpcUrl));
|
|
251
267
|
if (tokens?.erc20) {
|
|
252
268
|
_url.searchParams.set(
|
|
@@ -454,12 +470,13 @@ var ControllerProvider = class extends BaseProvider {
|
|
|
454
470
|
this.profile = profile;
|
|
455
471
|
},
|
|
456
472
|
methods: {
|
|
457
|
-
openSettings: this.openSettings.bind(this),
|
|
458
|
-
openPurchaseCredits: this.openPurchaseCredits.bind(this),
|
|
459
|
-
openExecute: this.openExecute.bind(this)
|
|
473
|
+
openSettings: () => this.openSettings.bind(this),
|
|
474
|
+
openPurchaseCredits: () => this.openPurchaseCredits.bind(this),
|
|
475
|
+
openExecute: () => this.openExecute.bind(this)
|
|
460
476
|
},
|
|
461
477
|
rpcUrl: this.rpc.toString(),
|
|
462
|
-
username
|
|
478
|
+
username,
|
|
479
|
+
version: this.version
|
|
463
480
|
});
|
|
464
481
|
}
|
|
465
482
|
return this.account;
|
|
@@ -533,10 +550,15 @@ var ControllerProvider = class extends BaseProvider {
|
|
|
533
550
|
console.error(new NotReadyToConnect().message);
|
|
534
551
|
return null;
|
|
535
552
|
}
|
|
536
|
-
this.iframes.profile?.
|
|
553
|
+
if (this.iframes.profile?.sendBackward) {
|
|
554
|
+
this.iframes.profile?.sendBackward();
|
|
555
|
+
} else {
|
|
556
|
+
this.iframes.profile?.close();
|
|
557
|
+
}
|
|
537
558
|
this.iframes.keychain.open();
|
|
538
559
|
const res = await this.keychain.openSettings();
|
|
539
560
|
this.iframes.keychain.close();
|
|
561
|
+
this.iframes.profile?.sendForward?.();
|
|
540
562
|
if (res && res.code === "NOT_CONNECTED" /* NOT_CONNECTED */) {
|
|
541
563
|
return false;
|
|
542
564
|
}
|
|
@@ -575,7 +597,7 @@ var ControllerProvider = class extends BaseProvider {
|
|
|
575
597
|
this.iframes.keychain.open();
|
|
576
598
|
this.keychain.openPurchaseCredits();
|
|
577
599
|
}
|
|
578
|
-
openExecute(calls) {
|
|
600
|
+
async openExecute(calls) {
|
|
579
601
|
if (!this.keychain || !this.iframes.keychain) {
|
|
580
602
|
console.error(new NotReadyToConnect().message);
|
|
581
603
|
return;
|
|
@@ -584,9 +606,16 @@ var ControllerProvider = class extends BaseProvider {
|
|
|
584
606
|
console.error("Profile is not ready");
|
|
585
607
|
return;
|
|
586
608
|
}
|
|
587
|
-
this.iframes.profile
|
|
609
|
+
if (this.iframes.profile?.sendBackward) {
|
|
610
|
+
this.iframes.profile?.sendBackward();
|
|
611
|
+
} else {
|
|
612
|
+
this.iframes.profile?.close();
|
|
613
|
+
}
|
|
588
614
|
this.iframes.keychain.open();
|
|
589
|
-
this.keychain.execute(calls);
|
|
615
|
+
const res = await this.keychain.execute(calls, void 0, void 0, true);
|
|
616
|
+
this.iframes.keychain.close();
|
|
617
|
+
this.iframes.profile?.sendForward?.();
|
|
618
|
+
return !(res && res.code === "NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
590
619
|
}
|
|
591
620
|
async delegateAccount() {
|
|
592
621
|
if (!this.keychain) {
|