@cartridge/controller 0.8.0 → 0.9.1
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 +51 -49
- package/.turbo/turbo-build.log +47 -45
- package/dist/account.d.ts +2 -3
- package/dist/controller.d.ts +2 -3
- package/dist/iframe/base.d.ts +1 -0
- package/dist/iframe/index.d.ts +0 -1
- package/dist/iframe/keychain.d.ts +4 -2
- package/dist/index.js +466 -518
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +2 -2
- package/dist/node/index.js.map +1 -1
- package/dist/{provider-ClUbos7A.js → provider-iltRv2Q1.js} +21 -22
- package/dist/provider-iltRv2Q1.js.map +1 -0
- package/dist/provider.d.ts +1 -1
- package/dist/session.js +10 -10
- package/dist/session.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types.d.ts +4 -8
- package/dist/wallets/bridge.d.ts +2 -2
- package/dist/wallets/metamask/index.d.ts +2 -2
- package/dist/wallets/rabby/index.d.ts +1 -1
- package/dist/wallets/types.d.ts +2 -2
- package/package.json +7 -6
- package/src/account.ts +5 -8
- package/src/controller.ts +32 -74
- package/src/iframe/base.ts +6 -24
- package/src/iframe/index.ts +0 -1
- package/src/iframe/keychain.ts +32 -2
- package/src/node/account.ts +1 -1
- package/src/provider.ts +9 -9
- package/src/session/account.ts +1 -2
- package/src/types.ts +3 -11
- package/src/wallets/bridge.ts +5 -18
- package/src/wallets/metamask/index.ts +9 -13
- package/src/wallets/rabby/index.ts +9 -4
- package/src/wallets/types.ts +5 -2
- package/.turbo/turbo-format$colon$check.log +0 -7
- package/.turbo/turbo-format.log +0 -44
- package/dist/iframe/profile.d.ts +0 -12
- package/dist/provider-ClUbos7A.js.map +0 -1
- package/src/iframe/profile.ts +0 -59
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[2mdist/[22m[
|
|
22
|
-
[
|
|
23
|
-
[39m
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[34mCLI[39m
|
|
32
|
-
[34mCLI[39m Using
|
|
33
|
-
[34mCLI[39m
|
|
34
|
-
[34mCLI[39m
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
[32mESM[39m
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[32mCJS[39m
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
|
|
2
|
+
> @cartridge/controller@0.9.1 build:deps /home/runner/work/controller/controller/packages/controller
|
|
3
|
+
> pnpm build
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @cartridge/controller@0.9.1 build /home/runner/work/controller/controller/packages/controller
|
|
7
|
+
> pnpm build:browser && pnpm build:node
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
> @cartridge/controller@0.9.1 build:browser /home/runner/work/controller/controller/packages/controller
|
|
11
|
+
> vite build
|
|
12
|
+
|
|
13
|
+
[36mvite v6.3.4 [32mbuilding for production...[36m[39m
|
|
14
|
+
transforming...
|
|
15
|
+
[32m✓[39m 217 modules transformed.
|
|
16
|
+
rendering chunks...
|
|
17
|
+
[vite-plugin-top-level-await] Non-existing module "../../../node_modules/.pnpm/@cartridge+controller-wasm@0.2.3/node_modules/@cartridge/controller-wasm/pkg-session/session_wasm_bg.wasm" imported by "session.js", ignoring.
|
|
18
|
+
|
|
19
|
+
[vite:dts] Start generate declaration files...
|
|
20
|
+
computing gzip size...
|
|
21
|
+
[2mdist/[22m[36msession.js [39m[1m[2m11.17 kB[22m[1m[22m[2m │ gzip: 3.47 kB[22m[2m │ map: 60.40 kB[22m
|
|
22
|
+
[2mdist/[22m[36mprovider-iltRv2Q1.js [39m[1m[2m13.48 kB[22m[1m[22m[2m │ gzip: 5.51 kB[22m[2m │ map: 32.57 kB[22m
|
|
23
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m77.06 kB[22m[1m[22m[2m │ gzip: 20.21 kB[22m[2m │ map: 217.97 kB[22m
|
|
24
|
+
[vite:dts] Declaration files built in 4753ms.
|
|
25
|
+
|
|
26
|
+
[32m✓ built in 6.33s[39m
|
|
27
|
+
|
|
28
|
+
> @cartridge/controller@0.9.1 build:node /home/runner/work/controller/controller/packages/controller
|
|
29
|
+
> tsup --config tsup.node.config.ts
|
|
30
|
+
|
|
31
|
+
[34mCLI[39m Building entry: src/node/index.ts
|
|
32
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
33
|
+
[34mCLI[39m tsup v8.4.0
|
|
34
|
+
[34mCLI[39m Using tsup config: /home/runner/work/controller/controller/packages/controller/tsup.node.config.ts
|
|
35
|
+
[34mCLI[39m Target: esnext
|
|
36
|
+
[34mCLI[39m Cleaning output folder
|
|
37
|
+
[34mESM[39m Build start
|
|
38
|
+
[34mCJS[39m Build start
|
|
39
|
+
"constants", "getChecksumAddress" and "shortString" are imported from external module "starknet" but never used in "dist/node/index.js".
|
|
40
|
+
"constants", "getChecksumAddress" and "shortString" are imported from external module "starknet" but never used in "dist/node/index.cjs".
|
|
41
|
+
Entry module "dist/node/index.cjs" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
42
|
+
[32mESM[39m [1mdist/node/index.js [22m[32m21.13 KB[39m
|
|
43
|
+
[32mESM[39m [1mdist/node/index.js.map [22m[32m50.30 KB[39m
|
|
44
|
+
[32mESM[39m ⚡️ Build success in 361ms
|
|
45
|
+
[32mCJS[39m [1mdist/node/index.cjs [22m[32m21.89 KB[39m
|
|
46
|
+
[32mCJS[39m [1mdist/node/index.cjs.map [22m[32m50.50 KB[39m
|
|
47
|
+
[32mCJS[39m ⚡️ Build success in 361ms
|
|
48
|
+
[34mDTS[39m Build start
|
|
49
|
+
[32mDTS[39m ⚡️ Build success in 4389ms
|
|
50
|
+
[32mDTS[39m [1mdist/node/index.d.ts [22m[32m5.26 KB[39m
|
|
51
|
+
[32mDTS[39m [1mdist/node/index.d.cts [22m[32m5.26 KB[39m
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[2mdist/[22m[
|
|
18
|
-
[
|
|
19
|
-
[39m
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[34mCLI[39m
|
|
28
|
-
[34mCLI[39m Using
|
|
29
|
-
[34mCLI[39m
|
|
30
|
-
[34mCLI[39m
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"constants", "getChecksumAddress" and "shortString" are imported from external module "starknet" but never used in "dist/node/index.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
[32mCJS[39m
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[32mESM[39m
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
|
|
2
|
+
> @cartridge/controller@0.9.1 build /home/runner/work/controller/controller/packages/controller
|
|
3
|
+
> pnpm build:browser && pnpm build:node
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @cartridge/controller@0.9.1 build:browser /home/runner/work/controller/controller/packages/controller
|
|
7
|
+
> vite build
|
|
8
|
+
|
|
9
|
+
[36mvite v6.3.4 [32mbuilding for production...[36m[39m
|
|
10
|
+
transforming...
|
|
11
|
+
[32m✓[39m 217 modules transformed.
|
|
12
|
+
rendering chunks...
|
|
13
|
+
[vite-plugin-top-level-await] Non-existing module "../../../node_modules/.pnpm/@cartridge+controller-wasm@0.2.3/node_modules/@cartridge/controller-wasm/pkg-session/session_wasm_bg.wasm" imported by "session.js", ignoring.
|
|
14
|
+
|
|
15
|
+
[vite:dts] Start generate declaration files...
|
|
16
|
+
computing gzip size...
|
|
17
|
+
[2mdist/[22m[36msession.js [39m[1m[2m11.17 kB[22m[1m[22m[2m │ gzip: 3.47 kB[22m[2m │ map: 60.40 kB[22m
|
|
18
|
+
[2mdist/[22m[36mprovider-iltRv2Q1.js [39m[1m[2m13.48 kB[22m[1m[22m[2m │ gzip: 5.51 kB[22m[2m │ map: 32.57 kB[22m
|
|
19
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m77.06 kB[22m[1m[22m[2m │ gzip: 20.21 kB[22m[2m │ map: 217.97 kB[22m
|
|
20
|
+
[vite:dts] Declaration files built in 4954ms.
|
|
21
|
+
|
|
22
|
+
[32m✓ built in 6.73s[39m
|
|
23
|
+
|
|
24
|
+
> @cartridge/controller@0.9.1 build:node /home/runner/work/controller/controller/packages/controller
|
|
25
|
+
> tsup --config tsup.node.config.ts
|
|
26
|
+
|
|
27
|
+
[34mCLI[39m Building entry: src/node/index.ts
|
|
28
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
29
|
+
[34mCLI[39m tsup v8.4.0
|
|
30
|
+
[34mCLI[39m Using tsup config: /home/runner/work/controller/controller/packages/controller/tsup.node.config.ts
|
|
31
|
+
[34mCLI[39m Target: esnext
|
|
32
|
+
[34mCLI[39m Cleaning output folder
|
|
33
|
+
[34mESM[39m Build start
|
|
34
|
+
[34mCJS[39m Build start
|
|
35
|
+
"constants", "getChecksumAddress" and "shortString" are imported from external module "starknet" but never used in "dist/node/index.cjs".
|
|
36
|
+
Entry module "dist/node/index.cjs" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
37
|
+
"constants", "getChecksumAddress" and "shortString" are imported from external module "starknet" but never used in "dist/node/index.js".
|
|
38
|
+
[32mCJS[39m [1mdist/node/index.cjs [22m[32m21.89 KB[39m
|
|
39
|
+
[32mCJS[39m [1mdist/node/index.cjs.map [22m[32m50.50 KB[39m
|
|
40
|
+
[32mCJS[39m ⚡️ Build success in 395ms
|
|
41
|
+
[32mESM[39m [1mdist/node/index.js [22m[32m21.13 KB[39m
|
|
42
|
+
[32mESM[39m [1mdist/node/index.js.map [22m[32m50.30 KB[39m
|
|
43
|
+
[32mESM[39m ⚡️ Build success in 396ms
|
|
44
|
+
[34mDTS[39m Build start
|
|
45
|
+
[32mDTS[39m ⚡️ Build success in 4422ms
|
|
46
|
+
[32mDTS[39m [1mdist/node/index.d.ts [22m[32m5.26 KB[39m
|
|
47
|
+
[32mDTS[39m [1mdist/node/index.d.cts [22m[32m5.26 KB[39m
|
package/dist/account.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { InvokeFunctionResponse, TypedData, WalletAccount, Call, AllowArray } from 'starknet';
|
|
2
|
-
import { SPEC } from '@starknet-io/types-js';
|
|
3
2
|
import { Keychain, KeychainOptions, Modal } from './types';
|
|
4
3
|
import { AsyncMethodReturns } from '@cartridge/penpal';
|
|
5
4
|
import { default as BaseProvider } from './provider';
|
|
5
|
+
import { SIGNATURE } from '@starknet-io/types-js';
|
|
6
6
|
declare class ControllerAccount extends WalletAccount {
|
|
7
|
-
address: string;
|
|
8
7
|
private keychain;
|
|
9
8
|
private modal;
|
|
10
9
|
private options?;
|
|
@@ -30,6 +29,6 @@ declare class ControllerAccount extends WalletAccount {
|
|
|
30
29
|
* @returns the signature of the JSON object
|
|
31
30
|
* @throws {Error} if the JSON object is not a valid JSON
|
|
32
31
|
*/
|
|
33
|
-
signMessage(typedData: TypedData): Promise<
|
|
32
|
+
signMessage(typedData: TypedData): Promise<SIGNATURE>;
|
|
34
33
|
}
|
|
35
34
|
export default ControllerAccount;
|
package/dist/controller.d.ts
CHANGED
|
@@ -5,13 +5,12 @@ import { default as BaseProvider } from './provider';
|
|
|
5
5
|
import { ControllerOptions, ProfileContextTypeVariant } from './types';
|
|
6
6
|
export default class ControllerProvider extends BaseProvider {
|
|
7
7
|
private keychain?;
|
|
8
|
-
private profile?;
|
|
9
8
|
private options;
|
|
10
9
|
private iframes;
|
|
11
10
|
private selectedChain;
|
|
12
11
|
private chains;
|
|
13
12
|
isReady(): boolean;
|
|
14
|
-
constructor(options
|
|
13
|
+
constructor(options?: ControllerOptions);
|
|
15
14
|
logout(): Promise<void>;
|
|
16
15
|
probe(): Promise<WalletAccount | undefined>;
|
|
17
16
|
connect(): Promise<WalletAccount | undefined>;
|
|
@@ -21,7 +20,7 @@ export default class ControllerProvider extends BaseProvider {
|
|
|
21
20
|
openProfile(tab?: ProfileContextTypeVariant): Promise<void>;
|
|
22
21
|
openProfileTo(to: string): Promise<void>;
|
|
23
22
|
openProfileAt(at: string): Promise<void>;
|
|
24
|
-
openSettings():
|
|
23
|
+
openSettings(): void;
|
|
25
24
|
revoke(origin: string, _policy: Policy[]): Promise<void> | null;
|
|
26
25
|
rpcUrl(): string;
|
|
27
26
|
username(): Promise<string> | undefined;
|
package/dist/iframe/base.d.ts
CHANGED
package/dist/iframe/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Keychain, KeychainOptions } from '../types';
|
|
2
2
|
import { WalletBridge } from '../wallets/bridge';
|
|
3
3
|
import { IFrame, IFrameOptions } from './base';
|
|
4
|
-
type KeychainIframeOptions = IFrameOptions<Keychain> & KeychainOptions
|
|
4
|
+
type KeychainIframeOptions = IFrameOptions<Keychain> & KeychainOptions & {
|
|
5
|
+
version?: string;
|
|
6
|
+
};
|
|
5
7
|
export declare class KeychainIFrame extends IFrame<Keychain> {
|
|
6
8
|
private walletBridge;
|
|
7
|
-
constructor({ url, policies, ...iframeOptions }: KeychainIframeOptions);
|
|
9
|
+
constructor({ url, policies, version, slot, namespace, tokens, ...iframeOptions }: KeychainIframeOptions);
|
|
8
10
|
getWalletBridge(): WalletBridge;
|
|
9
11
|
}
|
|
10
12
|
export {};
|