This package contains the heavy runtime dependencies related to the @metamask/keyring-api package
to keep it as a lightweight API surface (types, structs, interfaces).
yarn add @metamask/keyring-sdkor
npm install @metamask/keyring-sdkimport { EthKeyringWrapper, EthKeyringMethod } from '@metamask/keyring-sdk';
import { EthMethod, KeyringType } from '@metamask/keyring-api';
export class MyKeyringV2 extends EthKeyringWrapper<MyLegacyKeyring> {
constructor(inner: MyLegacyKeyring) {
super({
type: KeyringType.Hd,
inner,
capabilities: { scopes: ['eip155:1'] },
});
}
async getAccounts() {
/* ... */
}
async createAccounts(options) {
/* ... */
}
async deleteAccount(accountId) {
/* ... */
}
}This package is part of a monorepo. Instructions for contributing can be found in the monorepo README.