@cartridge/controller 0.7.7 → 0.7.8
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 +23 -23
- package/.turbo/turbo-build.log +31 -31
- package/dist/controller.cjs +472 -3
- package/dist/controller.cjs.map +1 -1
- package/dist/controller.d.cts +1 -1
- package/dist/controller.d.ts +1 -1
- package/dist/controller.js +472 -3
- package/dist/controller.js.map +1 -1
- package/dist/index.cjs +1908 -1214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -3
- package/dist/index.d.ts +46 -3
- package/dist/index.js +1905 -1215
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +1 -1
- 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 +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/{provider-CTDncg8U.d.cts → provider-BeCgS86X.d.cts} +64 -1
- package/dist/{provider-CTDncg8U.d.ts → provider-BeCgS86X.d.ts} +64 -1
- package/dist/session/index.cjs +1 -1
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +2 -2
- package/dist/session/index.d.ts +2 -2
- package/dist/session/index.js +1 -1
- package/dist/session/index.js.map +1 -1
- package/package.json +8 -5
- package/src/iframe/base.ts +1 -1
- package/src/iframe/keychain.ts +11 -0
- package/src/index.ts +1 -0
- package/src/types.ts +24 -0
- package/src/wallets/argent/index.ts +122 -0
- package/src/wallets/bridge.ts +165 -0
- package/src/wallets/index.ts +5 -0
- package/src/wallets/metamask/index.ts +210 -0
- package/src/wallets/phantom/index.ts +124 -0
- package/src/wallets/types.ts +32 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { default } from './controller.cjs';
|
|
2
2
|
import { P as ParsedSessionPolicies } from './policies-DD1aPjQ4.cjs';
|
|
3
3
|
export { N as NotReadyToConnect } from './policies-DD1aPjQ4.cjs';
|
|
4
|
-
|
|
4
|
+
import { W as WalletAdapter, E as ExternalWalletType, a as ExternalPlatform, b as ExternalWallet, c as ExternalWalletResponse } from './provider-BeCgS86X.cjs';
|
|
5
|
+
export { m as Chain, C as ConnectError, e as ConnectReply, i as ControllerAccounts, d as ControllerError, k as ControllerOptions, D as DeployReply, f as ExecuteReply, l as IFrameOptions, I as IFrames, K as Keychain, o as KeychainOptions, L as LookupRequest, h as LookupResponse, g as LookupResult, M as Modal, P as ProbeReply, j as Profile, q as ProfileContextTypeVariant, p as ProfileOptions, n as ProviderOptions, R as ResponseCodes, S as Session, T as Tokens, r as WalletBridge } from './provider-BeCgS86X.cjs';
|
|
5
6
|
export { lookupAddresses, lookupUsernames } from './lookup.cjs';
|
|
6
7
|
import * as starknet from 'starknet';
|
|
7
8
|
import { Call } from 'starknet';
|
|
8
9
|
import wasm from '@cartridge/account-wasm/controller';
|
|
9
10
|
import { Policies, SessionPolicies } from '@cartridge/presets';
|
|
10
11
|
export * from '@cartridge/presets';
|
|
11
|
-
import { ChainId } from '@starknet-io/types-js';
|
|
12
|
+
import { ChainId, TypedData } from '@starknet-io/types-js';
|
|
12
13
|
import '@cartridge/penpal';
|
|
13
14
|
|
|
14
15
|
declare function normalizeCalls(calls: Call | Call[]): {
|
|
@@ -22,4 +23,46 @@ declare function toArray<T>(val: T | T[]): T[];
|
|
|
22
23
|
declare function humanizeString(str: string): string;
|
|
23
24
|
declare function parseChainId(url: URL): Promise<ChainId>;
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
declare class MetaMaskWallet implements WalletAdapter {
|
|
27
|
+
readonly type: ExternalWalletType;
|
|
28
|
+
readonly platform: ExternalPlatform;
|
|
29
|
+
private MMSDK;
|
|
30
|
+
private account;
|
|
31
|
+
constructor();
|
|
32
|
+
isAvailable(): boolean;
|
|
33
|
+
getInfo(): ExternalWallet;
|
|
34
|
+
connect(): Promise<ExternalWalletResponse<any>>;
|
|
35
|
+
signTransaction(transaction: any): Promise<ExternalWalletResponse<any>>;
|
|
36
|
+
signMessage(message: string): Promise<ExternalWalletResponse<any>>;
|
|
37
|
+
signTypedData(data: any): Promise<ExternalWalletResponse<any>>;
|
|
38
|
+
switchChain(chainId: string): Promise<boolean>;
|
|
39
|
+
getBalance(tokenAddress?: string): Promise<ExternalWalletResponse<any>>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class PhantomWallet implements WalletAdapter {
|
|
43
|
+
readonly type: ExternalWalletType;
|
|
44
|
+
readonly platform: ExternalPlatform;
|
|
45
|
+
private account;
|
|
46
|
+
isAvailable(): boolean;
|
|
47
|
+
getInfo(): ExternalWallet;
|
|
48
|
+
connect(): Promise<ExternalWalletResponse<any>>;
|
|
49
|
+
signTransaction(transaction: any): Promise<ExternalWalletResponse<any>>;
|
|
50
|
+
signMessage(message: string): Promise<ExternalWalletResponse<any>>;
|
|
51
|
+
switchChain(_chainId: string): Promise<boolean>;
|
|
52
|
+
getBalance(_tokenAddress?: string): Promise<ExternalWalletResponse<any>>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class ArgentWallet implements WalletAdapter {
|
|
56
|
+
readonly type: ExternalWalletType;
|
|
57
|
+
readonly platform: ExternalPlatform;
|
|
58
|
+
private wallet;
|
|
59
|
+
private account;
|
|
60
|
+
isAvailable(): boolean;
|
|
61
|
+
getInfo(): ExternalWallet;
|
|
62
|
+
connect(): Promise<ExternalWalletResponse<any>>;
|
|
63
|
+
signTypedData(data: TypedData): Promise<ExternalWalletResponse<any>>;
|
|
64
|
+
switchChain(_chainId: string): Promise<boolean>;
|
|
65
|
+
getBalance(_tokenAddress?: string): Promise<ExternalWalletResponse<any>>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ArgentWallet, ExternalPlatform, ExternalWallet, ExternalWalletResponse, ExternalWalletType, MetaMaskWallet, PhantomWallet, WalletAdapter, humanizeString, normalizeCalls, parseChainId, toArray, toSessionPolicies, toWasmPolicies };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { default } from './controller.js';
|
|
2
2
|
import { P as ParsedSessionPolicies } from './policies-DD1aPjQ4.js';
|
|
3
3
|
export { N as NotReadyToConnect } from './policies-DD1aPjQ4.js';
|
|
4
|
-
|
|
4
|
+
import { W as WalletAdapter, E as ExternalWalletType, a as ExternalPlatform, b as ExternalWallet, c as ExternalWalletResponse } from './provider-BeCgS86X.js';
|
|
5
|
+
export { m as Chain, C as ConnectError, e as ConnectReply, i as ControllerAccounts, d as ControllerError, k as ControllerOptions, D as DeployReply, f as ExecuteReply, l as IFrameOptions, I as IFrames, K as Keychain, o as KeychainOptions, L as LookupRequest, h as LookupResponse, g as LookupResult, M as Modal, P as ProbeReply, j as Profile, q as ProfileContextTypeVariant, p as ProfileOptions, n as ProviderOptions, R as ResponseCodes, S as Session, T as Tokens, r as WalletBridge } from './provider-BeCgS86X.js';
|
|
5
6
|
export { lookupAddresses, lookupUsernames } from './lookup.js';
|
|
6
7
|
import * as starknet from 'starknet';
|
|
7
8
|
import { Call } from 'starknet';
|
|
8
9
|
import wasm from '@cartridge/account-wasm/controller';
|
|
9
10
|
import { Policies, SessionPolicies } from '@cartridge/presets';
|
|
10
11
|
export * from '@cartridge/presets';
|
|
11
|
-
import { ChainId } from '@starknet-io/types-js';
|
|
12
|
+
import { ChainId, TypedData } from '@starknet-io/types-js';
|
|
12
13
|
import '@cartridge/penpal';
|
|
13
14
|
|
|
14
15
|
declare function normalizeCalls(calls: Call | Call[]): {
|
|
@@ -22,4 +23,46 @@ declare function toArray<T>(val: T | T[]): T[];
|
|
|
22
23
|
declare function humanizeString(str: string): string;
|
|
23
24
|
declare function parseChainId(url: URL): Promise<ChainId>;
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
declare class MetaMaskWallet implements WalletAdapter {
|
|
27
|
+
readonly type: ExternalWalletType;
|
|
28
|
+
readonly platform: ExternalPlatform;
|
|
29
|
+
private MMSDK;
|
|
30
|
+
private account;
|
|
31
|
+
constructor();
|
|
32
|
+
isAvailable(): boolean;
|
|
33
|
+
getInfo(): ExternalWallet;
|
|
34
|
+
connect(): Promise<ExternalWalletResponse<any>>;
|
|
35
|
+
signTransaction(transaction: any): Promise<ExternalWalletResponse<any>>;
|
|
36
|
+
signMessage(message: string): Promise<ExternalWalletResponse<any>>;
|
|
37
|
+
signTypedData(data: any): Promise<ExternalWalletResponse<any>>;
|
|
38
|
+
switchChain(chainId: string): Promise<boolean>;
|
|
39
|
+
getBalance(tokenAddress?: string): Promise<ExternalWalletResponse<any>>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class PhantomWallet implements WalletAdapter {
|
|
43
|
+
readonly type: ExternalWalletType;
|
|
44
|
+
readonly platform: ExternalPlatform;
|
|
45
|
+
private account;
|
|
46
|
+
isAvailable(): boolean;
|
|
47
|
+
getInfo(): ExternalWallet;
|
|
48
|
+
connect(): Promise<ExternalWalletResponse<any>>;
|
|
49
|
+
signTransaction(transaction: any): Promise<ExternalWalletResponse<any>>;
|
|
50
|
+
signMessage(message: string): Promise<ExternalWalletResponse<any>>;
|
|
51
|
+
switchChain(_chainId: string): Promise<boolean>;
|
|
52
|
+
getBalance(_tokenAddress?: string): Promise<ExternalWalletResponse<any>>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class ArgentWallet implements WalletAdapter {
|
|
56
|
+
readonly type: ExternalWalletType;
|
|
57
|
+
readonly platform: ExternalPlatform;
|
|
58
|
+
private wallet;
|
|
59
|
+
private account;
|
|
60
|
+
isAvailable(): boolean;
|
|
61
|
+
getInfo(): ExternalWallet;
|
|
62
|
+
connect(): Promise<ExternalWalletResponse<any>>;
|
|
63
|
+
signTypedData(data: TypedData): Promise<ExternalWalletResponse<any>>;
|
|
64
|
+
switchChain(_chainId: string): Promise<boolean>;
|
|
65
|
+
getBalance(_tokenAddress?: string): Promise<ExternalWalletResponse<any>>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ArgentWallet, ExternalPlatform, ExternalWallet, ExternalWalletResponse, ExternalWalletType, MetaMaskWallet, PhantomWallet, WalletAdapter, humanizeString, normalizeCalls, parseChainId, toArray, toSessionPolicies, toWasmPolicies };
|