@imtbl/sdk 1.43.3 → 1.43.4
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/dist/Passport.d-011d5035.d.ts +224 -0
- package/dist/blockchain-data.d-1634b683.d.ts +3406 -0
- package/dist/blockchain_data-d989298c.js +1 -0
- package/dist/blockchain_data.d-d538f8d4.d.ts +4543 -0
- package/dist/blockchain_data.d.ts +3 -7950
- package/dist/blockchain_data.js +1 -6058
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout-68675dd1.js +16 -0
- package/dist/checkout.d-ae9ca847.d.ts +3392 -0
- package/dist/checkout.d.ts +7 -16882
- package/dist/checkout.js +1 -37189
- package/dist/config-53a9a4ca.js +1 -0
- package/dist/config.d-65420620.d.ts +18 -0
- package/dist/config.d.ts +1 -30
- package/dist/config.js +1 -394
- package/dist/event-types.d-42520276.d.ts +332 -0
- package/dist/imxProvider.d-cac9e315.d.ts +12538 -0
- package/dist/index-14aad537.js +1 -0
- package/dist/index-3951cdf0.js +1 -0
- package/dist/index-3f40d7f6.js +1 -0
- package/dist/index-58a79c29.js +1 -0
- package/dist/index-96599707.js +1 -0
- package/dist/index-e7002486.js +1 -0
- package/dist/index.browser.js +4 -4
- package/dist/index.cjs +7 -7
- package/dist/index.d-c4a4c17d.d.ts +277 -0
- package/dist/index.d-f0845744.d.ts +30 -0
- package/dist/index.d-f1471830.d.ts +376 -0
- package/dist/index.d.ts +18 -32627
- package/dist/index.js +1 -64124
- package/dist/json-rpc-provider.d-5c038bd9.d.ts +249 -0
- package/dist/minting_backend-04aef147.js +1 -0
- package/dist/minting_backend.d-4754ffee.d.ts +104 -0
- package/dist/minting_backend.d.ts +5 -3535
- package/dist/minting_backend.js +1 -6756
- package/dist/orderbook-e71036df.js +1 -0
- package/dist/orderbook.d-77162c6c.d.ts +1257 -0
- package/dist/orderbook.d.ts +5 -1713
- package/dist/orderbook.js +1 -2479
- package/dist/passport-0f45e532.js +1 -0
- package/dist/passport.d-d3f44798.d.ts +67 -0
- package/dist/passport.d.ts +6 -13703
- package/dist/passport.js +1 -23137
- package/dist/transfer.d-87728423.d.ts +898 -0
- package/dist/webhook-a16541bb.js +1 -0
- package/dist/webhook.d-4c3cb340.d.ts +75 -0
- package/dist/webhook.d.ts +4 -1265
- package/dist/webhook.js +1 -488
- package/dist/x-a5b39578.js +1 -0
- package/dist/x.d-1b51f0c3.d.ts +4879 -0
- package/dist/x.d.ts +6 -18663
- package/dist/x.js +1 -19242
- package/package.json +1 -1
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { C as Configuration, A as AssetsApi, B as BalancesApi, a as CollectionsApi, D as DepositsApi, E as EncodingApi, b as ExchangesApi, M as MetadataApi, c as MetadataRefreshesApi, d as MintsApi, N as NftCheckoutPrimaryApi, O as OrdersApi, P as PrimarySalesApi, e as ProjectsApi, T as TokensApi, f as TradesApi, g as TransfersApi, U as UsersApi, W as WithdrawalsApi, I as IMXClient, h as IMXProvider } from './imxProvider.d-cac9e315.js';
|
|
2
|
+
import { M as ModuleConfiguration } from './index.d-f0845744.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for generated clients
|
|
6
|
+
*/
|
|
7
|
+
type ImmutableAPIConfiguration = Configuration;
|
|
8
|
+
|
|
9
|
+
declare class ImxApiClients {
|
|
10
|
+
config: ImmutableAPIConfiguration;
|
|
11
|
+
assetApi: AssetsApi;
|
|
12
|
+
balanceApi: BalancesApi;
|
|
13
|
+
collectionApi: CollectionsApi;
|
|
14
|
+
depositsApi: DepositsApi;
|
|
15
|
+
encodingApi: EncodingApi;
|
|
16
|
+
exchangeApi: ExchangesApi;
|
|
17
|
+
metadataApi: MetadataApi;
|
|
18
|
+
metadataRefreshesApi: MetadataRefreshesApi;
|
|
19
|
+
mintsApi: MintsApi;
|
|
20
|
+
nftCheckoutPrimaryApi: NftCheckoutPrimaryApi;
|
|
21
|
+
ordersApi: OrdersApi;
|
|
22
|
+
primarySalesApi: PrimarySalesApi;
|
|
23
|
+
projectsApi: ProjectsApi;
|
|
24
|
+
tokensApi: TokensApi;
|
|
25
|
+
tradesApi: TradesApi;
|
|
26
|
+
transfersApi: TransfersApi;
|
|
27
|
+
usersApi: UsersApi;
|
|
28
|
+
withdrawalsApi: WithdrawalsApi;
|
|
29
|
+
constructor(config: ImmutableAPIConfiguration);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type UserProfile = {
|
|
33
|
+
email?: string;
|
|
34
|
+
nickname?: string;
|
|
35
|
+
sub: string;
|
|
36
|
+
};
|
|
37
|
+
interface OidcConfiguration {
|
|
38
|
+
clientId: string;
|
|
39
|
+
logoutRedirectUri?: string;
|
|
40
|
+
logoutMode?: 'redirect' | 'silent';
|
|
41
|
+
redirectUri: string;
|
|
42
|
+
scope?: string;
|
|
43
|
+
audience?: string;
|
|
44
|
+
}
|
|
45
|
+
interface PassportOverrides {
|
|
46
|
+
authenticationDomain: string;
|
|
47
|
+
magicPublishableApiKey: string;
|
|
48
|
+
magicProviderId: string;
|
|
49
|
+
passportDomain: string;
|
|
50
|
+
imxPublicApiDomain: string;
|
|
51
|
+
immutableXClient: IMXClient;
|
|
52
|
+
zkEvmRpcUrl: string;
|
|
53
|
+
relayerUrl: string;
|
|
54
|
+
indexerMrBasePath: string;
|
|
55
|
+
orderBookMrBasePath: string;
|
|
56
|
+
passportMrBasePath: string;
|
|
57
|
+
imxApiClients?: ImxApiClients;
|
|
58
|
+
}
|
|
59
|
+
interface PopupOverlayOptions {
|
|
60
|
+
disableGenericPopupOverlay?: boolean;
|
|
61
|
+
disableBlockedPopupOverlay?: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface PassportModuleConfiguration extends ModuleConfiguration<PassportOverrides>, OidcConfiguration {
|
|
64
|
+
/**
|
|
65
|
+
* This flag indicates that Passport is being used in a cross-sdk bridge scenario
|
|
66
|
+
* and not directly on the web.
|
|
67
|
+
*/
|
|
68
|
+
crossSdkBridgeEnabled?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Options for disabling the Passport popup overlays.
|
|
71
|
+
*/
|
|
72
|
+
popupOverlayOptions?: PopupOverlayOptions;
|
|
73
|
+
}
|
|
74
|
+
type DeviceConnectResponse = {
|
|
75
|
+
code: string;
|
|
76
|
+
deviceCode: string;
|
|
77
|
+
url: string;
|
|
78
|
+
interval: number;
|
|
79
|
+
};
|
|
80
|
+
type DeviceTokenResponse = {
|
|
81
|
+
access_token: string;
|
|
82
|
+
refresh_token?: string;
|
|
83
|
+
id_token: string;
|
|
84
|
+
token_type: string;
|
|
85
|
+
expires_in: number;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* ProviderErrors should take priority over RpcErrorCodes
|
|
90
|
+
* https://eips.ethereum.org/EIPS/eip-1193#provider-errors
|
|
91
|
+
* https://eips.ethereum.org/EIPS/eip-1474#error-codes
|
|
92
|
+
*/
|
|
93
|
+
declare enum ProviderErrorCode {
|
|
94
|
+
USER_REJECTED_REQUEST = 4001,
|
|
95
|
+
UNAUTHORIZED = 4100,
|
|
96
|
+
UNSUPPORTED_METHOD = 4200,
|
|
97
|
+
DISCONNECTED = 4900
|
|
98
|
+
}
|
|
99
|
+
declare enum RpcErrorCode {
|
|
100
|
+
RPC_SERVER_ERROR = -32000,
|
|
101
|
+
INVALID_REQUEST = -32600,
|
|
102
|
+
METHOD_NOT_FOUND = -32601,
|
|
103
|
+
INVALID_PARAMS = -32602,
|
|
104
|
+
INTERNAL_ERROR = -32603,
|
|
105
|
+
PARSE_ERROR = -32700,
|
|
106
|
+
TRANSACTION_REJECTED = -32003
|
|
107
|
+
}
|
|
108
|
+
declare class JsonRpcError extends Error {
|
|
109
|
+
readonly message: string;
|
|
110
|
+
readonly code: ProviderErrorCode | RpcErrorCode;
|
|
111
|
+
constructor(code: ProviderErrorCode | RpcErrorCode, message: string);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface TypedDataPayload {
|
|
115
|
+
types: {
|
|
116
|
+
EIP712Domain: Array<{
|
|
117
|
+
name: string;
|
|
118
|
+
type: string;
|
|
119
|
+
}>;
|
|
120
|
+
[key: string]: Array<{
|
|
121
|
+
name: string;
|
|
122
|
+
type: string;
|
|
123
|
+
}>;
|
|
124
|
+
};
|
|
125
|
+
domain: {
|
|
126
|
+
name?: string;
|
|
127
|
+
version?: string;
|
|
128
|
+
chainId?: number;
|
|
129
|
+
verifyingContract?: string;
|
|
130
|
+
salt?: string;
|
|
131
|
+
};
|
|
132
|
+
primaryType: string;
|
|
133
|
+
message: Record<string, any>;
|
|
134
|
+
}
|
|
135
|
+
interface RequestArguments {
|
|
136
|
+
method: string;
|
|
137
|
+
params?: Array<any>;
|
|
138
|
+
}
|
|
139
|
+
type JsonRpcRequestPayload = RequestArguments & {
|
|
140
|
+
jsonrpc?: string;
|
|
141
|
+
id?: string | number;
|
|
142
|
+
};
|
|
143
|
+
interface JsonRpcRequestCallback {
|
|
144
|
+
(err: JsonRpcError | null, result?: JsonRpcResponsePayload | (JsonRpcResponsePayload | null)[] | null): void;
|
|
145
|
+
}
|
|
146
|
+
interface JsonRpcResponsePayload {
|
|
147
|
+
result?: Array<any> | null;
|
|
148
|
+
error?: JsonRpcError | null;
|
|
149
|
+
jsonrpc?: string;
|
|
150
|
+
id?: string | number;
|
|
151
|
+
}
|
|
152
|
+
type Provider = {
|
|
153
|
+
request: (request: RequestArguments) => Promise<any>;
|
|
154
|
+
sendAsync: (request: JsonRpcRequestPayload | JsonRpcRequestPayload[], callback: JsonRpcRequestCallback) => void;
|
|
155
|
+
send: (request: string | JsonRpcRequestPayload | JsonRpcRequestPayload[], callbackOrParams?: JsonRpcRequestCallback | Array<any>, callback?: JsonRpcRequestCallback) => void;
|
|
156
|
+
on: (event: string, listener: (...args: any[]) => void) => void;
|
|
157
|
+
removeListener: (event: string, listener: (...args: any[]) => void) => void;
|
|
158
|
+
isPassport: boolean;
|
|
159
|
+
};
|
|
160
|
+
declare enum ProviderEvent {
|
|
161
|
+
ACCOUNTS_CHANGED = "accountsChanged"
|
|
162
|
+
}
|
|
163
|
+
type AccountsChangedEvent = Array<string>;
|
|
164
|
+
|
|
165
|
+
declare class Passport {
|
|
166
|
+
private readonly authManager;
|
|
167
|
+
private readonly config;
|
|
168
|
+
private readonly confirmationScreen;
|
|
169
|
+
private readonly immutableXClient;
|
|
170
|
+
private readonly magicAdapter;
|
|
171
|
+
private readonly multiRollupApiClients;
|
|
172
|
+
private readonly passportImxProviderFactory;
|
|
173
|
+
private readonly passportEventEmitter;
|
|
174
|
+
private readonly guardianClient;
|
|
175
|
+
constructor(passportModuleConfiguration: PassportModuleConfiguration);
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated The method `login` with an argument of `{ useCachedSession: true }` should be used in conjunction with
|
|
178
|
+
* `connectImx` instead.
|
|
179
|
+
*/
|
|
180
|
+
connectImxSilent(): Promise<IMXProvider | null>;
|
|
181
|
+
connectImx(): Promise<IMXProvider>;
|
|
182
|
+
connectEvm(options?: {
|
|
183
|
+
announceProvider: boolean;
|
|
184
|
+
}): Provider;
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* Initiates the authorisation flow.
|
|
188
|
+
*
|
|
189
|
+
* @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
|
|
190
|
+
* prompted to log in and the Promise will resolve with a null value.
|
|
191
|
+
* @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
|
|
192
|
+
* @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
|
|
193
|
+
*/
|
|
194
|
+
login(options?: {
|
|
195
|
+
useCachedSession: boolean;
|
|
196
|
+
anonymousId?: string;
|
|
197
|
+
}): Promise<UserProfile | null>;
|
|
198
|
+
loginCallback(): Promise<void>;
|
|
199
|
+
loginWithDeviceFlow(options?: {
|
|
200
|
+
anonymousId?: string;
|
|
201
|
+
}): Promise<DeviceConnectResponse>;
|
|
202
|
+
loginWithDeviceFlowCallback(deviceCode: string, interval: number, timeoutMs?: number): Promise<UserProfile>;
|
|
203
|
+
loginWithPKCEFlow(): string;
|
|
204
|
+
loginWithPKCEFlowCallback(authorizationCode: string, state: string): Promise<UserProfile>;
|
|
205
|
+
logout(): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Logs the user out of Passport when using device flow authentication.
|
|
208
|
+
*
|
|
209
|
+
* @returns {Promise<string>} The device flow end session endpoint. Consumers are responsible for
|
|
210
|
+
* opening this URL in the same browser that was used to log the user in.
|
|
211
|
+
*/
|
|
212
|
+
logoutDeviceFlow(): Promise<string>;
|
|
213
|
+
/**
|
|
214
|
+
* This method should only be called from the logout redirect uri
|
|
215
|
+
* when logout mode is 'silent'.
|
|
216
|
+
*/
|
|
217
|
+
logoutSilentCallback(url: string): Promise<void>;
|
|
218
|
+
getUserInfo(): Promise<UserProfile | undefined>;
|
|
219
|
+
getIdToken(): Promise<string | undefined>;
|
|
220
|
+
getAccessToken(): Promise<string | undefined>;
|
|
221
|
+
getLinkedAddresses(): Promise<string[]>;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export { AccountsChangedEvent as A, DeviceConnectResponse as D, JsonRpcError as J, Passport as P, RequestArguments as R, TypedDataPayload as T, UserProfile as U, DeviceTokenResponse as a, JsonRpcRequestCallback as b, JsonRpcRequestPayload as c, JsonRpcResponsePayload as d, PassportModuleConfiguration as e, PassportOverrides as f, Provider as g, ProviderErrorCode as h, ProviderEvent as i, RpcErrorCode as j };
|