FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

View File

@@ -0,0 +1,22 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./signAndSendTransaction.js"), exports);
__exportStar(require("./signIn.js"), exports);
__exportStar(require("./signMessage.js"), exports);
__exportStar(require("./signTransaction.js"), exports);
__exportStar(require("./signAndSendAllTransactions.js"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,8DAA4C;AAC5C,8CAA4B;AAC5B,mDAAiC;AACjC,uDAAqC;AACrC,kEAAgD"}

View File

@@ -0,0 +1 @@
{ "type": "commonjs" }

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SignAndSendAllTransactions = void 0;
/** Name of the feature */
exports.SignAndSendAllTransactions = 'solana:signAndSendAllTransactions';
//# sourceMappingURL=signAndSendAllTransactions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signAndSendAllTransactions.js","sourceRoot":"","sources":["../../src/signAndSendAllTransactions.ts"],"names":[],"mappings":";;;AAMA,0BAA0B;AACb,QAAA,0BAA0B,GAAG,mCAAmC,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolanaSignAndSendTransaction = void 0;
/** Name of the feature. */
exports.SolanaSignAndSendTransaction = 'solana:signAndSendTransaction';
//# sourceMappingURL=signAndSendTransaction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signAndSendTransaction.js","sourceRoot":"","sources":["../../src/signAndSendTransaction.ts"],"names":[],"mappings":";;;AAQA,2BAA2B;AACd,QAAA,4BAA4B,GAAG,+BAA+B,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolanaSignIn = void 0;
/** Name of the feature. */
exports.SolanaSignIn = 'solana:signIn';
//# sourceMappingURL=signIn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signIn.js","sourceRoot":"","sources":["../../src/signIn.ts"],"names":[],"mappings":";;;AAEA,2BAA2B;AACd,QAAA,YAAY,GAAG,eAAe,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolanaSignMessage = void 0;
/** Name of the feature. */
exports.SolanaSignMessage = 'solana:signMessage';
//# sourceMappingURL=signMessage.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../src/signMessage.ts"],"names":[],"mappings":";;;AAEA,2BAA2B;AACd,QAAA,iBAAiB,GAAG,oBAAoB,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolanaSignTransaction = void 0;
/** Name of the feature. */
exports.SolanaSignTransaction = 'solana:signTransaction';
//# sourceMappingURL=signTransaction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signTransaction.js","sourceRoot":"","sources":["../../src/signTransaction.ts"],"names":[],"mappings":";;;AAEA,2BAA2B;AACd,QAAA,qBAAqB,GAAG,wBAAwB,CAAC"}

View File

@@ -0,0 +1 @@
{"root":["../../src/index.ts","../../src/signAndSendAllTransactions.ts","../../src/signAndSendTransaction.ts","../../src/signIn.ts","../../src/signMessage.ts","../../src/signTransaction.ts"],"version":"5.7.3"}

View File

@@ -0,0 +1,6 @@
export * from './signAndSendTransaction.js';
export * from './signIn.js';
export * from './signMessage.js';
export * from './signTransaction.js';
export * from './signAndSendAllTransactions.js';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}

View File

@@ -0,0 +1,3 @@
/** Name of the feature */
export const SignAndSendAllTransactions = 'solana:signAndSendAllTransactions';
//# sourceMappingURL=signAndSendAllTransactions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signAndSendAllTransactions.js","sourceRoot":"","sources":["../../src/signAndSendAllTransactions.ts"],"names":[],"mappings":"AAMA,0BAA0B;AAC1B,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC"}

View File

@@ -0,0 +1,3 @@
/** Name of the feature. */
export const SolanaSignAndSendTransaction = 'solana:signAndSendTransaction';
//# sourceMappingURL=signAndSendTransaction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signAndSendTransaction.js","sourceRoot":"","sources":["../../src/signAndSendTransaction.ts"],"names":[],"mappings":"AAQA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,4BAA4B,GAAG,+BAA+B,CAAC"}

View File

@@ -0,0 +1,3 @@
/** Name of the feature. */
export const SolanaSignIn = 'solana:signIn';
//# sourceMappingURL=signIn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signIn.js","sourceRoot":"","sources":["../../src/signIn.ts"],"names":[],"mappings":"AAEA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC"}

View File

@@ -0,0 +1,3 @@
/** Name of the feature. */
export const SolanaSignMessage = 'solana:signMessage';
//# sourceMappingURL=signMessage.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../src/signMessage.ts"],"names":[],"mappings":"AAEA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC"}

View File

@@ -0,0 +1,3 @@
/** Name of the feature. */
export const SolanaSignTransaction = 'solana:signTransaction';
//# sourceMappingURL=signTransaction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signTransaction.js","sourceRoot":"","sources":["../../src/signTransaction.ts"],"names":[],"mappings":"AAEA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,qBAAqB,GAAG,wBAAwB,CAAC"}

View File

@@ -0,0 +1 @@
{"root":["../../src/index.ts","../../src/signAndSendAllTransactions.ts","../../src/signAndSendTransaction.ts","../../src/signIn.ts","../../src/signMessage.ts","../../src/signTransaction.ts"],"version":"5.7.3"}

View File

@@ -0,0 +1,16 @@
import type { WalletWithFeatures } from '@wallet-standard/base';
import type { SolanaSignAndSendTransactionFeature } from './signAndSendTransaction.js';
import type { SolanaSignInFeature } from './signIn.js';
import type { SolanaSignMessageFeature } from './signMessage.js';
import type { SolanaSignTransactionFeature } from './signTransaction.js';
import type { SolanaSignAndSendAllTransactionsFeature } from './signAndSendAllTransactions.js';
/** TODO: docs */
export type SolanaFeatures = SolanaSignAndSendTransactionFeature | SolanaSignInFeature | SolanaSignMessageFeature | SolanaSignTransactionFeature | SolanaSignAndSendAllTransactionsFeature;
/** TODO: docs */
export type WalletWithSolanaFeatures = WalletWithFeatures<SolanaFeatures>;
export * from './signAndSendTransaction.js';
export * from './signIn.js';
export * from './signMessage.js';
export * from './signTransaction.js';
export * from './signAndSendAllTransactions.js';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAE/F,iBAAiB;AACjB,MAAM,MAAM,cAAc,GACpB,mCAAmC,GACnC,mBAAmB,GACnB,wBAAwB,GACxB,4BAA4B,GAC5B,uCAAuC,CAAC;AAE9C,iBAAiB;AACjB,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAE1E,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}

