@metamask/keyring-api 14.0.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -1
- package/dist/api/account.cjs +2 -2
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +2 -2
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +2 -2
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +5 -5
- package/dist/api/account.mjs.map +1 -1
- package/dist/api/address.cjs +14 -0
- package/dist/api/address.cjs.map +1 -0
- package/dist/api/address.d.cts +19 -0
- package/dist/api/address.d.cts.map +1 -0
- package/dist/api/address.d.mts +19 -0
- package/dist/api/address.d.mts.map +1 -0
- package/dist/api/address.mjs +11 -0
- package/dist/api/address.mjs.map +1 -0
- package/dist/api/asset.cjs +15 -9
- package/dist/api/asset.cjs.map +1 -1
- package/dist/api/asset.d.cts +25 -9
- package/dist/api/asset.d.cts.map +1 -1
- package/dist/api/asset.d.mts +25 -9
- package/dist/api/asset.d.mts.map +1 -1
- package/dist/api/asset.mjs +14 -8
- package/dist/api/asset.mjs.map +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.cts.map +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.mts.map +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/api/keyring.cjs.map +1 -1
- package/dist/api/keyring.d.cts +16 -2
- package/dist/api/keyring.d.cts.map +1 -1
- package/dist/api/keyring.d.mts +16 -2
- package/dist/api/keyring.d.mts.map +1 -1
- package/dist/api/keyring.mjs.map +1 -1
- package/dist/api/transaction.d.cts +30 -30
- package/dist/api/transaction.d.mts +30 -30
- package/dist/btc/constants.cjs +9 -10
- package/dist/btc/constants.cjs.map +1 -1
- package/dist/btc/constants.d.cts +1 -2
- package/dist/btc/constants.d.cts.map +1 -1
- package/dist/btc/constants.d.mts +1 -2
- package/dist/btc/constants.d.mts.map +1 -1
- package/dist/btc/constants.mjs +8 -9
- package/dist/btc/constants.mjs.map +1 -1
- package/dist/btc/types.cjs +7 -0
- package/dist/btc/types.cjs.map +1 -1
- package/dist/btc/types.d.cts +7 -2
- package/dist/btc/types.d.cts.map +1 -1
- package/dist/btc/types.d.mts +7 -2
- package/dist/btc/types.d.mts.map +1 -1
- package/dist/btc/types.mjs +8 -1
- package/dist/btc/types.mjs.map +1 -1
- package/dist/eth/constants.cjs +7 -6
- package/dist/eth/constants.cjs.map +1 -1
- package/dist/eth/constants.d.cts +4 -3
- package/dist/eth/constants.d.cts.map +1 -1
- package/dist/eth/constants.d.mts +4 -3
- package/dist/eth/constants.d.mts.map +1 -1
- package/dist/eth/constants.mjs +6 -5
- package/dist/eth/constants.mjs.map +1 -1
- package/dist/eth/types.cjs +7 -2
- package/dist/eth/types.cjs.map +1 -1
- package/dist/eth/types.d.cts +9 -6
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts +9 -6
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/eth/types.mjs +8 -3
- package/dist/eth/types.mjs.map +1 -1
- package/dist/events.cjs +75 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +248 -9
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +248 -9
- package/dist/events.d.mts.map +1 -1
- package/dist/events.mjs +78 -4
- package/dist/events.mjs.map +1 -1
- package/dist/rpc.cjs +18 -4
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.cts +77 -29
- package/dist/rpc.d.cts.map +1 -1
- package/dist/rpc.d.mts +77 -29
- package/dist/rpc.d.mts.map +1 -1
- package/dist/rpc.mjs +18 -4
- package/dist/rpc.mjs.map +1 -1
- package/dist/sol/constants.cjs +7 -8
- package/dist/sol/constants.cjs.map +1 -1
- package/dist/sol/constants.d.cts +1 -2
- package/dist/sol/constants.d.cts.map +1 -1
- package/dist/sol/constants.d.mts +1 -2
- package/dist/sol/constants.d.mts.map +1 -1
- package/dist/sol/constants.mjs +6 -7
- package/dist/sol/constants.mjs.map +1 -1
- package/dist/sol/types.cjs +5 -0
- package/dist/sol/types.cjs.map +1 -1
- package/dist/sol/types.d.cts +5 -2
- package/dist/sol/types.d.cts.map +1 -1
- package/dist/sol/types.d.mts +5 -2
- package/dist/sol/types.d.mts.map +1 -1
- package/dist/sol/types.mjs +6 -1
- package/dist/sol/types.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/api/caip.cjs +0 -21
- package/dist/api/caip.cjs.map +0 -1
- package/dist/api/caip.d.cts +0 -21
- package/dist/api/caip.d.cts.map +0 -1
- package/dist/api/caip.d.mts +0 -21
- package/dist/api/caip.d.mts.map +0 -1
- package/dist/api/caip.mjs +0 -18
- package/dist/api/caip.mjs.map +0 -1
package/dist/events.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { exactOptional, object, UuidStruct } from "@metamask/keyring-utils";
|
2
|
-
import { boolean, literal, string } from "@metamask/superstruct";
|
3
|
-
import { JsonStruct } from "@metamask/utils";
|
4
|
-
import { KeyringAccountStruct } from "./api/index.mjs";
|
1
|
+
import { exactOptional, object, UuidStruct, AccountIdStruct } from "@metamask/keyring-utils";
|
2
|
+
import { array, boolean, literal, record, string } from "@metamask/superstruct";
|
3
|
+
import { CaipAssetTypeStruct, CaipAssetTypeOrIdStruct, JsonStruct } from "@metamask/utils";
|
4
|
+
import { FungibleAssetAmountStruct, KeyringAccountStruct, TransactionStruct } from "./api/index.mjs";
|
5
5
|
/**
|
6
6
|
* Supported keyring events.
|
7
7
|
*/
|
@@ -14,6 +14,10 @@ export var KeyringEvent;
|
|
14
14
|
// Request events
|
15
15
|
KeyringEvent["RequestApproved"] = "notify:requestApproved";
|
16
16
|
KeyringEvent["RequestRejected"] = "notify:requestRejected";
|
17
|
+
// Assets related events
|
18
|
+
KeyringEvent["AccountBalancesUpdated"] = "notify:accountBalancesUpdated";
|
19
|
+
KeyringEvent["AccountAssetListUpdated"] = "notify:accountAssetListUpdated";
|
20
|
+
KeyringEvent["AccountTransactionsUpdated"] = "notify:accountTransactionsUpdated";
|
17
21
|
})(KeyringEvent || (KeyringEvent = {}));
|
18
22
|
export const AccountCreatedEventStruct = object({
|
19
23
|
method: literal(`${KeyringEvent.AccountCreated}`),
|
@@ -77,4 +81,74 @@ export const RequestRejectedEventStruct = object({
|
|
77
81
|
id: UuidStruct,
|
78
82
|
}),
|
79
83
|
});
|
84
|
+
// Assets related events:
|
85
|
+
// -----------------------------------------------------------------------------------------------
|
86
|
+
export const AccountBalancesUpdatedEventStruct = object({
|
87
|
+
method: literal(`${KeyringEvent.AccountBalancesUpdated}`),
|
88
|
+
params: object({
|
89
|
+
/**
|
90
|
+
* Balances updates of accounts owned by the Snap.
|
91
|
+
*/
|
92
|
+
balances: record(
|
93
|
+
/**
|
94
|
+
* Account ID.
|
95
|
+
*/
|
96
|
+
AccountIdStruct,
|
97
|
+
/**
|
98
|
+
* Mapping of each owned assets and their respective balances for that account.
|
99
|
+
*/
|
100
|
+
record(
|
101
|
+
/**
|
102
|
+
* Asset type (CAIP-19).
|
103
|
+
*/
|
104
|
+
CaipAssetTypeStruct,
|
105
|
+
/**
|
106
|
+
* Balance information for a given asset.
|
107
|
+
*/
|
108
|
+
FungibleAssetAmountStruct)),
|
109
|
+
}),
|
110
|
+
});
|
111
|
+
export const AccountTransactionsUpdatedEventStruct = object({
|
112
|
+
method: literal(`${KeyringEvent.AccountTransactionsUpdated}`),
|
113
|
+
params: object({
|
114
|
+
/**
|
115
|
+
* Transactions updates of accounts owned by the Snap.
|
116
|
+
*/
|
117
|
+
transactions: record(
|
118
|
+
/**
|
119
|
+
* Account ID.
|
120
|
+
*/
|
121
|
+
AccountIdStruct,
|
122
|
+
/**
|
123
|
+
* List of updated transactions for that account.
|
124
|
+
*/
|
125
|
+
array(TransactionStruct)),
|
126
|
+
}),
|
127
|
+
});
|
128
|
+
export const AccountAssetListUpdatedEventStruct = object({
|
129
|
+
method: literal(`${KeyringEvent.AccountAssetListUpdated}`),
|
130
|
+
params: object({
|
131
|
+
/**
|
132
|
+
* Asset list update of accounts owned by the Snap.
|
133
|
+
*/
|
134
|
+
assets: record(
|
135
|
+
/**
|
136
|
+
* Account ID.
|
137
|
+
*/
|
138
|
+
AccountIdStruct,
|
139
|
+
/**
|
140
|
+
* Asset list changes for that account.
|
141
|
+
*/
|
142
|
+
object({
|
143
|
+
/**
|
144
|
+
* New assets detected.
|
145
|
+
*/
|
146
|
+
added: array(CaipAssetTypeOrIdStruct),
|
147
|
+
/**
|
148
|
+
* Assets no longer available on that account.
|
149
|
+
*/
|
150
|
+
removed: array(CaipAssetTypeOrIdStruct),
|
151
|
+
})),
|
152
|
+
}),
|
153
|
+
});
|
80
154
|
//# sourceMappingURL=events.mjs.map
|
package/dist/events.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.mjs","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"events.mjs","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,MAAM,EACN,UAAU,EACV,eAAe,EAChB,gCAAgC;AAEjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAChF,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,UAAU,EACX,wBAAwB;AAEzB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EAClB,wBAAc;AAEf;;GAEG;AACH,MAAM,CAAN,IAAY,YAcX;AAdD,WAAY,YAAY;IACtB,iBAAiB;IACjB,wDAAwC,CAAA;IACxC,wDAAwC,CAAA;IACxC,wDAAwC,CAAA;IAExC,iBAAiB;IACjB,0DAA0C,CAAA;IAC1C,0DAA0C,CAAA;IAE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Y,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC;AAEH,yBAAyB;AACzB,kGAAkG;AAElG,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC;IACtD,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,sBAAsB,EAAE,CAAC;IACzD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,QAAQ,EAAE,MAAM;QACd;;WAEG;QACH,eAAe;QAEf;;WAEG;QACH,MAAM;QACJ;;WAEG;QACH,mBAAmB;QAEnB;;WAEG;QACH,yBAAyB,CAC1B,CACF;KACF,CAAC;CACH,CAAC,CAAC;AAeH,MAAM,CAAC,MAAM,qCAAqC,GAAG,MAAM,CAAC;IAC1D,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,0BAA0B,EAAE,CAAC;IAC7D,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,YAAY,EAAE,MAAM;QAClB;;WAEG;QACH,eAAe;QAEf;;WAEG;QACH,KAAK,CAAC,iBAAiB,CAAC,CACzB;KACF,CAAC;CACH,CAAC,CAAC;AAgBH,MAAM,CAAC,MAAM,kCAAkC,GAAG,MAAM,CAAC;IACvD,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAC;IAC1D,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,MAAM,EAAE,MAAM;QACZ;;WAEG;QACH,eAAe;QAEf;;WAEG;QACH,MAAM,CAAC;YACL;;eAEG;YACH,KAAK,EAAE,KAAK,CAAC,uBAAuB,CAAC;YAErC;;eAEG;YACH,OAAO,EAAE,KAAK,CAAC,uBAAuB,CAAC;SACxC,CAAC,CACH;KACF,CAAC;CACH,CAAC,CAAC","sourcesContent":["import {\n exactOptional,\n object,\n UuidStruct,\n AccountIdStruct,\n} from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, boolean, literal, record, string } from '@metamask/superstruct';\nimport {\n CaipAssetTypeStruct,\n CaipAssetTypeOrIdStruct,\n JsonStruct,\n} from '@metamask/utils';\n\nimport {\n FungibleAssetAmountStruct,\n KeyringAccountStruct,\n TransactionStruct,\n} from './api';\n\n/**\n * Supported keyring events.\n */\nexport enum KeyringEvent {\n // Account events\n AccountCreated = 'notify:accountCreated',\n AccountUpdated = 'notify:accountUpdated',\n AccountDeleted = 'notify:accountDeleted',\n\n // Request events\n RequestApproved = 'notify:requestApproved',\n RequestRejected = 'notify:requestRejected',\n\n // Assets related events\n AccountBalancesUpdated = 'notify:accountBalancesUpdated',\n AccountAssetListUpdated = 'notify:accountAssetListUpdated',\n AccountTransactionsUpdated = 'notify:accountTransactionsUpdated',\n}\n\nexport const AccountCreatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountCreated}`),\n params: object({\n /**\n * New account object.\n */\n account: KeyringAccountStruct,\n\n /**\n * Account name suggestion provided to the MetaMask client.\n *\n * The keyring can suggest a name for the account, but it's up to the\n * client to decide whether to use it. The keyring won't be informed if the\n * client decides to use a different name.\n */\n accountNameSuggestion: exactOptional(string()),\n\n /**\n * Instructs MetaMask to display the add account confirmation dialog in the UI.\n * **Note:** This is not guaranteed to be honored by the MetaMask client.\n */\n displayConfirmation: exactOptional(boolean()),\n }),\n});\n\nexport const AccountUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountUpdated}`),\n params: object({\n /**\n * Updated account object.\n */\n account: KeyringAccountStruct,\n }),\n});\n\nexport const AccountDeletedEventStruct = object({\n method: literal(`${KeyringEvent.AccountDeleted}`),\n params: object({\n /**\n * Deleted account ID.\n */\n id: UuidStruct,\n }),\n});\n\nexport const RequestApprovedEventStruct = object({\n method: literal(`${KeyringEvent.RequestApproved}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n\n /**\n * Request result.\n */\n result: JsonStruct,\n }),\n});\n\nexport const RequestRejectedEventStruct = object({\n method: literal(`${KeyringEvent.RequestRejected}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n }),\n});\n\n// Assets related events:\n// -----------------------------------------------------------------------------------------------\n\nexport const AccountBalancesUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountBalancesUpdated}`),\n params: object({\n /**\n * Balances updates of accounts owned by the Snap.\n */\n balances: record(\n /**\n * Account ID.\n */\n AccountIdStruct,\n\n /**\n * Mapping of each owned assets and their respective balances for that account.\n */\n record(\n /**\n * Asset type (CAIP-19).\n */\n CaipAssetTypeStruct,\n\n /**\n * Balance information for a given asset.\n */\n FungibleAssetAmountStruct,\n ),\n ),\n }),\n});\n\n/**\n * Event emitted when the balances of an account are updated.\n *\n * Only changes are reported.\n *\n * The Snap can choose to emit this event for multiple accounts at once.\n */\nexport type AccountBalancesUpdatedEvent = Infer<\n typeof AccountBalancesUpdatedEventStruct\n>;\nexport type AccountBalancesUpdatedEventPayload =\n AccountBalancesUpdatedEvent['params'];\n\nexport const AccountTransactionsUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountTransactionsUpdated}`),\n params: object({\n /**\n * Transactions updates of accounts owned by the Snap.\n */\n transactions: record(\n /**\n * Account ID.\n */\n AccountIdStruct,\n\n /**\n * List of updated transactions for that account.\n */\n array(TransactionStruct),\n ),\n }),\n});\n\n/**\n * Event emitted when the transactions of an account are updated (added or\n * changed).\n *\n * Only changes are reported.\n *\n * The Snap can choose to emit this event for multiple accounts at once.\n */\nexport type AccountTransactionsUpdatedEvent = Infer<\n typeof AccountTransactionsUpdatedEventStruct\n>;\nexport type AccountTransactionsUpdatedEventPayload =\n AccountTransactionsUpdatedEvent['params'];\n\nexport const AccountAssetListUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountAssetListUpdated}`),\n params: object({\n /**\n * Asset list update of accounts owned by the Snap.\n */\n assets: record(\n /**\n * Account ID.\n */\n AccountIdStruct,\n\n /**\n * Asset list changes for that account.\n */\n object({\n /**\n * New assets detected.\n */\n added: array(CaipAssetTypeOrIdStruct),\n\n /**\n * Assets no longer available on that account.\n */\n removed: array(CaipAssetTypeOrIdStruct),\n }),\n ),\n }),\n});\n\n/**\n * Event emitted when the assets of an account are updated.\n *\n * Only changes are reported.\n *\n * The Snap can choose to emit this event for multiple accounts at once.\n */\nexport type AccountAssetListUpdatedEvent = Infer<\n typeof AccountAssetListUpdatedEventStruct\n>;\nexport type AccountAssetListUpdatedEventPayload =\n AccountAssetListUpdatedEvent['params'];\n"]}
|
package/dist/rpc.cjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.RejectRequestResponseStruct = exports.RejectRequestRequestStruct = exports.ApproveRequestResponseStruct = exports.ApproveRequestRequestStruct = exports.SubmitRequestResponseStruct = exports.SubmitRequestRequestStruct = exports.GetRequestResponseStruct = exports.GetRequestRequestStruct = exports.ListRequestsResponseStruct = exports.ListRequestsRequestStruct = exports.ExportAccountResponseStruct = exports.ExportAccountRequestStruct = exports.DeleteAccountResponseStruct = exports.DeleteAccountRequestStruct = exports.UpdateAccountResponseStruct = exports.UpdateAccountRequestStruct = exports.FilterAccountChainsResponseStruct = exports.FilterAccountChainsStruct = exports.GetAccountBalancesResponseStruct = exports.GetAccountBalancesRequestStruct = exports.ListAccountAssetsResponseStruct = exports.ListAccountAssetsRequestStruct = exports.ListAccountTransactionsResponseStruct = exports.ListAccountTransactionsRequestStruct = exports.CreateAccountResponseStruct = exports.CreateAccountRequestStruct = exports.GetAccountResponseStruct = exports.GetAccountRequestStruct = exports.ListAccountsResponseStruct = exports.ListAccountsRequestStruct = exports.KeyringRpcMethod = void 0;
|
3
|
+
exports.RejectRequestResponseStruct = exports.RejectRequestRequestStruct = exports.ApproveRequestResponseStruct = exports.ApproveRequestRequestStruct = exports.SubmitRequestResponseStruct = exports.SubmitRequestRequestStruct = exports.GetRequestResponseStruct = exports.GetRequestRequestStruct = exports.ListRequestsResponseStruct = exports.ListRequestsRequestStruct = exports.ExportAccountResponseStruct = exports.ExportAccountRequestStruct = exports.DeleteAccountResponseStruct = exports.DeleteAccountRequestStruct = exports.UpdateAccountResponseStruct = exports.UpdateAccountRequestStruct = exports.FilterAccountChainsResponseStruct = exports.FilterAccountChainsStruct = exports.ResolveAccountAddressResponseStruct = exports.ResolveAccountAddressRequestStruct = exports.GetAccountBalancesResponseStruct = exports.GetAccountBalancesRequestStruct = exports.ListAccountAssetsResponseStruct = exports.ListAccountAssetsRequestStruct = exports.ListAccountTransactionsResponseStruct = exports.ListAccountTransactionsRequestStruct = exports.CreateAccountResponseStruct = exports.CreateAccountRequestStruct = exports.GetAccountResponseStruct = exports.GetAccountRequestStruct = exports.ListAccountsResponseStruct = exports.ListAccountsRequestStruct = exports.KeyringRpcMethod = void 0;
|
4
4
|
exports.isKeyringRpcMethod = isKeyringRpcMethod;
|
5
5
|
const keyring_utils_1 = require("@metamask/keyring-utils");
|
6
6
|
const superstruct_1 = require("@metamask/superstruct");
|
@@ -17,6 +17,7 @@ var KeyringRpcMethod;
|
|
17
17
|
KeyringRpcMethod["ListAccountAssets"] = "keyring_listAccountAssets";
|
18
18
|
KeyringRpcMethod["ListAccountTransactions"] = "keyring_listAccountTransactions";
|
19
19
|
KeyringRpcMethod["GetAccountBalances"] = "keyring_getAccountBalances";
|
20
|
+
KeyringRpcMethod["ResolveAccountAddress"] = "keyring_resolveAccountAddress";
|
20
21
|
KeyringRpcMethod["FilterAccountChains"] = "keyring_filterAccountChains";
|
21
22
|
KeyringRpcMethod["UpdateAccount"] = "keyring_updateAccount";
|
22
23
|
KeyringRpcMethod["DeleteAccount"] = "keyring_deleteAccount";
|
@@ -88,7 +89,7 @@ exports.ListAccountAssetsRequestStruct = (0, keyring_utils_1.object)({
|
|
88
89
|
id: keyring_utils_1.UuidStruct,
|
89
90
|
}),
|
90
91
|
});
|
91
|
-
exports.ListAccountAssetsResponseStruct = (0, superstruct_1.array)(
|
92
|
+
exports.ListAccountAssetsResponseStruct = (0, superstruct_1.array)(utils_1.CaipAssetTypeOrIdStruct);
|
92
93
|
// ----------------------------------------------------------------------------
|
93
94
|
// Get account balances
|
94
95
|
exports.GetAccountBalancesRequestStruct = (0, keyring_utils_1.object)({
|
@@ -96,10 +97,23 @@ exports.GetAccountBalancesRequestStruct = (0, keyring_utils_1.object)({
|
|
96
97
|
method: (0, superstruct_1.literal)(`${KeyringRpcMethod.GetAccountBalances}`),
|
97
98
|
params: (0, keyring_utils_1.object)({
|
98
99
|
id: keyring_utils_1.UuidStruct,
|
99
|
-
assets: (0, superstruct_1.array)(
|
100
|
+
assets: (0, superstruct_1.array)(utils_1.CaipAssetTypeStruct),
|
100
101
|
}),
|
101
102
|
});
|
102
|
-
exports.GetAccountBalancesResponseStruct = (0, superstruct_1.record)(
|
103
|
+
exports.GetAccountBalancesResponseStruct = (0, superstruct_1.record)(utils_1.CaipAssetTypeStruct, api_1.BalanceStruct);
|
104
|
+
// ----------------------------------------------------------------------------
|
105
|
+
// Resolve account address
|
106
|
+
exports.ResolveAccountAddressRequestStruct = (0, keyring_utils_1.object)({
|
107
|
+
...CommonHeader,
|
108
|
+
method: (0, superstruct_1.literal)('keyring_resolveAccountAddress'),
|
109
|
+
params: (0, keyring_utils_1.object)({
|
110
|
+
scope: utils_1.CaipChainIdStruct,
|
111
|
+
request: keyring_utils_1.JsonRpcRequestStruct,
|
112
|
+
}),
|
113
|
+
});
|
114
|
+
exports.ResolveAccountAddressResponseStruct = (0, superstruct_1.nullable)((0, keyring_utils_1.object)({
|
115
|
+
address: (0, superstruct_1.string)(),
|
116
|
+
}));
|
103
117
|
// ----------------------------------------------------------------------------
|
104
118
|
// Filter account chains
|
105
119
|
exports.FilterAccountChainsStruct = (0, keyring_utils_1.object)({
|
package/dist/rpc.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.cjs","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings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AAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;KACnC,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,4BAA4B,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC;AAI1D,+EAA+E;AAC/E,iBAAiB;AAEJ,QAAA,0BAA0B,GAAG,IAAA,sBAAM,EAAC;IAC/C,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAAO,EAAC,uBAAuB,CAAC;IACxC,MAAM,EAAE,IAAA,sBAAM,EAAC;QACb,EAAE,EAAE,0BAAU;KACf,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,2BAA2B,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC","sourcesContent":["import { object, UuidStruct } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport {\n array,\n literal,\n number,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport {\n BalanceStruct,\n CaipAssetTypeStruct,\n KeyringAccountDataStruct,\n KeyringAccountStruct,\n KeyringRequestStruct,\n KeyringResponseStruct,\n TransactionsPageStruct,\n PaginationStruct,\n CaipAssetTypeOrIdStruct,\n} from './api';\n\n/**\n * Keyring RPC methods used by the API.\n */\nexport enum KeyringRpcMethod {\n ListAccounts = 'keyring_listAccounts',\n GetAccount = 'keyring_getAccount',\n CreateAccount = 'keyring_createAccount',\n ListAccountAssets = 'keyring_listAccountAssets',\n ListAccountTransactions = 'keyring_listAccountTransactions',\n GetAccountBalances = 'keyring_getAccountBalances',\n FilterAccountChains = 'keyring_filterAccountChains',\n UpdateAccount = 'keyring_updateAccount',\n DeleteAccount = 'keyring_deleteAccount',\n ExportAccount = 'keyring_exportAccount',\n ListRequests = 'keyring_listRequests',\n GetRequest = 'keyring_getRequest',\n SubmitRequest = 'keyring_submitRequest',\n ApproveRequest = 'keyring_approveRequest',\n RejectRequest = 'keyring_rejectRequest',\n}\n\n/**\n * Check if a method is a keyring RPC method.\n *\n * @param method - Method to check.\n * @returns Whether the method is a keyring RPC method.\n */\nexport function isKeyringRpcMethod(method: string): boolean {\n return Object.values(KeyringRpcMethod).includes(method as KeyringRpcMethod);\n}\n\n// ----------------------------------------------------------------------------\n\nconst CommonHeader = {\n jsonrpc: literal('2.0'),\n id: union([string(), number(), literal(null)]),\n};\n\n// ----------------------------------------------------------------------------\n// List accounts\n\nexport const ListAccountsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccounts'),\n});\n\nexport type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;\n\nexport const ListAccountsResponseStruct = array(KeyringAccountStruct);\n\nexport type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account\n\nexport const GetAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;\n\nexport const GetAccountResponseStruct = KeyringAccountStruct;\n\nexport type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Create account\n\nexport const CreateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_createAccount'),\n params: object({\n options: record(string(), JsonStruct),\n }),\n});\n\nexport type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;\n\nexport const CreateAccountResponseStruct = KeyringAccountStruct;\n\nexport type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List account transactions\n\nexport const ListAccountTransactionsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountTransactions'),\n params: object({\n id: UuidStruct,\n pagination: PaginationStruct,\n }),\n});\n\nexport type ListAccountTransactionsRequest = Infer<\n typeof ListAccountTransactionsRequestStruct\n>;\n\nexport const ListAccountTransactionsResponseStruct = TransactionsPageStruct;\n\nexport type ListAccountTransactionsResponse = Infer<\n typeof ListAccountTransactionsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// List account assets\n\nexport const ListAccountAssetsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountAssets'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ListAccountAssetsRequest = Infer<\n typeof ListAccountAssetsRequestStruct\n>;\n\nexport const ListAccountAssetsResponseStruct = array(CaipAssetTypeOrIdStruct);\n\nexport type ListAccountAssetsResponse = Infer<\n typeof ListAccountAssetsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Get account balances\n\nexport const GetAccountBalancesRequestStruct = object({\n ...CommonHeader,\n method: literal(`${KeyringRpcMethod.GetAccountBalances}`),\n params: object({\n id: UuidStruct,\n assets: array(CaipAssetTypeStruct),\n }),\n});\n\nexport type GetAccountBalancesRequest = Infer<\n typeof GetAccountBalancesRequestStruct\n>;\n\nexport const GetAccountBalancesResponseStruct = record(\n CaipAssetTypeStruct,\n BalanceStruct,\n);\n\nexport type GetAccountBalancesResponse = Infer<\n typeof GetAccountBalancesResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Filter account chains\n\nexport const FilterAccountChainsStruct = object({\n ...CommonHeader,\n method: literal('keyring_filterAccountChains'),\n params: object({\n id: UuidStruct,\n chains: array(string()),\n }),\n});\n\nexport type FilterAccountChainsRequest = Infer<\n typeof FilterAccountChainsStruct\n>;\n\nexport const FilterAccountChainsResponseStruct = array(string());\n\nexport type FilterAccountChainsResponse = Infer<\n typeof FilterAccountChainsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Update account\n\nexport const UpdateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_updateAccount'),\n params: object({\n account: KeyringAccountStruct,\n }),\n});\n\nexport type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;\n\nexport const UpdateAccountResponseStruct = literal(null);\n\nexport type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Delete account\n\nexport const DeleteAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_deleteAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;\n\nexport const DeleteAccountResponseStruct = literal(null);\n\nexport type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Export account\n\nexport const ExportAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_exportAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;\n\nexport const ExportAccountResponseStruct = KeyringAccountDataStruct;\n\nexport type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List requests\n\nexport const ListRequestsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listRequests'),\n});\n\nexport type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;\n\nexport const ListRequestsResponseStruct = array(KeyringRequestStruct);\n\nexport type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get request\n\nexport const GetRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;\n\nexport const GetRequestResponseStruct = KeyringRequestStruct;\n\nexport type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Submit request\n\nexport const SubmitRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_submitRequest'),\n params: KeyringRequestStruct,\n});\n\nexport type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;\n\nexport const SubmitRequestResponseStruct = KeyringResponseStruct;\n\nexport type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Approve request\n\nexport const ApproveRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_approveRequest'),\n params: object({\n id: UuidStruct,\n data: record(string(), JsonStruct),\n }),\n});\n\nexport type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;\n\nexport const ApproveRequestResponseStruct = literal(null);\n\nexport type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Reject request\n\nexport const RejectRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_rejectRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;\n\nexport const RejectRequestResponseStruct = literal(null);\n\nexport type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;\n"]}
|
1
|
+
{"version":3,"file":"rpc.cjs","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":";;;AA4DA,gDAEC;AA9DD,2DAIiC;AAEjC,uDAQ+B;AAC/B,2CAKyB;AAEzB,yCAQe;AAEf;;GAEG;AACH,IAAY,gBAiBX;AAjBD,WAAY,gBAAgB;IAC1B,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CAAA;IACvC,mEAA+C,CAAA;IAC/C,+EAA2D,CAAA;IAC3D,qEAAiD,CAAA;IACjD,2EAAuD,CAAA;IACvD,uEAAmD,CAAA;IACnD,2DAAuC,CAAA;IACvC,2DAAuC,CAAA;IACvC,2DAAuC,CAAA;IACvC,yDAAqC,CAAA;IACrC,qDAAiC,CAAA;IACjC,2DAAuC,CAAA;IACvC,6DAAyC,CAAA;IACzC,2DAAuC,CAAA;AACzC,CAAC,EAjBW,gBAAgB,gCAAhB,gBAAgB,QAiB3B;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,MAAc;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,MAA0B,CAAC,CAAC;AAC9E,CAAC;AAED,+EAA+E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AA,qBAAO,EAAC,uBAAuB,CAAC;IACxC,MAAM,EAAE,IAAA,sBAAM,EAAC;QACb,EAAE,EAAE,0BAAU;KACf,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,2BAA2B,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC","sourcesContent":["import {\n object,\n UuidStruct,\n JsonRpcRequestStruct,\n} from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport {\n array,\n literal,\n nullable,\n number,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport {\n JsonStruct,\n CaipAssetTypeStruct,\n CaipAssetTypeOrIdStruct,\n CaipChainIdStruct,\n} from '@metamask/utils';\n\nimport {\n BalanceStruct,\n KeyringAccountDataStruct,\n KeyringAccountStruct,\n KeyringRequestStruct,\n KeyringResponseStruct,\n TransactionsPageStruct,\n PaginationStruct,\n} from './api';\n\n/**\n * Keyring RPC methods used by the API.\n */\nexport enum KeyringRpcMethod {\n ListAccounts = 'keyring_listAccounts',\n GetAccount = 'keyring_getAccount',\n CreateAccount = 'keyring_createAccount',\n ListAccountAssets = 'keyring_listAccountAssets',\n ListAccountTransactions = 'keyring_listAccountTransactions',\n GetAccountBalances = 'keyring_getAccountBalances',\n ResolveAccountAddress = 'keyring_resolveAccountAddress',\n FilterAccountChains = 'keyring_filterAccountChains',\n UpdateAccount = 'keyring_updateAccount',\n DeleteAccount = 'keyring_deleteAccount',\n ExportAccount = 'keyring_exportAccount',\n ListRequests = 'keyring_listRequests',\n GetRequest = 'keyring_getRequest',\n SubmitRequest = 'keyring_submitRequest',\n ApproveRequest = 'keyring_approveRequest',\n RejectRequest = 'keyring_rejectRequest',\n}\n\n/**\n * Check if a method is a keyring RPC method.\n *\n * @param method - Method to check.\n * @returns Whether the method is a keyring RPC method.\n */\nexport function isKeyringRpcMethod(method: string): boolean {\n return Object.values(KeyringRpcMethod).includes(method as KeyringRpcMethod);\n}\n\n// ----------------------------------------------------------------------------\n\nconst CommonHeader = {\n jsonrpc: literal('2.0'),\n id: union([string(), number(), literal(null)]),\n};\n\n// ----------------------------------------------------------------------------\n// List accounts\n\nexport const ListAccountsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccounts'),\n});\n\nexport type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;\n\nexport const ListAccountsResponseStruct = array(KeyringAccountStruct);\n\nexport type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account\n\nexport const GetAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;\n\nexport const GetAccountResponseStruct = KeyringAccountStruct;\n\nexport type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Create account\n\nexport const CreateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_createAccount'),\n params: object({\n options: record(string(), JsonStruct),\n }),\n});\n\nexport type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;\n\nexport const CreateAccountResponseStruct = KeyringAccountStruct;\n\nexport type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List account transactions\n\nexport const ListAccountTransactionsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountTransactions'),\n params: object({\n id: UuidStruct,\n pagination: PaginationStruct,\n }),\n});\n\nexport type ListAccountTransactionsRequest = Infer<\n typeof ListAccountTransactionsRequestStruct\n>;\n\nexport const ListAccountTransactionsResponseStruct = TransactionsPageStruct;\n\nexport type ListAccountTransactionsResponse = Infer<\n typeof ListAccountTransactionsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// List account assets\n\nexport const ListAccountAssetsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccountAssets'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ListAccountAssetsRequest = Infer<\n typeof ListAccountAssetsRequestStruct\n>;\n\nexport const ListAccountAssetsResponseStruct = array(CaipAssetTypeOrIdStruct);\n\nexport type ListAccountAssetsResponse = Infer<\n typeof ListAccountAssetsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Get account balances\n\nexport const GetAccountBalancesRequestStruct = object({\n ...CommonHeader,\n method: literal(`${KeyringRpcMethod.GetAccountBalances}`),\n params: object({\n id: UuidStruct,\n assets: array(CaipAssetTypeStruct),\n }),\n});\n\nexport type GetAccountBalancesRequest = Infer<\n typeof GetAccountBalancesRequestStruct\n>;\n\nexport const GetAccountBalancesResponseStruct = record(\n CaipAssetTypeStruct,\n BalanceStruct,\n);\n\nexport type GetAccountBalancesResponse = Infer<\n typeof GetAccountBalancesResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Resolve account address\n\nexport const ResolveAccountAddressRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_resolveAccountAddress'),\n params: object({\n scope: CaipChainIdStruct,\n request: JsonRpcRequestStruct,\n }),\n});\n\nexport type ResolveAccountAddressRequest = Infer<\n typeof ResolveAccountAddressRequestStruct\n>;\n\nexport const ResolveAccountAddressResponseStruct = nullable(\n object({\n address: string(),\n }),\n);\n\nexport type ResolveAccountAddressResponse = Infer<\n typeof ResolveAccountAddressResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Filter account chains\n\nexport const FilterAccountChainsStruct = object({\n ...CommonHeader,\n method: literal('keyring_filterAccountChains'),\n params: object({\n id: UuidStruct,\n chains: array(string()),\n }),\n});\n\nexport type FilterAccountChainsRequest = Infer<\n typeof FilterAccountChainsStruct\n>;\n\nexport const FilterAccountChainsResponseStruct = array(string());\n\nexport type FilterAccountChainsResponse = Infer<\n typeof FilterAccountChainsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Update account\n\nexport const UpdateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_updateAccount'),\n params: object({\n account: KeyringAccountStruct,\n }),\n});\n\nexport type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;\n\nexport const UpdateAccountResponseStruct = literal(null);\n\nexport type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Delete account\n\nexport const DeleteAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_deleteAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;\n\nexport const DeleteAccountResponseStruct = literal(null);\n\nexport type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Export account\n\nexport const ExportAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_exportAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;\n\nexport const ExportAccountResponseStruct = KeyringAccountDataStruct;\n\nexport type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List requests\n\nexport const ListRequestsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listRequests'),\n});\n\nexport type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;\n\nexport const ListRequestsResponseStruct = array(KeyringRequestStruct);\n\nexport type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get request\n\nexport const GetRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;\n\nexport const GetRequestResponseStruct = KeyringRequestStruct;\n\nexport type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Submit request\n\nexport const SubmitRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_submitRequest'),\n params: KeyringRequestStruct,\n});\n\nexport type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;\n\nexport const SubmitRequestResponseStruct = KeyringResponseStruct;\n\nexport type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Approve request\n\nexport const ApproveRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_approveRequest'),\n params: object({\n id: UuidStruct,\n data: record(string(), JsonStruct),\n }),\n});\n\nexport type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;\n\nexport const ApproveRequestResponseStruct = literal(null);\n\nexport type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Reject request\n\nexport const RejectRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_rejectRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;\n\nexport const RejectRequestResponseStruct = literal(null);\n\nexport type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;\n"]}
|
package/dist/rpc.d.cts
CHANGED
@@ -9,6 +9,7 @@ export declare enum KeyringRpcMethod {
|
|
9
9
|
ListAccountAssets = "keyring_listAccountAssets",
|
10
10
|
ListAccountTransactions = "keyring_listAccountTransactions",
|
11
11
|
GetAccountBalances = "keyring_getAccountBalances",
|
12
|
+
ResolveAccountAddress = "keyring_resolveAccountAddress",
|
12
13
|
FilterAccountChains = "keyring_filterAccountChains",
|
13
14
|
UpdateAccount = "keyring_updateAccount",
|
14
15
|
DeleteAccount = "keyring_deleteAccount",
|
@@ -41,14 +42,14 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
|
|
41
42
|
id: string;
|
42
43
|
options: Record<string, import("@metamask/utils").Json>;
|
43
44
|
address: string;
|
44
|
-
scopes: string[];
|
45
|
+
scopes: `${string}:${string}`[];
|
45
46
|
methods: string[];
|
46
47
|
}[], import("@metamask/superstruct").Struct<{
|
47
48
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
48
49
|
id: string;
|
49
50
|
options: Record<string, import("@metamask/utils").Json>;
|
50
51
|
address: string;
|
51
|
-
scopes: string[];
|
52
|
+
scopes: `${string}:${string}`[];
|
52
53
|
methods: string[];
|
53
54
|
}, {
|
54
55
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -59,7 +60,7 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
|
|
59
60
|
"solana:data-account": "solana:data-account";
|
60
61
|
}>;
|
61
62
|
address: import("@metamask/superstruct").Struct<string, null>;
|
62
|
-
scopes: import("@metamask/superstruct").Struct
|
63
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
63
64
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
64
65
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
65
66
|
}>>;
|
@@ -87,7 +88,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
|
|
87
88
|
id: string;
|
88
89
|
options: Record<string, import("@metamask/utils").Json>;
|
89
90
|
address: string;
|
90
|
-
scopes: string[];
|
91
|
+
scopes: `${string}:${string}`[];
|
91
92
|
methods: string[];
|
92
93
|
}, {
|
93
94
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -98,7 +99,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
|
|
98
99
|
"solana:data-account": "solana:data-account";
|
99
100
|
}>;
|
100
101
|
address: import("@metamask/superstruct").Struct<string, null>;
|
101
|
-
scopes: import("@metamask/superstruct").Struct
|
102
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
102
103
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
103
104
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
104
105
|
}>;
|
@@ -126,7 +127,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
|
|
126
127
|
id: string;
|
127
128
|
options: Record<string, import("@metamask/utils").Json>;
|
128
129
|
address: string;
|
129
|
-
scopes: string[];
|
130
|
+
scopes: `${string}:${string}`[];
|
130
131
|
methods: string[];
|
131
132
|
}, {
|
132
133
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -137,7 +138,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
|
|
137
138
|
"solana:data-account": "solana:data-account";
|
138
139
|
}>;
|
139
140
|
address: import("@metamask/superstruct").Struct<string, null>;
|
140
|
-
scopes: import("@metamask/superstruct").Struct
|
141
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
141
142
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
142
143
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
143
144
|
}>;
|
@@ -184,8 +185,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
184
185
|
asset: {
|
185
186
|
unit: string;
|
186
187
|
type: `${string}:${string}/${string}:${string}`;
|
187
|
-
fungible: true;
|
188
188
|
amount: string;
|
189
|
+
fungible: true;
|
189
190
|
} | {
|
190
191
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
191
192
|
fungible: false;
|
@@ -204,8 +205,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
204
205
|
asset: {
|
205
206
|
unit: string;
|
206
207
|
type: `${string}:${string}/${string}:${string}`;
|
207
|
-
fungible: true;
|
208
208
|
amount: string;
|
209
|
+
fungible: true;
|
209
210
|
} | {
|
210
211
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
211
212
|
fungible: false;
|
@@ -216,8 +217,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
216
217
|
asset: {
|
217
218
|
unit: string;
|
218
219
|
type: `${string}:${string}/${string}:${string}`;
|
219
|
-
fungible: true;
|
220
220
|
amount: string;
|
221
|
+
fungible: true;
|
221
222
|
} | {
|
222
223
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
223
224
|
fungible: false;
|
@@ -234,8 +235,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
234
235
|
asset: {
|
235
236
|
unit: string;
|
236
237
|
type: `${string}:${string}/${string}:${string}`;
|
237
|
-
fungible: true;
|
238
238
|
amount: string;
|
239
|
+
fungible: true;
|
239
240
|
} | {
|
240
241
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
241
242
|
fungible: false;
|
@@ -254,8 +255,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
254
255
|
asset: {
|
255
256
|
unit: string;
|
256
257
|
type: `${string}:${string}/${string}:${string}`;
|
257
|
-
fungible: true;
|
258
258
|
amount: string;
|
259
|
+
fungible: true;
|
259
260
|
} | {
|
260
261
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
261
262
|
fungible: false;
|
@@ -266,8 +267,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
266
267
|
asset: {
|
267
268
|
unit: string;
|
268
269
|
type: `${string}:${string}/${string}:${string}`;
|
269
|
-
fungible: true;
|
270
270
|
amount: string;
|
271
|
+
fungible: true;
|
271
272
|
} | {
|
272
273
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
273
274
|
fungible: false;
|
@@ -281,8 +282,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
281
282
|
asset: {
|
282
283
|
unit: string;
|
283
284
|
type: `${string}:${string}/${string}:${string}`;
|
284
|
-
fungible: true;
|
285
285
|
amount: string;
|
286
|
+
fungible: true;
|
286
287
|
} | {
|
287
288
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
288
289
|
fungible: false;
|
@@ -301,8 +302,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
301
302
|
asset: {
|
302
303
|
unit: string;
|
303
304
|
type: `${string}:${string}/${string}:${string}`;
|
304
|
-
fungible: true;
|
305
305
|
amount: string;
|
306
|
+
fungible: true;
|
306
307
|
} | {
|
307
308
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
308
309
|
fungible: false;
|
@@ -313,8 +314,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
313
314
|
asset: {
|
314
315
|
unit: string;
|
315
316
|
type: `${string}:${string}/${string}:${string}`;
|
316
|
-
fungible: true;
|
317
317
|
amount: string;
|
318
|
+
fungible: true;
|
318
319
|
} | {
|
319
320
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
320
321
|
fungible: false;
|
@@ -340,8 +341,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
340
341
|
asset: {
|
341
342
|
unit: string;
|
342
343
|
type: `${string}:${string}/${string}:${string}`;
|
343
|
-
fungible: true;
|
344
344
|
amount: string;
|
345
|
+
fungible: true;
|
345
346
|
} | {
|
346
347
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
347
348
|
fungible: false;
|
@@ -351,8 +352,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
351
352
|
asset: {
|
352
353
|
unit: string;
|
353
354
|
type: `${string}:${string}/${string}:${string}`;
|
354
|
-
fungible: true;
|
355
355
|
amount: string;
|
356
|
+
fungible: true;
|
356
357
|
} | {
|
357
358
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
358
359
|
fungible: false;
|
@@ -362,8 +363,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
362
363
|
asset: import("@metamask/superstruct").Struct<{
|
363
364
|
unit: string;
|
364
365
|
type: `${string}:${string}/${string}:${string}`;
|
365
|
-
fungible: true;
|
366
366
|
amount: string;
|
367
|
+
fungible: true;
|
367
368
|
} | {
|
368
369
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
369
370
|
fungible: false;
|
@@ -374,8 +375,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
374
375
|
asset: {
|
375
376
|
unit: string;
|
376
377
|
type: `${string}:${string}/${string}:${string}`;
|
377
|
-
fungible: true;
|
378
378
|
amount: string;
|
379
|
+
fungible: true;
|
379
380
|
} | {
|
380
381
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
381
382
|
fungible: false;
|
@@ -385,8 +386,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
385
386
|
asset: {
|
386
387
|
unit: string;
|
387
388
|
type: `${string}:${string}/${string}:${string}`;
|
388
|
-
fungible: true;
|
389
389
|
amount: string;
|
390
|
+
fungible: true;
|
390
391
|
} | {
|
391
392
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
392
393
|
fungible: false;
|
@@ -396,8 +397,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
396
397
|
asset: import("@metamask/superstruct").Struct<{
|
397
398
|
unit: string;
|
398
399
|
type: `${string}:${string}/${string}:${string}`;
|
399
|
-
fungible: true;
|
400
400
|
amount: string;
|
401
|
+
fungible: true;
|
401
402
|
} | {
|
402
403
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
403
404
|
fungible: false;
|
@@ -408,8 +409,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
408
409
|
asset: {
|
409
410
|
unit: string;
|
410
411
|
type: `${string}:${string}/${string}:${string}`;
|
411
|
-
fungible: true;
|
412
412
|
amount: string;
|
413
|
+
fungible: true;
|
413
414
|
} | {
|
414
415
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
415
416
|
fungible: false;
|
@@ -419,8 +420,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
419
420
|
asset: {
|
420
421
|
unit: string;
|
421
422
|
type: `${string}:${string}/${string}:${string}`;
|
422
|
-
fungible: true;
|
423
423
|
amount: string;
|
424
|
+
fungible: true;
|
424
425
|
} | {
|
425
426
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
426
427
|
fungible: false;
|
@@ -433,8 +434,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
433
434
|
asset: import("@metamask/superstruct").Struct<{
|
434
435
|
unit: string;
|
435
436
|
type: `${string}:${string}/${string}:${string}`;
|
436
|
-
fungible: true;
|
437
437
|
amount: string;
|
438
|
+
fungible: true;
|
438
439
|
} | {
|
439
440
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
440
441
|
fungible: false;
|
@@ -505,6 +506,53 @@ export declare const GetAccountBalancesResponseStruct: import("@metamask/superst
|
|
505
506
|
amount: string;
|
506
507
|
}>, null>;
|
507
508
|
export type GetAccountBalancesResponse = Infer<typeof GetAccountBalancesResponseStruct>;
|
509
|
+
export declare const ResolveAccountAddressRequestStruct: import("@metamask/superstruct").Struct<{
|
510
|
+
method: "keyring_resolveAccountAddress";
|
511
|
+
id: string | number | null;
|
512
|
+
jsonrpc: "2.0";
|
513
|
+
params: {
|
514
|
+
request: {
|
515
|
+
method: string;
|
516
|
+
id: string | number | null;
|
517
|
+
jsonrpc: "2.0";
|
518
|
+
params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
519
|
+
};
|
520
|
+
scope: `${string}:${string}`;
|
521
|
+
};
|
522
|
+
}, {
|
523
|
+
method: import("@metamask/superstruct").Struct<"keyring_resolveAccountAddress", "keyring_resolveAccountAddress">;
|
524
|
+
params: import("@metamask/superstruct").Struct<{
|
525
|
+
request: {
|
526
|
+
method: string;
|
527
|
+
id: string | number | null;
|
528
|
+
jsonrpc: "2.0";
|
529
|
+
params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
530
|
+
};
|
531
|
+
scope: `${string}:${string}`;
|
532
|
+
}, {
|
533
|
+
scope: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
534
|
+
request: import("@metamask/superstruct").Struct<{
|
535
|
+
method: string;
|
536
|
+
id: string | number | null;
|
537
|
+
jsonrpc: "2.0";
|
538
|
+
params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
539
|
+
}, {
|
540
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
541
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
542
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
543
|
+
params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
|
544
|
+
}>;
|
545
|
+
}>;
|
546
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
547
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
548
|
+
}>;
|
549
|
+
export type ResolveAccountAddressRequest = Infer<typeof ResolveAccountAddressRequestStruct>;
|
550
|
+
export declare const ResolveAccountAddressResponseStruct: import("@metamask/superstruct").Struct<{
|
551
|
+
address: string;
|
552
|
+
} | null, {
|
553
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
554
|
+
}>;
|
555
|
+
export type ResolveAccountAddressResponse = Infer<typeof ResolveAccountAddressResponseStruct>;
|
508
556
|
export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
|
509
557
|
method: "keyring_filterAccountChains";
|
510
558
|
id: string | number | null;
|
@@ -538,7 +586,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
538
586
|
id: string;
|
539
587
|
options: Record<string, import("@metamask/utils").Json>;
|
540
588
|
address: string;
|
541
|
-
scopes: string[];
|
589
|
+
scopes: `${string}:${string}`[];
|
542
590
|
methods: string[];
|
543
591
|
};
|
544
592
|
};
|
@@ -550,7 +598,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
550
598
|
id: string;
|
551
599
|
options: Record<string, import("@metamask/utils").Json>;
|
552
600
|
address: string;
|
553
|
-
scopes: string[];
|
601
|
+
scopes: `${string}:${string}`[];
|
554
602
|
methods: string[];
|
555
603
|
};
|
556
604
|
}, {
|
@@ -559,7 +607,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
559
607
|
id: string;
|
560
608
|
options: Record<string, import("@metamask/utils").Json>;
|
561
609
|
address: string;
|
562
|
-
scopes: string[];
|
610
|
+
scopes: `${string}:${string}`[];
|
563
611
|
methods: string[];
|
564
612
|
}, {
|
565
613
|
id: import("@metamask/superstruct").Struct<string, null>;
|
@@ -570,7 +618,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
570
618
|
"solana:data-account": "solana:data-account";
|
571
619
|
}>;
|
572
620
|
address: import("@metamask/superstruct").Struct<string, null>;
|
573
|
-
scopes: import("@metamask/superstruct").Struct
|
621
|
+
scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
|
574
622
|
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
575
623
|
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
576
624
|
}>;
|
package/dist/rpc.d.cts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.d.cts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"rpc.d.cts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AA2BnD;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,YAAY,yBAAyB;IACrC,UAAU,uBAAuB;IACjC,aAAa,0BAA0B;IACvC,iBAAiB,8BAA8B;IAC/C,uBAAuB,oCAAoC;IAC3D,kBAAkB,+BAA+B;IACjD,qBAAqB,kCAAkC;IACvD,mBAAmB,gCAAgC;IACnD,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,aAAa,0BAA0B;IACvC,YAAY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