@metamask/keyring-api 11.0.0 → 12.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 +3 -4
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +1 -1
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +1 -1
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +1 -2
- package/dist/api/account.mjs.map +1 -1
- package/dist/api/asset.cjs +82 -0
- package/dist/api/asset.cjs.map +1 -0
- package/dist/api/asset.d.cts +93 -0
- package/dist/api/asset.d.cts.map +1 -0
- package/dist/api/asset.d.mts +93 -0
- package/dist/api/asset.d.mts.map +1 -0
- package/dist/api/asset.mjs +79 -0
- package/dist/api/asset.mjs.map +1 -0
- package/dist/api/balance.cjs +3 -4
- package/dist/api/balance.cjs.map +1 -1
- package/dist/api/balance.d.cts +1 -1
- package/dist/api/balance.d.cts.map +1 -1
- package/dist/api/balance.d.mts +1 -1
- package/dist/api/balance.d.mts.map +1 -1
- package/dist/api/balance.mjs +1 -2
- package/dist/api/balance.mjs.map +1 -1
- package/dist/api/caip.cjs +3 -3
- package/dist/api/caip.cjs.map +1 -1
- package/dist/api/caip.d.cts.map +1 -1
- package/dist/api/caip.d.mts.map +1 -1
- package/dist/api/caip.mjs +1 -1
- package/dist/api/caip.mjs.map +1 -1
- package/dist/api/index.cjs +3 -0
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +4 -1
- package/dist/api/index.d.cts.map +1 -1
- package/dist/api/index.d.mts +4 -1
- package/dist/api/index.d.mts.map +1 -1
- package/dist/api/index.mjs +3 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/api/keyring.cjs +2 -0
- package/dist/api/keyring.cjs.map +1 -1
- package/dist/api/keyring.d.cts +14 -0
- package/dist/api/keyring.d.cts.map +1 -1
- package/dist/api/keyring.d.mts +14 -0
- package/dist/api/keyring.d.mts.map +1 -1
- package/dist/api/keyring.mjs +2 -0
- package/dist/api/keyring.mjs.map +1 -1
- package/dist/api/pagination.cjs +28 -0
- package/dist/api/pagination.cjs.map +1 -0
- package/dist/api/pagination.d.cts +59 -0
- package/dist/api/pagination.d.cts.map +1 -0
- package/dist/api/pagination.d.mts +59 -0
- package/dist/api/pagination.d.mts.map +1 -0
- package/dist/api/pagination.mjs +25 -0
- package/dist/api/pagination.mjs.map +1 -0
- package/dist/api/request.cjs +6 -7
- package/dist/api/request.cjs.map +1 -1
- package/dist/api/request.d.cts +5 -5
- package/dist/api/request.d.cts.map +1 -1
- package/dist/api/request.d.mts +5 -5
- package/dist/api/request.d.mts.map +1 -1
- package/dist/api/request.mjs +1 -2
- package/dist/api/request.mjs.map +1 -1
- package/dist/api/response.cjs +6 -6
- package/dist/api/response.cjs.map +1 -1
- package/dist/api/response.d.cts +1 -1
- package/dist/api/response.d.cts.map +1 -1
- package/dist/api/response.d.mts +1 -1
- package/dist/api/response.d.mts.map +1 -1
- package/dist/api/response.mjs +1 -1
- package/dist/api/response.mjs.map +1 -1
- package/dist/api/transaction.cjs +294 -0
- package/dist/api/transaction.cjs.map +1 -0
- package/dist/api/transaction.d.cts +773 -0
- package/dist/api/transaction.d.cts.map +1 -0
- package/dist/api/transaction.d.mts +773 -0
- package/dist/api/transaction.d.mts.map +1 -0
- package/dist/api/transaction.mjs +291 -0
- package/dist/api/transaction.mjs.map +1 -0
- package/dist/btc/types.cjs +2 -2
- package/dist/btc/types.cjs.map +1 -1
- package/dist/btc/types.d.cts +1 -1
- package/dist/btc/types.d.cts.map +1 -1
- package/dist/btc/types.d.mts +1 -1
- package/dist/btc/types.d.mts.map +1 -1
- package/dist/btc/types.mjs +2 -2
- package/dist/btc/types.mjs.map +1 -1
- package/dist/eth/erc4337/types.cjs +10 -11
- package/dist/eth/erc4337/types.cjs.map +1 -1
- package/dist/eth/erc4337/types.d.cts +4 -4
- package/dist/eth/erc4337/types.d.cts.map +1 -1
- package/dist/eth/erc4337/types.d.mts +4 -4
- package/dist/eth/erc4337/types.d.mts.map +1 -1
- package/dist/eth/erc4337/types.mjs +1 -2
- package/dist/eth/erc4337/types.mjs.map +1 -1
- package/dist/eth/types.cjs +6 -6
- package/dist/eth/types.cjs.map +1 -1
- package/dist/eth/types.d.cts +2 -2
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts +2 -2
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/eth/types.mjs +1 -1
- package/dist/eth/types.mjs.map +1 -1
- package/dist/eth/utils.cjs.map +1 -1
- package/dist/eth/utils.d.cts.map +1 -1
- package/dist/eth/utils.d.mts.map +1 -1
- package/dist/eth/utils.mjs.map +1 -1
- package/dist/events.cjs +67 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +161 -0
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +161 -0
- package/dist/events.d.mts.map +1 -1
- package/dist/events.mjs +66 -0
- package/dist/events.mjs.map +1 -1
- package/dist/index.cjs +2 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -8
- package/dist/index.mjs.map +1 -1
- package/dist/{internal/api.cjs → rpc.cjs} +78 -38
- package/dist/rpc.cjs.map +1 -0
- package/dist/{internal/api.d.cts → rpc.d.cts} +402 -59
- package/dist/rpc.d.cts.map +1 -0
- package/dist/{internal/api.d.mts → rpc.d.mts} +402 -59
- package/dist/rpc.d.mts.map +1 -0
- package/dist/{internal/api.mjs → rpc.mjs} +44 -5
- package/dist/rpc.mjs.map +1 -0
- package/dist/sol/types.cjs +3 -3
- package/dist/sol/types.cjs.map +1 -1
- package/dist/sol/types.d.cts +1 -1
- package/dist/sol/types.d.cts.map +1 -1
- package/dist/sol/types.d.mts +1 -1
- package/dist/sol/types.d.mts.map +1 -1
- package/dist/sol/types.mjs +1 -1
- package/dist/sol/types.mjs.map +1 -1
- package/package.json +11 -14
- package/dist/JsonRpcRequest.cjs +0 -13
- package/dist/JsonRpcRequest.cjs.map +0 -1
- package/dist/JsonRpcRequest.d.cts +0 -17
- package/dist/JsonRpcRequest.d.cts.map +0 -1
- package/dist/JsonRpcRequest.d.mts +0 -17
- package/dist/JsonRpcRequest.d.mts.map +0 -1
- package/dist/JsonRpcRequest.mjs +0 -10
- package/dist/JsonRpcRequest.mjs.map +0 -1
- package/dist/KeyringClient.cjs +0 -124
- package/dist/KeyringClient.cjs.map +0 -1
- package/dist/KeyringClient.d.cts +0 -29
- package/dist/KeyringClient.d.cts.map +0 -1
- package/dist/KeyringClient.d.mts +0 -29
- package/dist/KeyringClient.d.mts.map +0 -1
- package/dist/KeyringClient.mjs +0 -120
- package/dist/KeyringClient.mjs.map +0 -1
- package/dist/KeyringSnapRpcClient.cjs +0 -68
- package/dist/KeyringSnapRpcClient.cjs.map +0 -1
- package/dist/KeyringSnapRpcClient.d.cts +0 -40
- package/dist/KeyringSnapRpcClient.d.cts.map +0 -1
- package/dist/KeyringSnapRpcClient.d.mts +0 -40
- package/dist/KeyringSnapRpcClient.d.mts.map +0 -1
- package/dist/KeyringSnapRpcClient.mjs +0 -63
- package/dist/KeyringSnapRpcClient.mjs.map +0 -1
- package/dist/internal/api.cjs.map +0 -1
- package/dist/internal/api.d.cts.map +0 -1
- package/dist/internal/api.d.mts.map +0 -1
- package/dist/internal/api.mjs.map +0 -1
- package/dist/internal/eth/EthKeyring.cjs +0 -3
- package/dist/internal/eth/EthKeyring.cjs.map +0 -1
- package/dist/internal/eth/EthKeyring.d.cts +0 -34
- package/dist/internal/eth/EthKeyring.d.cts.map +0 -1
- package/dist/internal/eth/EthKeyring.d.mts +0 -34
- package/dist/internal/eth/EthKeyring.d.mts.map +0 -1
- package/dist/internal/eth/EthKeyring.mjs +0 -2
- package/dist/internal/eth/EthKeyring.mjs.map +0 -1
- package/dist/internal/eth/index.cjs +0 -3
- package/dist/internal/eth/index.cjs.map +0 -1
- package/dist/internal/eth/index.d.cts +0 -2
- package/dist/internal/eth/index.d.cts.map +0 -1
- package/dist/internal/eth/index.d.mts +0 -2
- package/dist/internal/eth/index.d.mts.map +0 -1
- package/dist/internal/eth/index.mjs +0 -2
- package/dist/internal/eth/index.mjs.map +0 -1
- package/dist/internal/events.cjs +0 -72
- package/dist/internal/events.cjs.map +0 -1
- package/dist/internal/events.d.cts +0 -162
- package/dist/internal/events.d.cts.map +0 -1
- package/dist/internal/events.d.mts +0 -162
- package/dist/internal/events.d.mts.map +0 -1
- package/dist/internal/events.mjs +0 -69
- package/dist/internal/events.mjs.map +0 -1
- package/dist/internal/index.cjs +0 -21
- package/dist/internal/index.cjs.map +0 -1
- package/dist/internal/index.d.cts +0 -6
- package/dist/internal/index.d.cts.map +0 -1
- package/dist/internal/index.d.mts +0 -6
- package/dist/internal/index.d.mts.map +0 -1
- package/dist/internal/index.mjs +0 -5
- package/dist/internal/index.mjs.map +0 -1
- package/dist/internal/rpc.cjs +0 -33
- package/dist/internal/rpc.cjs.map +0 -1
- package/dist/internal/rpc.d.cts +0 -26
- package/dist/internal/rpc.d.cts.map +0 -1
- package/dist/internal/rpc.d.mts +0 -26
- package/dist/internal/rpc.d.mts.map +0 -1
- package/dist/internal/rpc.mjs +0 -29
- package/dist/internal/rpc.mjs.map +0 -1
- package/dist/internal/types.cjs +0 -52
- package/dist/internal/types.cjs.map +0 -1
- package/dist/internal/types.d.cts +0 -392
- package/dist/internal/types.d.cts.map +0 -1
- package/dist/internal/types.d.mts +0 -392
- package/dist/internal/types.d.mts.map +0 -1
- package/dist/internal/types.mjs +0 -49
- package/dist/internal/types.mjs.map +0 -1
- package/dist/rpc-handler.cjs +0 -136
- package/dist/rpc-handler.cjs.map +0 -1
- package/dist/rpc-handler.d.cts +0 -30
- package/dist/rpc-handler.d.cts.map +0 -1
- package/dist/rpc-handler.d.mts +0 -30
- package/dist/rpc-handler.d.mts.map +0 -1
- package/dist/rpc-handler.mjs +0 -131
- package/dist/rpc-handler.mjs.map +0 -1
- package/dist/snap-utils.cjs +0 -20
- package/dist/snap-utils.cjs.map +0 -1
- package/dist/snap-utils.d.cts +0 -12
- package/dist/snap-utils.d.cts.map +0 -1
- package/dist/snap-utils.d.mts +0 -12
- package/dist/snap-utils.d.mts.map +0 -1
- package/dist/snap-utils.mjs +0 -17
- package/dist/snap-utils.mjs.map +0 -1
- package/dist/superstruct.cjs +0 -80
- package/dist/superstruct.cjs.map +0 -1
- package/dist/superstruct.d.cts +0 -84
- package/dist/superstruct.d.cts.map +0 -1
- package/dist/superstruct.d.mts +0 -84
- package/dist/superstruct.d.mts.map +0 -1
- package/dist/superstruct.mjs +0 -74
- package/dist/superstruct.mjs.map +0 -1
- package/dist/utils/index.cjs +0 -19
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -3
- package/dist/utils/index.d.cts.map +0 -1
- package/dist/utils/index.d.mts +0 -3
- package/dist/utils/index.d.mts.map +0 -1
- package/dist/utils/index.mjs +0 -3
- package/dist/utils/index.mjs.map +0 -1
- package/dist/utils/types.cjs +0 -29
- package/dist/utils/types.cjs.map +0 -1
- package/dist/utils/types.d.cts +0 -18
- package/dist/utils/types.d.cts.map +0 -1
- package/dist/utils/types.d.mts +0 -18
- package/dist/utils/types.d.mts.map +0 -1
- package/dist/utils/types.mjs +0 -26
- package/dist/utils/types.mjs.map +0 -1
- package/dist/utils/typing.cjs +0 -20
- package/dist/utils/typing.cjs.map +0 -1
- package/dist/utils/typing.d.cts +0 -33
- package/dist/utils/typing.d.cts.map +0 -1
- package/dist/utils/typing.d.mts +0 -33
- package/dist/utils/typing.d.mts.map +0 -1
- package/dist/utils/typing.mjs +0 -17
- package/dist/utils/typing.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [12.0.0]
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Use `ts-bridge/cli@0.6.1` ([#118](https://github.com/MetaMask/accounts/pull/118))
|
15
|
+
- This new version fixes a bug with CJS re-exports.
|
16
|
+
- **BREAKING:** Split into several smaller packages ([#24](https://github.com/MetaMask/accounts/pull/24))
|
17
|
+
- This should improve dependencies management.
|
18
|
+
- Internal related types (internal to both clients) have been moved to `keyring-internal-*` packages.
|
19
|
+
- Keyring API clients (mainly used by dapps) have been moved to `keyring-snap-client` package.
|
20
|
+
- Common utils have been moevd to `keyring-utils` package.
|
21
|
+
|
22
|
+
## [11.1.0]
|
23
|
+
|
24
|
+
### Added
|
25
|
+
|
26
|
+
- Add `listAccountTransactions` keyring method ([#41](https://github.com/MetaMask/accounts/pull/41))
|
27
|
+
|
10
28
|
## [11.0.0]
|
11
29
|
|
12
30
|
### Added
|
@@ -438,7 +456,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
438
456
|
- SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
|
439
457
|
- Helper functions to create keyring handler in the snap.
|
440
458
|
|
441
|
-
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@
|
459
|
+
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@12.0.0...HEAD
|
460
|
+
[12.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@11.1.0...@metamask/keyring-api@12.0.0
|
461
|
+
[11.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@11.0.0...@metamask/keyring-api@11.1.0
|
442
462
|
[11.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@10.1.0...@metamask/keyring-api@11.0.0
|
443
463
|
[10.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@10.0.0...@metamask/keyring-api@10.1.0
|
444
464
|
[10.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-api@9.0.0...@metamask/keyring-api@10.0.0
|
package/dist/api/account.cjs
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.KeyringAccountStruct = exports.SolAccountType = exports.BtcAccountType = exports.EthAccountType = void 0;
|
4
|
+
const keyring_utils_1 = require("@metamask/keyring-utils");
|
4
5
|
const superstruct_1 = require("@metamask/superstruct");
|
5
6
|
const utils_1 = require("@metamask/utils");
|
6
|
-
const superstruct_2 = require("../superstruct.cjs");
|
7
|
-
const utils_2 = require("../utils/index.cjs");
|
8
7
|
/**
|
9
8
|
* Supported Ethereum account types.
|
10
9
|
*/
|
@@ -34,11 +33,11 @@ var SolAccountType;
|
|
34
33
|
*
|
35
34
|
* See {@link KeyringAccount}.
|
36
35
|
*/
|
37
|
-
exports.KeyringAccountStruct = (0,
|
36
|
+
exports.KeyringAccountStruct = (0, keyring_utils_1.object)({
|
38
37
|
/**
|
39
38
|
* Account ID (UUIDv4).
|
40
39
|
*/
|
41
|
-
id:
|
40
|
+
id: keyring_utils_1.UuidStruct,
|
42
41
|
/**
|
43
42
|
* Account type.
|
44
43
|
*/
|
package/dist/api/account.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"account.cjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"account.cjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":";;;AAAA,2DAA6D;AAE7D,uDAAqE;AACrE,2CAA6C;AAE7C;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,0CAAwB,CAAA;AAC1B,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAWD;;;;;;GAMG;AACU,QAAA,oBAAoB,GAAG,IAAA,sBAAM,EAAC;IACzC;;OAEG;IACH,EAAE,EAAE,0BAAU;IAEd;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,GAAE;IAEjB;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,oBAAM,GAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { object, UuidStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, record, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2wpkh = 'bip122:p2wpkh',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2wpkh}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: UuidStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2wpkh}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
|
package/dist/api/account.d.cts
CHANGED
@@ -32,8 +32,8 @@ export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc
|
|
32
32
|
export declare const KeyringAccountStruct: import("@metamask/superstruct").Struct<{
|
33
33
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
34
34
|
id: string;
|
35
|
-
address: string;
|
36
35
|
options: Record<string, import("@metamask/utils").Json>;
|
36
|
+
address: string;
|
37
37
|
methods: string[];
|
38
38
|
}, {
|
39
39
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"account.d.cts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"account.d.cts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,kBAAkB;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;IAQH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/api/account.d.mts
CHANGED
@@ -32,8 +32,8 @@ export type KeyringAccountType = `${EthAccountType.Eoa}` | `${EthAccountType.Erc
|
|
32
32
|
export declare const KeyringAccountStruct: import("@metamask/superstruct").Struct<{
|
33
33
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
34
34
|
id: string;
|
35
|
-
address: string;
|
36
35
|
options: Record<string, import("@metamask/utils").Json>;
|
36
|
+
address: string;
|
37
37
|
methods: string[];
|
38
38
|
}, {
|
39
39
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,kBAAkB;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;IAQH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/api/account.mjs
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
+
import { object, UuidStruct } from "@metamask/keyring-utils";
|
1
2
|
import { array, enums, record, string } from "@metamask/superstruct";
|
2
3
|
import { JsonStruct } from "@metamask/utils";
|
3
|
-
import { object } from "../superstruct.mjs";
|
4
|
-
import { UuidStruct } from "../utils/index.mjs";
|
5
4
|
/**
|
6
5
|
* Supported Ethereum account types.
|
7
6
|
*/
|
package/dist/api/account.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"account.mjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"account.mjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gCAAgC;AAE7D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AACrE,OAAO,EAAE,UAAU,EAAE,wBAAwB;AAE7C;;GAEG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,0CAAwB,CAAA;AAC1B,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAWD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,EAAE,EAAE,UAAU;IAEd;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { object, UuidStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, record, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2wpkh = 'bip122:p2wpkh',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2wpkh}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: UuidStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2wpkh}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AssetStruct = exports.NonFungibleAssetStruct = exports.FungibleAssetStruct = 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
|
+
/**
|
8
|
+
* Fungible asset struct.
|
9
|
+
*/
|
10
|
+
exports.FungibleAssetStruct = (0, keyring_utils_1.object)({
|
11
|
+
/**
|
12
|
+
* It is a fungible asset.
|
13
|
+
*/
|
14
|
+
fungible: (0, superstruct_1.literal)(true),
|
15
|
+
/**
|
16
|
+
* Asset type (CAIP-19).
|
17
|
+
*/
|
18
|
+
type: utils_1.CaipAssetTypeStruct,
|
19
|
+
/**
|
20
|
+
* Asset unit.
|
21
|
+
*/
|
22
|
+
unit: (0, superstruct_1.string)(),
|
23
|
+
/**
|
24
|
+
* Asset amount.
|
25
|
+
*/
|
26
|
+
amount: keyring_utils_1.StringNumberStruct,
|
27
|
+
});
|
28
|
+
/**
|
29
|
+
* Non-fungible asset struct.
|
30
|
+
*/
|
31
|
+
exports.NonFungibleAssetStruct = (0, keyring_utils_1.object)({
|
32
|
+
/**
|
33
|
+
* It is a non-fungible asset.
|
34
|
+
*/
|
35
|
+
fungible: (0, superstruct_1.literal)(false),
|
36
|
+
/**
|
37
|
+
* Asset ID (CAIP-19).
|
38
|
+
*/
|
39
|
+
id: utils_1.CaipAssetIdStruct,
|
40
|
+
});
|
41
|
+
/**
|
42
|
+
* Asset struct. This represents a fungible or non-fungible asset. Fungible
|
43
|
+
* assets include an amount and a unit in addition to the asset type. While
|
44
|
+
* non-fungible assets include only an asset ID.
|
45
|
+
*
|
46
|
+
* See {@link NonFungibleAssetStruct} and {@link FungibleAssetStruct}.
|
47
|
+
*
|
48
|
+
* All assets have a `fungible` property that is used to tag the union and
|
49
|
+
* allow the following pattern:
|
50
|
+
*
|
51
|
+
* ```ts
|
52
|
+
* if (asset.fungible) {
|
53
|
+
* // Use asset.type
|
54
|
+
* } else {
|
55
|
+
* // Use asset.id
|
56
|
+
* }
|
57
|
+
* ```
|
58
|
+
*
|
59
|
+
* @example
|
60
|
+
* ```ts
|
61
|
+
* {
|
62
|
+
* fungible: true,
|
63
|
+
* type: 'eip155:1/slip44:60',
|
64
|
+
* unit: 'ETH',
|
65
|
+
* amount: '0.01',
|
66
|
+
* }
|
67
|
+
* ```
|
68
|
+
*
|
69
|
+
* @example
|
70
|
+
* ```ts
|
71
|
+
* {
|
72
|
+
* fungible: false,
|
73
|
+
* id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',
|
74
|
+
* }
|
75
|
+
* ```
|
76
|
+
*/
|
77
|
+
exports.AssetStruct = (0, keyring_utils_1.selectiveUnion)((value) => {
|
78
|
+
return (0, utils_1.isPlainObject)(value) && !value.fungible
|
79
|
+
? exports.NonFungibleAssetStruct
|
80
|
+
: exports.FungibleAssetStruct;
|
81
|
+
});
|
82
|
+
//# sourceMappingURL=asset.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"asset.cjs","sourceRoot":"","sources":["../../src/api/asset.ts"],"names":[],"mappings":";;;AAAA,2DAIiC;AAEjC,uDAAwD;AACxD,2CAIyB;AAEzB;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAA,sBAAM,EAAC;IACxC;;OAEG;IACH,QAAQ,EAAE,IAAA,qBAAO,EAAC,IAAI,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,2BAAmB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,oBAAM,GAAE;IAEd;;OAEG;IACH,MAAM,EAAE,kCAAkB;CAC3B,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,sBAAsB,GAAG,IAAA,sBAAM,EAAC;IAC3C;;OAEG;IACH,QAAQ,EAAE,IAAA,qBAAO,EAAC,KAAK,CAAC;IAExB;;OAEG;IACH,EAAE,EAAE,yBAAiB;CACtB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACU,QAAA,WAAW,GAAG,IAAA,8BAAc,EAAC,CAAC,KAAU,EAAE,EAAE;IACvD,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;QAC5C,CAAC,CAAC,8BAAsB;QACxB,CAAC,CAAC,2BAAmB,CAAC;AAC1B,CAAC,CAAC,CAAC","sourcesContent":["import {\n object,\n selectiveUnion,\n StringNumberStruct,\n} from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { literal, string } from '@metamask/superstruct';\nimport {\n CaipAssetIdStruct,\n CaipAssetTypeStruct,\n isPlainObject,\n} from '@metamask/utils';\n\n/**\n * Fungible asset struct.\n */\nexport const FungibleAssetStruct = object({\n /**\n * It is a fungible asset.\n */\n fungible: literal(true),\n\n /**\n * Asset type (CAIP-19).\n */\n type: CaipAssetTypeStruct,\n\n /**\n * Asset unit.\n */\n unit: string(),\n\n /**\n * Asset amount.\n */\n amount: StringNumberStruct,\n});\n\n/**\n * Non-fungible asset struct.\n */\nexport const NonFungibleAssetStruct = object({\n /**\n * It is a non-fungible asset.\n */\n fungible: literal(false),\n\n /**\n * Asset ID (CAIP-19).\n */\n id: CaipAssetIdStruct,\n});\n\n/**\n * Asset struct. This represents a fungible or non-fungible asset. Fungible\n * assets include an amount and a unit in addition to the asset type. While\n * non-fungible assets include only an asset ID.\n *\n * See {@link NonFungibleAssetStruct} and {@link FungibleAssetStruct}.\n *\n * All assets have a `fungible` property that is used to tag the union and\n * allow the following pattern:\n *\n * ```ts\n * if (asset.fungible) {\n * // Use asset.type\n * } else {\n * // Use asset.id\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * fungible: true,\n * type: 'eip155:1/slip44:60',\n * unit: 'ETH',\n * amount: '0.01',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * fungible: false,\n * id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',\n * }\n * ```\n */\nexport const AssetStruct = selectiveUnion((value: any) => {\n return isPlainObject(value) && !value.fungible\n ? NonFungibleAssetStruct\n : FungibleAssetStruct;\n});\n\n/**\n * Asset type {@see AssetStruct}.\n */\nexport type Asset = Infer<typeof AssetStruct>;\n"]}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import type { Infer } from "@metamask/superstruct";
|
2
|
+
/**
|
3
|
+
* Fungible asset struct.
|
4
|
+
*/
|
5
|
+
export declare const FungibleAssetStruct: import("@metamask/superstruct").Struct<{
|
6
|
+
unit: string;
|
7
|
+
type: `${string}:${string}/${string}:${string}`;
|
8
|
+
fungible: true;
|
9
|
+
amount: string;
|
10
|
+
}, {
|
11
|
+
/**
|
12
|
+
* It is a fungible asset.
|
13
|
+
*/
|
14
|
+
fungible: import("@metamask/superstruct").Struct<true, true>;
|
15
|
+
/**
|
16
|
+
* Asset type (CAIP-19).
|
17
|
+
*/
|
18
|
+
type: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
19
|
+
/**
|
20
|
+
* Asset unit.
|
21
|
+
*/
|
22
|
+
unit: import("@metamask/superstruct").Struct<string, null>;
|
23
|
+
/**
|
24
|
+
* Asset amount.
|
25
|
+
*/
|
26
|
+
amount: import("@metamask/superstruct").Struct<string, null>;
|
27
|
+
}>;
|
28
|
+
/**
|
29
|
+
* Non-fungible asset struct.
|
30
|
+
*/
|
31
|
+
export declare const NonFungibleAssetStruct: import("@metamask/superstruct").Struct<{
|
32
|
+
id: `${string}:${string}/${string}:${string}/${string}`;
|
33
|
+
fungible: false;
|
34
|
+
}, {
|
35
|
+
/**
|
36
|
+
* It is a non-fungible asset.
|
37
|
+
*/
|
38
|
+
fungible: import("@metamask/superstruct").Struct<false, false>;
|
39
|
+
/**
|
40
|
+
* Asset ID (CAIP-19).
|
41
|
+
*/
|
42
|
+
id: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}/${string}`, null>;
|
43
|
+
}>;
|
44
|
+
/**
|
45
|
+
* Asset struct. This represents a fungible or non-fungible asset. Fungible
|
46
|
+
* assets include an amount and a unit in addition to the asset type. While
|
47
|
+
* non-fungible assets include only an asset ID.
|
48
|
+
*
|
49
|
+
* See {@link NonFungibleAssetStruct} and {@link FungibleAssetStruct}.
|
50
|
+
*
|
51
|
+
* All assets have a `fungible` property that is used to tag the union and
|
52
|
+
* allow the following pattern:
|
53
|
+
*
|
54
|
+
* ```ts
|
55
|
+
* if (asset.fungible) {
|
56
|
+
* // Use asset.type
|
57
|
+
* } else {
|
58
|
+
* // Use asset.id
|
59
|
+
* }
|
60
|
+
* ```
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* ```ts
|
64
|
+
* {
|
65
|
+
* fungible: true,
|
66
|
+
* type: 'eip155:1/slip44:60',
|
67
|
+
* unit: 'ETH',
|
68
|
+
* amount: '0.01',
|
69
|
+
* }
|
70
|
+
* ```
|
71
|
+
*
|
72
|
+
* @example
|
73
|
+
* ```ts
|
74
|
+
* {
|
75
|
+
* fungible: false,
|
76
|
+
* id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',
|
77
|
+
* }
|
78
|
+
* ```
|
79
|
+
*/
|
80
|
+
export declare const AssetStruct: import("@metamask/superstruct").Struct<{
|
81
|
+
unit: string;
|
82
|
+
type: `${string}:${string}/${string}:${string}`;
|
83
|
+
fungible: true;
|
84
|
+
amount: string;
|
85
|
+
} | {
|
86
|
+
id: `${string}:${string}/${string}:${string}/${string}`;
|
87
|
+
fungible: false;
|
88
|
+
}, null>;
|
89
|
+
/**
|
90
|
+
* Asset type {@see AssetStruct}.
|
91
|
+
*/
|
92
|
+
export type Asset = Infer<typeof AssetStruct>;
|
93
|
+
//# sourceMappingURL=asset.d.cts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"asset.d.cts","sourceRoot":"","sources":["../../src/api/asset.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAQnD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;IAC9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;IACjC;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,WAAW;;;;;;;;QAItB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import type { Infer } from "@metamask/superstruct";
|
2
|
+
/**
|
3
|
+
* Fungible asset struct.
|
4
|
+
*/
|
5
|
+
export declare const FungibleAssetStruct: import("@metamask/superstruct").Struct<{
|
6
|
+
unit: string;
|
7
|
+
type: `${string}:${string}/${string}:${string}`;
|
8
|
+
fungible: true;
|
9
|
+
amount: string;
|
10
|
+
}, {
|
11
|
+
/**
|
12
|
+
* It is a fungible asset.
|
13
|
+
*/
|
14
|
+
fungible: import("@metamask/superstruct").Struct<true, true>;
|
15
|
+
/**
|
16
|
+
* Asset type (CAIP-19).
|
17
|
+
*/
|
18
|
+
type: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
19
|
+
/**
|
20
|
+
* Asset unit.
|
21
|
+
*/
|
22
|
+
unit: import("@metamask/superstruct").Struct<string, null>;
|
23
|
+
/**
|
24
|
+
* Asset amount.
|
25
|
+
*/
|
26
|
+
amount: import("@metamask/superstruct").Struct<string, null>;
|
27
|
+
}>;
|
28
|
+
/**
|
29
|
+
* Non-fungible asset struct.
|
30
|
+
*/
|
31
|
+
export declare const NonFungibleAssetStruct: import("@metamask/superstruct").Struct<{
|
32
|
+
id: `${string}:${string}/${string}:${string}/${string}`;
|
33
|
+
fungible: false;
|
34
|
+
}, {
|
35
|
+
/**
|
36
|
+
* It is a non-fungible asset.
|
37
|
+
*/
|
38
|
+
fungible: import("@metamask/superstruct").Struct<false, false>;
|
39
|
+
/**
|
40
|
+
* Asset ID (CAIP-19).
|
41
|
+
*/
|
42
|
+
id: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}/${string}`, null>;
|
43
|
+
}>;
|
44
|
+
/**
|
45
|
+
* Asset struct. This represents a fungible or non-fungible asset. Fungible
|
46
|
+
* assets include an amount and a unit in addition to the asset type. While
|
47
|
+
* non-fungible assets include only an asset ID.
|
48
|
+
*
|
49
|
+
* See {@link NonFungibleAssetStruct} and {@link FungibleAssetStruct}.
|
50
|
+
*
|
51
|
+
* All assets have a `fungible` property that is used to tag the union and
|
52
|
+
* allow the following pattern:
|
53
|
+
*
|
54
|
+
* ```ts
|
55
|
+
* if (asset.fungible) {
|
56
|
+
* // Use asset.type
|
57
|
+
* } else {
|
58
|
+
* // Use asset.id
|
59
|
+
* }
|
60
|
+
* ```
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* ```ts
|
64
|
+
* {
|
65
|
+
* fungible: true,
|
66
|
+
* type: 'eip155:1/slip44:60',
|
67
|
+
* unit: 'ETH',
|
68
|
+
* amount: '0.01',
|
69
|
+
* }
|
70
|
+
* ```
|
71
|
+
*
|
72
|
+
* @example
|
73
|
+
* ```ts
|
74
|
+
* {
|
75
|
+
* fungible: false,
|
76
|
+
* id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',
|
77
|
+
* }
|
78
|
+
* ```
|
79
|
+
*/
|
80
|
+
export declare const AssetStruct: import("@metamask/superstruct").Struct<{
|
81
|
+
unit: string;
|
82
|
+
type: `${string}:${string}/${string}:${string}`;
|
83
|
+
fungible: true;
|
84
|
+
amount: string;
|
85
|
+
} | {
|
86
|
+
id: `${string}:${string}/${string}:${string}/${string}`;
|
87
|
+
fungible: false;
|
88
|
+
}, null>;
|
89
|
+
/**
|
90
|
+
* Asset type {@see AssetStruct}.
|
91
|
+
*/
|
92
|
+
export type Asset = Infer<typeof AssetStruct>;
|
93
|
+
//# sourceMappingURL=asset.d.mts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"asset.d.mts","sourceRoot":"","sources":["../../src/api/asset.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAQnD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;IAC9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;IACjC;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,WAAW;;;;;;;;QAItB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import { object, selectiveUnion, StringNumberStruct } from "@metamask/keyring-utils";
|
2
|
+
import { literal, string } from "@metamask/superstruct";
|
3
|
+
import { CaipAssetIdStruct, CaipAssetTypeStruct, isPlainObject } from "@metamask/utils";
|
4
|
+
/**
|
5
|
+
* Fungible asset struct.
|
6
|
+
*/
|
7
|
+
export const FungibleAssetStruct = object({
|
8
|
+
/**
|
9
|
+
* It is a fungible asset.
|
10
|
+
*/
|
11
|
+
fungible: literal(true),
|
12
|
+
/**
|
13
|
+
* Asset type (CAIP-19).
|
14
|
+
*/
|
15
|
+
type: CaipAssetTypeStruct,
|
16
|
+
/**
|
17
|
+
* Asset unit.
|
18
|
+
*/
|
19
|
+
unit: string(),
|
20
|
+
/**
|
21
|
+
* Asset amount.
|
22
|
+
*/
|
23
|
+
amount: StringNumberStruct,
|
24
|
+
});
|
25
|
+
/**
|
26
|
+
* Non-fungible asset struct.
|
27
|
+
*/
|
28
|
+
export const NonFungibleAssetStruct = object({
|
29
|
+
/**
|
30
|
+
* It is a non-fungible asset.
|
31
|
+
*/
|
32
|
+
fungible: literal(false),
|
33
|
+
/**
|
34
|
+
* Asset ID (CAIP-19).
|
35
|
+
*/
|
36
|
+
id: CaipAssetIdStruct,
|
37
|
+
});
|
38
|
+
/**
|
39
|
+
* Asset struct. This represents a fungible or non-fungible asset. Fungible
|
40
|
+
* assets include an amount and a unit in addition to the asset type. While
|
41
|
+
* non-fungible assets include only an asset ID.
|
42
|
+
*
|
43
|
+
* See {@link NonFungibleAssetStruct} and {@link FungibleAssetStruct}.
|
44
|
+
*
|
45
|
+
* All assets have a `fungible` property that is used to tag the union and
|
46
|
+
* allow the following pattern:
|
47
|
+
*
|
48
|
+
* ```ts
|
49
|
+
* if (asset.fungible) {
|
50
|
+
* // Use asset.type
|
51
|
+
* } else {
|
52
|
+
* // Use asset.id
|
53
|
+
* }
|
54
|
+
* ```
|
55
|
+
*
|
56
|
+
* @example
|
57
|
+
* ```ts
|
58
|
+
* {
|
59
|
+
* fungible: true,
|
60
|
+
* type: 'eip155:1/slip44:60',
|
61
|
+
* unit: 'ETH',
|
62
|
+
* amount: '0.01',
|
63
|
+
* }
|
64
|
+
* ```
|
65
|
+
*
|
66
|
+
* @example
|
67
|
+
* ```ts
|
68
|
+
* {
|
69
|
+
* fungible: false,
|
70
|
+
* id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',
|
71
|
+
* }
|
72
|
+
* ```
|
73
|
+
*/
|
74
|
+
export const AssetStruct = selectiveUnion((value) => {
|
75
|
+
return isPlainObject(value) && !value.fungible
|
76
|
+
? NonFungibleAssetStruct
|
77
|
+
: FungibleAssetStruct;
|
78
|
+
});
|
79
|
+
//# sourceMappingURL=asset.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"asset.mjs","sourceRoot":"","sources":["../../src/api/asset.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,cAAc,EACd,kBAAkB,EACnB,gCAAgC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,8BAA8B;AACxD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACd,wBAAwB;AAEzB;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,mBAAmB;IAEzB;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE;IAEd;;OAEG;IACH,MAAM,EAAE,kBAAkB;CAC3B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;IAC3C;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC;IAExB;;OAEG;IACH,EAAE,EAAE,iBAAiB;CACtB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC,CAAC,KAAU,EAAE,EAAE;IACvD,OAAO,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;QAC5C,CAAC,CAAC,sBAAsB;QACxB,CAAC,CAAC,mBAAmB,CAAC;AAC1B,CAAC,CAAC,CAAC","sourcesContent":["import {\n object,\n selectiveUnion,\n StringNumberStruct,\n} from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { literal, string } from '@metamask/superstruct';\nimport {\n CaipAssetIdStruct,\n CaipAssetTypeStruct,\n isPlainObject,\n} from '@metamask/utils';\n\n/**\n * Fungible asset struct.\n */\nexport const FungibleAssetStruct = object({\n /**\n * It is a fungible asset.\n */\n fungible: literal(true),\n\n /**\n * Asset type (CAIP-19).\n */\n type: CaipAssetTypeStruct,\n\n /**\n * Asset unit.\n */\n unit: string(),\n\n /**\n * Asset amount.\n */\n amount: StringNumberStruct,\n});\n\n/**\n * Non-fungible asset struct.\n */\nexport const NonFungibleAssetStruct = object({\n /**\n * It is a non-fungible asset.\n */\n fungible: literal(false),\n\n /**\n * Asset ID (CAIP-19).\n */\n id: CaipAssetIdStruct,\n});\n\n/**\n * Asset struct. This represents a fungible or non-fungible asset. Fungible\n * assets include an amount and a unit in addition to the asset type. While\n * non-fungible assets include only an asset ID.\n *\n * See {@link NonFungibleAssetStruct} and {@link FungibleAssetStruct}.\n *\n * All assets have a `fungible` property that is used to tag the union and\n * allow the following pattern:\n *\n * ```ts\n * if (asset.fungible) {\n * // Use asset.type\n * } else {\n * // Use asset.id\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * fungible: true,\n * type: 'eip155:1/slip44:60',\n * unit: 'ETH',\n * amount: '0.01',\n * }\n * ```\n *\n * @example\n * ```ts\n * {\n * fungible: false,\n * id: 'eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769',\n * }\n * ```\n */\nexport const AssetStruct = selectiveUnion((value: any) => {\n return isPlainObject(value) && !value.fungible\n ? NonFungibleAssetStruct\n : FungibleAssetStruct;\n});\n\n/**\n * Asset type {@see AssetStruct}.\n */\nexport type Asset = Infer<typeof AssetStruct>;\n"]}
|
package/dist/api/balance.cjs
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.BalanceStruct = void 0;
|
4
|
+
const keyring_utils_1 = require("@metamask/keyring-utils");
|
4
5
|
const superstruct_1 = require("@metamask/superstruct");
|
5
|
-
|
6
|
-
|
7
|
-
exports.BalanceStruct = (0, superstruct_2.object)({
|
8
|
-
amount: utils_1.StringNumberStruct,
|
6
|
+
exports.BalanceStruct = (0, keyring_utils_1.object)({
|
7
|
+
amount: keyring_utils_1.StringNumberStruct,
|
9
8
|
unit: (0, superstruct_1.string)(),
|
10
9
|
});
|
11
10
|
//# sourceMappingURL=balance.cjs.map
|
package/dist/api/balance.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balance.cjs","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"balance.cjs","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":";;;AAAA,2DAAqE;AAErE,uDAA+C;AAElC,QAAA,aAAa,GAAG,IAAA,sBAAM,EAAC;IAClC,MAAM,EAAE,kCAAkB;IAC1B,IAAI,EAAE,IAAA,oBAAM,GAAE;CACf,CAAC,CAAC","sourcesContent":["import { object, StringNumberStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { string } from '@metamask/superstruct';\n\nexport const BalanceStruct = object({\n amount: StringNumberStruct,\n unit: string(),\n});\n\nexport type Balance = Infer<typeof BalanceStruct>;\n"]}
|
package/dist/api/balance.d.cts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Infer } from "@metamask/superstruct";
|
2
2
|
export declare const BalanceStruct: import("@metamask/superstruct").Struct<{
|
3
|
-
amount: string;
|
4
3
|
unit: string;
|
4
|
+
amount: string;
|
5
5
|
}, {
|
6
6
|
amount: import("@metamask/superstruct").Struct<string, null>;
|
7
7
|
unit: import("@metamask/superstruct").Struct<string, null>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balance.d.cts","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"balance.d.cts","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAGnD,eAAO,MAAM,aAAa;;;;;;EAGxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/api/balance.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Infer } from "@metamask/superstruct";
|
2
2
|
export declare const BalanceStruct: import("@metamask/superstruct").Struct<{
|
3
|
-
amount: string;
|
4
3
|
unit: string;
|
4
|
+
amount: string;
|
5
5
|
}, {
|
6
6
|
amount: import("@metamask/superstruct").Struct<string, null>;
|
7
7
|
unit: import("@metamask/superstruct").Struct<string, null>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balance.d.mts","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"balance.d.mts","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAGnD,eAAO,MAAM,aAAa;;;;;;EAGxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/api/balance.mjs
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
+
import { object, StringNumberStruct } from "@metamask/keyring-utils";
|
1
2
|
import { string } from "@metamask/superstruct";
|
2
|
-
import { object } from "../superstruct.mjs";
|
3
|
-
import { StringNumberStruct } from "../utils/index.mjs";
|
4
3
|
export const BalanceStruct = object({
|
5
4
|
amount: StringNumberStruct,
|
6
5
|
unit: string(),
|
package/dist/api/balance.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balance.mjs","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"balance.mjs","sourceRoot":"","sources":["../../src/api/balance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,gCAAgC;AAErE,OAAO,EAAE,MAAM,EAAE,8BAA8B;AAE/C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;IAClC,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,MAAM,EAAE;CACf,CAAC,CAAC","sourcesContent":["import { object, StringNumberStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { string } from '@metamask/superstruct';\n\nexport const BalanceStruct = object({\n amount: StringNumberStruct,\n unit: string(),\n});\n\nexport type Balance = Infer<typeof BalanceStruct>;\n"]}
|
package/dist/api/caip.cjs
CHANGED
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CaipAssetIdStruct = exports.CaipAssetTypeStruct = void 0;
|
4
4
|
exports.isCaipAssetType = isCaipAssetType;
|
5
5
|
exports.isCaipAssetId = isCaipAssetId;
|
6
|
+
const keyring_utils_1 = require("@metamask/keyring-utils");
|
6
7
|
const superstruct_1 = require("@metamask/superstruct");
|
7
|
-
const superstruct_2 = require("../superstruct.cjs");
|
8
8
|
const CAIP_ASSET_TYPE_REGEX = /^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u;
|
9
9
|
const CAIP_ASSET_ID_REGEX = /^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u;
|
10
10
|
/**
|
11
11
|
* A CAIP-19 asset type identifier, i.e., a human-readable type of asset identifier.
|
12
12
|
*/
|
13
|
-
exports.CaipAssetTypeStruct = (0,
|
13
|
+
exports.CaipAssetTypeStruct = (0, keyring_utils_1.definePattern)('CaipAssetType', CAIP_ASSET_TYPE_REGEX);
|
14
14
|
/**
|
15
15
|
* A CAIP-19 asset ID identifier, i.e., a human-readable type of asset ID.
|
16
16
|
*/
|
17
|
-
exports.CaipAssetIdStruct = (0,
|
17
|
+
exports.CaipAssetIdStruct = (0, keyring_utils_1.definePattern)('CaipAssetId', CAIP_ASSET_ID_REGEX);
|
18
18
|
/**
|
19
19
|
* Check if the given value is a {@link CaipAssetType}.
|
20
20
|
*
|
package/dist/api/caip.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"caip.cjs","sourceRoot":"","sources":["../../src/api/caip.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"caip.cjs","sourceRoot":"","sources":["../../src/api/caip.ts"],"names":[],"mappings":";;;AAuCA,0CAEC;AAcD,sCAEC;AAzDD,2DAAwD;AACxD,uDAAuD;AAEvD,MAAM,qBAAqB,GACzB,2JAA2J,CAAC;AAE9J,MAAM,mBAAmB,GACvB,6LAA6L,CAAC;AAEhM;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAA,6BAAa,EAC9C,eAAe,EACf,qBAAqB,CACtB,CAAC;AAGF;;GAEG;AACU,QAAA,iBAAiB,GAAG,IAAA,6BAAa,EAC5C,aAAa,EACb,mBAAmB,CACpB,CAAC;AAGF;;;;;;;;;;;GAWG;AACH,SAAgB,eAAe,CAAC,KAAc;IAC5C,OAAO,IAAA,gBAAE,EAAC,KAAK,EAAE,2BAAmB,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,aAAa,CAAC,KAAc;IAC1C,OAAO,IAAA,gBAAE,EAAC,KAAK,EAAE,yBAAiB,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import { definePattern } from '@metamask/keyring-utils';\nimport { is, type Infer } from '@metamask/superstruct';\n\nconst CAIP_ASSET_TYPE_REGEX =\n /^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u;\n\nconst CAIP_ASSET_ID_REGEX =\n /^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u;\n\n/**\n * A CAIP-19 asset type identifier, i.e., a human-readable type of asset identifier.\n */\nexport const CaipAssetTypeStruct = definePattern(\n 'CaipAssetType',\n CAIP_ASSET_TYPE_REGEX,\n);\nexport type CaipAssetType = Infer<typeof CaipAssetTypeStruct>;\n\n/**\n * A CAIP-19 asset ID identifier, i.e., a human-readable type of asset ID.\n */\nexport const CaipAssetIdStruct = definePattern(\n 'CaipAssetId',\n CAIP_ASSET_ID_REGEX,\n);\nexport type CaipAssetId = Infer<typeof CaipAssetIdStruct>;\n\n/**\n * Check if the given value is a {@link CaipAssetType}.\n *\n * @param value - The value to check.\n * @returns Whether the value is a {@link CaipAssetType}.\n * @example\n * ```ts\n * isCaipAssetType('eip155:1/slip44:60'); // true\n * isCaipAssetType('cosmos:cosmoshub-3/slip44:118'); // true\n * isCaipAssetType('hedera:mainnet/nft:0.0.55492/12'); // false\n * ```\n */\nexport function isCaipAssetType(value: unknown): value is CaipAssetType {\n return is(value, CaipAssetTypeStruct);\n}\n\n/**\n * Check if the given value is a {@link CaipAssetId}.\n *\n * @param value - The value to check.\n * @returns Whether the value is a {@link CaipAssetId}.\n * @example\n * ```ts\n * isCaipAssetType('eip155:1/slip44:60'); // false\n * isCaipAssetType('cosmos:cosmoshub-3/slip44:118'); // false\n * isCaipAssetType('hedera:mainnet/nft:0.0.55492/12'); // true\n * ```\n */\nexport function isCaipAssetId(value: unknown): value is CaipAssetId {\n return is(value, CaipAssetIdStruct);\n}\n"]}
|
package/dist/api/caip.d.cts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"caip.d.cts","sourceRoot":"","sources":["../../src/api/caip.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"caip.d.cts","sourceRoot":"","sources":["../../src/api/caip.ts"],"names":[],"mappings":"AACA,OAAO,EAAM,KAAK,KAAK,EAAE,8BAA8B;AAQvD;;GAEG;AACH,eAAO,MAAM,mBAAmB,sDAG/B,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,iBAAiB,sDAG7B,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE"}
|
package/dist/api/caip.d.mts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"caip.d.mts","sourceRoot":"","sources":["../../src/api/caip.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"caip.d.mts","sourceRoot":"","sources":["../../src/api/caip.ts"],"names":[],"mappings":"AACA,OAAO,EAAM,KAAK,KAAK,EAAE,8BAA8B;AAQvD;;GAEG;AACH,eAAO,MAAM,mBAAmB,sDAG/B,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,iBAAiB,sDAG7B,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE"}
|