@metamask/keyring-api 22.0.0 → 23.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 +21 -1
- 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/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 +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/events.d.cts +10 -8
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +10 -8
- 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 -1
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.cts +23 -18
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +23 -18
- package/dist/rpc.d.mts.map +1 -1
- package/dist/rpc.mjs +2 -1
- package/dist/rpc.mjs.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/bip44.cjs +1 -1
- package/dist/{api/v2/create-account/bip44.mjs.map → v2/api/create-account/bip44.cjs.map} +1 -1
- package/dist/{api/v2 → v2/api}/create-account/bip44.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/bip44.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/bip44.mjs +1 -1
- package/dist/v2/api/create-account/bip44.mjs.map +1 -0
- package/dist/{api/v2 → v2/api}/create-account/custom.cjs.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/custom.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/custom.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/custom.mjs.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/index.cjs.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/index.d.cts +1 -1
- package/dist/{api/v2 → v2/api}/create-account/index.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/index.d.mts +1 -1
- package/dist/{api/v2 → v2/api}/create-account/index.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/index.mjs.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/private-key.cjs +1 -1
- package/dist/v2/api/create-account/private-key.cjs.map +1 -0
- package/dist/{api/v2 → v2/api}/create-account/private-key.d.cts +3 -2
- package/dist/{api/v2 → v2/api}/create-account/private-key.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/private-key.d.mts +3 -2
- package/dist/{api/v2 → v2/api}/create-account/private-key.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/create-account/private-key.mjs +1 -1
- package/dist/v2/api/create-account/private-key.mjs.map +1 -0
- package/dist/{api/v2 → v2/api}/export-account/index.cjs.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/index.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/index.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/index.mjs.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/private-key.cjs.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/private-key.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/private-key.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/export-account/private-key.mjs.map +1 -1
- package/dist/{api/v2 → v2/api}/index.cjs +1 -0
- package/dist/v2/api/index.cjs.map +1 -0
- package/dist/{api/v2 → v2/api}/index.d.cts +1 -0
- package/dist/v2/api/index.d.cts.map +1 -0
- package/dist/{api/v2 → v2/api}/index.d.mts +1 -0
- package/dist/v2/api/index.d.mts.map +1 -0
- package/dist/{api/v2 → v2/api}/index.mjs +1 -0
- package/dist/v2/api/index.mjs.map +1 -0
- package/dist/{api/v2 → v2/api}/keyring-capabilities.cjs +2 -2
- package/dist/v2/api/keyring-capabilities.cjs.map +1 -0
- package/dist/{api/v2 → v2/api}/keyring-capabilities.d.cts +7 -6
- package/dist/v2/api/keyring-capabilities.d.cts.map +1 -0
- package/dist/{api/v2 → v2/api}/keyring-capabilities.d.mts +7 -6
- package/dist/v2/api/keyring-capabilities.d.mts.map +1 -0
- package/dist/{api/v2 → v2/api}/keyring-capabilities.mjs +2 -2
- package/dist/v2/api/keyring-capabilities.mjs.map +1 -0
- package/dist/v2/api/keyring-rpc.cjs +93 -0
- package/dist/v2/api/keyring-rpc.cjs.map +1 -0
- package/dist/v2/api/keyring-rpc.d.cts +443 -0
- package/dist/v2/api/keyring-rpc.d.cts.map +1 -0
- package/dist/v2/api/keyring-rpc.d.mts +443 -0
- package/dist/v2/api/keyring-rpc.d.mts.map +1 -0
- package/dist/v2/api/keyring-rpc.mjs +89 -0
- package/dist/v2/api/keyring-rpc.mjs.map +1 -0
- package/dist/{api/v2 → v2/api}/keyring-type.cjs.map +1 -1
- package/dist/{api/v2 → v2/api}/keyring-type.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/keyring-type.d.mts.map +1 -1
- package/dist/{api/v2 → v2/api}/keyring-type.mjs.map +1 -1
- package/dist/v2/api/keyring.cjs.map +1 -0
- package/dist/{api/v2 → v2/api}/keyring.d.cts +4 -4
- package/dist/{api/v2 → v2/api}/keyring.d.cts.map +1 -1
- package/dist/{api/v2 → v2/api}/keyring.d.mts +4 -4
- package/dist/{api/v2 → v2/api}/keyring.d.mts.map +1 -1
- package/dist/v2/api/keyring.mjs.map +1 -0
- package/dist/{api/v2 → v2/api}/private-key.cjs +1 -1
- package/dist/v2/api/private-key.cjs.map +1 -0
- package/dist/{api/v2 → v2/api}/private-key.d.cts +3 -2
- package/dist/v2/api/private-key.d.cts.map +1 -0
- package/dist/{api/v2 → v2/api}/private-key.d.mts +3 -2
- package/dist/v2/api/private-key.d.mts.map +1 -0
- package/dist/{api/v2 → v2/api}/private-key.mjs +1 -1
- package/dist/v2/api/private-key.mjs.map +1 -0
- package/dist/v2/index.cjs +18 -0
- package/dist/v2/index.cjs.map +1 -0
- package/dist/v2/index.d.cts +2 -0
- package/dist/v2/index.d.cts.map +1 -0
- package/dist/v2/index.d.mts +2 -0
- package/dist/v2/index.d.mts.map +1 -0
- package/dist/v2/index.mjs +2 -0
- package/dist/v2/index.mjs.map +1 -0
- 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 +42 -0
- package/dist/xlm/types.cjs.map +1 -0
- package/dist/xlm/types.d.cts +71 -0
- package/dist/xlm/types.d.cts.map +1 -0
- package/dist/xlm/types.d.mts +71 -0
- package/dist/xlm/types.d.mts.map +1 -0
- package/dist/xlm/types.mjs +39 -0
- package/dist/xlm/types.mjs.map +1 -0
- package/package.json +26 -11
- package/dist/api/v2/create-account/bip44.cjs.map +0 -1
- package/dist/api/v2/create-account/private-key.cjs.map +0 -1
- package/dist/api/v2/create-account/private-key.mjs.map +0 -1
- package/dist/api/v2/index.cjs.map +0 -1
- package/dist/api/v2/index.d.cts.map +0 -1
- package/dist/api/v2/index.d.mts.map +0 -1
- package/dist/api/v2/index.mjs.map +0 -1
- package/dist/api/v2/keyring-capabilities.cjs.map +0 -1
- package/dist/api/v2/keyring-capabilities.d.cts.map +0 -1
- package/dist/api/v2/keyring-capabilities.d.mts.map +0 -1
- package/dist/api/v2/keyring-capabilities.mjs.map +0 -1
- package/dist/api/v2/keyring.cjs.map +0 -1
- package/dist/api/v2/keyring.mjs.map +0 -1
- package/dist/api/v2/private-key.cjs.map +0 -1
- package/dist/api/v2/private-key.d.cts.map +0 -1
- package/dist/api/v2/private-key.d.mts.map +0 -1
- package/dist/api/v2/private-key.mjs.map +0 -1
- /package/dist/{api/v2 → v2/api}/create-account/bip44.d.cts +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/bip44.d.mts +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/custom.cjs +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/custom.d.cts +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/custom.d.mts +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/custom.mjs +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/index.cjs +0 -0
- /package/dist/{api/v2 → v2/api}/create-account/index.mjs +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/index.cjs +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/index.d.cts +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/index.d.mts +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/index.mjs +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/private-key.cjs +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/private-key.d.cts +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/private-key.d.mts +0 -0
- /package/dist/{api/v2 → v2/api}/export-account/private-key.mjs +0 -0
- /package/dist/{api/v2 → v2/api}/keyring-type.cjs +0 -0
- /package/dist/{api/v2 → v2/api}/keyring-type.d.cts +0 -0
- /package/dist/{api/v2 → v2/api}/keyring-type.d.mts +0 -0
- /package/dist/{api/v2 → v2/api}/keyring-type.mjs +0 -0
- /package/dist/{api/v2 → v2/api}/keyring.cjs +0 -0
- /package/dist/{api/v2 → v2/api}/keyring.mjs +0 -0
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/keyring-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"description": "MetaMask Keyring API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metamask",
|
|
7
7
|
"keyring",
|
|
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
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/MetaMask/
|
|
16
|
+
"url": "https://github.com/MetaMask/accounts.git"
|
|
17
17
|
},
|
|
18
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
19
|
+
"sideEffects": false,
|
|
18
20
|
"exports": {
|
|
19
21
|
".": {
|
|
20
22
|
"import": {
|
|
@@ -25,7 +27,18 @@
|
|
|
25
27
|
"types": "./dist/index.d.cts",
|
|
26
28
|
"default": "./dist/index.cjs"
|
|
27
29
|
}
|
|
28
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"./v2": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/v2/index.d.mts",
|
|
34
|
+
"default": "./dist/v2/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/v2/index.d.cts",
|
|
38
|
+
"default": "./dist/v2/index.cjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
29
42
|
},
|
|
30
43
|
"main": "./dist/index.cjs",
|
|
31
44
|
"types": "./dist/index.d.cts",
|
|
@@ -33,29 +46,31 @@
|
|
|
33
46
|
"dist/"
|
|
34
47
|
],
|
|
35
48
|
"scripts": {
|
|
36
|
-
"build": "ts-bridge --project tsconfig.build.json --no-references",
|
|
49
|
+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
50
|
+
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
|
|
37
51
|
"build:clean": "yarn build --clean",
|
|
38
52
|
"build:docs": "typedoc",
|
|
39
53
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/keyring-api",
|
|
40
54
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/keyring-api",
|
|
41
55
|
"publish:preview": "yarn npm publish --tag preview",
|
|
56
|
+
"since-latest-release": "../../scripts/since-latest-release.sh",
|
|
42
57
|
"test": "yarn test:source && yarn test:types",
|
|
43
|
-
"test:clean": "jest --clearCache",
|
|
44
|
-
"test:source": "jest
|
|
58
|
+
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
|
|
59
|
+
"test:source": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
|
|
45
60
|
"test:types": "../../scripts/tsd-test.sh ./src",
|
|
46
|
-
"test:
|
|
61
|
+
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
|
|
62
|
+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
47
63
|
},
|
|
48
64
|
"dependencies": {
|
|
49
65
|
"@metamask/keyring-utils": "^3.2.0",
|
|
50
66
|
"@metamask/superstruct": "^3.1.0",
|
|
51
|
-
"@metamask/utils": "^11.
|
|
67
|
+
"@metamask/utils": "^11.11.0",
|
|
52
68
|
"bitcoin-address-validation": "^2.2.3"
|
|
53
69
|
},
|
|
54
70
|
"devDependencies": {
|
|
55
71
|
"@lavamoat/allow-scripts": "^3.2.1",
|
|
56
72
|
"@lavamoat/preinstall-always-fail": "^2.1.0",
|
|
57
73
|
"@metamask/auto-changelog": "^3.4.4",
|
|
58
|
-
"@metamask/keyring-utils": "^3.2.0",
|
|
59
74
|
"@ts-bridge/cli": "^0.6.3",
|
|
60
75
|
"@types/jest": "^29.5.12",
|
|
61
76
|
"@types/node": "^20.12.12",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bip44.cjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/bip44.ts"],"names":[],"mappings":";;;AAAA,uDAM+B;AAE/B,qDAAwD;AAExD;;GAEG;AACU,QAAA,yCAAyC,GAAG,IAAA,oBAAM,EAAC;IAC9D;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,mBAAmB,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,cAAc,EAAE,iCAAoB;CACrC,CAAC,CAAC;AASH;;GAEG;AACU,QAAA,0CAA0C,GAAG,IAAA,oBAAM,EAAC;IAC/D;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,oBAAoB,CAAC;IACnC;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,UAAU,EAAE,IAAA,oBAAM,GAAE;CACrB,CAAC,CAAC;AAYH;;GAEG;AACU,QAAA,uCAAuC,GAAG,IAAA,oBAAM,EAAC;IAC5D;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,gBAAgB,CAAC;IAC/B;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,UAAU,EAAE,IAAA,oBAAM,GAAE;CACrB,CAAC,CAAC;AAYH;;GAEG;AACU,QAAA,+CAA+C,GAAG,IAAA,oBAAM,EAAC;IACpE;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,0BAA0B,CAAC;IACzC;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,KAAK,EAAE,IAAA,oBAAM,EAAC;QACZ;;WAEG;QACH,IAAI,EAAE,IAAA,oBAAM,GAAE;QACd;;WAEG;QACH,EAAE,EAAE,IAAA,oBAAM,GAAE;KACb,CAAC;CACH,CAAC,CAAC","sourcesContent":["import {\n literal,\n number,\n object,\n string,\n type Infer,\n} from '@metamask/superstruct';\n\nimport { DerivationPathStruct } from '../../derivation';\n\n/**\n * Struct for {@link CreateAccountBip44DerivePathOptions}.\n */\nexport const CreateAccountBip44DerivePathOptionsStruct = object({\n /**\n * Type of the options.\n */\n type: literal('bip44:derive-path'),\n /**\n * ID of the entropy source to be used to derive the account.\n */\n entropySource: string(),\n /**\n * BIP-44 derivation path to be used to derive the account.\n */\n derivationPath: DerivationPathStruct,\n});\n\n/**\n * Options for creating an account using the given BIP-44 derivation path.\n */\nexport type CreateAccountBip44DerivePathOptions = Infer<\n typeof CreateAccountBip44DerivePathOptionsStruct\n>;\n\n/**\n * Struct for {@link CreateAccountBip44DeriveIndexOptions}.\n */\nexport const CreateAccountBip44DeriveIndexOptionsStruct = object({\n /**\n * The type of the options.\n */\n type: literal('bip44:derive-index'),\n /**\n * ID of the entropy source to be used to derive the account.\n */\n entropySource: string(),\n /**\n * The index of the account group to be derived.\n */\n groupIndex: number(),\n});\n\n/**\n * Options for creating an account using the given BIP-44 account group index.\n *\n * Note that the keyring can support non-standard BIP-44 paths for\n * compatibility with other wallets.\n */\nexport type CreateAccountBip44DeriveIndexOptions = Infer<\n typeof CreateAccountBip44DeriveIndexOptionsStruct\n>;\n\n/**\n * Struct for {@link CreateAccountBip44DiscoverOptions}.\n */\nexport const CreateAccountBip44DiscoverOptionsStruct = object({\n /**\n * The type of the options.\n */\n type: literal('bip44:discover'),\n /**\n * ID of the entropy source to be used to derive the account.\n */\n entropySource: string(),\n /**\n * The index of the account group to be derived.\n */\n groupIndex: number(),\n});\n\n/**\n * Options for creating accounts by performing a BIP-44 account discovery.\n *\n * Note that the keyring can support non-standard BIP-44 paths for\n * compatibility with other wallets.\n */\nexport type CreateAccountBip44DiscoverOptions = Infer<\n typeof CreateAccountBip44DiscoverOptionsStruct\n>;\n\n/**\n * Struct for {@link CreateAccountBip44DeriveIndexRangeOptions}.\n */\nexport const CreateAccountBip44DeriveIndexRangeOptionsStruct = object({\n /**\n * The type of the options.\n */\n type: literal('bip44:derive-index-range'),\n /**\n * ID of the entropy source to be used to derive the accounts.\n */\n entropySource: string(),\n /**\n * The range of account group indices to derive (inclusive on both ends).\n */\n range: object({\n /**\n * The starting index of the account group range (inclusive).\n */\n from: number(),\n /**\n * The ending index of the account group range (inclusive).\n */\n to: number(),\n }),\n});\n\n/**\n * Options for creating accounts by deriving a range of BIP-44 account indices.\n *\n * The range is inclusive on both ends, meaning range.from=0 and range.to=5\n * will create accounts for group indices 0, 1, 2, 3, 4, and 5.\n *\n * Note that the keyring can support non-standard BIP-44 paths for\n * compatibility with other wallets.\n */\nexport type CreateAccountBip44DeriveIndexRangeOptions = Infer<\n typeof CreateAccountBip44DeriveIndexRangeOptionsStruct\n>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.cjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/private-key.ts"],"names":[],"mappings":";;;AAAA,uDAM+B;AAE/B,+CAAyD;AACzD,oDAA0D;AAE1D;;GAEG;AACU,QAAA,oCAAoC,GAAG,IAAA,oBAAM,EAAC;IACzD;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,oBAAoB,CAAC;IACnC;;OAEG;IACH,UAAU,EAAE,IAAA,oBAAM,GAAE;IACpB;;OAEG;IACH,QAAQ,EAAE,sCAAwB;IAClC;;OAEG;IACH,WAAW,EAAE,IAAA,2BAAa,EAAC,kCAAwB,CAAC;CACrD,CAAC,CAAC","sourcesContent":["import {\n exactOptional,\n literal,\n object,\n string,\n type Infer,\n} from '@metamask/superstruct';\n\nimport { KeyringAccountTypeStruct } from '../../account';\nimport { PrivateKeyEncodingStruct } from '../private-key';\n\n/**\n * Struct for {@link CreateAccountPrivateKeyOptions}.\n */\nexport const CreateAccountPrivateKeyOptionsStruct = object({\n /**\n * The type of the options.\n */\n type: literal('private-key:import'),\n /**\n * The encoded private key to be imported.\n */\n privateKey: string(),\n /**\n * The encoding of the private key.\n */\n encoding: PrivateKeyEncodingStruct,\n /**\n * The account type of the imported account.\n */\n accountType: exactOptional(KeyringAccountTypeStruct),\n});\n\n/**\n * Options for importing an account from a private key.\n */\nexport type CreateAccountPrivateKeyOptions = Infer<\n typeof CreateAccountPrivateKeyOptionsStruct\n>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.mjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,OAAO,EACP,MAAM,EACN,MAAM,EAEP,8BAA8B;AAE/B,OAAO,EAAE,wBAAwB,EAAE,0BAAsB;AACzD,OAAO,EAAE,wBAAwB,EAAE,2BAAuB;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,MAAM,CAAC;IACzD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,oBAAoB,CAAC;IACnC;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE;IACpB;;OAEG;IACH,QAAQ,EAAE,wBAAwB;IAClC;;OAEG;IACH,WAAW,EAAE,aAAa,CAAC,wBAAwB,CAAC;CACrD,CAAC,CAAC","sourcesContent":["import {\n exactOptional,\n literal,\n object,\n string,\n type Infer,\n} from '@metamask/superstruct';\n\nimport { KeyringAccountTypeStruct } from '../../account';\nimport { PrivateKeyEncodingStruct } from '../private-key';\n\n/**\n * Struct for {@link CreateAccountPrivateKeyOptions}.\n */\nexport const CreateAccountPrivateKeyOptionsStruct = object({\n /**\n * The type of the options.\n */\n type: literal('private-key:import'),\n /**\n * The encoded private key to be imported.\n */\n privateKey: string(),\n /**\n * The encoding of the private key.\n */\n encoding: PrivateKeyEncodingStruct,\n /**\n * The account type of the imported account.\n */\n accountType: exactOptional(KeyringAccountTypeStruct),\n});\n\n/**\n * Options for importing an account from a private key.\n */\nexport type CreateAccountPrivateKeyOptions = Infer<\n typeof CreateAccountPrivateKeyOptionsStruct\n>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/api/v2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,qDAA+B;AAC/B,6DAAiC;AACjC,6DAAiC;AACjC,oDAA8B","sourcesContent":["export type * from './keyring';\nexport * from './keyring-capabilities';\nexport * from './keyring-type';\nexport * from './create-account';\nexport * from './export-account';\nexport * from './private-key';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/api/v2/index.ts"],"names":[],"mappings":"AAAA,mCAA+B;AAC/B,2CAAuC;AACvC,mCAA+B;AAC/B,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/api/v2/index.ts"],"names":[],"mappings":"AAAA,mCAA+B;AAC/B,2CAAuC;AACvC,mCAA+B;AAC/B,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/api/v2/index.ts"],"names":[],"mappings":"AACA,2CAAuC;AACvC,mCAA+B;AAC/B,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B","sourcesContent":["export type * from './keyring';\nexport * from './keyring-capabilities';\nexport * from './keyring-type';\nexport * from './create-account';\nexport * from './export-account';\nexport * from './private-key';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-capabilities.cjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":";;;AAAA,uDAQ+B;AAE/B,mDAGuB;AACvB,sCAA4C;AAE5C;;GAEG;AACU,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,wBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,KAAK,EAAE,IAAA,2BAAa,EAClB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,UAAU,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACpC;;WAEG;QACH,WAAW,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACrC;;WAEG;QACH,gBAAgB,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QAC1C;;WAEG;QACH,QAAQ,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;KACnC,CAAC,CACH;IACD;;OAEG;IACH,UAAU,EAAE,IAAA,2BAAa,EACvB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,aAAa,EAAE,IAAA,2BAAa,EAAC,IAAA,mBAAK,EAAC,0CAA4B,CAAC,CAAC;QACjE;;WAEG;QACH,aAAa,EAAE,IAAA,2BAAa,EAAC,IAAA,mBAAK,EAAC,0CAA4B,CAAC,CAAC;KAClE,CAAC,CACH;IACD;;;;;;OAMG;IACH,MAAM,EAAE,IAAA,2BAAa,EACnB,IAAA,qBAAO,EACL,IAAA,oBAAM,EAAC;QACL,cAAc,EAAE,IAAA,qBAAO,GAAE;KAC1B,CAAC,CACH,CACF;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n partial,\n type Infer,\n} from '@metamask/superstruct';\n\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\nimport { CaipChainIdStruct } from '../caip';\n\n/**\n * Struct for {@link KeyringCapabilities}.\n */\nexport const KeyringCapabilitiesStruct = object({\n /**\n * List of CAIP-2 chain IDs that this keyring supports.\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * BIP-44 capabilities supported by this keyring.\n */\n bip44: exactOptional(\n object({\n /**\n * Whether the keyring supports deriving accounts from a specific BIP-44 path.\n */\n derivePath: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a range of BIP-44 account indices.\n */\n deriveIndexRange: exactOptional(boolean()),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: exactOptional(boolean()),\n }),\n ),\n /**\n * Private key capabilities supported by this keyring.\n */\n privateKey: exactOptional(\n object({\n /**\n * List of supported formats for importing private keys.\n */\n importFormats: exactOptional(array(ImportPrivateKeyFormatStruct)),\n /**\n * List of supported formats for exporting private keys.\n */\n exportFormats: exactOptional(array(ExportPrivateKeyFormatStruct)),\n }),\n ),\n /**\n * Indicates which KeyringV2 methods accept non-standard options.\n *\n * When a method is set to `true`, it signals that the keyring implementation\n * accepts custom options for that method, different from the standard API.\n * This is a workaround for keyrings with very specific requirements.\n */\n custom: exactOptional(\n partial(\n object({\n createAccounts: boolean(),\n }),\n ),\n ),\n});\n\n/**\n * Type representing the capabilities supported by a keyring.\n *\n * @example\n * ```ts\n * const capabilities: KeyringCapabilities = {\n * scopes: ['bip122:_'],\n * bip44: {\n * derivePath: true,\n * deriveIndex: true,\n * deriveIndexRange: true,\n * discover: true,\n * },\n * privateKey: {\n * importFormats: [\n * { encoding: 'base58', type: 'bip122:p2sh' },\n * { encoding: 'base58', type: 'bip122:p2tr' },\n * { encoding: 'base58', type: 'bip122:p2pkh' },\n * { encoding: 'base58', type: 'bip122:p2wpkh' },\n * ],\n * exportFormats: [\n * { encoding: 'base58' },\n * { encoding: 'base58' },\n * ],\n * },\n * };\n * ```\n */\nexport type KeyringCapabilities = Infer<typeof KeyringCapabilitiesStruct>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-capabilities.d.cts","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,KAAK,EACX,8BAA8B;AAQ/B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;IAIP;;;;;;OAMG;;;;;;EAQH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-capabilities.d.mts","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,KAAK,EACX,8BAA8B;AAQ/B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;IAIP;;;;;;OAMG;;;;;;EAQH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyring-capabilities.mjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,EACR,MAAM,EACN,OAAO,EAER,8BAA8B;AAE/B,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC7B,0BAAsB;AACvB,OAAO,EAAE,iBAAiB,EAAE,oBAAgB;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,KAAK,EAAE,aAAa,CAClB,MAAM,CAAC;QACL;;WAEG;QACH,UAAU,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;QACpC;;WAEG;QACH,WAAW,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;QACrC;;WAEG;QACH,gBAAgB,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;QAC1C;;WAEG;QACH,QAAQ,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;KACnC,CAAC,CACH;IACD;;OAEG;IACH,UAAU,EAAE,aAAa,CACvB,MAAM,CAAC;QACL;;WAEG;QACH,aAAa,EAAE,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACjE;;WAEG;QACH,aAAa,EAAE,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;KAClE,CAAC,CACH;IACD;;;;;;OAMG;IACH,MAAM,EAAE,aAAa,CACnB,OAAO,CACL,MAAM,CAAC;QACL,cAAc,EAAE,OAAO,EAAE;KAC1B,CAAC,CACH,CACF;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n partial,\n type Infer,\n} from '@metamask/superstruct';\n\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\nimport { CaipChainIdStruct } from '../caip';\n\n/**\n * Struct for {@link KeyringCapabilities}.\n */\nexport const KeyringCapabilitiesStruct = object({\n /**\n * List of CAIP-2 chain IDs that this keyring supports.\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * BIP-44 capabilities supported by this keyring.\n */\n bip44: exactOptional(\n object({\n /**\n * Whether the keyring supports deriving accounts from a specific BIP-44 path.\n */\n derivePath: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a range of BIP-44 account indices.\n */\n deriveIndexRange: exactOptional(boolean()),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: exactOptional(boolean()),\n }),\n ),\n /**\n * Private key capabilities supported by this keyring.\n */\n privateKey: exactOptional(\n object({\n /**\n * List of supported formats for importing private keys.\n */\n importFormats: exactOptional(array(ImportPrivateKeyFormatStruct)),\n /**\n * List of supported formats for exporting private keys.\n */\n exportFormats: exactOptional(array(ExportPrivateKeyFormatStruct)),\n }),\n ),\n /**\n * Indicates which KeyringV2 methods accept non-standard options.\n *\n * When a method is set to `true`, it signals that the keyring implementation\n * accepts custom options for that method, different from the standard API.\n * This is a workaround for keyrings with very specific requirements.\n */\n custom: exactOptional(\n partial(\n object({\n createAccounts: boolean(),\n }),\n ),\n ),\n});\n\n/**\n * Type representing the capabilities supported by a keyring.\n *\n * @example\n * ```ts\n * const capabilities: KeyringCapabilities = {\n * scopes: ['bip122:_'],\n * bip44: {\n * derivePath: true,\n * deriveIndex: true,\n * deriveIndexRange: true,\n * discover: true,\n * },\n * privateKey: {\n * importFormats: [\n * { encoding: 'base58', type: 'bip122:p2sh' },\n * { encoding: 'base58', type: 'bip122:p2tr' },\n * { encoding: 'base58', type: 'bip122:p2pkh' },\n * { encoding: 'base58', type: 'bip122:p2wpkh' },\n * ],\n * exportFormats: [\n * { encoding: 'base58' },\n * { encoding: 'base58' },\n * ],\n * },\n * };\n * ```\n */\nexport type KeyringCapabilities = Infer<typeof KeyringCapabilitiesStruct>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyring.cjs","sourceRoot":"","sources":["../../../src/api/v2/keyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { AccountId } from '@metamask/keyring-utils';\nimport type { Json } from '@metamask/utils';\n\nimport type { CreateAccountOptions } from './create-account';\nimport type { ExportedAccount, ExportAccountOptions } from './export-account';\nimport type { KeyringCapabilities } from './keyring-capabilities';\nimport type { KeyringType } from './keyring-type';\nimport type { KeyringAccount } from '../account';\nimport type { KeyringRequest } from '../request';\n\n/**\n * The KeyringV2 interface defines methods for managing accounts and signing\n * requests. This interface unifies the existing EVM and Snap keyring interfaces\n * to provide a consistent API for all keyring type.\n *\n * This interface supports both EVM and non-EVM chains, and includes\n * account metadata needed for features like Multi-SRP and Backup and Sync.\n */\nexport type KeyringV2 = {\n /**\n * Type of the keyring.\n */\n type: `${KeyringType}`;\n\n /**\n * List of capabilities supported by the keyring.\n */\n capabilities: KeyringCapabilities;\n\n /**\n * Serialize the keyring state to a JSON object.\n *\n * @returns A promise that resolves to a JSON-serializable representation of\n * the keyring state.\n */\n serialize(): Promise<Json>;\n\n /**\n * Restores the keyring state from a serialized JSON object.\n *\n * @param state - A JSON object representing a serialized keyring state.\n * @returns A promise that resolves when the keyring state has been restored.\n */\n deserialize(state: Json): Promise<void>;\n\n /**\n * Initialize the keyring.\n *\n * This method is called after the constructor to allow the keyring to\n * perform any necessary asynchronous initialization tasks.\n *\n * @returns A promise that resolves when initialization is complete.\n */\n init?(): Promise<void>;\n\n /**\n * Destroy the keyring.\n *\n * This method is called before the keyring is removed from the Keyring\n * Controller, allowing the keyring to perform any necessary cleanup tasks.\n *\n * @returns A promise that resolves when cleanup is complete.\n */\n destroy?(): Promise<void>;\n\n /**\n * Returns all accounts managed by the keyring.\n *\n * @returns A promise that resolves to an array of all accounts managed by\n * this keyring.\n */\n getAccounts(): Promise<KeyringAccount[]>;\n\n /**\n * Returns the account with the specified ID.\n *\n * @param accountId - ID of the account to retrieve.\n * @returns A promise that resolves to the account with the given ID.\n */\n getAccount(accountId: AccountId): Promise<KeyringAccount>;\n\n /**\n * Creates one or more new accounts according to the provided options.\n *\n * Deterministic account creation MUST be idempotent, meaning that for\n * deterministic algorithms, like BIP-44, calling this method with the same\n * options should always return the same accounts, even if the accounts\n * already exist in the keyring.\n *\n * @param options - Options describing how to create the account(s).\n * @returns A promise that resolves to an array of the created account objects.\n */\n createAccounts(options: CreateAccountOptions): Promise<KeyringAccount[]>;\n\n /**\n * Deletes the account with the specified ID.\n *\n * @param accountId - ID of the account to delete.\n * @returns A promise that resolves when the account has been deleted.\n */\n deleteAccount(accountId: AccountId): Promise<void>;\n\n /**\n * Exports the private key or secret material for the specified account.\n *\n * @param accountId - ID of the account to export.\n * @param options - Optional export options.\n * @returns A promise that resolves to the exported account data.\n */\n exportAccount?(\n accountId: AccountId,\n options?: ExportAccountOptions,\n ): Promise<ExportedAccount>;\n\n /**\n * Submits a request to the keyring.\n *\n * @param request - The `KeyringRequest` object to submit.\n * @returns A promise that resolves to the response for the request.\n */\n submitRequest(request: KeyringRequest): Promise<Json>;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyring.mjs","sourceRoot":"","sources":["../../../src/api/v2/keyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { AccountId } from '@metamask/keyring-utils';\nimport type { Json } from '@metamask/utils';\n\nimport type { CreateAccountOptions } from './create-account';\nimport type { ExportedAccount, ExportAccountOptions } from './export-account';\nimport type { KeyringCapabilities } from './keyring-capabilities';\nimport type { KeyringType } from './keyring-type';\nimport type { KeyringAccount } from '../account';\nimport type { KeyringRequest } from '../request';\n\n/**\n * The KeyringV2 interface defines methods for managing accounts and signing\n * requests. This interface unifies the existing EVM and Snap keyring interfaces\n * to provide a consistent API for all keyring type.\n *\n * This interface supports both EVM and non-EVM chains, and includes\n * account metadata needed for features like Multi-SRP and Backup and Sync.\n */\nexport type KeyringV2 = {\n /**\n * Type of the keyring.\n */\n type: `${KeyringType}`;\n\n /**\n * List of capabilities supported by the keyring.\n */\n capabilities: KeyringCapabilities;\n\n /**\n * Serialize the keyring state to a JSON object.\n *\n * @returns A promise that resolves to a JSON-serializable representation of\n * the keyring state.\n */\n serialize(): Promise<Json>;\n\n /**\n * Restores the keyring state from a serialized JSON object.\n *\n * @param state - A JSON object representing a serialized keyring state.\n * @returns A promise that resolves when the keyring state has been restored.\n */\n deserialize(state: Json): Promise<void>;\n\n /**\n * Initialize the keyring.\n *\n * This method is called after the constructor to allow the keyring to\n * perform any necessary asynchronous initialization tasks.\n *\n * @returns A promise that resolves when initialization is complete.\n */\n init?(): Promise<void>;\n\n /**\n * Destroy the keyring.\n *\n * This method is called before the keyring is removed from the Keyring\n * Controller, allowing the keyring to perform any necessary cleanup tasks.\n *\n * @returns A promise that resolves when cleanup is complete.\n */\n destroy?(): Promise<void>;\n\n /**\n * Returns all accounts managed by the keyring.\n *\n * @returns A promise that resolves to an array of all accounts managed by\n * this keyring.\n */\n getAccounts(): Promise<KeyringAccount[]>;\n\n /**\n * Returns the account with the specified ID.\n *\n * @param accountId - ID of the account to retrieve.\n * @returns A promise that resolves to the account with the given ID.\n */\n getAccount(accountId: AccountId): Promise<KeyringAccount>;\n\n /**\n * Creates one or more new accounts according to the provided options.\n *\n * Deterministic account creation MUST be idempotent, meaning that for\n * deterministic algorithms, like BIP-44, calling this method with the same\n * options should always return the same accounts, even if the accounts\n * already exist in the keyring.\n *\n * @param options - Options describing how to create the account(s).\n * @returns A promise that resolves to an array of the created account objects.\n */\n createAccounts(options: CreateAccountOptions): Promise<KeyringAccount[]>;\n\n /**\n * Deletes the account with the specified ID.\n *\n * @param accountId - ID of the account to delete.\n * @returns A promise that resolves when the account has been deleted.\n */\n deleteAccount(accountId: AccountId): Promise<void>;\n\n /**\n * Exports the private key or secret material for the specified account.\n *\n * @param accountId - ID of the account to export.\n * @param options - Optional export options.\n * @returns A promise that resolves to the exported account data.\n */\n exportAccount?(\n accountId: AccountId,\n options?: ExportAccountOptions,\n ): Promise<ExportedAccount>;\n\n /**\n * Submits a request to the keyring.\n *\n * @param request - The `KeyringRequest` object to submit.\n * @returns A promise that resolves to the response for the request.\n */\n submitRequest(request: KeyringRequest): Promise<Json>;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.cjs","sourceRoot":"","sources":["../../../src/api/v2/private-key.ts"],"names":[],"mappings":";;;AAAA,uDAK+B;AAE/B,4CAAsD;AAEtD;;GAEG;AACH,IAAY,kBAUX;AAVD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,uCAAiB,CAAA;AACnB,CAAC,EAVW,kBAAkB,kCAAlB,kBAAkB,QAU7B;AAED;;GAEG;AACU,QAAA,wBAAwB,GAAG,IAAA,mBAAK,EAAC;IAC5C,GAAG,kBAAkB,CAAC,WAAW,EAAE;IACnC,GAAG,kBAAkB,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,4BAA4B,GAAG,IAAA,oBAAM,EAAC;IACjD;;OAEG;IACH,QAAQ,EAAE,gCAAwB;IAElC;;;;;;OAMG;IACH,IAAI,EAAE,IAAA,2BAAa,EAAC,kCAAwB,CAAC;CAC9C,CAAC,CAAC;AAOH;;GAEG;AACU,QAAA,4BAA4B,GAAG,IAAA,oBAAM,EAAC;IACjD;;OAEG;IACH,QAAQ,EAAE,gCAAwB;CACnC,CAAC,CAAC","sourcesContent":["import {\n enums,\n exactOptional,\n object,\n type Infer,\n} from '@metamask/superstruct';\n\nimport { KeyringAccountTypeStruct } from '../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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.d.cts","sourceRoot":"","sources":["../../../src/api/v2/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EACX,8BAA8B;AAI/B;;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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../src/api/v2/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EACX,8BAA8B;AAI/B;;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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key.mjs","sourceRoot":"","sources":["../../../src/api/v2/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,aAAa,EACb,MAAM,EAEP,8BAA8B;AAE/B,OAAO,EAAE,wBAAwB,EAAE,uBAAmB;AAEtD;;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 {\n enums,\n exactOptional,\n object,\n type Infer,\n} from '@metamask/superstruct';\n\nimport { KeyringAccountTypeStruct } from '../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"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|