View File

@@ -0,0 +1,35 @@
import type { SolanaTransactionVersion } from './signTransaction.js';
import type { SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionOutput } from './signAndSendTransaction.js';
/** Name of the feature */
export declare const SignAndSendAllTransactions = "solana:signAndSendAllTransactions";
/** TODO: docs */
export type SolanaSignAndSendAllTransactionsFeature = {
/** Name of the feature. */
readonly [SignAndSendAllTransactions]: {
/** Version of the feature API. */
readonly version: SolanaSignAndSendAllTransactionsVersion;
/** TODO: docs */
readonly supportedTransactionVersions: readonly SolanaTransactionVersion[];
/**
* Sign transactions using the account's secret key and send them to the chain.
*
* @param inputs {SolanaSignAndSendTransactionInput[]} Inputs for signing and sending multiple transactions.
* @param options {SolanaSignAndSendAllTransactionsOptions} Options for signing and sending transactions.
*
* @return Outputs of signing and sending transactions.
*/
readonly signAndSendAllTransactions: SolanaSignAndSendAllTransactionsMethod;
};
};
/** Version of the feature. */
export type SolanaSignAndSendAllTransactionsVersion = '1.0.0';
/** TODO: docs */
export type SolanaSignAndSendAllTransactionsMethod = (inputs: readonly SolanaSignAndSendTransactionInput[], options?: SolanaSignAndSendAllTransactionsOptions) => Promise<readonly PromiseSettledResult<SolanaSignAndSendTransactionOutput>[]>;
/** Options for signing and sending multiple transactions. */
export type SolanaSignAndSendAllTransactionsOptions = {
/** Mode for signing and sending transactions. */
readonly mode?: SolanaSignAndSendAllTransactionsMode;
};
/** Mode for signing and sending transactions. */
export type SolanaSignAndSendAllTransactionsMode = 'parallel' | 'serial';
//# sourceMappingURL=signAndSendAllTransactions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signAndSendAllTransactions.d.ts","sourceRoot":"","sources":["../../src/signAndSendAllTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EACR,iCAAiC,EACjC,kCAAkC,EACrC,MAAM,6BAA6B,CAAC;AAErC,0BAA0B;AAC1B,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAE9E,iBAAiB;AACjB,MAAM,MAAM,uCAAuC,GAAG;IAClD,2BAA2B;IAC3B,QAAQ,CAAC,CAAC,0BAA0B,CAAC,EAAE;QACnC,kCAAkC;QAClC,QAAQ,CAAC,OAAO,EAAE,uCAAuC,CAAC;QAE1D,iBAAiB;QACjB,QAAQ,CAAC,4BAA4B,EAAE,SAAS,wBAAwB,EAAE,CAAC;QAE3E;;;;;;;WAOG;QACH,QAAQ,CAAC,0BAA0B,EAAE,sCAAsC,CAAC;KAC/E,CAAC;CACL,CAAC;AAEF,8BAA8B;AAC9B,MAAM,MAAM,uCAAuC,GAAG,OAAO,CAAC;AAE9D,iBAAiB;AACjB,MAAM,MAAM,sCAAsC,GAAG,CACjD,MAAM,EAAE,SAAS,iCAAiC,EAAE,EACpD,OAAO,CAAC,EAAE,uCAAuC,KAChD,OAAO,CAAC,SAAS,oBAAoB,CAAC,kCAAkC,CAAC,EAAE,CAAC,CAAC;AAElF,6DAA6D;AAC7D,MAAM,MAAM,uCAAuC,GAAG;IAClD,iDAAiD;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,oCAAoC,CAAC;CACxD,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,oCAAoC,GAAG,UAAU,GAAG,QAAQ,CAAC"}

