Defined in: account-kit/signer/src/solanaSigner.ts:18
The SolanaSigner class is used to sign transactions and messages for the Solana blockchain. It provides methods to add signatures to transactions and sign messages.
new SolanaSigner(client): SolanaSigner;Defined in: account-kit/signer/src/solanaSigner.ts:27
Constructor for the SolanaSigner class which is a wrapper around the alchemy client, and is more focused on the solana web3
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| This is the client that will be used to sign the transaction, and we are just having functions on top of it. |
Returns
SolanaSigner
addSignature(transaction): Promise<Transaction | VersionedTransaction>;Defined in: account-kit/signer/src/solanaSigner.ts:41
Adds a signature of the client user to a transaction
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The transaction to add the signature to |
Returns
Promise<Transaction | VersionedTransaction>
The transaction with the signature added
addSponsorship(
instructions,
connection,
policyId?): Promise<VersionedTransaction>;Defined in: account-kit/signer/src/solanaSigner.ts:158
Adds sponsorship to a transaction. Used to have a party like Alchemy pay for the transaction.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The instructions to add to the transaction |
|
| The connection to use for the transaction |
|
| The policy ID to add sponsorship to |
Returns
Promise<VersionedTransaction>
The transaction with sponsorship added
Creates a transfer transaction. Used for the SolanaCard example.
Param
The instructions to add to the transaction
Param
The connection to use for the transaction
Param
The version of the transaction
Call Signature
createTransaction(
instructions,
connection,
version?): Promise<VersionedTransaction>;Defined in: account-kit/signer/src/solanaSigner.ts:92
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<VersionedTransaction>
Call Signature
createTransaction(
instructions,
connection,
version?): Promise<Transaction>;Defined in: account-kit/signer/src/solanaSigner.ts:97
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<Transaction>
Call Signature
createTransaction(instructions, connection): Promise<VersionedTransaction>;Defined in: account-kit/signer/src/solanaSigner.ts:102
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
Returns
Promise<VersionedTransaction>
signMessage(message): Promise<ByteArray>;Defined in: account-kit/signer/src/solanaSigner.ts:73
Signs a message
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The message to sign |
Returns
Promise<ByteArray>
The signature of the message