New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wallet-standard/features

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wallet-standard/features - npm Package Compare versions

Comparing version 0.1.0-alpha.0 to 0.1.0-alpha.1

lib/cjs/connect.js

12

lib/cjs/index.js

@@ -17,8 +17,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./decrypt"), exports);
__exportStar(require("./encrypt"), exports);
__exportStar(require("./signAndSendTransaction"), exports);
__exportStar(require("./signMessage"), exports);
__exportStar(require("./signTransaction"), exports);
__exportStar(require("./solana"), exports);
__exportStar(require("./connect.js"), exports);
__exportStar(require("./decrypt.js"), exports);
__exportStar(require("./encrypt.js"), exports);
__exportStar(require("./signAndSendTransaction.js"), exports);
__exportStar(require("./signMessage.js"), exports);
__exportStar(require("./signTransaction.js"), exports);
//# sourceMappingURL=index.js.map

@@ -1,7 +0,7 @@

export * from './decrypt';
export * from './encrypt';
export * from './signAndSendTransaction';
export * from './signMessage';
export * from './signTransaction';
export * from './solana';
export * from './connect.js';
export * from './decrypt.js';
export * from './encrypt.js';
export * from './signAndSendTransaction.js';
export * from './signMessage.js';
export * from './signTransaction.js';
//# sourceMappingURL=index.js.map