View File

@@ -0,0 +1,48 @@
import type { IdentifierString } from '@wallet-standard/base';
import type { SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaTransactionCommitment, SolanaTransactionVersion } from './signTransaction.js';
/** Name of the feature. */
export declare const SolanaSignAndSendTransaction = "solana:signAndSendTransaction";
/** TODO: docs */
export type SolanaSignAndSendTransactionFeature = {
/** Name of the feature. */
readonly [SolanaSignAndSendTransaction]: {
/** Version of the feature API. */
readonly version: SolanaSignAndSendTransactionVersion;
/** TODO: docs */
readonly supportedTransactionVersions: readonly SolanaTransactionVersion[];
/**
* Sign transactions using the account's secret key and send them to the chain.
*
* @param inputs Inputs for signing and sending transactions.
*
* @return Outputs of signing and sending transactions.
*/
readonly signAndSendTransaction: SolanaSignAndSendTransactionMethod;
};
};
/** Version of the feature. */
export type SolanaSignAndSendTransactionVersion = '1.0.0';
/** TODO: docs */
export type SolanaSignAndSendTransactionMethod = (...inputs: readonly SolanaSignAndSendTransactionInput[]) => Promise<readonly SolanaSignAndSendTransactionOutput[]>;
/** Input for signing and sending a transaction. */
export interface SolanaSignAndSendTransactionInput extends SolanaSignTransactionInput {
/** Chain to use. */
readonly chain: IdentifierString;
/** TODO: docs */
readonly options?: SolanaSignAndSendTransactionOptions;
}
/** Output of signing and sending a transaction. */
export interface SolanaSignAndSendTransactionOutput {
/** Transaction signature, as raw bytes. */
readonly signature: Uint8Array;
}
/** Options for signing and sending a transaction. */
export type SolanaSignAndSendTransactionOptions = SolanaSignTransactionOptions & {
/** Desired commitment level. If provided, confirm the transaction after sending. */
readonly commitment?: SolanaTransactionCommitment;
/** Disable transaction verification at the RPC. */
readonly skipPreflight?: boolean;
/** Maximum number of times for the RPC node to retry sending the transaction to the leader. */
readonly maxRetries?: number;
};
//# sourceMappingURL=signAndSendTransaction.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signAndSendTransaction.d.ts","sourceRoot":"","sources":["../../src/signAndSendTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EACR,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,2BAA2B;AAC3B,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAE5E,iBAAiB;AACjB,MAAM,MAAM,mCAAmC,GAAG;IAC9C,2BAA2B;IAC3B,QAAQ,CAAC,CAAC,4BAA4B,CAAC,EAAE;QACrC,kCAAkC;QAClC,QAAQ,CAAC,OAAO,EAAE,mCAAmC,CAAC;QAEtD,iBAAiB;QACjB,QAAQ,CAAC,4BAA4B,EAAE,SAAS,wBAAwB,EAAE,CAAC;QAE3E;;;;;;WAMG;QACH,QAAQ,CAAC,sBAAsB,EAAE,kCAAkC,CAAC;KACvE,CAAC;CACL,CAAC;AAEF,8BAA8B;AAC9B,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAC;AAE1D,iBAAiB;AACjB,MAAM,MAAM,kCAAkC,GAAG,CAC7C,GAAG,MAAM,EAAE,SAAS,iCAAiC,EAAE,KACtD,OAAO,CAAC,SAAS,kCAAkC,EAAE,CAAC,CAAC;AAE5D,mDAAmD;AACnD,MAAM,WAAW,iCAAkC,SAAQ,0BAA0B;IACjF,oBAAoB;IACpB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAEjC,iBAAiB;IACjB,QAAQ,CAAC,OAAO,CAAC,EAAE,mCAAmC,CAAC;CAC1D;AAED,mDAAmD;AACnD,MAAM,WAAW,kCAAkC;IAC/C,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;CAClC;AAED,qDAAqD;AACrD,MAAM,MAAM,mCAAmC,GAAG,4BAA4B,GAAG;IAC7E,oFAAoF;IACpF,QAAQ,CAAC,UAAU,CAAC,EAAE,2BAA2B,CAAC;IAElD,mDAAmD;IACnD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAEjC,+FAA+F;IAC/F,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}

View File

@@ -0,0 +1,104 @@
import type { WalletAccount } from '@wallet-standard/base';
/** Name of the feature. */
export declare const SolanaSignIn = "solana:signIn";
/** TODO: docs */
export type SolanaSignInFeature = {
/** Name of the feature. */
readonly [SolanaSignIn]: {
/** Version of the feature API. */
readonly version: SolanaSignInVersion;
/** Sign In With Solana (based on https://eips.ethereum.org/EIPS/eip-4361 and https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md). */
readonly signIn: SolanaSignInMethod;
};
};
/** Version of the feature. */
export type SolanaSignInVersion = '1.0.0';
/** TODO: docs */
export type SolanaSignInMethod = (...inputs: readonly SolanaSignInInput[]) => Promise<readonly SolanaSignInOutput[]>;
/** Input for signing in. */
export interface SolanaSignInInput {
/**
* Optional EIP-4361 Domain.
* If not provided, the wallet must determine the Domain to include in the message.
*/
readonly domain?: string;
/**
* Optional EIP-4361 Address.
* If not provided, the wallet must determine the Address to include in the message.
*/
readonly address?: string;
/**
* Optional EIP-4361 Statement.
* If not provided, the wallet must not include Statement in the message.
*/
readonly statement?: string;
/**
* Optional EIP-4361 URI.
* If not provided, the wallet must not include URI in the message.
*/
readonly uri?: string;
/**
* Optional EIP-4361 Version.
* If not provided, the wallet must not include Version in the message.
*/
readonly version?: string;
/**
* Optional EIP-4361 Chain ID.
* If not provided, the wallet must not include Chain ID in the message.
*/
readonly chainId?: string;
/**
* Optional EIP-4361 Nonce.
* If not provided, the wallet must not include Nonce in the message.
*/
readonly nonce?: string;
/**
* Optional EIP-4361 Issued At.
* If not provided, the wallet must not include Issued At in the message.
*/
readonly issuedAt?: string;
/**
* Optional EIP-4361 Expiration Time.
* If not provided, the wallet must not include Expiration Time in the message.
*/
readonly expirationTime?: string;
/**
* Optional EIP-4361 Not Before.
* If not provided, the wallet must not include Not Before in the message.
*/
readonly notBefore?: string;
/**
* Optional EIP-4361 Request ID.
* If not provided, the wallet must not include Request ID in the message.
*/
readonly requestId?: string;
/**
* Optional EIP-4361 Resources.
* If not provided, the wallet must not include Resources in the message.
*/
readonly resources?: readonly string[];
}
/** Output of signing in. */
export interface SolanaSignInOutput {
/**
* Account that was signed in.
* The address of the account may be different from the provided input Address.
*/
readonly account: WalletAccount;
/**
* Message bytes that were signed.
* The wallet may prefix or otherwise modify the message before signing it.
*/
readonly signedMessage: Uint8Array;
/**
* Message signature produced.
* If the signature type is provided, the signature must be Ed25519.
*/
readonly signature: Uint8Array;
/**
* Optional type of the message signature produced.
* If not provided, the signature must be Ed25519.
*/
readonly signatureType?: 'ed25519';
}
//# sourceMappingURL=signIn.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signIn.d.ts","sourceRoot":"","sources":["../../src/signIn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,2BAA2B;AAC3B,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAE5C,iBAAiB;AACjB,MAAM,MAAM,mBAAmB,GAAG;IAC9B,2BAA2B;IAC3B,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE;QACrB,kCAAkC;QAClC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,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AGG;IACH,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IAEnC;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAE/B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;CACtC"}

View File

@@ -0,0 +1,43 @@
import type { WalletAccount } from '@wallet-standard/base';
/** Name of the feature. */
export declare const SolanaSignMessage = "solana:signMessage";
/** TODO: docs */
export type SolanaSignMessageFeature = {
/** Name of the feature. */
readonly [SolanaSignMessage]: {
/** Version of the feature API. */
readonly version: SolanaSignMessageVersion;
/** Sign messages (arbitrary bytes) using the account's secret key. */
readonly signMessage: SolanaSignMessageMethod;
};
};
/** Version of the feature. */
export type SolanaSignMessageVersion = '1.1.0' | '1.0.0';
/** TODO: docs */
export type SolanaSignMessageMethod = (...inputs: readonly SolanaSignMessageInput[]) => Promise<readonly SolanaSignMessageOutput[]>;
/** Input for signing a message. */
export interface SolanaSignMessageInput {
/** Account to use. */
readonly account: WalletAccount;
/** Message to sign, as raw bytes. */
readonly message: Uint8Array;
}
/** Output of signing a message. */
export interface SolanaSignMessageOutput {
/**
* Message bytes that were signed.
* The wallet may prefix or otherwise modify the message before signing it.
*/
readonly signedMessage: Uint8Array;
/**
* Message signature produced.
* If the signature type is provided, the signature must be Ed25519.
*/
readonly signature: Uint8Array;
/**
* Optional type of the message signature produced.
* If not provided, the signature must be Ed25519.
*/
readonly signatureType?: 'ed25519';
}
//# sourceMappingURL=signMessage.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../src/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,2BAA2B;AAC3B,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,iBAAiB;AACjB,MAAM,MAAM,wBAAwB,GAAG;IACnC,2BAA2B;IAC3B,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE;QAC1B,kCAAkC;QAClC,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;QAE3C,sEAAsE;QACtE,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;KACjD,CAAC;CACL,CAAC;AAEF,8BAA8B;AAC9B,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEzD,iBAAiB;AACjB,MAAM,MAAM,uBAAuB,GAAG,CAClC,GAAG,MAAM,EAAE,SAAS,sBAAsB,EAAE,KAC3C,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC,CAAC;AAEjD,mCAAmC;AACnC,MAAM,WAAW,sBAAsB;IACnC,sBAAsB;IACtB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAEhC,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;CAChC;AAED,mCAAmC;AACnC,MAAM,WAAW,uBAAuB;IACpC;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IAEnC;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAE/B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;CACtC"}

View File

@@ -0,0 +1,57 @@
import type { IdentifierString, WalletAccount } from '@wallet-standard/base';
/** Name of the feature. */
export declare const SolanaSignTransaction = "solana:signTransaction";
/** TODO: docs */
export type SolanaSignTransactionFeature = {
/** Name of the feature. */
readonly [SolanaSignTransaction]: {
/** Version of the feature API. */
readonly version: SolanaSignTransactionVersion;
/** TODO: docs */
readonly supportedTransactionVersions: readonly SolanaTransactionVersion[];
/**
* Sign transactions using the account's secret key.
*
* @param inputs Inputs for signing transactions.
*
* @return Outputs of signing transactions.
*/
readonly signTransaction: SolanaSignTransactionMethod;
};
};
/** Version of the feature. */
export type SolanaSignTransactionVersion = '1.0.0';
/** TODO: docs */
export type SolanaTransactionVersion = 'legacy' | 0;
/** TODO: docs */
export type SolanaSignTransactionMethod = (...inputs: readonly SolanaSignTransactionInput[]) => Promise<readonly SolanaSignTransactionOutput[]>;
/** Input for signing a transaction. */
export interface SolanaSignTransactionInput {
/** Account to use. */
readonly account: WalletAccount;
/** Serialized transaction, as raw bytes. */
readonly transaction: Uint8Array;
/** Chain to use. */
readonly chain?: IdentifierString;
/** TODO: docs */
readonly options?: SolanaSignTransactionOptions;
}
/** Output of signing a transaction. */
export interface SolanaSignTransactionOutput {
/**
* Signed, serialized transaction, as raw bytes.
* Returning a transaction rather than signatures allows multisig wallets, program wallets, and other wallets that
* use meta-transactions to return a modified, signed transaction.
*/
readonly signedTransaction: Uint8Array;
}
/** Options for signing a transaction. */
export type SolanaSignTransactionOptions = {
/** Preflight commitment level. */
readonly preflightCommitment?: SolanaTransactionCommitment;
/** The minimum slot that the request can be evaluated at. */
readonly minContextSlot?: number;
};
/** Commitment level for transactions. */
export type SolanaTransactionCommitment = 'processed' | 'confirmed' | 'finalized';
//# sourceMappingURL=signTransaction.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../src/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE7E,2BAA2B;AAC3B,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,iBAAiB;AACjB,MAAM,MAAM,4BAA4B,GAAG;IACvC,2BAA2B;IAC3B,QAAQ,CAAC,CAAC,qBAAqB,CAAC,EAAE;QAC9B,kCAAkC;QAClC,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;QAE/C,iBAAiB;QACjB,QAAQ,CAAC,4BAA4B,EAAE,SAAS,wBAAwB,EAAE,CAAC;QAE3E;;;;;;WAMG;QACH,QAAQ,CAAC,eAAe,EAAE,2BAA2B,CAAC;KACzD,CAAC;CACL,CAAC;AAEF,8BAA8B;AAC9B,MAAM,MAAM,4BAA4B,GA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