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

@solana/wallet-adapter-clover

Package Overview
Dependencies
Maintainers
12
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/wallet-adapter-clover - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

5

lib/cjs/adapter.d.ts

@@ -1,2 +0,2 @@

import { BaseSignerWalletAdapter, WalletName, WalletReadyState } from '@solana/wallet-adapter-base';
import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from '@solana/wallet-adapter-base';
import { PublicKey, Transaction } from '@solana/web3.js';

@@ -6,3 +6,3 @@ export interface CloverWalletAdapterConfig {

export declare const CloverWalletName: WalletName;
export declare class CloverWalletAdapter extends BaseSignerWalletAdapter {
export declare class CloverWalletAdapter extends BaseMessageSignerWalletAdapter {
name: WalletName;

@@ -23,2 +23,3 @@ url: string;

signAllTransactions(transactions: Transaction[]): Promise<Transaction[]>;
signMessage(message: Uint8Array): Promise<Uint8Array>;
}

22

lib/cjs/adapter.js

@@ -16,3 +16,3 @@ "use strict";

exports.CloverWalletName = 'Clover';
class CloverWalletAdapter extends wallet_adapter_base_1.BaseSignerWalletAdapter {
class CloverWalletAdapter extends wallet_adapter_base_1.BaseMessageSignerWalletAdapter {
constructor(config = {}) {

@@ -134,4 +134,24 @@ super();

}
signMessage(message) {
return __awaiter(this, void 0, void 0, function* () {
try {
const wallet = this._wallet;
if (!wallet)
throw new wallet_adapter_base_1.WalletNotConnectedError();
try {
const { signature } = yield wallet.signMessage(message);
return Uint8Array.from(signature);
}
catch (error) {
throw new wallet_adapter_base_1.WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);
}
}
catch (error) {
this.emit('error', error);
throw error;
}
});
}
}
exports.CloverWalletAdapter = CloverWalletAdapter;
//# sourceMappingURL=adapter.js.map

@@ -1,2 +0,2 @@

import { BaseSignerWalletAdapter, WalletName, WalletReadyState } from '@solana/wallet-adapter-base';
import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from '@solana/wallet-adapter-base';
import { PublicKey, Transaction } from '@solana/web3.js';

@@ -6,3 +6,3 @@ export interface CloverWalletAdapterConfig {

export declare const CloverWalletName: WalletName;
export declare class CloverWalletAdapter extends BaseSignerWalletAdapter {
export declare class CloverWalletAdapter extends BaseMessageSignerWalletAdapter {
name: WalletName;

@@ -23,2 +23,3 @@ url: string;

signAllTransactions(transactions: Transaction[]): Promise<Transaction[]>;
signMessage(message: Uint8Array): Promise<Uint8Array>;
}
{
"name": "@solana/wallet-adapter-clover",
"version": "0.4.3",
"version": "0.4.4",
"author": "Solana Maintainers <maintainers@solana.foundation>",

@@ -33,3 +33,3 @@ "repository": "https://github.com/solana-labs/wallet-adapter",

},
"gitHead": "0373f0da94309cc72d4cdb3c56176ca9355f95cc"
"gitHead": "4dfc650645a259fc9d537fc0a2b46be164eda2d6"
}
import {
Adapter,
BaseSignerWalletAdapter,
BaseMessageSignerWalletAdapter,
scopePollingDetectionStrategy,

@@ -20,2 +19,3 @@ WalletAccountError,

signAllTransactions(transactions: Transaction[]): Promise<Transaction[]>;
signMessage(message: Uint8Array): Promise<{ signature: Uint8Array }>;
}

@@ -33,3 +33,3 @@

export class CloverWalletAdapter extends BaseSignerWalletAdapter {
export class CloverWalletAdapter extends BaseMessageSignerWalletAdapter {
name = CloverWalletName;

@@ -153,2 +153,19 @@ url = 'https://clover.finance';

}
async signMessage(message: Uint8Array): Promise<Uint8Array> {
try {
const wallet = this._wallet;
if (!wallet) throw new WalletNotConnectedError();
try {
const { signature } = await wallet.signMessage(message);
return Uint8Array.from(signature);
} catch (error: any) {
throw new WalletSignTransactionError(error?.message, error);
}
} catch (error: any) {
this.emit('error', error);
throw error;
}
}
}

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