Compare commits

...
Author SHA1 Message Date
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
881c7a96f7 Version Packages (#8372)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-07 06:04:42 +07:00
FirekeeperandGitHub ad68969559 Refactor Solana sign transaction API for flexible inputs (#8371) 2025-11-07 05:56:11 +07:00
12 changed files with 152 additions and 80 deletions
+8
View File
@@ -1,5 +1,13 @@
# wagmi-inapp
## 0.0.26
### Patch Changes
- Updated dependencies []:
- thirdweb@5.111.6
- @thirdweb-dev/wagmi-adapter@0.2.181
## 0.0.25
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "wagmi-inapp",
"private": true,
"version": "0.0.25",
"version": "0.0.26",
"type": "module",
"scripts": {
"dev": "vite",
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/engine
## 3.4.0
### Minor Changes
- [#8371](https://github.com/thirdweb-dev/js/pull/8371) [`ad68969`](https://github.com/thirdweb-dev/js/commit/ad68969559a80a5f188a647ef0e1c04f0003a0ad) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Reworked Solana Sign Transaction API that accepts more flexible inputs
## 3.3.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/engine",
"version": "3.3.0",
"version": "3.4.0",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
+27 -27
View File
@@ -274,6 +274,33 @@ export const sendSolanaTransaction = <ThrowOnError extends boolean = false>(
});
};
/**
* Sign Solana Transaction
* Sign a Solana transaction without broadcasting it
*/
export const signSolanaTransaction = <ThrowOnError extends boolean = false>(
options: Options<SignSolanaTransactionData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).post<
SignSolanaTransactionResponses,
unknown,
ThrowOnError
>({
security: [
{
name: "x-secret-key",
type: "apiKey",
},
],
url: "/v1/solana/sign/transaction",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
};
/**
* Cancel Transaction
* Attempt to cancel a queued transaction. Transactions that have been sent and are waiting for mine cannot be cancelled.
@@ -424,33 +451,6 @@ export const signSolanaMessage = <ThrowOnError extends boolean = false>(
});
};
/**
* Sign Solana Transaction
* Sign a serialized Solana transaction.
*/
export const signSolanaTransaction = <ThrowOnError extends boolean = false>(
options?: Options<SignSolanaTransactionData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).post<
SignSolanaTransactionResponses,
unknown,
ThrowOnError
>({
security: [
{
name: "x-secret-key",
type: "apiKey",
},
],
url: "/v1/solana/sign-transaction",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/**
* Get Transactions
* Search transactions with various filters and pagination
+90 -48
View File
@@ -556,6 +556,10 @@ export type Eip7702OwnerExecution = {
* The delegated EOA address
*/
from: AddressDef;
/**
* Optional fleet ID to route the transaction to a specific bundler fleet
*/
fleetId?: string | null;
};
/**
@@ -570,6 +574,10 @@ export type Eip7702SessionKeyExecution = {
* The account address is the address of a delegated account you want to execute the transaction on. This account has granted a session key to the `session_key_address`
*/
accountAddress: AddressDef;
/**
* Optional fleet ID to route the transaction to a specific bundler fleet
*/
fleetId?: string | null;
};
export type EmptyIdempotencySetResponse = {
@@ -1000,15 +1008,11 @@ export type RpcErrorResponse = {
/**
* Request to send a Solana transaction
*/
export type SendSolanaTransactionRequest = {
export type SendSolanaTransactionRequest = SolanaTransactionInput & {
/**
* Idempotency key for this transaction (defaults to random UUID)
*/
idempotencyKey?: string;
/**
* List of Solana instructions to execute
*/
instructions: Array<SolanaInstructionData>;
/**
* Solana execution options
*/
@@ -1188,6 +1192,30 @@ export type SignResultData = {
signedData: string;
};
/**
* Request to sign a Solana transaction
*/
export type SignSolanaTransactionRequest = SolanaTransactionInput & {
/**
* Solana execution options
*/
executionOptions: SolanaExecutionOptions;
};
/**
* Data returned from successful signing
*/
export type SignSolanaTransactionResponse = {
/**
* The signature (base58-encoded)
*/
signature: string;
/**
* The signed serialized transaction (base64-encoded)
*/
signedTransaction: string;
};
/**
* Request to sign typed data
*/
@@ -1452,6 +1480,21 @@ export type SolanaRpcResponseErrorData =
type: "NODE_UNHEALTHY";
};
/**
* Input for Solana transaction - either build from instructions or use pre-built
*/
export type SolanaTransactionInput =
| SolanaTransactionInputInstructions
| SolanaTransactionInputSerialized;
export type SolanaTransactionInputInstructions = {
instructions: Array<SolanaInstructionData>;
};
export type SolanaTransactionInputSerialized = {
transaction: string;
};
/**
* Execution Option Variants
* All supported specific execution options are contained here
@@ -1503,6 +1546,22 @@ export type SuccessResponseQueuedTransactionsResponse = {
};
};
export type SuccessResponseSignSolanaTransactionResponse = {
/**
* Data returned from successful signing
*/
result: {
/**
* The signature (base58-encoded)
*/
signature: string;
/**
* The signed serialized transaction (base64-encoded)
*/
signedTransaction: string;
};
};
export type ThirdwebError =
| {
error: ThirdwebSerializationError;
@@ -1847,6 +1906,32 @@ export type SendSolanaTransactionResponses = {
export type SendSolanaTransactionResponse =
SendSolanaTransactionResponses[keyof SendSolanaTransactionResponses];
export type SignSolanaTransactionData = {
/**
* Sign Solana transaction request
*/
body: SignSolanaTransactionRequest;
headers?: {
/**
* Vault access token
*/
"x-vault-access-token"?: string | null;
};
path?: never;
query?: never;
url: "/v1/solana/sign/transaction";
};
export type SignSolanaTransactionResponses = {
/**
* Successfully signed Solana transaction
*/
200: SuccessResponseSignSolanaTransactionResponse;
};
export type SignSolanaTransactionResponse2 =
SignSolanaTransactionResponses[keyof SignSolanaTransactionResponses];
export type CancelTransactionData = {
body?: never;
path: {
@@ -2076,49 +2161,6 @@ export type SignSolanaMessageResponses = {
export type SignSolanaMessageResponse =
SignSolanaMessageResponses[keyof SignSolanaMessageResponses];
export type SignSolanaTransactionData = {
body?: {
/**
* Base58 encoded Solana public key
*/
from: string;
/**
* Base64 encoded Solana transaction
*/
transaction: string;
};
headers?: {
/**
* Vault Access Token used to access your EOA
*/
"x-vault-access-token"?: string;
};
path?: never;
query?: never;
url: "/v1/solana/sign-transaction";
};
export type SignSolanaTransactionResponses = {
/**
* Transaction signed
*/
200: {
result: {
/**
* Base58 encoded signature
*/
signature: string;
/**
* Base58 encoded Solana public key
*/
signerPublicKey: string;
};
};
};
export type SignSolanaTransactionResponse =
SignSolanaTransactionResponses[keyof SignSolanaTransactionResponses];
export type GetTransactionsData = {
body?: never;
path?: never;
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/nebula
## 0.2.84
### Patch Changes
- Updated dependencies []:
- thirdweb@5.111.6
## 0.2.83
### Patch Changes
+1 -1
View File
@@ -57,5 +57,5 @@
"type": "module",
"types": "./dist/types/exports/thirdweb.d.ts",
"typings": "./dist/types/exports/thirdweb.d.ts",
"version": "0.2.83"
"version": "0.2.84"
}
+7
View File
@@ -1,5 +1,12 @@
# thirdweb
## 5.111.6
### Patch Changes
- Updated dependencies [[`ad68969`](https://github.com/thirdweb-dev/js/commit/ad68969559a80a5f188a647ef0e1c04f0003a0ad)]:
- @thirdweb-dev/engine@3.4.0
## 5.111.5
### Patch Changes
+1 -1
View File
@@ -430,5 +430,5 @@
}
},
"typings": "./dist/types/exports/thirdweb.d.ts",
"version": "5.111.5"
"version": "5.111.6"
}
+2
View File
@@ -1,5 +1,7 @@
# @thirdweb-dev/wagmi-adapter
## 0.2.181
## 0.2.180
## 0.2.179
+1 -1
View File
@@ -56,5 +56,5 @@
"type": "module",
"types": "./dist/types/exports/thirdweb.d.ts",
"typings": "./dist/types/exports/thirdweb.d.ts",
"version": "0.2.180"
"version": "0.2.181"
}