@metamask-previews/keyring-api 22.0.0-ea8175e → 23.1.0-bc99865
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 +35 -8
- package/README.md +0 -9
- package/dist/api/account.cjs +15 -1
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +17 -4
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +17 -4
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +14 -0
- package/dist/api/account.mjs.map +1 -1
- package/dist/api/keyring.cjs.map +1 -1
- package/dist/api/keyring.d.cts +1 -1
- package/dist/api/keyring.d.cts.map +1 -1
- package/dist/api/keyring.d.mts +1 -1
- package/dist/api/keyring.d.mts.map +1 -1
- package/dist/api/keyring.mjs.map +1 -1
- package/dist/api/transaction.cjs +5 -0
- package/dist/api/transaction.cjs.map +1 -1
- package/dist/api/transaction.d.cts +12 -6
- package/dist/api/transaction.d.cts.map +1 -1
- package/dist/api/transaction.d.mts +12 -6
- package/dist/api/transaction.d.mts.map +1 -1
- package/dist/api/transaction.mjs +5 -0
- package/dist/api/transaction.mjs.map +1 -1
- package/dist/eth/erc4337/types.cjs.map +1 -1
- package/dist/eth/erc4337/types.d.cts +1 -1
- package/dist/eth/erc4337/types.d.cts.map +1 -1
- package/dist/eth/erc4337/types.d.mts +1 -1
- package/dist/eth/erc4337/types.d.mts.map +1 -1
- package/dist/eth/erc4337/types.mjs.map +1 -1
- package/dist/eth/types.cjs.map +1 -1
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/eth/types.mjs.map +1 -1
- package/dist/eth/utils.cjs +2 -1
- package/dist/eth/utils.cjs.map +1 -1
- package/dist/events.d.cts +13 -11
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +13 -11
- package/dist/events.d.mts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/rpc.cjs +2 -2
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.cts +27 -21
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +27 -21
- package/dist/rpc.d.mts.map +1 -1
- package/dist/v2/api/create-account/bip44.cjs.map +1 -1
- package/dist/v2/api/create-account/bip44.d.cts +1 -1
- package/dist/v2/api/create-account/bip44.d.cts.map +1 -1
- package/dist/v2/api/create-account/bip44.d.mts +1 -1
- package/dist/v2/api/create-account/bip44.d.mts.map +1 -1
- package/dist/v2/api/create-account/bip44.mjs.map +1 -1
- package/dist/v2/api/create-account/custom.cjs.map +1 -1
- package/dist/v2/api/create-account/custom.d.cts +1 -1
- package/dist/v2/api/create-account/custom.d.cts.map +1 -1
- package/dist/v2/api/create-account/custom.d.mts +1 -1
- package/dist/v2/api/create-account/custom.d.mts.map +1 -1
- package/dist/v2/api/create-account/custom.mjs.map +1 -1
- package/dist/v2/api/create-account/index.cjs +2 -2
- package/dist/v2/api/create-account/index.cjs.map +1 -1
- package/dist/v2/api/create-account/index.d.cts +2 -2
- package/dist/v2/api/create-account/index.d.cts.map +1 -1
- package/dist/v2/api/create-account/index.d.mts +2 -2
- package/dist/v2/api/create-account/index.d.mts.map +1 -1
- package/dist/v2/api/create-account/index.mjs.map +1 -1
- package/dist/v2/api/create-account/private-key.cjs.map +1 -1
- package/dist/v2/api/create-account/private-key.d.cts +4 -3
- package/dist/v2/api/create-account/private-key.d.cts.map +1 -1
- package/dist/v2/api/create-account/private-key.d.mts +4 -3
- package/dist/v2/api/create-account/private-key.d.mts.map +1 -1
- package/dist/v2/api/create-account/private-key.mjs.map +1 -1
- package/dist/v2/api/export-account/index.cjs.map +1 -1
- package/dist/v2/api/export-account/index.d.cts +1 -1
- package/dist/v2/api/export-account/index.d.cts.map +1 -1
- package/dist/v2/api/export-account/index.d.mts +1 -1
- package/dist/v2/api/export-account/index.d.mts.map +1 -1
- package/dist/v2/api/export-account/index.mjs.map +1 -1
- package/dist/v2/api/export-account/private-key.cjs.map +1 -1
- package/dist/v2/api/export-account/private-key.d.cts +1 -1
- package/dist/v2/api/export-account/private-key.d.cts.map +1 -1
- package/dist/v2/api/export-account/private-key.d.mts +1 -1
- package/dist/v2/api/export-account/private-key.d.mts.map +1 -1
- package/dist/v2/api/export-account/private-key.mjs.map +1 -1
- package/dist/v2/api/keyring-capabilities.cjs +1 -1
- package/dist/v2/api/keyring-capabilities.cjs.map +1 -1
- package/dist/v2/api/keyring-capabilities.d.cts +7 -6
- package/dist/v2/api/keyring-capabilities.d.cts.map +1 -1
- package/dist/v2/api/keyring-capabilities.d.mts +7 -6
- package/dist/v2/api/keyring-capabilities.d.mts.map +1 -1
- package/dist/v2/api/keyring-capabilities.mjs +1 -1
- package/dist/v2/api/keyring-capabilities.mjs.map +1 -1
- package/dist/v2/api/keyring-rpc.cjs +4 -4
- package/dist/v2/api/keyring-rpc.cjs.map +1 -1
- package/dist/v2/api/keyring-rpc.d.cts +13 -10
- package/dist/v2/api/keyring-rpc.d.cts.map +1 -1
- package/dist/v2/api/keyring-rpc.d.mts +13 -10
- package/dist/v2/api/keyring-rpc.d.mts.map +1 -1
- package/dist/v2/api/keyring-rpc.mjs +2 -2
- package/dist/v2/api/keyring-rpc.mjs.map +1 -1
- package/dist/v2/api/keyring.cjs.map +1 -1
- package/dist/v2/api/keyring.d.cts +2 -2
- package/dist/v2/api/keyring.d.cts.map +1 -1
- package/dist/v2/api/keyring.d.mts +2 -2
- package/dist/v2/api/keyring.d.mts.map +1 -1
- package/dist/v2/api/keyring.mjs.map +1 -1
- package/dist/v2/api/private-key.cjs.map +1 -1
- package/dist/v2/api/private-key.d.cts +4 -3
- package/dist/v2/api/private-key.d.cts.map +1 -1
- package/dist/v2/api/private-key.d.mts +4 -3
- package/dist/v2/api/private-key.d.mts.map +1 -1
- package/dist/v2/api/private-key.mjs.map +1 -1
- package/dist/xlm/constants.cjs +15 -0
- package/dist/xlm/constants.cjs.map +1 -0
- package/dist/xlm/constants.d.cts +10 -0
- package/dist/xlm/constants.d.cts.map +1 -0
- package/dist/xlm/constants.d.mts +10 -0
- package/dist/xlm/constants.d.mts.map +1 -0
- package/dist/xlm/constants.mjs +12 -0
- package/dist/xlm/constants.mjs.map +1 -0
- package/dist/xlm/index.cjs +19 -0
- package/dist/xlm/index.cjs.map +1 -0
- package/dist/xlm/index.d.cts +3 -0
- package/dist/xlm/index.d.cts.map +1 -0
- package/dist/xlm/index.d.mts +3 -0
- package/dist/xlm/index.d.mts.map +1 -0
- package/dist/xlm/index.mjs +3 -0
- package/dist/xlm/index.mjs.map +1 -0
- package/dist/xlm/types.cjs +43 -0
- package/dist/xlm/types.cjs.map +1 -0
- package/dist/xlm/types.d.cts +73 -0
- package/dist/xlm/types.d.cts.map +1 -0
- package/dist/xlm/types.d.mts +73 -0
- package/dist/xlm/types.d.mts.map +1 -0
- package/dist/xlm/types.mjs +40 -0
- package/dist/xlm/types.mjs.map +1 -0
- package/package.json +36 -30
- package/v2.js +3 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Infer } from "@metamask/superstruct";
|
|
2
2
|
/**
|
|
3
3
|
* Supported encoding formats for private keys.
|
|
4
4
|
*/
|
|
@@ -24,7 +24,7 @@ export declare const PrivateKeyEncodingStruct: import("@metamask/superstruct").S
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const ImportPrivateKeyFormatStruct: import("@metamask/superstruct").Struct<{
|
|
26
26
|
encoding: "hexadecimal" | "base58";
|
|
27
|
-
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
27
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
|
|
28
28
|
}, {
|
|
29
29
|
/**
|
|
30
30
|
* Format used to encode the private key as a string.
|
|
@@ -40,7 +40,7 @@ export declare const ImportPrivateKeyFormatStruct: import("@metamask/superstruct
|
|
|
40
40
|
* to be created from the private key. For example, in Bitcoin, a private key
|
|
41
41
|
* can be used to create multiple types of accounts, such as P2WPKH, or P2TR.
|
|
42
42
|
*/
|
|
43
|
-
type: import("@metamask/superstruct").ExactOptionalStruct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account", {
|
|
43
|
+
type: import("@metamask/superstruct").ExactOptionalStruct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account", {
|
|
44
44
|
"eip155:eoa": "eip155:eoa";
|
|
45
45
|
"eip155:erc4337": "eip155:erc4337";
|
|
46
46
|
"bip122:p2pkh": "bip122:p2pkh";
|
|
@@ -49,6 +49,7 @@ export declare const ImportPrivateKeyFormatStruct: import("@metamask/superstruct
|
|
|
49
49
|
"bip122:p2tr": "bip122:p2tr";
|
|
50
50
|
"solana:data-account": "solana:data-account";
|
|
51
51
|
"tron:eoa": "tron:eoa";
|
|
52
|
+
"stellar:account": "stellar:account";
|
|
52
53
|
"any:account": "any:account";
|
|
53
54
|
}>;
|
|
54
55
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../src/v2/api/private-key.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../src/v2/api/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;EAGnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;IACvC;;OAEG;;;;;IAGH;;;;;;OAMG;;;;;;;;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;IACvC;;OAEG;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.mjs","sourceRoot":"","sources":["../../../src/v2/api/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"private-key.mjs","sourceRoot":"","sources":["../../../src/v2/api/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,8BAA8B;AAGrE,OAAO,EAAE,wBAAwB,EAAE,8BAA0B;AAE7D;;GAEG;AACH,MAAM,CAAN,IAAY,kBAUX;AAVD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,uCAAiB,CAAA;AACnB,CAAC,EAVW,kBAAkB,KAAlB,kBAAkB,QAU7B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;IAC5C,GAAG,kBAAkB,CAAC,WAAW,EAAE;IACnC,GAAG,kBAAkB,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;IACjD;;OAEG;IACH,QAAQ,EAAE,wBAAwB;IAElC;;;;;;OAMG;IACH,IAAI,EAAE,aAAa,CAAC,wBAAwB,CAAC;CAC9C,CAAC,CAAC;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;IACjD;;OAEG;IACH,QAAQ,EAAE,wBAAwB;CACnC,CAAC,CAAC","sourcesContent":["import { enums, exactOptional, object } from '@metamask/superstruct';\nimport type { Infer } from '@metamask/superstruct';\n\nimport { KeyringAccountTypeStruct } from '../../api/account';\n\n/**\n * Supported encoding formats for private keys.\n */\nexport enum PrivateKeyEncoding {\n /**\n * Hexadecimal encoding format.\n */\n Hexadecimal = 'hexadecimal',\n\n /**\n * Base58 encoding format.\n */\n Base58 = 'base58',\n}\n\n/**\n * Struct for {@link PrivateKeyEncoding}.\n */\nexport const PrivateKeyEncodingStruct = enums([\n `${PrivateKeyEncoding.Hexadecimal}`,\n `${PrivateKeyEncoding.Base58}`,\n]);\n\n/**\n * Struct for {@link ImportPrivateKeyFormat}.\n */\nexport const ImportPrivateKeyFormatStruct = object({\n /**\n * Format used to encode the private key as a string.\n */\n encoding: PrivateKeyEncodingStruct,\n\n /**\n * Type of the account to be created.\n *\n * This field is necessary when there is ambiguity about the type of account\n * to be created from the private key. For example, in Bitcoin, a private key\n * can be used to create multiple types of accounts, such as P2WPKH, or P2TR.\n */\n type: exactOptional(KeyringAccountTypeStruct),\n});\n\n/**\n * Represents the format for importing a private key into a keyring.\n */\nexport type ImportPrivateKeyFormat = Infer<typeof ImportPrivateKeyFormatStruct>;\n\n/**\n * Struct for {@link ExportPrivateKeyFormat}.\n */\nexport const ExportPrivateKeyFormatStruct = object({\n /**\n * Format used to encode the private key as a string.\n */\n encoding: PrivateKeyEncodingStruct,\n});\n\n/**\n * Represents the format for exporting a private key from a keyring.\n */\nexport type ExportPrivateKeyFormat = Infer<typeof ExportPrivateKeyFormatStruct>;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// istanbul ignore file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.XlmScope = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Scopes for Stellar account type. See {@link KeyringAccount.scopes}.
|
|
7
|
+
*
|
|
8
|
+
* @see https://namespaces.chainagnostic.org/stellar/caip2
|
|
9
|
+
*/
|
|
10
|
+
var XlmScope;
|
|
11
|
+
(function (XlmScope) {
|
|
12
|
+
XlmScope["Pubnet"] = "stellar:pubnet";
|
|
13
|
+
XlmScope["Testnet"] = "stellar:testnet";
|
|
14
|
+
})(XlmScope || (exports.XlmScope = XlmScope = {}));
|
|
15
|
+
//# sourceMappingURL=constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/xlm/constants.ts"],"names":[],"mappings":";AAAA,uBAAuB;;;AAEvB;;;;GAIG;AACH,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,qCAAyB,CAAA;IACzB,uCAA2B,CAAA;AAC7B,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB","sourcesContent":["// istanbul ignore file\n\n/**\n * Scopes for Stellar account type. See {@link KeyringAccount.scopes}.\n *\n * @see https://namespaces.chainagnostic.org/stellar/caip2\n */\nexport enum XlmScope {\n Pubnet = 'stellar:pubnet',\n Testnet = 'stellar:testnet',\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scopes for Stellar account type. See {@link KeyringAccount.scopes}.
|
|
3
|
+
*
|
|
4
|
+
* @see https://namespaces.chainagnostic.org/stellar/caip2
|
|
5
|
+
*/
|
|
6
|
+
export declare enum XlmScope {
|
|
7
|
+
Pubnet = "stellar:pubnet",
|
|
8
|
+
Testnet = "stellar:testnet"
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=constants.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/xlm/constants.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,oBAAY,QAAQ;IAClB,MAAM,mBAAmB;IACzB,OAAO,oBAAoB;CAC5B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scopes for Stellar account type. See {@link KeyringAccount.scopes}.
|
|
3
|
+
*
|
|
4
|
+
* @see https://namespaces.chainagnostic.org/stellar/caip2
|
|
5
|
+
*/
|
|
6
|
+
export declare enum XlmScope {
|
|
7
|
+
Pubnet = "stellar:pubnet",
|
|
8
|
+
Testnet = "stellar:testnet"
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/xlm/constants.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,oBAAY,QAAQ;IAClB,MAAM,mBAAmB;IACzB,OAAO,oBAAoB;CAC5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// istanbul ignore file
|
|
2
|
+
/**
|
|
3
|
+
* Scopes for Stellar account type. See {@link KeyringAccount.scopes}.
|
|
4
|
+
*
|
|
5
|
+
* @see https://namespaces.chainagnostic.org/stellar/caip2
|
|
6
|
+
*/
|
|
7
|
+
export var XlmScope;
|
|
8
|
+
(function (XlmScope) {
|
|
9
|
+
XlmScope["Pubnet"] = "stellar:pubnet";
|
|
10
|
+
XlmScope["Testnet"] = "stellar:testnet";
|
|
11
|
+
})(XlmScope || (XlmScope = {}));
|
|
12
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/xlm/constants.ts"],"names":[],"mappings":"AAAA,uBAAuB;AAEvB;;;;GAIG;AACH,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,qCAAyB,CAAA;IACzB,uCAA2B,CAAA;AAC7B,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB","sourcesContent":["// istanbul ignore file\n\n/**\n * Scopes for Stellar account type. See {@link KeyringAccount.scopes}.\n *\n * @see https://namespaces.chainagnostic.org/stellar/caip2\n */\nexport enum XlmScope {\n Pubnet = 'stellar:pubnet',\n Testnet = 'stellar:testnet',\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants.cjs"), exports);
|
|
18
|
+
__exportStar(require("./types.cjs"), exports);
|
|
19
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/xlm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA4B;AAC5B,8CAAwB","sourcesContent":["export * from './constants';\nexport * from './types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/xlm/index.ts"],"names":[],"mappings":"AAAA,gCAA4B;AAC5B,4BAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/xlm/index.ts"],"names":[],"mappings":"AAAA,gCAA4B;AAC5B,4BAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/xlm/index.ts"],"names":[],"mappings":"AAAA,gCAA4B;AAC5B,4BAAwB","sourcesContent":["export * from './constants';\nexport * from './types';\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XlmAccountStruct = exports.XlmMethod = exports.XlmAddressStruct = void 0;
|
|
4
|
+
const keyring_utils_1 = require("@metamask/keyring-utils");
|
|
5
|
+
const superstruct_1 = require("@metamask/superstruct");
|
|
6
|
+
const utils_1 = require("@metamask/utils");
|
|
7
|
+
const api_1 = require("../api/index.cjs");
|
|
8
|
+
/**
|
|
9
|
+
* Stellar account addresses use strkey encoding: non-muxed accounts start with `G`
|
|
10
|
+
* and are 56 characters long.
|
|
11
|
+
*
|
|
12
|
+
* TODO: Add checksum validation.
|
|
13
|
+
*/
|
|
14
|
+
exports.XlmAddressStruct = (0, utils_1.definePattern)('XlmAddress', /^G[A-Z2-7]{55}$/u);
|
|
15
|
+
/**
|
|
16
|
+
* Supported Stellar methods.
|
|
17
|
+
*/
|
|
18
|
+
var XlmMethod;
|
|
19
|
+
(function (XlmMethod) {
|
|
20
|
+
XlmMethod["SignMessage"] = "signMessage";
|
|
21
|
+
XlmMethod["SignTransaction"] = "signTransaction";
|
|
22
|
+
XlmMethod["SignAuthEntry"] = "signAuthEntry";
|
|
23
|
+
})(XlmMethod || (exports.XlmMethod = XlmMethod = {}));
|
|
24
|
+
exports.XlmAccountStruct = (0, keyring_utils_1.object)({
|
|
25
|
+
...api_1.KeyringAccountStruct.schema,
|
|
26
|
+
/**
|
|
27
|
+
* Account address.
|
|
28
|
+
*/
|
|
29
|
+
address: exports.XlmAddressStruct,
|
|
30
|
+
/**
|
|
31
|
+
* Account type.
|
|
32
|
+
*/
|
|
33
|
+
type: (0, superstruct_1.literal)(`${api_1.XlmAccountType.Account}`),
|
|
34
|
+
/**
|
|
35
|
+
* Account supported scopes (CAIP-2 chain IDs).
|
|
36
|
+
*/
|
|
37
|
+
scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)(api_1.CaipChainIdStruct)),
|
|
38
|
+
/**
|
|
39
|
+
* Account supported methods.
|
|
40
|
+
*/
|
|
41
|
+
methods: (0, superstruct_1.array)((0, superstruct_1.enums)(Object.values(XlmMethod))),
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/xlm/types.ts"],"names":[],"mappings":";;;AAAA,2DAAiD;AAEjD,uDAAwE;AACxE,2CAAgD;AAEhD,0CAIgB;AAEhB;;;;;GAKG;AACU,QAAA,gBAAgB,GAAG,IAAA,qBAAa,EAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;AAEhF;;GAEG;AACH,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;AACjC,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAEY,QAAA,gBAAgB,GAAG,IAAA,sBAAM,EAAC;IACrC,GAAG,0BAAoB,CAAC,MAAM;IAC9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IACzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,OAAO,EAAE,CAAC;IAC1C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,uBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC","sourcesContent":["import { object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty } from '@metamask/superstruct';\nimport { definePattern } from '@metamask/utils';\n\nimport {\n CaipChainIdStruct,\n KeyringAccountStruct,\n XlmAccountType,\n} from '../api';\n\n/**\n * Stellar account addresses use strkey encoding: non-muxed accounts start with `G`\n * and are 56 characters long.\n *\n * TODO: Add checksum validation.\n */\nexport const XlmAddressStruct = definePattern('XlmAddress', /^G[A-Z2-7]{55}$/u);\n\n/**\n * Supported Stellar methods.\n */\nexport enum XlmMethod {\n SignMessage = 'signMessage',\n SignTransaction = 'signTransaction',\n SignAuthEntry = 'signAuthEntry',\n}\n\nexport const XlmAccountStruct = object({\n ...KeyringAccountStruct.schema,\n /**\n * Account address.\n */\n address: XlmAddressStruct,\n /**\n * Account type.\n */\n type: literal(`${XlmAccountType.Account}`),\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * Account supported methods.\n */\n methods: array(enums(Object.values(XlmMethod))),\n});\n\nexport type XlmAccount = Infer<typeof XlmAccountStruct>;\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Infer } from "@metamask/superstruct";
|
|
2
|
+
/**
|
|
3
|
+
* Stellar account addresses use strkey encoding: non-muxed accounts start with `G`
|
|
4
|
+
* and are 56 characters long.
|
|
5
|
+
*
|
|
6
|
+
* TODO: Add checksum validation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const XlmAddressStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
9
|
+
/**
|
|
10
|
+
* Supported Stellar methods.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum XlmMethod {
|
|
13
|
+
SignMessage = "signMessage",
|
|
14
|
+
SignTransaction = "signTransaction",
|
|
15
|
+
SignAuthEntry = "signAuthEntry"
|
|
16
|
+
}
|
|
17
|
+
export declare const XlmAccountStruct: import("@metamask/superstruct").Struct<{
|
|
18
|
+
type: "stellar:account";
|
|
19
|
+
id: string;
|
|
20
|
+
options: Record<string, import("@metamask/utils").Json> & {
|
|
21
|
+
entropy?: {
|
|
22
|
+
type: "mnemonic";
|
|
23
|
+
id: string;
|
|
24
|
+
derivationPath: string;
|
|
25
|
+
groupIndex: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: "private-key";
|
|
28
|
+
} | {
|
|
29
|
+
type: "custom";
|
|
30
|
+
};
|
|
31
|
+
exportable?: boolean;
|
|
32
|
+
};
|
|
33
|
+
address: string;
|
|
34
|
+
scopes: `${string}:${string}`[];
|
|
35
|
+
methods: XlmMethod[];
|
|
36
|
+
}, {
|
|
37
|
+
/**
|
|
38
|
+
* Account address.
|
|
39
|
+
*/
|
|
40
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
41
|
+
/**
|
|
42
|
+
* Account type.
|
|
43
|
+
*/
|
|
44
|
+
type: import("@metamask/superstruct").Struct<"stellar:account", "stellar:account">;
|
|
45
|
+
/**
|
|
46
|
+
* Account supported scopes (CAIP-2 chain IDs).
|
|
47
|
+
*/
|
|
48
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
|
49
|
+
/**
|
|
50
|
+
* Account supported methods.
|
|
51
|
+
*/
|
|
52
|
+
methods: import("@metamask/superstruct").Struct<XlmMethod[], import("@metamask/superstruct").Struct<XlmMethod, {
|
|
53
|
+
signMessage: XlmMethod.SignMessage;
|
|
54
|
+
signTransaction: XlmMethod.SignTransaction;
|
|
55
|
+
signAuthEntry: XlmMethod.SignAuthEntry;
|
|
56
|
+
}>>;
|
|
57
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
58
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> & {
|
|
59
|
+
entropy?: {
|
|
60
|
+
type: "mnemonic";
|
|
61
|
+
id: string;
|
|
62
|
+
derivationPath: string;
|
|
63
|
+
groupIndex: number;
|
|
64
|
+
} | {
|
|
65
|
+
type: "private-key";
|
|
66
|
+
} | {
|
|
67
|
+
type: "custom";
|
|
68
|
+
};
|
|
69
|
+
exportable?: boolean;
|
|
70
|
+
}, null>;
|
|
71
|
+
}>;
|
|
72
|
+
export type XlmAccount = Infer<typeof XlmAccountStruct>;
|
|
73
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/xlm/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAUnD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,sDAAkD,CAAC;AAEhF;;GAEG;AACH,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;CAChC;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;IAE3B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Infer } from "@metamask/superstruct";
|
|
2
|
+
/**
|
|
3
|
+
* Stellar account addresses use strkey encoding: non-muxed accounts start with `G`
|
|
4
|
+
* and are 56 characters long.
|
|
5
|
+
*
|
|
6
|
+
* TODO: Add checksum validation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const XlmAddressStruct: import("@metamask/superstruct").Struct<string, null>;
|
|
9
|
+
/**
|
|
10
|
+
* Supported Stellar methods.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum XlmMethod {
|
|
13
|
+
SignMessage = "signMessage",
|
|
14
|
+
SignTransaction = "signTransaction",
|
|
15
|
+
SignAuthEntry = "signAuthEntry"
|
|
16
|
+
}
|
|
17
|
+
export declare const XlmAccountStruct: import("@metamask/superstruct").Struct<{
|
|
18
|
+
type: "stellar:account";
|
|
19
|
+
id: string;
|
|
20
|
+
options: Record<string, import("@metamask/utils").Json> & {
|
|
21
|
+
entropy?: {
|
|
22
|
+
type: "mnemonic";
|
|
23
|
+
id: string;
|
|
24
|
+
derivationPath: string;
|
|
25
|
+
groupIndex: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: "private-key";
|
|
28
|
+
} | {
|
|
29
|
+
type: "custom";
|
|
30
|
+
};
|
|
31
|
+
exportable?: boolean;
|
|
32
|
+
};
|
|
33
|
+
address: string;
|
|
34
|
+
scopes: `${string}:${string}`[];
|
|
35
|
+
methods: XlmMethod[];
|
|
36
|
+
}, {
|
|
37
|
+
/**
|
|
38
|
+
* Account address.
|
|
39
|
+
*/
|
|
40
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
41
|
+
/**
|
|
42
|
+
* Account type.
|
|
43
|
+
*/
|
|
44
|
+
type: import("@metamask/superstruct").Struct<"stellar:account", "stellar:account">;
|
|
45
|
+
/**
|
|
46
|
+
* Account supported scopes (CAIP-2 chain IDs).
|
|
47
|
+
*/
|
|
48
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
|
49
|
+
/**
|
|
50
|
+
* Account supported methods.
|
|
51
|
+
*/
|
|
52
|
+
methods: import("@metamask/superstruct").Struct<XlmMethod[], import("@metamask/superstruct").Struct<XlmMethod, {
|
|
53
|
+
signMessage: XlmMethod.SignMessage;
|
|
54
|
+
signTransaction: XlmMethod.SignTransaction;
|
|
55
|
+
signAuthEntry: XlmMethod.SignAuthEntry;
|
|
56
|
+
}>>;
|
|
57
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
58
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> & {
|
|
59
|
+
entropy?: {
|
|
60
|
+
type: "mnemonic";
|
|
61
|
+
id: string;
|
|
62
|
+
derivationPath: string;
|
|
63
|
+
groupIndex: number;
|
|
64
|
+
} | {
|
|
65
|
+
type: "private-key";
|
|
66
|
+
} | {
|
|
67
|
+
type: "custom";
|
|
68
|
+
};
|
|
69
|
+
exportable?: boolean;
|
|
70
|
+
}, null>;
|
|
71
|
+
}>;
|
|
72
|
+
export type XlmAccount = Infer<typeof XlmAccountStruct>;
|
|
73
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/xlm/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAUnD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,sDAAkD,CAAC;AAEhF;;GAEG;AACH,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;CAChC;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;IAE3B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { object } from "@metamask/keyring-utils";
|
|
2
|
+
import { array, enums, literal, nonempty } from "@metamask/superstruct";
|
|
3
|
+
import { definePattern } from "@metamask/utils";
|
|
4
|
+
import { CaipChainIdStruct, KeyringAccountStruct, XlmAccountType } from "../api/index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Stellar account addresses use strkey encoding: non-muxed accounts start with `G`
|
|
7
|
+
* and are 56 characters long.
|
|
8
|
+
*
|
|
9
|
+
* TODO: Add checksum validation.
|
|
10
|
+
*/
|
|
11
|
+
export const XlmAddressStruct = definePattern('XlmAddress', /^G[A-Z2-7]{55}$/u);
|
|
12
|
+
/**
|
|
13
|
+
* Supported Stellar methods.
|
|
14
|
+
*/
|
|
15
|
+
export var XlmMethod;
|
|
16
|
+
(function (XlmMethod) {
|
|
17
|
+
XlmMethod["SignMessage"] = "signMessage";
|
|
18
|
+
XlmMethod["SignTransaction"] = "signTransaction";
|
|
19
|
+
XlmMethod["SignAuthEntry"] = "signAuthEntry";
|
|
20
|
+
})(XlmMethod || (XlmMethod = {}));
|
|
21
|
+
export const XlmAccountStruct = object({
|
|
22
|
+
...KeyringAccountStruct.schema,
|
|
23
|
+
/**
|
|
24
|
+
* Account address.
|
|
25
|
+
*/
|
|
26
|
+
address: XlmAddressStruct,
|
|
27
|
+
/**
|
|
28
|
+
* Account type.
|
|
29
|
+
*/
|
|
30
|
+
type: literal(`${XlmAccountType.Account}`),
|
|
31
|
+
/**
|
|
32
|
+
* Account supported scopes (CAIP-2 chain IDs).
|
|
33
|
+
*/
|
|
34
|
+
scopes: nonempty(array(CaipChainIdStruct)),
|
|
35
|
+
/**
|
|
36
|
+
* Account supported methods.
|
|
37
|
+
*/
|
|
38
|
+
methods: array(enums(Object.values(XlmMethod))),
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/xlm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gCAAgC;AAEjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,8BAA8B;AACxE,OAAO,EAAE,aAAa,EAAE,wBAAwB;AAEhD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACf,yBAAe;AAEhB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;AACjC,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;IACrC,GAAG,oBAAoB,CAAC,MAAM;IAC9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IACzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;IAC1C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC","sourcesContent":["import { object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty } from '@metamask/superstruct';\nimport { definePattern } from '@metamask/utils';\n\nimport {\n CaipChainIdStruct,\n KeyringAccountStruct,\n XlmAccountType,\n} from '../api';\n\n/**\n * Stellar account addresses use strkey encoding: non-muxed accounts start with `G`\n * and are 56 characters long.\n *\n * TODO: Add checksum validation.\n */\nexport const XlmAddressStruct = definePattern('XlmAddress', /^G[A-Z2-7]{55}$/u);\n\n/**\n * Supported Stellar methods.\n */\nexport enum XlmMethod {\n SignMessage = 'signMessage',\n SignTransaction = 'signTransaction',\n SignAuthEntry = 'signAuthEntry',\n}\n\nexport const XlmAccountStruct = object({\n ...KeyringAccountStruct.schema,\n /**\n * Account address.\n */\n address: XlmAddressStruct,\n /**\n * Account type.\n */\n type: literal(`${XlmAccountType.Account}`),\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * Account supported methods.\n */\n methods: array(enums(Object.values(XlmMethod))),\n});\n\nexport type XlmAccount = Infer<typeof XlmAccountStruct>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/keyring-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.1.0-bc99865",
|
|
4
4
|
"description": "MetaMask Keyring API",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"metamask",
|
|
7
6
|
"keyring",
|
|
7
|
+
"metamask",
|
|
8
8
|
"snaps"
|
|
9
9
|
],
|
|
10
|
-
"homepage": "https://github.com/MetaMask/keyring-api#readme",
|
|
10
|
+
"homepage": "https://github.com/MetaMask/accounts/tree/main/packages/keyring-api#readme",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/MetaMask/
|
|
12
|
+
"url": "https://github.com/MetaMask/accounts/issues"
|
|
13
13
|
},
|
|
14
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/MetaMask/
|
|
17
|
+
"url": "https://github.com/MetaMask/accounts.git"
|
|
17
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/",
|
|
21
|
+
"v2.js"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"main": "./dist/index.cjs",
|
|
25
|
+
"types": "./dist/index.d.cts",
|
|
18
26
|
"exports": {
|
|
19
27
|
".": {
|
|
20
28
|
"import": {
|
|
@@ -35,37 +43,39 @@
|
|
|
35
43
|
"types": "./dist/v2/index.d.cts",
|
|
36
44
|
"default": "./dist/v2/index.cjs"
|
|
37
45
|
}
|
|
38
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"./package.json": "./package.json"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public",
|
|
51
|
+
"registry": "https://registry.npmjs.org/"
|
|
39
52
|
},
|
|
40
|
-
"main": "./dist/index.cjs",
|
|
41
|
-
"types": "./dist/index.d.cts",
|
|
42
|
-
"files": [
|
|
43
|
-
"dist/"
|
|
44
|
-
],
|
|
45
53
|
"scripts": {
|
|
46
|
-
"build": "ts-bridge --project tsconfig.build.json --no-references",
|
|
54
|
+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
55
|
+
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
|
|
47
56
|
"build:clean": "yarn build --clean",
|
|
48
57
|
"build:docs": "typedoc",
|
|
49
58
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/keyring-api",
|
|
50
59
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/keyring-api",
|
|
51
60
|
"publish:preview": "yarn npm publish --tag preview",
|
|
61
|
+
"since-latest-release": "../../scripts/since-latest-release.sh",
|
|
52
62
|
"test": "yarn test:source && yarn test:types",
|
|
53
|
-
"test:clean": "jest --clearCache",
|
|
54
|
-
"test:source": "jest
|
|
63
|
+
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
|
|
64
|
+
"test:source": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
|
|
55
65
|
"test:types": "../../scripts/tsd-test.sh ./src",
|
|
56
|
-
"test:
|
|
66
|
+
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
|
|
67
|
+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
57
68
|
},
|
|
58
69
|
"dependencies": {
|
|
59
|
-
"@metamask/keyring-utils": "3.
|
|
70
|
+
"@metamask/keyring-utils": "3.3.1",
|
|
60
71
|
"@metamask/superstruct": "^3.1.0",
|
|
61
|
-
"@metamask/utils": "^11.
|
|
72
|
+
"@metamask/utils": "^11.11.0",
|
|
62
73
|
"bitcoin-address-validation": "^2.2.3"
|
|
63
74
|
},
|
|
64
75
|
"devDependencies": {
|
|
65
76
|
"@lavamoat/allow-scripts": "^3.2.1",
|
|
66
77
|
"@lavamoat/preinstall-always-fail": "^2.1.0",
|
|
67
|
-
"@metamask/auto-changelog": "^
|
|
68
|
-
"@metamask/keyring-utils": "3.2.0",
|
|
78
|
+
"@metamask/auto-changelog": "^6.1.0",
|
|
69
79
|
"@ts-bridge/cli": "^0.6.3",
|
|
70
80
|
"@types/jest": "^29.5.12",
|
|
71
81
|
"@types/node": "^20.12.12",
|
|
@@ -78,26 +88,22 @@
|
|
|
78
88
|
"ts-node": "^10.9.2",
|
|
79
89
|
"tsd": "^0.31.0",
|
|
80
90
|
"typedoc": "^0.25.13",
|
|
81
|
-
"typescript": "~5.
|
|
91
|
+
"typescript": "~5.3.3"
|
|
92
|
+
},
|
|
93
|
+
"tsd": {
|
|
94
|
+
"compilerOptions": {
|
|
95
|
+
"composite": "false"
|
|
96
|
+
},
|
|
97
|
+
"directory": "src"
|
|
82
98
|
},
|
|
83
99
|
"engines": {
|
|
84
100
|
"node": "^18.18 || >=20"
|
|
85
101
|
},
|
|
86
|
-
"publishConfig": {
|
|
87
|
-
"access": "public",
|
|
88
|
-
"registry": "https://registry.npmjs.org/"
|
|
89
|
-
},
|
|
90
102
|
"lavamoat": {
|
|
91
103
|
"allowScripts": {
|
|
92
104
|
"@lavamoat/preinstall-always-fail": false,
|
|
93
105
|
"@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>keccak": false,
|
|
94
106
|
"@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>secp256k1": false
|
|
95
107
|
}
|
|
96
|
-
},
|
|
97
|
-
"tsd": {
|
|
98
|
-
"directory": "src",
|
|
99
|
-
"compilerOptions": {
|
|
100
|
-
"composite": "false"
|
|
101
|
-
}
|
|
102
108
|
}
|
|
103
109
|
}
|
package/v2.js
ADDED