@metamask/keyring-api 14.0.0 → 16.0.0
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/CHANGELOG.md +28 -1
- package/dist/api/account.cjs +2 -2
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +2 -2
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +2 -2
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +5 -5
- package/dist/api/account.mjs.map +1 -1
- package/dist/api/address.cjs +14 -0
- package/dist/api/address.cjs.map +1 -0
- package/dist/api/address.d.cts +19 -0
- package/dist/api/address.d.cts.map +1 -0
- package/dist/api/address.d.mts +19 -0
- package/dist/api/address.d.mts.map +1 -0
- package/dist/api/address.mjs +11 -0
- package/dist/api/address.mjs.map +1 -0
- package/dist/api/asset.cjs +15 -9
- package/dist/api/asset.cjs.map +1 -1
- package/dist/api/asset.d.cts +25 -9
- package/dist/api/asset.d.cts.map +1 -1
- package/dist/api/asset.d.mts +25 -9
- package/dist/api/asset.d.mts.map +1 -1
- package/dist/api/asset.mjs +14 -8
- package/dist/api/asset.mjs.map +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.cts.map +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.mts.map +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/api/keyring.cjs.map +1 -1
- package/dist/api/keyring.d.cts +16 -2
- package/dist/api/keyring.d.cts.map +1 -1
- package/dist/api/keyring.d.mts +16 -2
- package/dist/api/keyring.d.mts.map +1 -1
- package/dist/api/keyring.mjs.map +1 -1
- package/dist/api/transaction.d.cts +30 -30
- package/dist/api/transaction.d.mts +30 -30
- package/dist/btc/constants.cjs +9 -10
- package/dist/btc/constants.cjs.map +1 -1
- package/dist/btc/constants.d.cts +1 -2
- package/dist/btc/constants.d.cts.map +1 -1
- package/dist/btc/constants.d.mts +1 -2
- package/dist/btc/constants.d.mts.map +1 -1
- package/dist/btc/constants.mjs +8 -9
- package/dist/btc/constants.mjs.map +1 -1
- package/dist/btc/types.cjs +7 -0
- package/dist/btc/types.cjs.map +1 -1
- package/dist/btc/types.d.cts +7 -2
- package/dist/btc/types.d.cts.map +1 -1
- package/dist/btc/types.d.mts +7 -2
- package/dist/btc/types.d.mts.map +1 -1
- package/dist/btc/types.mjs +8 -1
- package/dist/btc/types.mjs.map +1 -1
- package/dist/eth/constants.cjs +7 -6
- package/dist/eth/constants.cjs.map +1 -1
- package/dist/eth/constants.d.cts +4 -3
- package/dist/eth/constants.d.cts.map +1 -1
- package/dist/eth/constants.d.mts +4 -3
- package/dist/eth/constants.d.mts.map +1 -1
- package/dist/eth/constants.mjs +6 -5
- package/dist/eth/constants.mjs.map +1 -1
- package/dist/eth/types.cjs +7 -2
- package/dist/eth/types.cjs.map +1 -1
- package/dist/eth/types.d.cts +9 -6
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts +9 -6
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/eth/types.mjs +8 -3
- package/dist/eth/types.mjs.map +1 -1
- package/dist/events.cjs +75 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +248 -9
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +248 -9
- package/dist/events.d.mts.map +1 -1
- package/dist/events.mjs +78 -4
- package/dist/events.mjs.map +1 -1
- package/dist/rpc.cjs +18 -4
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.cts +77 -29
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +77 -29
- package/dist/rpc.d.mts.map +1 -1
- package/dist/rpc.mjs +18 -4
- package/dist/rpc.mjs.map +1 -1
- package/dist/sol/constants.cjs +7 -8
- package/dist/sol/constants.cjs.map +1 -1
- package/dist/sol/constants.d.cts +1 -2
- package/dist/sol/constants.d.cts.map +1 -1
- package/dist/sol/constants.d.mts +1 -2
- package/dist/sol/constants.d.mts.map +1 -1
- package/dist/sol/constants.mjs +6 -7
- package/dist/sol/constants.mjs.map +1 -1
- package/dist/sol/types.cjs +5 -0
- package/dist/sol/types.cjs.map +1 -1
- package/dist/sol/types.d.cts +5 -2
- package/dist/sol/types.d.cts.map +1 -1
- package/dist/sol/types.d.mts +5 -2
- package/dist/sol/types.d.mts.map +1 -1
- package/dist/sol/types.mjs +6 -1
- package/dist/sol/types.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/api/caip.cjs +0 -21
- package/dist/api/caip.cjs.map +0 -1
- package/dist/api/caip.d.cts +0 -21
- package/dist/api/caip.d.cts.map +0 -1
- package/dist/api/caip.d.mts +0 -21
- package/dist/api/caip.d.mts.map +0 -1
- package/dist/api/caip.mjs +0 -18
- package/dist/api/caip.mjs.map +0 -1
package/dist/rpc.d.mts
CHANGED
@@ -9,6 +9,7 @@ export declare enum KeyringRpcMethod {
|
|
9
9
|
ListAccountAssets = "keyring_listAccountAssets",
|
10
10
|
ListAccountTransactions = "keyring_listAccountTransactions",
|
11
11
|
GetAccountBalances = "keyring_getAccountBalances",
|
12
|
+
ResolveAccountAddress = "keyring_resolveAccountAddress",
|
12
13
|
FilterAccountChains = "keyring_filterAccountChains",
|
13
14
|
UpdateAccount = "keyring_updateAccount",
|
14
15
|
DeleteAccount = "keyring_deleteAccount",
|
@@ -41,14 +42,14 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
|
|
41
42
|
id: string;
|
42
43
|
options: Record<string, import("@metamask/utils").Json>;
|
43
44
|
address: string;
|
44
|
-
scopes: string[];
|
45
|
+
scopes: `${string}:${string}`[];
|
45
46
|
methods: string[];
|
46
47
|
}[], import("@metamask/superstruct").Struct<{
|
47
48
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
48
49
|
id: string;
|
49
50
|
options: Record<string, import("@metamask/utils").Json>;
|
50
51
|
address: string;
|
51
|
-
scopes: string[];
|
52
|
+
scopes: `${string}:${string}`[];
|
52
53
|
methods: string[];
|
53
54
|
}, {
|
54
55
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -59,7 +60,7 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
|
|
59
60
|
"solana:data-account": "solana:data-account";
|
60
61
|
}>;
|
61
62
|
address: import("@metamask/superstruct").Struct<string, null>;
|
62
|
-
scopes: import("@metamask/superstruct").Struct
|
63
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
63
64
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
64
65
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
65
66
|
}>>;
|
@@ -87,7 +88,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
|
|
87
88
|
id: string;
|
88
89
|
options: Record<string, import("@metamask/utils").Json>;
|
89
90
|
address: string;
|
90
|
-
scopes: string[];
|
91
|
+
scopes: `${string}:${string}`[];
|
91
92
|
methods: string[];
|
92
93
|
}, {
|
93
94
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -98,7 +99,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
|
|
98
99
|
"solana:data-account": "solana:data-account";
|
99
100
|
}>;
|
100
101
|
address: import("@metamask/superstruct").Struct<string, null>;
|
101
|
-
scopes: import("@metamask/superstruct").Struct
|
102
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
102
103
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
103
104
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
104
105
|
}>;
|
@@ -126,7 +127,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
|
|
126
127
|
id: string;
|
127
128
|
options: Record<string, import("@metamask/utils").Json>;
|
128
129
|
address: string;
|
129
|
-
scopes: string[];
|
130
|
+
scopes: `${string}:${string}`[];
|
130
131
|
methods: string[];
|
131
132
|
}, {
|
132
133
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -137,7 +138,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
|
|
137
138
|
"solana:data-account": "solana:data-account";
|
138
139
|
}>;
|
139
140
|
address: import("@metamask/superstruct").Struct<string, null>;
|
140
|
-
scopes: import("@metamask/superstruct").Struct
|
141
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
141
142
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
142
143
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
143
144
|
}>;
|
@@ -184,8 +185,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
184
185
|
asset: {
|
185
186
|
unit: string;
|
186
187
|
type: `${string}:${string}/${string}:${string}`;
|
187
|
-
fungible: true;
|
188
188
|
amount: string;
|
189
|
+
fungible: true;
|
189
190
|
} | {
|
190
191
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
191
192
|
fungible: false;
|
@@ -204,8 +205,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
204
205
|
asset: {
|
205
206
|
unit: string;
|
206
207
|
type: `${string}:${string}/${string}:${string}`;
|
207
|
-
fungible: true;
|
208
208
|
amount: string;
|
209
|
+
fungible: true;
|
209
210
|
} | {
|
210
211
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
211
212
|
fungible: false;
|
@@ -216,8 +217,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
216
217
|
asset: {
|
217
218
|
unit: string;
|
218
219
|
type: `${string}:${string}/${string}:${string}`;
|
219
|
-
fungible: true;
|
220
220
|
amount: string;
|
221
|
+
fungible: true;
|
221
222
|
} | {
|
222
223
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
223
224
|
fungible: false;
|
@@ -234,8 +235,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
234
235
|
asset: {
|
235
236
|
unit: string;
|
236
237
|
type: `${string}:${string}/${string}:${string}`;
|
237
|
-
fungible: true;
|
238
238
|
amount: string;
|
239
|
+
fungible: true;
|
239
240
|
} | {
|
240
241
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
241
242
|
fungible: false;
|
@@ -254,8 +255,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
254
255
|
asset: {
|
255
256
|
unit: string;
|
256
257
|
type: `${string}:${string}/${string}:${string}`;
|
257
|
-
fungible: true;
|
258
258
|
amount: string;
|
259
|
+
fungible: true;
|
259
260
|
} | {
|
260
261
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
261
262
|
fungible: false;
|
@@ -266,8 +267,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
266
267
|
asset: {
|
267
268
|
unit: string;
|
268
269
|
type: `${string}:${string}/${string}:${string}`;
|
269
|
-
fungible: true;
|
270
270
|
amount: string;
|
271
|
+
fungible: true;
|
271
272
|
} | {
|
272
273
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
273
274
|
fungible: false;
|
@@ -281,8 +282,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
281
282
|
asset: {
|
282
283
|
unit: string;
|
283
284
|
type: `${string}:${string}/${string}:${string}`;
|
284
|
-
fungible: true;
|
285
285
|
amount: string;
|
286
|
+
fungible: true;
|
286
287
|
} | {
|
287
288
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
288
289
|
fungible: false;
|
@@ -301,8 +302,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
301
302
|
asset: {
|
302
303
|
unit: string;
|
303
304
|
type: `${string}:${string}/${string}:${string}`;
|
304
|
-
fungible: true;
|
305
305
|
amount: string;
|
306
|
+
fungible: true;
|
306
307
|
} | {
|
307
308
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
308
309
|
fungible: false;
|
@@ -313,8 +314,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
313
314
|
asset: {
|
314
315
|
unit: string;
|
315
316
|
type: `${string}:${string}/${string}:${string}`;
|
316
|
-
fungible: true;
|
317
317
|
amount: string;
|
318
|
+
fungible: true;
|
318
319
|
} | {
|
319
320
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
320
321
|
fungible: false;
|
@@ -340,8 +341,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
340
341
|
asset: {
|
341
342
|
unit: string;
|
342
343
|
type: `${string}:${string}/${string}:${string}`;
|
343
|
-
fungible: true;
|
344
344
|
amount: string;
|
345
|
+
fungible: true;
|
345
346
|
} | {
|
346
347
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
347
348
|
fungible: false;
|
@@ -351,8 +352,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
351
352
|
asset: {
|
352
353
|
unit: string;
|
353
354
|
type: `${string}:${string}/${string}:${string}`;
|
354
|
-
fungible: true;
|
355
355
|
amount: string;
|
356
|
+
fungible: true;
|
356
357
|
} | {
|
357
358
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
358
359
|
fungible: false;
|
@@ -362,8 +363,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
362
363
|
asset: import("@metamask/superstruct").Struct<{
|
363
364
|
unit: string;
|
364
365
|
type: `${string}:${string}/${string}:${string}`;
|
365
|
-
fungible: true;
|
366
366
|
amount: string;
|
367
|
+
fungible: true;
|
367
368
|
} | {
|
368
369
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
369
370
|
fungible: false;
|
@@ -374,8 +375,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
374
375
|
asset: {
|
375
376
|
unit: string;
|
376
377
|
type: `${string}:${string}/${string}:${string}`;
|
377
|
-
fungible: true;
|
378
378
|
amount: string;
|
379
|
+
fungible: true;
|
379
380
|
} | {
|
380
381
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
381
382
|
fungible: false;
|
@@ -385,8 +386,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
385
386
|
asset: {
|
386
387
|
unit: string;
|
387
388
|
type: `${string}:${string}/${string}:${string}`;
|
388
|
-
fungible: true;
|
389
389
|
amount: string;
|
390
|
+
fungible: true;
|
390
391
|
} | {
|
391
392
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
392
393
|
fungible: false;
|
@@ -396,8 +397,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
396
397
|
asset: import("@metamask/superstruct").Struct<{
|
397
398
|
unit: string;
|
398
399
|
type: `${string}:${string}/${string}:${string}`;
|
399
|
-
fungible: true;
|
400
400
|
amount: string;
|
401
|
+
fungible: true;
|
401
402
|
} | {
|
402
403
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
403
404
|
fungible: false;
|
@@ -408,8 +409,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
408
409
|
asset: {
|
409
410
|
unit: string;
|
410
411
|
type: `${string}:${string}/${string}:${string}`;
|
411
|
-
fungible: true;
|
412
412
|
amount: string;
|
413
|
+
fungible: true;
|
413
414
|
} | {
|
414
415
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
415
416
|
fungible: false;
|
@@ -419,8 +420,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
419
420
|
asset: {
|
420
421
|
unit: string;
|
421
422
|
type: `${string}:${string}/${string}:${string}`;
|
422
|
-
fungible: true;
|
423
423
|
amount: string;
|
424
|
+
fungible: true;
|
424
425
|
} | {
|
425
426
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
426
427
|
fungible: false;
|
@@ -433,8 +434,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
433
434
|
asset: import("@metamask/superstruct").Struct<{
|
434
435
|
unit: string;
|
435
436
|
type: `${string}:${string}/${string}:${string}`;
|
436
|
-
fungible: true;
|
437
437
|
amount: string;
|
438
|
+
fungible: true;
|
438
439
|
} | {
|
439
440
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
440
441
|
fungible: false;
|
@@ -505,6 +506,53 @@ export declare const GetAccountBalancesResponseStruct: import("@metamask/superst
|
|
505
506
|
amount: string;
|
506
507
|
}>, null>;
|
507
508
|
export type GetAccountBalancesResponse = Infer<typeof GetAccountBalancesResponseStruct>;
|
509
|
+
export declare const ResolveAccountAddressRequestStruct: import("@metamask/superstruct").Struct<{
|
510
|
+
method: "keyring_resolveAccountAddress";
|
511
|
+
id: string | number | null;
|
512
|
+
jsonrpc: "2.0";
|
513
|
+
params: {
|
514
|
+
request: {
|
515
|
+
method: string;
|
516
|
+
id: string | number | null;
|
517
|
+
jsonrpc: "2.0";
|
518
|
+
params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
519
|
+
};
|
520
|
+
scope: `${string}:${string}`;
|
521
|
+
};
|
522
|
+
}, {
|
523
|
+
method: import("@metamask/superstruct").Struct<"keyring_resolveAccountAddress", "keyring_resolveAccountAddress">;
|
524
|
+
params: import("@metamask/superstruct").Struct<{
|
525
|
+
request: {
|
526
|
+
method: string;
|
527
|
+
id: string | number | null;
|
528
|
+
jsonrpc: "2.0";
|
529
|
+
params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
530
|
+
};
|
531
|
+
scope: `${string}:${string}`;
|
532
|
+
}, {
|
533
|
+
scope: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
534
|
+
request: import("@metamask/superstruct").Struct<{
|
535
|
+
method: string;
|
536
|
+
id: string | number | null;
|
537
|
+
jsonrpc: "2.0";
|
538
|
+
params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
539
|
+
}, {
|
540
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
541
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
542
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
543
|
+
params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
544
|
+
}>;
|
545
|
+
}>;
|
546
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
547
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
548
|
+
}>;
|
549
|
+
export type ResolveAccountAddressRequest = Infer<typeof ResolveAccountAddressRequestStruct>;
|
550
|
+
export declare const ResolveAccountAddressResponseStruct: import("@metamask/superstruct").Struct<{
|
551
|
+
address: string;
|
552
|
+
} | null, {
|
553
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
554
|
+
}>;
|
555
|
+
export type ResolveAccountAddressResponse = Infer<typeof ResolveAccountAddressResponseStruct>;
|
508
556
|
export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
|
509
557
|
method: "keyring_filterAccountChains";
|
510
558
|
id: string | number | null;
|
@@ -538,7 +586,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
538
586
|
id: string;
|
539
587
|
options: Record<string, import("@metamask/utils").Json>;
|
540
588
|
address: string;
|
541
|
-
scopes: string[];
|
589
|
+
scopes: `${string}:${string}`[];
|
542
590
|
methods: string[];
|
543
591
|
};
|
544
592
|
};
|
@@ -550,7 +598,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
550
598
|
id: string;
|
551
599
|
options: Record<string, import("@metamask/utils").Json>;
|
552
600
|
address: string;
|
553
|
-
scopes: string[];
|
601
|
+
scopes: `${string}:${string}`[];
|
554
602
|
methods: string[];
|
555
603
|
};
|
556
604
|
}, {
|
@@ -559,7 +607,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
559
607
|
id: string;
|
560
608
|
options: Record<string, import("@metamask/utils").Json>;
|
561
609
|
address: string;
|
562
|
-
scopes: string[];
|
610
|
+
scopes: `${string}:${string}`[];
|
563
611
|
methods: string[];
|
564
612
|
}, {
|
565
613
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -570,7 +618,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
570
618
|
"solana:data-account": "solana:data-account";
|
571
619
|
}>;
|
572
620
|
address: import("@metamask/superstruct").Struct<string, null>;
|
573
|
-
scopes: import("@metamask/superstruct").Struct
|
621
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
574
622
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
575
623
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
576
624
|
}>;
|
package/dist/rpc.d.mts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AA2BnD;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,iBAAiB,8BAA8B;IAC/C,uBAAuB,oCAAoC;IAC3D,kBAAkB,+BAA+B;IACjD,qBAAqB,kCAAkC;IACvD,mBAAmB,gCAAgC;IACnD,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,cAAc,2BAA2B;IACzC,a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AwB;;;;;;;;;;;;;;;;;;;EAAuB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAKxE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;;;;;;;;QAAwB,CAAC;AAEjE,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAK9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;EAOtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE9E,eAAO,MAAM,4BAA4B,oDAAgB,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAKhF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E,eAAO,MAAM,2BAA2B,oDAAgB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
package/dist/rpc.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { object, UuidStruct } from "@metamask/keyring-utils";
|
2
|
-
import { array, literal, number, record, string, union } from "@metamask/superstruct";
|
3
|
-
import { JsonStruct } from "@metamask/utils";
|
4
|
-
import { BalanceStruct,
|
1
|
+
import { object, UuidStruct, JsonRpcRequestStruct } from "@metamask/keyring-utils";
|
2
|
+
import { array, literal, nullable, number, record, string, union } from "@metamask/superstruct";
|
3
|
+
import { JsonStruct, CaipAssetTypeStruct, CaipAssetTypeOrIdStruct, CaipChainIdStruct } from "@metamask/utils";
|
4
|
+
import { BalanceStruct, KeyringAccountDataStruct, KeyringAccountStruct, KeyringRequestStruct, KeyringResponseStruct, TransactionsPageStruct, PaginationStruct } from "./api/index.mjs";
|
5
5
|
/**
|
6
6
|
* Keyring RPC methods used by the API.
|
7
7
|
*/
|
@@ -13,6 +13,7 @@ export var KeyringRpcMethod;
|
|
13
13
|
KeyringRpcMethod["ListAccountAssets"] = "keyring_listAccountAssets";
|
14
14
|
KeyringRpcMethod["ListAccountTransactions"] = "keyring_listAccountTransactions";
|
15
15
|
KeyringRpcMethod["GetAccountBalances"] = "keyring_getAccountBalances";
|
16
|
+
KeyringRpcMethod["ResolveAccountAddress"] = "keyring_resolveAccountAddress";
|
16
17
|
KeyringRpcMethod["FilterAccountChains"] = "keyring_filterAccountChains";
|
17
18
|
KeyringRpcMethod["UpdateAccount"] = "keyring_updateAccount";
|
18
19
|
KeyringRpcMethod["DeleteAccount"] = "keyring_deleteAccount";
|
@@ -97,6 +98,19 @@ export const GetAccountBalancesRequestStruct = object({
|
|
97
98
|
});
|
98
99
|
export const GetAccountBalancesResponseStruct = record(CaipAssetTypeStruct, BalanceStruct);
|
99
100
|
// ----------------------------------------------------------------------------
|
101
|
+
// Resolve account address
|
102
|
+
export const ResolveAccountAddressRequestStruct = object({
|
103
|
+
...CommonHeader,
|
104
|
+
method: literal('keyring_resolveAccountAddress'),
|
105
|
+
params: object({
|
106
|
+
scope: CaipChainIdStruct,
|
107
|
+
request: JsonRpcRequestStruct,
|
108
|
+
}),
|
109
|
+
});
|
110
|
+
export const ResolveAccountAddressResponseStruct = nullable(object({
|
111
|
+
address: string(),
|
112
|
+
}));
|
113
|
+
// ----------------------------------------------------------------------------
|
100
114
|
// Filter account chains
|
101
115
|
export const FilterAccountChainsStruct = object({
|
102
116
|
...CommonHeader,
|
package/dist/rpc.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.mjs","sourceRoot":"","sources":["../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jE,+EAA+E;AAC/E,kBAAkB;AAElB,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC;IAChD,GAAG,YAAY;IACf,MAAM,EAAE,OAAO,CAAC,wBAAwB,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC;KACnC,CAAC;CACH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAI1D,+EAA+E;AAC/E,iBAAiB;AAEjB,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,GAAG,YAAY;IACf,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import { object, UuidStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport {\n array,\n literal,\n number,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport {\n BalanceStruct,\n CaipAssetTypeStruct,\n KeyringAccountDataStruct,\n KeyringAccountStruct,\n KeyringRequestStruct,\n KeyringResponseStruct,\n TransactionsPageStruct,\n PaginationStruct,\n CaipAssetTypeOrIdStruct,\n} from './api';\n\n/**\n * Keyring RPC methods used by the API.\n */\nexport enum KeyringRpcMethod {\n ListAccounts = 'keyring_listAccounts',\n GetAccount = 'keyring_getAccount',\n CreateAccount = 'keyring_createAccount',\n ListAccountAssets = 'keyring_listAccountAssets',\n ListAccountTransactions = 'keyring_listAccountTransactions',\n GetAccountBalances = 'keyring_getAccountBalances',\n FilterAccountChains = 'keyring_filterAccountChains',\n UpdateAccount = 'keyring_updateAccount',\n DeleteAccount = 'keyring_deleteAccount',\n ExportAccount = 'keyring_exportAccount',\n ListRequests = 'keyring_listRequests',\n GetRequest = 'keyring_getRequest',\n SubmitRequest = 'keyring_submitRequest',\n ApproveRequest = 'keyring_approveRequest',\n RejectRequest = 'keyring_rejectRequest',\n}\n\n/**\n * Check if a method is a keyring RPC method.\n *\n * @param method - Method to check.\n * @returns Whether the method is a keyring RPC method.\n */\nexport function isKeyringRpcMethod(method: string): boolean {\n return Object.values(KeyringRpcMethod).includes(method as KeyringRpcMethod);\n}\n\n// ----------------------------------------------------------------------------\n\nconst CommonHeader = {\n jsonrpc: literal('2.0'),\n id: union([string(), number(), literal(null)]),\n};\n\n// ----------------------------------------------------------------------------\n// List accounts\n\nexport const ListAccountsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccounts'),\n});\n\nexport type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;\n\nexport const ListAccountsResponseStruct = array(KeyringAccountStruct);\n\nexport type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account\n\nexport const GetAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;\n\nexport const GetAccountResponseStruct = KeyringAccountStruct;\n\nexport type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Create account\n\nexport const CreateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_createAccount'),\n params: object({\n options: record(string(), JsonStruct),\n }),\n});\n\nexport type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;\n\nexport const CreateAccountResponseStruct = KeyringAccountStruct;\n\nexport type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List account transactions\n\nexport const ListAccountTransactionsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountTransactions'),\n params: object({\n id: UuidStruct,\n pagination: PaginationStruct,\n }),\n});\n\nexport type ListAccountTransactionsRequest = Infer<\n typeof ListAccountTransactionsRequestStruct\n>;\n\nexport const ListAccountTransactionsResponseStruct = TransactionsPageStruct;\n\nexport type ListAccountTransactionsResponse = Infer<\n typeof ListAccountTransactionsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// List account assets\n\nexport const ListAccountAssetsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountAssets'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ListAccountAssetsRequest = Infer<\n typeof ListAccountAssetsRequestStruct\n>;\n\nexport const ListAccountAssetsResponseStruct = array(CaipAssetTypeOrIdStruct);\n\nexport type ListAccountAssetsResponse = Infer<\n typeof ListAccountAssetsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Get account balances\n\nexport const GetAccountBalancesRequestStruct = object({\n ...CommonHeader,\n method: literal(`${KeyringRpcMethod.GetAccountBalances}`),\n params: object({\n id: UuidStruct,\n assets: array(CaipAssetTypeStruct),\n }),\n});\n\nexport type GetAccountBalancesRequest = Infer<\n typeof GetAccountBalancesRequestStruct\n>;\n\nexport const GetAccountBalancesResponseStruct = record(\n CaipAssetTypeStruct,\n BalanceStruct,\n);\n\nexport type GetAccountBalancesResponse = Infer<\n typeof GetAccountBalancesResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Filter account chains\n\nexport const FilterAccountChainsStruct = object({\n ...CommonHeader,\n method: literal('keyring_filterAccountChains'),\n params: object({\n id: UuidStruct,\n chains: array(string()),\n }),\n});\n\nexport type FilterAccountChainsRequest = Infer<\n typeof FilterAccountChainsStruct\n>;\n\nexport const FilterAccountChainsResponseStruct = array(string());\n\nexport type FilterAccountChainsResponse = Infer<\n typeof FilterAccountChainsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Update account\n\nexport const UpdateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_updateAccount'),\n params: object({\n account: KeyringAccountStruct,\n }),\n});\n\nexport type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;\n\nexport const UpdateAccountResponseStruct = literal(null);\n\nexport type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Delete account\n\nexport const DeleteAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_deleteAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;\n\nexport const DeleteAccountResponseStruct = literal(null);\n\nexport type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Export account\n\nexport const ExportAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_exportAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;\n\nexport const ExportAccountResponseStruct = KeyringAccountDataStruct;\n\nexport type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List requests\n\nexport const ListRequestsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listRequests'),\n});\n\nexport type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;\n\nexport const ListRequestsResponseStruct = array(KeyringRequestStruct);\n\nexport type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get request\n\nexport const GetRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;\n\nexport const GetRequestResponseStruct = KeyringRequestStruct;\n\nexport type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Submit request\n\nexport const SubmitRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_submitRequest'),\n params: KeyringRequestStruct,\n});\n\nexport type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;\n\nexport const SubmitRequestResponseStruct = KeyringResponseStruct;\n\nexport type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Approve request\n\nexport const ApproveRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_approveRequest'),\n params: object({\n id: UuidStruct,\n data: record(string(), JsonStruct),\n }),\n});\n\nexport type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;\n\nexport const ApproveRequestResponseStruct = literal(null);\n\nexport type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Reject request\n\nexport const RejectRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_rejectRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;\n\nexport const RejectRequestResponseStruct = literal(null);\n\nexport type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;\n"]}
|
1
|
+
{"version":3,"file":"rpc.mjs","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,oBAAoB,EACrB,gCAAgC;AAEjC,OAAO,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,EACN,8BAA8B;AAC/B,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EAClB,wBAAwB;AAEzB,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EACjB,wBAAc;AAEf;;GAEG;AACH,MAAM,CAAN,IAAY,gBAiBX;AAjBD,WAAY,gBAAgB;IAC1B,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CA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AY;IACf,MAAM,EAAE,OAAO,CAAC,wBAAwB,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC;KACnC,CAAC;CACH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAI1D,+EAA+E;AAC/E,iBAAiB;AAEjB,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,GAAG,YAAY;IACf,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import {\n object,\n UuidStruct,\n JsonRpcRequestStruct,\n} from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport {\n array,\n literal,\n nullable,\n number,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport {\n JsonStruct,\n CaipAssetTypeStruct,\n CaipAssetTypeOrIdStruct,\n CaipChainIdStruct,\n} from '@metamask/utils';\n\nimport {\n BalanceStruct,\n KeyringAccountDataStruct,\n KeyringAccountStruct,\n KeyringRequestStruct,\n KeyringResponseStruct,\n TransactionsPageStruct,\n PaginationStruct,\n} from './api';\n\n/**\n * Keyring RPC methods used by the API.\n */\nexport enum KeyringRpcMethod {\n ListAccounts = 'keyring_listAccounts',\n GetAccount = 'keyring_getAccount',\n CreateAccount = 'keyring_createAccount',\n ListAccountAssets = 'keyring_listAccountAssets',\n ListAccountTransactions = 'keyring_listAccountTransactions',\n GetAccountBalances = 'keyring_getAccountBalances',\n ResolveAccountAddress = 'keyring_resolveAccountAddress',\n FilterAccountChains = 'keyring_filterAccountChains',\n UpdateAccount = 'keyring_updateAccount',\n DeleteAccount = 'keyring_deleteAccount',\n ExportAccount = 'keyring_exportAccount',\n ListRequests = 'keyring_listRequests',\n GetRequest = 'keyring_getRequest',\n SubmitRequest = 'keyring_submitRequest',\n ApproveRequest = 'keyring_approveRequest',\n RejectRequest = 'keyring_rejectRequest',\n}\n\n/**\n * Check if a method is a keyring RPC method.\n *\n * @param method - Method to check.\n * @returns Whether the method is a keyring RPC method.\n */\nexport function isKeyringRpcMethod(method: string): boolean {\n return Object.values(KeyringRpcMethod).includes(method as KeyringRpcMethod);\n}\n\n// ----------------------------------------------------------------------------\n\nconst CommonHeader = {\n jsonrpc: literal('2.0'),\n id: union([string(), number(), literal(null)]),\n};\n\n// ----------------------------------------------------------------------------\n// List accounts\n\nexport const ListAccountsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccounts'),\n});\n\nexport type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;\n\nexport const ListAccountsResponseStruct = array(KeyringAccountStruct);\n\nexport type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account\n\nexport const GetAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;\n\nexport const GetAccountResponseStruct = KeyringAccountStruct;\n\nexport type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Create account\n\nexport const CreateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_createAccount'),\n params: object({\n options: record(string(), JsonStruct),\n }),\n});\n\nexport type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;\n\nexport const CreateAccountResponseStruct = KeyringAccountStruct;\n\nexport type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List account transactions\n\nexport const ListAccountTransactionsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountTransactions'),\n params: object({\n id: UuidStruct,\n pagination: PaginationStruct,\n }),\n});\n\nexport type ListAccountTransactionsRequest = Infer<\n typeof ListAccountTransactionsRequestStruct\n>;\n\nexport const ListAccountTransactionsResponseStruct = TransactionsPageStruct;\n\nexport type ListAccountTransactionsResponse = Infer<\n typeof ListAccountTransactionsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// List account assets\n\nexport const ListAccountAssetsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountAssets'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ListAccountAssetsRequest = Infer<\n typeof ListAccountAssetsRequestStruct\n>;\n\nexport const ListAccountAssetsResponseStruct = array(CaipAssetTypeOrIdStruct);\n\nexport type ListAccountAssetsResponse = Infer<\n typeof ListAccountAssetsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Get account balances\n\nexport const GetAccountBalancesRequestStruct = object({\n ...CommonHeader,\n method: literal(`${KeyringRpcMethod.GetAccountBalances}`),\n params: object({\n id: UuidStruct,\n assets: array(CaipAssetTypeStruct),\n }),\n});\n\nexport type GetAccountBalancesRequest = Infer<\n typeof GetAccountBalancesRequestStruct\n>;\n\nexport const GetAccountBalancesResponseStruct = record(\n CaipAssetTypeStruct,\n BalanceStruct,\n);\n\nexport type GetAccountBalancesResponse = Infer<\n typeof GetAccountBalancesResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Resolve account address\n\nexport const ResolveAccountAddressRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_resolveAccountAddress'),\n params: object({\n scope: CaipChainIdStruct,\n request: JsonRpcRequestStruct,\n }),\n});\n\nexport type ResolveAccountAddressRequest = Infer<\n typeof ResolveAccountAddressRequestStruct\n>;\n\nexport const ResolveAccountAddressResponseStruct = nullable(\n object({\n address: string(),\n }),\n);\n\nexport type ResolveAccountAddressResponse = Infer<\n typeof ResolveAccountAddressResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Filter account chains\n\nexport const FilterAccountChainsStruct = object({\n ...CommonHeader,\n method: literal('keyring_filterAccountChains'),\n params: object({\n id: UuidStruct,\n chains: array(string()),\n }),\n});\n\nexport type FilterAccountChainsRequest = Infer<\n typeof FilterAccountChainsStruct\n>;\n\nexport const FilterAccountChainsResponseStruct = array(string());\n\nexport type FilterAccountChainsResponse = Infer<\n typeof FilterAccountChainsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Update account\n\nexport const UpdateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_updateAccount'),\n params: object({\n account: KeyringAccountStruct,\n }),\n});\n\nexport type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;\n\nexport const UpdateAccountResponseStruct = literal(null);\n\nexport type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Delete account\n\nexport const DeleteAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_deleteAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;\n\nexport const DeleteAccountResponseStruct = literal(null);\n\nexport type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Export account\n\nexport const ExportAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_exportAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;\n\nexport const ExportAccountResponseStruct = KeyringAccountDataStruct;\n\nexport type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List requests\n\nexport const ListRequestsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listRequests'),\n});\n\nexport type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;\n\nexport const ListRequestsResponseStruct = array(KeyringRequestStruct);\n\nexport type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get request\n\nexport const GetRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;\n\nexport const GetRequestResponseStruct = KeyringRequestStruct;\n\nexport type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Submit request\n\nexport const SubmitRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_submitRequest'),\n params: KeyringRequestStruct,\n});\n\nexport type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;\n\nexport const SubmitRequestResponseStruct = KeyringResponseStruct;\n\nexport type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Approve request\n\nexport const ApproveRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_approveRequest'),\n params: object({\n id: UuidStruct,\n data: record(string(), JsonStruct),\n }),\n});\n\nexport type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;\n\nexport const ApproveRequestResponseStruct = literal(null);\n\nexport type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Reject request\n\nexport const RejectRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_rejectRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;\n\nexport const RejectRequestResponseStruct = literal(null);\n\nexport type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;\n"]}
|
package/dist/sol/constants.cjs
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
/* istanbul ignore file */
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.
|
4
|
+
exports.SolScope = void 0;
|
5
5
|
/**
|
6
6
|
* Scopes for Solana account type. See {@link KeyringAccount.scopes}.
|
7
7
|
*/
|
8
|
-
var
|
9
|
-
(function (
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
})(SolScopes || (exports.SolScopes = SolScopes = {}));
|
8
|
+
var SolScope;
|
9
|
+
(function (SolScope) {
|
10
|
+
SolScope["Devnet"] = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
11
|
+
SolScope["Mainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
12
|
+
SolScope["Testnet"] = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
|
13
|
+
})(SolScope || (exports.SolScope = SolScope = {}));
|
15
14
|
//# sourceMappingURL=constants.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,
|
1
|
+
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,8DAAkD,CAAA;IAClD,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;AACrD,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Solana account type. See {@link KeyringAccount.scopes}.\n */\nexport enum SolScope {\n Devnet = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n Mainnet = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n Testnet = 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n}\n"]}
|
package/dist/sol/constants.d.cts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Scopes for Solana account type. See {@link KeyringAccount.scopes}.
|
3
3
|
*/
|
4
|
-
export declare enum
|
5
|
-
Namespace = "solana",
|
4
|
+
export declare enum SolScope {
|
6
5
|
Devnet = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
|
7
6
|
Mainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
8
7
|
Testnet = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,
|
1
|
+
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,MAAM,4CAA4C;IAClD,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;CACpD"}
|
package/dist/sol/constants.d.mts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Scopes for Solana account type. See {@link KeyringAccount.scopes}.
|
3
3
|
*/
|
4
|
-
export declare enum
|
5
|
-
Namespace = "solana",
|
4
|
+
export declare enum SolScope {
|
6
5
|
Devnet = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
|
7
6
|
Mainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
8
7
|
Testnet = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,MAAM,4CAA4C;IAClD,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;CACpD"}
|
package/dist/sol/constants.mjs
CHANGED
@@ -2,11 +2,10 @@
|
|
2
2
|
/**
|
3
3
|
* Scopes for Solana account type. See {@link KeyringAccount.scopes}.
|
4
4
|
*/
|
5
|
-
export var
|
6
|
-
(function (
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
})(SolScopes || (SolScopes = {}));
|
5
|
+
export var SolScope;
|
6
|
+
(function (SolScope) {
|
7
|
+
SolScope["Devnet"] = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
8
|
+
SolScope["Mainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
9
|
+
SolScope["Testnet"] = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
|
10
|
+
})(SolScope || (SolScope = {}));
|
12
11
|
//# sourceMappingURL=constants.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,
|
1
|
+
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,8DAAkD,CAAA;IAClD,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;AACrD,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Solana account type. See {@link KeyringAccount.scopes}.\n */\nexport enum SolScope {\n Devnet = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n Mainnet = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n Testnet = 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n}\n"]}
|
package/dist/sol/types.cjs
CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SolDataAccountStruct = exports.SolMethod = exports.SolAddressStruct = void 0;
|
4
4
|
const keyring_utils_1 = require("@metamask/keyring-utils");
|
5
5
|
const superstruct_1 = require("@metamask/superstruct");
|
6
|
+
const utils_1 = require("@metamask/utils");
|
6
7
|
const api_1 = require("../api/index.cjs");
|
7
8
|
/**
|
8
9
|
* Solana addresses are represented in the format of a 256-bit ed25519 public key and
|
@@ -28,6 +29,10 @@ exports.SolDataAccountStruct = (0, keyring_utils_1.object)({
|
|
28
29
|
* Account type.
|
29
30
|
*/
|
30
31
|
type: (0, superstruct_1.literal)(`${api_1.SolAccountType.DataAccount}`),
|
32
|
+
/**
|
33
|
+
* Account supported scopes (CAIP-2 chain IDs).
|
34
|
+
*/
|
35
|
+
scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)(utils_1.CaipChainIdStruct)),
|
31
36
|
/**
|
32
37
|
* Account supported methods.
|
33
38
|
*/
|
package/dist/sol/types.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":";;;AAAA,2DAAgE;AAEhE,
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":";;;AAAA,2DAAgE;AAEhE,uDAAwE;AACxE,2CAAoD;AAEpD,0CAA8D;AAE9D;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAC3C,YAAY,EACZ,iCAAiC,CAClC,CAAC;AAEF;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAA8B;IAC9B,oEAAuD,CAAA;AACzD,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAEY,QAAA,oBAAoB,GAAG,IAAA,sBAAM,EAAC;IACzC,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,WAAW,EAAE,CAAC;IAE9C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,yBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,CAAC,GAAG,SAAS,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC;CAClE,CAAC,CAAC","sourcesContent":["import { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty } from '@metamask/superstruct';\nimport { CaipChainIdStruct } from '@metamask/utils';\n\nimport { KeyringAccountStruct, SolAccountType } from '../api';\n\n/**\n * Solana addresses are represented in the format of a 256-bit ed25519 public key and\n * are encoded using base58.\n * They are usually 32 to 44 characters long.\n */\nexport const SolAddressStruct = definePattern(\n 'SolAddress',\n /^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu,\n);\n\n/**\n * Supported Solana methods.\n */\nexport enum SolMethod {\n // General transaction methods\n SendAndConfirmTransaction = 'sendAndConfirmTransaction',\n}\n\nexport const SolDataAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: SolAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${SolAccountType.DataAccount}`),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account supported methods.\n */\n methods: array(enums([`${SolMethod.SendAndConfirmTransaction}`])),\n});\n\nexport type SolDataAccount = Infer<typeof SolDataAccountStruct>;\n"]}
|
package/dist/sol/types.d.cts
CHANGED
@@ -16,7 +16,7 @@ export declare const SolDataAccountStruct: import("@metamask/superstruct").Struc
|
|
16
16
|
id: string;
|
17
17
|
options: Record<string, import("@metamask/utils").Json>;
|
18
18
|
address: string;
|
19
|
-
scopes: string[];
|
19
|
+
scopes: `${string}:${string}`[];
|
20
20
|
methods: "sendAndConfirmTransaction"[];
|
21
21
|
}, {
|
22
22
|
/**
|
@@ -27,6 +27,10 @@ export declare const SolDataAccountStruct: import("@metamask/superstruct").Struc
|
|
27
27
|
* Account type.
|
28
28
|
*/
|
29
29
|
type: import("@metamask/superstruct").Struct<"solana:data-account", "solana:data-account">;
|
30
|
+
/**
|
31
|
+
* Account supported scopes (CAIP-2 chain IDs).
|
32
|
+
*/
|
33
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
30
34
|
/**
|
31
35
|
* Account supported methods.
|
32
36
|
*/
|
@@ -34,7 +38,6 @@ export declare const SolDataAccountStruct: import("@metamask/superstruct").Struc
|
|
34
38
|
sendAndConfirmTransaction: "sendAndConfirmTransaction";
|
35
39
|
}>>;
|
36
40
|
id: import("@metamask/superstruct").Struct<string, null>;
|
37
|
-
scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
38
41
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
39
42
|
}>;
|
40
43
|
export type SolDataAccount = Infer<typeof SolDataAccountStruct>;
|
package/dist/sol/types.d.cts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/sol/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAMnD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,yBAAyB,8BAA8B;CACxD;AAED,eAAO,MAAM,oBAAoB;;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|