Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot-onboard/core

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot-onboard/core - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

2

dist/types/types.d.ts

@@ -15,3 +15,3 @@ import type { Signer } from '@polkadot/types/types';

export interface BaseWalletProvider {
getWallets: () => BaseWallet[];
getWallets: () => Promise<BaseWallet[]>;
}

@@ -18,0 +18,0 @@ export interface WalletMetadata {

@@ -5,4 +5,4 @@ import type { BaseWallet, BaseWalletProvider } from './types.js';

constructor(providers: BaseWalletProvider[]);
getWallets(): BaseWallet[];
getWallets(): Promise<BaseWallet[]>;
}
//# sourceMappingURL=walletAggregator.d.ts.map
export class WalletAggregator {
walletProviders;
constructor(providers) {
this.walletProviders = providers;
}
getWallets() {
let wallets = [];
for (let provider of this.walletProviders) {
wallets.push(...provider.getWallets());
async getWallets() {
const wallets = [];
for (const provider of this.walletProviders) {
const providedWallets = await provider.getWallets();
wallets.push(...providedWallets);
}

@@ -10,0 +12,0 @@ return wallets;

{
"name": "@polkadot-onboard/core",
"version": "0.2.0",
"version": "1.0.0",
"author": "Parity Team <admin@parity.io>",

@@ -29,5 +29,5 @@ "maintainers": [

"@polkadot/types": "10.9.1",
"prettier": "3.0.0",
"prettier": "3.0.3",
"typescript": "5.1.6"
}
}

@@ -19,3 +19,3 @@ import type { Signer } from '@polkadot/types/types';

export interface BaseWalletProvider {
getWallets: () => BaseWallet[];
getWallets: () => Promise<BaseWallet[]>;
}

@@ -22,0 +22,0 @@

@@ -5,9 +5,14 @@ import type { BaseWallet, BaseWalletProvider } from './types.js';

walletProviders: BaseWalletProvider[];
constructor(providers: BaseWalletProvider[]) {
this.walletProviders = providers;
}
getWallets(): BaseWallet[] {
let wallets: BaseWallet[] = [];
for (let provider of this.walletProviders) {
wallets.push(...provider.getWallets());
async getWallets(): Promise<BaseWallet[]> {
const wallets: BaseWallet[] = [];
for (const provider of this.walletProviders) {
const providedWallets = await provider.getWallets();
wallets.push(...providedWallets);
}

@@ -14,0 +19,0 @@ return wallets;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc