Defined in: account-kit/signer/src/serverSigner.ts:31
AlchemyServerSigner is a signer that can sign messages and typed data using an access key. It extends the SmartAccountSigner interface and uses the ServerSignerClient to sign requests. Primarily intended to be used server-side.
SmartAccountSigner
new AlchemyServerSigner(client): AlchemyServerSigner;Defined in: account-kit/signer/src/serverSigner.ts:40
Creates an instance of AlchemyServerSigner.
Parameters
| Parameter | Type | Description |
|---|---|---|
| The underlying signer client |
Returns
AlchemyServerSigner
| Property | Type | Default value |
|---|---|---|
| ||
|
|
getAddress(): Promise<`0x${string}`>;Defined in: account-kit/signer/src/serverSigner.ts:50
Gets the address of the user from the signer client.
Returns
Promise<`0x${string}`>
The address of the user
Throws
If the user cannot be retrieved from the signer client
Implementation of
SmartAccountSigner.getAddress;signAuthorization(unsignedAuthorization): Promise<SignedAuthorization<number>>;Defined in: account-kit/signer/src/serverSigner.ts:86
Signs an authorization using the inner client.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The unsigned authorization to sign |
Returns
Promise<SignedAuthorization<number>>
The signed authorization
Implementation of
SmartAccountSigner.signAuthorization;signMessage(msg): Promise<`0x${string}`>;Defined in: account-kit/signer/src/serverSigner.ts:61
Signs a message using the inner client.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The message to sign |
Returns
Promise<`0x${string}`>
The signed message
Implementation of
SmartAccountSigner.signMessage;signTypedData<TTypedData, TPrimaryType>(params): Promise<`0x${string}`>;Defined in: account-kit/signer/src/serverSigner.ts:72
Signs typed data using the inner client.
Type Parameters
| Type Parameter | Default type |
|---|---|
| ‐ |
| keyof |
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The typed data to sign |
Returns
Promise<`0x${string}`>
The signed typed data
Implementation of
SmartAccountSigner.signTypedData;toSolanaSigner(): SolanaSigner;Defined in: account-kit/signer/src/serverSigner.ts:122
Creates a new instance of SolanaSigner using the inner client.
Example
import { AlchemyServerSigner } from "@account-kit/signer";
const signer = await createServerSigner({
auth: { accessKey },
connection: {
apiKey: "alchemy-api-key",
},
});
const solanaSigner = signer.toSolanaSigner();Returns
A new instance of SolanaSigner