@@ -1,13 +0,8 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const decryptMethod: AsyncMapFunction<DecryptInput, DecryptOutput>;
import type { WalletAccount } from '@wallet-standard/standard';
/** TODO: docs */
export declare type DecryptMethod = typeof decryptMethod;
/** TODO: docs */
export declare type DecryptFeature = Readonly<{
export declare type DecryptFeature = {
/** Namespace for the feature. */
decrypt: {
'standard:decrypt': {
/** Version of the feature API. */
version: DecryptVersion;
/** List of ciphers supported for decryption. */

@@ -24,5 +19,11 @@ ciphers: ReadonlyArray<string>;

};
}>;
};
/** TODO: docs */
export declare type DecryptVersion = '1.0.0';
/** TODO: docs */
export declare type DecryptMethod = (...inputs: DecryptInput[]) => Promise<DecryptOutput[]>;
/** Input for decryption. */
export declare type DecryptInput = Readonly<{
export interface DecryptInput {
/** Account to use. */
account: WalletAccount;
/** Cipher to use for decryption. */

@@ -38,8 +39,8 @@ cipher: string;

padding?: 0 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048;
}>;
}
/** Output of decryption. */
export declare type DecryptOutput = Readonly<{
export interface DecryptOutput {
/** Cleartext that was decrypted. */
cleartext: Uint8Array;
}>;
}
//# sourceMappingURL=decrypt.d.ts.map

@@ -1,13 +0,8 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const encryptMethod: AsyncMapFunction<EncryptInput, EncryptOutput>;
import type { WalletAccount } from '@wallet-standard/standard';
/** TODO: docs */
export declare type EncryptMethod = typeof encryptMethod;
/** TODO: docs */
export declare type EncryptFeature = Readonly<{
export declare type EncryptFeature = {
/** Namespace for the feature. */
encrypt: {
'standard:encrypt': {
/** Version of the feature API. */
version: EncryptVersion;
/** List of ciphers supported for encryption. */

@@ -24,5 +19,11 @@ ciphers: ReadonlyArray<string>;

};
}>;
};
/** TODO: docs */
export declare type EncryptVersion = '1.0.0';
/** TODO: docs */
export declare type EncryptMethod = (...inputs: EncryptInput[]) => Promise<EncryptOutput[]>;
/** Input for encryption. */
export declare type EncryptInput = Readonly<{
export interface EncryptInput {
/** Account to use. */
account: WalletAccount;
/** Cipher to use for encryption. */

@@ -36,5 +37,5 @@ cipher: string;

padding?: 0 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048;
}>;
}
/** Output of encryption. */
export declare type EncryptOutput = Readonly<{
export interface EncryptOutput {
/** Ciphertext that was encrypted. */

@@ -44,3 +45,3 @@ ciphertext: Uint8Array;

nonce: Uint8Array;
}>;
}
//# sourceMappingURL=encrypt.d.ts.map

@@ -1,15 +0,18 @@

import { DecryptFeature } from './decrypt';
import { EncryptFeature } from './encrypt';
import { SignAndSendTransactionFeature } from './signAndSendTransaction';
import { SignMessageFeature } from './signMessage';
import { SignTransactionFeature } from './signTransaction';
import { SolanaFeature } from './solana';
export * from './decrypt';
export * from './encrypt';
export * from './signAndSendTransaction';
export * from './signMessage';
export * from './signTransaction';
export * from './solana';
import type { WalletWithFeatures } from '@wallet-standard/standard';
import type { ConnectFeature } from './connect.js';
import type { DecryptFeature } from './decrypt.js';
import type { EncryptFeature } from './encrypt.js';
import type { SignAndSendTransactionFeature } from './signAndSendTransaction.js';
import type { SignMessageFeature } from './signMessage.js';
import type { SignTransactionFeature } from './signTransaction.js';
/** TODO: docs */
export declare type Feature = SignTransactionFeature | SignAndSendTransactionFeature | SignMessageFeature | EncryptFeature | DecryptFeature | SolanaFeature;
export declare type StandardFeatures = ConnectFeature | DecryptFeature | EncryptFeature | SignAndSendTransactionFeature | SignMessageFeature | SignTransactionFeature;
/** TODO: docs */
export declare type WalletWithStandardFeatures = WalletWithFeatures<StandardFeatures>;
export * from './connect.js';
export * from './decrypt.js';
export * from './encrypt.js';
export * from './signAndSendTransaction.js';
export * from './signMessage.js';
export * from './signTransaction.js';
//# sourceMappingURL=index.d.ts.map

@@ -1,13 +0,9 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const signAndSendTransactionMethod: AsyncMapFunction<SignAndSendTransactionInput, SignAndSendTransactionOutput>;
import type { IdentifierString } from '@wallet-standard/standard';
import type { SignTransactionInput } from './signTransaction.js';
/** TODO: docs */
export declare type SignAndSendTransactionMethod = typeof signAndSendTransactionMethod;
/** TODO: docs */
export declare type SignAndSendTransactionFeature = Readonly<{
export declare type SignAndSendTransactionFeature = {
/** Namespace for the feature. */
signAndSendTransaction: {
'standard:signAndSendTransaction': {
/** Version of the feature API. */
version: SignAndSendTransactionVersion;
/**

@@ -22,13 +18,17 @@ * Sign transactions using the account's secret key and send them to the chain.

};
}>;
};
/** TODO: docs */
export declare type SignAndSendTransactionVersion = '1.0.0';
/** TODO: docs */
export declare type SignAndSendTransactionMethod = (...inputs: SignAndSendTransactionInput[]) => Promise<SignAndSendTransactionOutput[]>;
/** Input for signing and sending transactions. */
export declare type SignAndSendTransactionInput = Readonly<{
/** Serialized transaction, as raw bytes. */
transaction: Uint8Array;
}>;
export interface SignAndSendTransactionInput extends SignTransactionInput {
/** Chain to use. */
chain: IdentifierString;
}
/** Output of signing and sending transactions. */
export declare type SignAndSendTransactionOutput = Readonly<{
export interface SignAndSendTransactionOutput {
/** Transaction signature, as raw bytes. */
signature: Uint8Array;
}>;
}
//# sourceMappingURL=signAndSendTransaction.d.ts.map

@@ -1,24 +0,25 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const signMessageMethod: AsyncMapFunction<SignMessageInput, SignMessageOutput>;
import type { WalletAccount } from '@wallet-standard/standard';
/** TODO: docs */
export declare type SignMessageMethod = typeof signMessageMethod;
/** TODO: docs */
export declare type SignMessageFeature = Readonly<{
export declare type SignMessageFeature = {
/** Namespace for the feature. */
signMessage: {
'standard:signMessage': {
/** Version of the feature API. */
version: SignMessageVersion;
/** Sign messages (arbitrary bytes) using the account's secret key. */
signMessage: SignMessageMethod;
};
}>;
};
/** TODO: docs */
export declare type SignMessageVersion = '1.0.0';
/** TODO: docs */
export declare type SignMessageMethod = (...inputs: SignMessageInput[]) => Promise<SignMessageOutput[]>;
/** Input for signing a message. */
export declare type SignMessageInput = Readonly<{
export interface SignMessageInput {
/** Account to use. */
account: WalletAccount;
/** Message to sign, as raw bytes. */
message: Uint8Array;
}>;
}
/** Output of signing a message. */
export declare type SignMessageOutput = Readonly<{
export interface SignMessageOutput {
/** TODO: docs */

@@ -28,3 +29,3 @@ signedMessage: Uint8Array;

signature: Uint8Array;
}>;
}
//# sourceMappingURL=signMessage.d.ts.map

@@ -1,24 +0,27 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const signTransactionMethod: AsyncMapFunction<SignTransactionInput, SignTransactionOutput>;
import type { IdentifierString, WalletAccount } from '@wallet-standard/standard';
/** TODO: docs */
export declare type SignTransactionMethod = typeof signTransactionMethod;
/** TODO: docs */
export declare type SignTransactionFeature = Readonly<{
export declare type SignTransactionFeature = {
/** Namespace for the feature. */
signTransaction: {
'standard:signTransaction': {
/** Version of the feature API. */
version: SignTransactionVersion;
/** Sign transactions using the account's secret key. */
signTransaction: SignTransactionMethod;
};
}>;
};
/** TODO: docs */
export declare type SignTransactionVersion = '1.0.0';
/** TODO: docs */
export declare type SignTransactionMethod = (...inputs: SignTransactionInput[]) => Promise<SignTransactionOutput[]>;
/** Input for signing a transaction. */
export declare type SignTransactionInput = Readonly<{
export interface SignTransactionInput {
/** Account to use. */
account: WalletAccount;
/** Serialized transactions, as raw bytes. */
transaction: Uint8Array;
}>;
/** Chain to use. */
chain?: IdentifierString;
}
/** Output of signing a transaction. */
export declare type SignTransactionOutput = Readonly<{
export interface SignTransactionOutput {
/**

@@ -30,3 +33,3 @@ * Signed, serialized transactions, as raw bytes.

signedTransaction: Uint8Array;
}>;
}
//# sourceMappingURL=signTransaction.d.ts.map
{
"name": "@wallet-standard/features",
"version": "0.1.0-alpha.0",
"version": "0.1.0-alpha.1",
"author": "Solana Maintainers <maintainers@solana.foundation>",

@@ -26,4 +26,3 @@ "repository": "https://github.com/wallet-standard/wallet-standard",

"dependencies": {
"@wallet-standard/standard": "^0.1.0-alpha.2",
"@wallet-standard/types": "^0.1.0-alpha.2"
"@wallet-standard/standard": "^0.1.0-alpha.3"
},

@@ -35,4 +34,4 @@ "devDependencies": {

"clean": "shx mkdir -p lib && shx rm -rf lib",
"prebuild": "pnpm run clean"
"package": "shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json"
}
}

@@ -1,16 +0,10 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
import type { WalletAccount } from '@wallet-standard/standard';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const decryptMethod: AsyncMapFunction<DecryptInput, DecryptOutput>;
/** TODO: docs */
export type DecryptMethod = typeof decryptMethod;
export type DecryptFeature = {
/** Namespace for the feature. */
'standard:decrypt': {
/** Version of the feature API. */
version: DecryptVersion;
/** TODO: docs */
export type DecryptFeature = Readonly<{
/** Namespace for the feature. */
decrypt: {
/** List of ciphers supported for decryption. */

@@ -28,8 +22,17 @@ ciphers: ReadonlyArray<string>;

};
}>;
};
/** TODO: docs */
export type DecryptVersion = '1.0.0';
/** TODO: docs */
export type DecryptMethod = (...inputs: DecryptInput[]) => Promise<DecryptOutput[]>;
/** Input for decryption. */
export type DecryptInput = Readonly<{
export interface DecryptInput {
/** Account to use. */
account: WalletAccount;
/** Cipher to use for decryption. */
cipher: string; // TODO: determine if this needs to be inferred from DecryptFeature
cipher: string;

@@ -47,8 +50,8 @@ /** Public key to derive a shared key to decrypt the data using. */

padding?: 0 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048;
}>;
}
/** Output of decryption. */
export type DecryptOutput = Readonly<{
export interface DecryptOutput {
/** Cleartext that was decrypted. */
cleartext: Uint8Array;
}>;
}

@@ -1,16 +0,11 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
import type { WalletAccount } from '@wallet-standard/standard';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const encryptMethod: AsyncMapFunction<EncryptInput, EncryptOutput>;
/** TODO: docs */
export type EncryptMethod = typeof encryptMethod;
export type EncryptFeature = {
/** Namespace for the feature. */
'standard:encrypt': {
/** Version of the feature API. */
version: EncryptVersion;
/** TODO: docs */
export type EncryptFeature = Readonly<{
/** Namespace for the feature. */
encrypt: {
// TODO: consider declaring cipher string types
/** List of ciphers supported for encryption. */

@@ -28,8 +23,17 @@ ciphers: ReadonlyArray<string>;

};
}>;
};
/** TODO: docs */
export type EncryptVersion = '1.0.0';
/** TODO: docs */
export type EncryptMethod = (...inputs: EncryptInput[]) => Promise<EncryptOutput[]>;
/** Input for encryption. */
export type EncryptInput = Readonly<{
export interface EncryptInput {
/** Account to use. */
account: WalletAccount;
/** Cipher to use for encryption. */
cipher: string; // TODO: determine if this needs to be inferred from EncryptFeature
cipher: string;

@@ -44,6 +48,6 @@ /** Public key to derive a shared key to encrypt the data using. */

padding?: 0 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048;
}>;
}
/** Output of encryption. */
export type EncryptOutput = Readonly<{
export interface EncryptOutput {
/** Ciphertext that was encrypted. */

@@ -54,2 +58,2 @@ ciphertext: Uint8Array;

nonce: Uint8Array;
}>;
}

@@ -1,22 +0,26 @@

import { DecryptFeature } from './decrypt';
import { EncryptFeature } from './encrypt';
import { SignAndSendTransactionFeature } from './signAndSendTransaction';
import { SignMessageFeature } from './signMessage';
import { SignTransactionFeature } from './signTransaction';
import { SolanaFeature } from './solana';
import type { WalletWithFeatures } from '@wallet-standard/standard';
import type { ConnectFeature } from './connect.js';
import type { DecryptFeature } from './decrypt.js';
import type { EncryptFeature } from './encrypt.js';
import type { SignAndSendTransactionFeature } from './signAndSendTransaction.js';
import type { SignMessageFeature } from './signMessage.js';
import type { SignTransactionFeature } from './signTransaction.js';
export * from './decrypt';
export * from './encrypt';
export * from './signAndSendTransaction';
export * from './signMessage';
export * from './signTransaction';
export * from './solana';
/** TODO: docs */
export type Feature =
| SignTransactionFeature
export type StandardFeatures =
| ConnectFeature
| DecryptFeature
| EncryptFeature
| SignAndSendTransactionFeature
| SignMessageFeature
| EncryptFeature
| DecryptFeature
| SolanaFeature;
| SignTransactionFeature;
/** TODO: docs */
export type WalletWithStandardFeatures = WalletWithFeatures<StandardFeatures>;
export * from './connect.js';
export * from './decrypt.js';
export * from './encrypt.js';
export * from './signAndSendTransaction.js';
export * from './signMessage.js';
export * from './signTransaction.js';

@@ -1,19 +0,12 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
import type { IdentifierString } from '@wallet-standard/standard';
import type { SignTransactionInput } from './signTransaction.js';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const signAndSendTransactionMethod: AsyncMapFunction<
SignAndSendTransactionInput,
SignAndSendTransactionOutput
>;
/** TODO: docs */
export type SignAndSendTransactionMethod = typeof signAndSendTransactionMethod;
export type SignAndSendTransactionFeature = {
/** Namespace for the feature. */
'standard:signAndSendTransaction': {
/** Version of the feature API. */
version: SignAndSendTransactionVersion;
/** TODO: docs */
export type SignAndSendTransactionFeature = Readonly<{
/** Namespace for the feature. */
signAndSendTransaction: {
// TODO: decide if signAndSendTransaction makes sense for multiple transactions
/**

@@ -28,14 +21,22 @@ * Sign transactions using the account's secret key and send them to the chain.

};
}>;
};
/** TODO: docs */
export type SignAndSendTransactionVersion = '1.0.0';
/** TODO: docs */
export type SignAndSendTransactionMethod = (
...inputs: SignAndSendTransactionInput[]
) => Promise<SignAndSendTransactionOutput[]>;
/** Input for signing and sending transactions. */
export type SignAndSendTransactionInput = Readonly<{
/** Serialized transaction, as raw bytes. */
transaction: Uint8Array;
}>;
export interface SignAndSendTransactionInput extends SignTransactionInput {
/** Chain to use. */
chain: IdentifierString;
}
/** Output of signing and sending transactions. */
export type SignAndSendTransactionOutput = Readonly<{
export interface SignAndSendTransactionOutput {
/** Transaction signature, as raw bytes. */
signature: Uint8Array;
}>;
}

@@ -1,29 +0,32 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
import type { WalletAccount } from '@wallet-standard/standard';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const signMessageMethod: AsyncMapFunction<SignMessageInput, SignMessageOutput>;
/** TODO: docs */
export type SignMessageMethod = typeof signMessageMethod;
export type SignMessageFeature = {
/** Namespace for the feature. */
'standard:signMessage': {
/** Version of the feature API. */
version: SignMessageVersion;
/** TODO: docs */
export type SignMessageFeature = Readonly<{
/** Namespace for the feature. */
signMessage: {
/** Sign messages (arbitrary bytes) using the account's secret key. */
signMessage: SignMessageMethod;
};
}>;
};
/** TODO: docs */
export type SignMessageVersion = '1.0.0';
/** TODO: docs */
export type SignMessageMethod = (...inputs: SignMessageInput[]) => Promise<SignMessageOutput[]>;
/** Input for signing a message. */
export type SignMessageInput = Readonly<{
export interface SignMessageInput {
/** Account to use. */
account: WalletAccount;
/** Message to sign, as raw bytes. */
message: Uint8Array;
}>;
}
/** Output of signing a message. */
export type SignMessageOutput = Readonly<{
export interface SignMessageOutput {
/** TODO: docs */

@@ -34,2 +37,2 @@ signedMessage: Uint8Array;

signature: Uint8Array;
}>;
}

@@ -1,29 +0,36 @@

import type { AsyncMapFunction } from '@wallet-standard/types';
import type { IdentifierString, WalletAccount } from '@wallet-standard/standard';
/**
* TODO: docs
* Instantiation expression -- https://github.com/microsoft/TypeScript/pull/47607
*/
export declare const signTransactionMethod: AsyncMapFunction<SignTransactionInput, SignTransactionOutput>;
/** TODO: docs */
export type SignTransactionMethod = typeof signTransactionMethod;
export type SignTransactionFeature = {
/** Namespace for the feature. */
'standard:signTransaction': {
/** Version of the feature API. */
version: SignTransactionVersion;
/** TODO: docs */
export type SignTransactionFeature = Readonly<{
/** Namespace for the feature. */
signTransaction: {
/** Sign transactions using the account's secret key. */
signTransaction: SignTransactionMethod;
};
}>;
};
/** TODO: docs */
export type SignTransactionVersion = '1.0.0';
/** TODO: docs */
export type SignTransactionMethod = (...inputs: SignTransactionInput[]) => Promise<SignTransactionOutput[]>;
/** Input for signing a transaction. */
export type SignTransactionInput = Readonly<{
export interface SignTransactionInput {
/** Account to use. */
account: WalletAccount;
/** Serialized transactions, as raw bytes. */
transaction: Uint8Array;
}>;
// TODO: decide if chain argument makes sense for multiple transactions
/** Chain to use. */
chain?: IdentifierString;
}
/** Output of signing a transaction. */
export type SignTransactionOutput = Readonly<{
export interface SignTransactionOutput {
/**

@@ -35,2 +42,2 @@ * Signed, serialized transactions, as raw bytes.

signedTransaction: Uint8Array;
}>;
}

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

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

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