Engine SDK updates (#8238)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@thirdweb-dev/engine": minor
|
||||
---
|
||||
|
||||
Add Solana endpoints
|
||||
@@ -11,11 +11,18 @@ import type {
|
||||
CancelTransactionResponses,
|
||||
CreateAccountData,
|
||||
CreateAccountResponses,
|
||||
CreateSolanaAccountData,
|
||||
CreateSolanaAccountResponses,
|
||||
EncodeContractData,
|
||||
EncodeContractResponses,
|
||||
GetActivityLogsData,
|
||||
GetActivityLogsErrors,
|
||||
GetActivityLogsResponses,
|
||||
GetSolanaActivityLogsData,
|
||||
GetSolanaActivityLogsErrors,
|
||||
GetSolanaActivityLogsResponses,
|
||||
GetSolanaTransactionsData,
|
||||
GetSolanaTransactionsResponses,
|
||||
GetTransactionAnalyticsData,
|
||||
GetTransactionAnalyticsResponses,
|
||||
GetTransactionAnalyticsSummaryData,
|
||||
@@ -25,17 +32,30 @@ import type {
|
||||
GetTransactionsResponses,
|
||||
ListAccountsData,
|
||||
ListAccountsResponses,
|
||||
ListSolanaAccountsData,
|
||||
ListSolanaAccountsResponses,
|
||||
ReadContractData,
|
||||
ReadContractResponses,
|
||||
SearchActivityLogsData,
|
||||
SearchActivityLogsErrors,
|
||||
SearchActivityLogsResponses,
|
||||
SearchSolanaActivityLogsData,
|
||||
SearchSolanaActivityLogsErrors,
|
||||
SearchSolanaActivityLogsResponses,
|
||||
SearchSolanaTransactionsData,
|
||||
SearchSolanaTransactionsResponses,
|
||||
SearchTransactionsData,
|
||||
SearchTransactionsResponses,
|
||||
SendSolanaTransactionData,
|
||||
SendSolanaTransactionResponses,
|
||||
SendTransactionData,
|
||||
SendTransactionResponses,
|
||||
SignMessageData,
|
||||
SignMessageResponses,
|
||||
SignSolanaMessageData,
|
||||
SignSolanaMessageResponses,
|
||||
SignSolanaTransactionData,
|
||||
SignSolanaTransactionResponses,
|
||||
SignTypedDataData,
|
||||
SignTypedDataResponses,
|
||||
WriteContractData,
|
||||
@@ -227,6 +247,33 @@ export const encodeContract = <ThrowOnError extends boolean = false>(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Send Solana Transaction
|
||||
* Execute a Solana transaction with custom instructions
|
||||
*/
|
||||
export const sendSolanaTransaction = <ThrowOnError extends boolean = false>(
|
||||
options: Options<SendSolanaTransactionData, ThrowOnError>,
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
SendSolanaTransactionResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/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.
|
||||
@@ -300,6 +347,110 @@ export const createAccount = <ThrowOnError extends boolean = false>(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* List Solana Accounts
|
||||
* List all Solana wallets provisioned for the project.
|
||||
*/
|
||||
export const listSolanaAccounts = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<ListSolanaAccountsData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
ListSolanaAccountsResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/accounts",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get or Create Solana Account
|
||||
* Create a new solana wallet in the vault or return the existing wallet for a given label.
|
||||
*/
|
||||
export const createSolanaAccount = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<CreateSolanaAccountData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).post<
|
||||
CreateSolanaAccountResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/accounts",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Sign Solana Message
|
||||
* Sign an arbitrary message with a Solana wallet.
|
||||
*/
|
||||
export const signSolanaMessage = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<SignSolanaMessageData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).post<
|
||||
SignSolanaMessageResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/sign-message",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -455,3 +606,103 @@ export const searchActivityLogs = <ThrowOnError extends boolean = false>(
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Solana Transactions
|
||||
* Search Solana transactions with various filters and pagination
|
||||
*/
|
||||
export const getSolanaTransactions = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetSolanaTransactionsData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetSolanaTransactionsResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/transactions",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Search Solana Transactions
|
||||
* Advanced search for Solana transactions with complex nested filters
|
||||
*/
|
||||
export const searchSolanaTransactions = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<SearchSolanaTransactionsData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).post<
|
||||
SearchSolanaTransactionsResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/transactions/search",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Solana Activity Logs
|
||||
* Get paginated activity logs for a specific Solana transaction with tenancy enforcement
|
||||
*/
|
||||
export const getSolanaActivityLogs = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetSolanaActivityLogsData, ThrowOnError>,
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetSolanaActivityLogsResponses,
|
||||
GetSolanaActivityLogsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/transactions/activity-logs",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Search Solana Activity Logs
|
||||
* Search Solana activity logs across transactions with advanced filtering and tenancy enforcement
|
||||
*/
|
||||
export const searchSolanaActivityLogs = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<SearchSolanaActivityLogsData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).post<
|
||||
SearchSolanaActivityLogsResponses,
|
||||
SearchSolanaActivityLogsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
security: [
|
||||
{
|
||||
name: "x-secret-key",
|
||||
type: "apiKey",
|
||||
},
|
||||
],
|
||||
url: "/v1/solana/transactions/activity-logs/search",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -17,6 +17,19 @@ export type TransactionsFilterNested = {
|
||||
filters: Array<TransactionsFilterValue | TransactionsFilterNested>;
|
||||
};
|
||||
|
||||
export type SolanaTransactionsFilterValue = {
|
||||
field: "id" | "chainId" | "signerAddress" | "signature";
|
||||
values: Array<string>;
|
||||
operation: "AND" | "OR";
|
||||
};
|
||||
|
||||
export type SolanaTransactionsFilterNested = {
|
||||
operation: "AND" | "OR";
|
||||
filters: Array<
|
||||
SolanaTransactionsFilterValue | SolanaTransactionsFilterNested
|
||||
>;
|
||||
};
|
||||
|
||||
/**
|
||||
* EVM Address
|
||||
* Used to represent an EVM address. This is a string of length 42 with a `0x` prefix. Non-checksummed addresses are also supported, but will be converted to checksummed.
|
||||
@@ -112,6 +125,21 @@ export type BatchResultItemEncodeResultSuccessItemEngineError =
|
||||
kind: RpcErrorKind;
|
||||
type: "BUNDLER_ERROR";
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* Solana chain identifier
|
||||
*/
|
||||
chain_id: string;
|
||||
/**
|
||||
* Human-readable error message
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* Structured error kind
|
||||
*/
|
||||
kind: SolanaRpcErrorKind;
|
||||
type: "SOLANA_RPC_ERROR";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
type: "VAULT_ERROR";
|
||||
@@ -202,6 +230,21 @@ export type BatchResultItemReadResultSuccessItemEngineError =
|
||||
kind: RpcErrorKind;
|
||||
type: "BUNDLER_ERROR";
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* Solana chain identifier
|
||||
*/
|
||||
chain_id: string;
|
||||
/**
|
||||
* Human-readable error message
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* Structured error kind
|
||||
*/
|
||||
kind: SolanaRpcErrorKind;
|
||||
type: "SOLANA_RPC_ERROR";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
type: "VAULT_ERROR";
|
||||
@@ -301,6 +344,21 @@ export type BatchResultItemSignResultDataEngineError =
|
||||
kind: RpcErrorKind;
|
||||
type: "BUNDLER_ERROR";
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* Solana chain identifier
|
||||
*/
|
||||
chain_id: string;
|
||||
/**
|
||||
* Human-readable error message
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* Structured error kind
|
||||
*/
|
||||
kind: SolanaRpcErrorKind;
|
||||
type: "SOLANA_RPC_ERROR";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
type: "VAULT_ERROR";
|
||||
@@ -392,6 +450,11 @@ export type CancelResult =
|
||||
}
|
||||
| "NOT_FOUND";
|
||||
|
||||
/**
|
||||
* Commitment Level
|
||||
*/
|
||||
export type CommitmentLevel = "confirmed" | "finalized";
|
||||
|
||||
/**
|
||||
* Represents a contract function call with parameters
|
||||
*
|
||||
@@ -765,6 +828,8 @@ export type InnerTransaction = (null | TransactionTypeData) & {
|
||||
gasLimit?: number | null;
|
||||
};
|
||||
|
||||
export type InstructionDataEncoding = "hex" | "base64";
|
||||
|
||||
export type MessageFormatDef = "text" | "hex";
|
||||
|
||||
/**
|
||||
@@ -783,6 +848,29 @@ export type MessageInput = {
|
||||
|
||||
export type MulticallDocType = boolean | AddressDef;
|
||||
|
||||
/**
|
||||
* Pubkey
|
||||
*/
|
||||
export type PubkeyDef = string;
|
||||
|
||||
/**
|
||||
* Response for a queued Solana transaction
|
||||
*/
|
||||
export type QueuedSolanaTransactionResponse = {
|
||||
/**
|
||||
* The idempotency key for this transaction
|
||||
*/
|
||||
transactionId: string;
|
||||
/**
|
||||
* The Solana chain
|
||||
*/
|
||||
chainId: SolanaChainId;
|
||||
/**
|
||||
* The signer address
|
||||
*/
|
||||
signerAddress: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* # QueuedTransaction
|
||||
* Response for any request that queues one or more transactions
|
||||
@@ -909,6 +997,28 @@ export type RpcErrorResponse = {
|
||||
data?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Request to send a Solana transaction
|
||||
*/
|
||||
export type SendSolanaTransactionRequest = {
|
||||
/**
|
||||
* Idempotency key for this transaction (defaults to random UUID)
|
||||
*/
|
||||
idempotencyKey?: string;
|
||||
/**
|
||||
* List of Solana instructions to execute
|
||||
*/
|
||||
instructions: Array<SolanaInstructionData>;
|
||||
/**
|
||||
* Solana execution options
|
||||
*/
|
||||
executionOptions: SolanaExecutionOptions;
|
||||
/**
|
||||
* Webhook options for transaction status notifications
|
||||
*/
|
||||
webhookOptions?: Array<WebhookOptions>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Incoming transaction request, parsed into InnerTransaction
|
||||
* Exposed API will have varying `params` but will all parse into InnerTransaction before execution
|
||||
@@ -975,6 +1085,9 @@ export type SerialisableAwsSignerError =
|
||||
| {
|
||||
message: string;
|
||||
type: "UNKNOWN";
|
||||
}
|
||||
| {
|
||||
type: "SIGNATURE_RECOVERY_FAILED";
|
||||
};
|
||||
|
||||
export type SerializableReqwestError =
|
||||
@@ -1149,6 +1262,196 @@ export type SigningOptions =
|
||||
chainId: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Account metadata for Solana instructions
|
||||
*/
|
||||
export type SolanaAccountMeta = {
|
||||
/**
|
||||
* Public key of the account
|
||||
*/
|
||||
pubkey: PubkeyDef;
|
||||
/**
|
||||
* Whether the account should sign the transaction
|
||||
*/
|
||||
isSigner: boolean;
|
||||
/**
|
||||
* Whether the account is writable
|
||||
*/
|
||||
isWritable: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Solana chain identifier
|
||||
*/
|
||||
export type SolanaChainId = "solana:mainnet" | "solana:devnet" | "solana:local";
|
||||
|
||||
/**
|
||||
* ### Solana Execution Options
|
||||
* This struct configures Solana transaction execution.
|
||||
*
|
||||
* Solana execution sends transactions directly to Solana RPC nodes with
|
||||
* support for priority fees, compute budgets, and commitment levels.
|
||||
*
|
||||
* ### Use Cases
|
||||
* - SOL transfers
|
||||
* - SPL token operations
|
||||
* - Program interactions (NFTs, DeFi, etc.)
|
||||
* - Arbitrary instruction composition
|
||||
*
|
||||
* ### Features
|
||||
* - Versioned transactions with address lookup tables
|
||||
* - Priority fee configuration for faster inclusion
|
||||
* - Compute budget optimization
|
||||
* - Configurable commitment levels
|
||||
* - Blockhash retry mechanism
|
||||
*/
|
||||
export type SolanaExecutionOptions = {
|
||||
/**
|
||||
* The Solana address (public key) to send transactions from
|
||||
* This account must have sufficient SOL to pay for transaction fees
|
||||
*/
|
||||
signerAddress: PubkeyDef;
|
||||
/**
|
||||
* Solana chain to use
|
||||
*/
|
||||
chainId: SolanaChainId;
|
||||
/**
|
||||
* Maximum number of times to retry fetching a new blockhash if transaction fails
|
||||
* Default: 0 (fail fast)
|
||||
* Max: 1000
|
||||
*/
|
||||
maxBlockhashRetries?: number;
|
||||
/**
|
||||
* Commitment level for transaction confirmation
|
||||
* Options: "processed", "confirmed", "finalized"
|
||||
* Default: "finalized"
|
||||
*/
|
||||
commitment?: CommitmentLevel;
|
||||
priorityFee?: null | SolanaPriorityFee;
|
||||
/**
|
||||
* Compute unit limit for the transaction. If omitted, the transaction will use the default compute unit limit. If provided, engine will add the compute budget instruction to the transaction.
|
||||
*/
|
||||
computeUnitLimit?: number | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Solana instruction data provided by the user
|
||||
* This is a simplified representation that will be converted to a proper Instruction
|
||||
*/
|
||||
export type SolanaInstructionData = {
|
||||
/**
|
||||
* Program ID to invoke
|
||||
*/
|
||||
programId: PubkeyDef;
|
||||
/**
|
||||
* Account keys that will be passed to the program
|
||||
*/
|
||||
accounts: Array<SolanaAccountMeta>;
|
||||
/**
|
||||
* Instruction data (hex-encoded or base64)
|
||||
*/
|
||||
data: string;
|
||||
encoding: InstructionDataEncoding;
|
||||
};
|
||||
|
||||
/**
|
||||
* Solana Priority Fee
|
||||
*/
|
||||
export type SolanaPriorityFee =
|
||||
| {
|
||||
type: "auto";
|
||||
}
|
||||
| {
|
||||
microLamportsPerUnit: number;
|
||||
type: "manual";
|
||||
}
|
||||
| {
|
||||
percentile: number;
|
||||
type: "percentile";
|
||||
};
|
||||
|
||||
/**
|
||||
* Solana-specific RPC error types
|
||||
*/
|
||||
export type SolanaRpcErrorKind =
|
||||
| {
|
||||
message: string;
|
||||
kind?: string | null;
|
||||
type: "IO";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
status?: number | null;
|
||||
type: "REQWEST";
|
||||
}
|
||||
| {
|
||||
code: number;
|
||||
message: string;
|
||||
/**
|
||||
* Structured error data from Solana RPC
|
||||
*/
|
||||
data: SolanaRpcResponseErrorData;
|
||||
type: "RPC_ERROR";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
line?: number | null;
|
||||
column?: number | null;
|
||||
type: "SERDE_JSON";
|
||||
}
|
||||
| {
|
||||
error_type: string;
|
||||
message: string;
|
||||
type: "TRANSACTION_ERROR";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
type: "SIGNING_ERROR";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
type: "CUSTOM";
|
||||
}
|
||||
| {
|
||||
message: string;
|
||||
type: "UNKNOWN";
|
||||
};
|
||||
|
||||
/**
|
||||
* Serializable version of Solana's RpcResponseErrorData
|
||||
*/
|
||||
export type SolanaRpcResponseErrorData =
|
||||
| {
|
||||
type: "EMPTY";
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* Error message from simulation
|
||||
*/
|
||||
err?: string | null;
|
||||
/**
|
||||
* Logs from simulation
|
||||
*/
|
||||
logs?: Array<string> | null;
|
||||
/**
|
||||
* Accounts used in simulation
|
||||
*/
|
||||
accounts?: unknown;
|
||||
/**
|
||||
* Units consumed during simulation
|
||||
*/
|
||||
units_consumed?: number | null;
|
||||
/**
|
||||
* Return data from the transaction
|
||||
*/
|
||||
return_data?: unknown;
|
||||
type: "SEND_TRANSACTION_PREFLIGHT_FAILURE";
|
||||
}
|
||||
| {
|
||||
num_slots_behind?: number | null;
|
||||
type: "NODE_UNHEALTHY";
|
||||
};
|
||||
|
||||
/**
|
||||
* Execution Option Variants
|
||||
* All supported specific execution options are contained here
|
||||
@@ -1174,6 +1477,26 @@ export type SuccessResponseEmptyIdempotencySetResponse = {
|
||||
};
|
||||
};
|
||||
|
||||
export type SuccessResponseQueuedSolanaTransactionResponse = {
|
||||
/**
|
||||
* Response for a queued Solana transaction
|
||||
*/
|
||||
result: {
|
||||
/**
|
||||
* The idempotency key for this transaction
|
||||
*/
|
||||
transactionId: string;
|
||||
/**
|
||||
* The Solana chain
|
||||
*/
|
||||
chainId: SolanaChainId;
|
||||
/**
|
||||
* The signer address
|
||||
*/
|
||||
signerAddress: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type SuccessResponseQueuedTransactionsResponse = {
|
||||
result: {
|
||||
transactions: Array<QueuedTransaction>;
|
||||
@@ -1498,6 +1821,32 @@ export type EncodeContractResponses = {
|
||||
export type EncodeContractResponse =
|
||||
EncodeContractResponses[keyof EncodeContractResponses];
|
||||
|
||||
export type SendSolanaTransactionData = {
|
||||
/**
|
||||
* Solana transaction request
|
||||
*/
|
||||
body: SendSolanaTransactionRequest;
|
||||
headers?: {
|
||||
/**
|
||||
* Vault access token
|
||||
*/
|
||||
"x-vault-access-token"?: string | null;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/v1/solana/transaction";
|
||||
};
|
||||
|
||||
export type SendSolanaTransactionResponses = {
|
||||
/**
|
||||
* Solana transaction queued successfully
|
||||
*/
|
||||
202: SuccessResponseQueuedSolanaTransactionResponse;
|
||||
};
|
||||
|
||||
export type SendSolanaTransactionResponse =
|
||||
SendSolanaTransactionResponses[keyof SendSolanaTransactionResponses];
|
||||
|
||||
export type CancelTransactionData = {
|
||||
body?: never;
|
||||
path: {
|
||||
@@ -1598,6 +1947,178 @@ export type CreateAccountResponses = {
|
||||
export type CreateAccountResponse =
|
||||
CreateAccountResponses[keyof CreateAccountResponses];
|
||||
|
||||
export type ListSolanaAccountsData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Vault Access Token used to access your EOA
|
||||
*/
|
||||
"x-vault-access-token"?: string;
|
||||
};
|
||||
path?: never;
|
||||
query?: {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
};
|
||||
url: "/v1/solana/accounts";
|
||||
};
|
||||
|
||||
export type ListSolanaAccountsResponses = {
|
||||
/**
|
||||
* Solana accounts retrieved
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
accounts: Array<{
|
||||
/**
|
||||
* Base58 encoded Solana public key
|
||||
*/
|
||||
publicKey: string;
|
||||
label?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}>;
|
||||
pagination: {
|
||||
totalCount: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type ListSolanaAccountsResponse =
|
||||
ListSolanaAccountsResponses[keyof ListSolanaAccountsResponses];
|
||||
|
||||
export type CreateSolanaAccountData = {
|
||||
body?: {
|
||||
label: string;
|
||||
};
|
||||
headers?: {
|
||||
/**
|
||||
* Vault Access Token used to access your EOA
|
||||
*/
|
||||
"x-vault-access-token"?: string;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/v1/solana/accounts";
|
||||
};
|
||||
|
||||
export type CreateSolanaAccountResponses = {
|
||||
/**
|
||||
* Solana account retrieved
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
/**
|
||||
* Base58 encoded Solana public key
|
||||
*/
|
||||
publicKey: string;
|
||||
label?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Solana account created
|
||||
*/
|
||||
201: {
|
||||
result: {
|
||||
/**
|
||||
* Base58 encoded Solana public key
|
||||
*/
|
||||
publicKey: string;
|
||||
label?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type CreateSolanaAccountResponse =
|
||||
CreateSolanaAccountResponses[keyof CreateSolanaAccountResponses];
|
||||
|
||||
export type SignSolanaMessageData = {
|
||||
body?: {
|
||||
/**
|
||||
* Base58 encoded Solana public key
|
||||
*/
|
||||
from: string;
|
||||
message: string;
|
||||
format?: "text" | "hex";
|
||||
};
|
||||
headers?: {
|
||||
/**
|
||||
* Vault Access Token used to access your EOA
|
||||
*/
|
||||
"x-vault-access-token"?: string;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/v1/solana/sign-message";
|
||||
};
|
||||
|
||||
export type SignSolanaMessageResponses = {
|
||||
/**
|
||||
* Message signed
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
/**
|
||||
* Base58 encoded signature
|
||||
*/
|
||||
signature: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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;
|
||||
@@ -1967,6 +2488,277 @@ export type SearchActivityLogsResponses = {
|
||||
export type SearchActivityLogsResponse =
|
||||
SearchActivityLogsResponses[keyof SearchActivityLogsResponses];
|
||||
|
||||
export type GetSolanaTransactionsData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
id?: string;
|
||||
chainId?: string;
|
||||
signerAddress?: string;
|
||||
signature?: string;
|
||||
status?: "QUEUED" | "SUBMITTED" | "CONFIRMED" | "FAILED";
|
||||
sortBy?: "createdAt" | "confirmedAt";
|
||||
sortDirection?: "asc" | "desc";
|
||||
};
|
||||
url: "/v1/solana/transactions";
|
||||
};
|
||||
|
||||
export type GetSolanaTransactionsResponses = {
|
||||
/**
|
||||
* Solana Transactions
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
transactions: Array<{
|
||||
id: string;
|
||||
clientId: string;
|
||||
chainId: string;
|
||||
signerAddress: string;
|
||||
transactionParams:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
signature: string | null;
|
||||
status: string | null;
|
||||
confirmedAt: string | null;
|
||||
confirmedAtSlot: string | null;
|
||||
blockTime: number | null;
|
||||
enrichedData:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
executionParams:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
executionResult:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>
|
||||
| null;
|
||||
createdAt: string;
|
||||
errorMessage: string | null;
|
||||
cancelledAt: string | null;
|
||||
}>;
|
||||
pagination: {
|
||||
totalCount: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type GetSolanaTransactionsResponse =
|
||||
GetSolanaTransactionsResponses[keyof GetSolanaTransactionsResponses];
|
||||
|
||||
export type SearchSolanaTransactionsData = {
|
||||
body?: {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
filters?: Array<
|
||||
SolanaTransactionsFilterValue | SolanaTransactionsFilterNested
|
||||
>;
|
||||
filtersOperation?: "AND" | "OR";
|
||||
sortBy?: "createdAt" | "confirmedAt";
|
||||
sortDirection?: "asc" | "desc";
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/v1/solana/transactions/search";
|
||||
};
|
||||
|
||||
export type SearchSolanaTransactionsResponses = {
|
||||
/**
|
||||
* Solana Transactions
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
transactions: Array<{
|
||||
id: string;
|
||||
clientId: string;
|
||||
chainId: string;
|
||||
signerAddress: string;
|
||||
transactionParams:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
signature: string | null;
|
||||
status: string | null;
|
||||
confirmedAt: string | null;
|
||||
confirmedAtSlot: string | null;
|
||||
blockTime: number | null;
|
||||
enrichedData:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
executionParams:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
executionResult:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>
|
||||
| null;
|
||||
createdAt: string;
|
||||
errorMessage: string | null;
|
||||
cancelledAt: string | null;
|
||||
}>;
|
||||
pagination: {
|
||||
totalCount: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type SearchSolanaTransactionsResponse =
|
||||
SearchSolanaTransactionsResponses[keyof SearchSolanaTransactionsResponses];
|
||||
|
||||
export type GetSolanaActivityLogsData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query: {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
transactionId: string;
|
||||
eventType?: "SUCCESS" | "FAILURE" | "NACK";
|
||||
stageName?: string;
|
||||
executorName?: string;
|
||||
sortBy?: "timestamp" | "createdAt";
|
||||
sortDirection?: "asc" | "desc";
|
||||
};
|
||||
url: "/v1/solana/transactions/activity-logs";
|
||||
};
|
||||
|
||||
export type GetSolanaActivityLogsErrors = {
|
||||
/**
|
||||
* Invalid request parameters
|
||||
*/
|
||||
400: unknown;
|
||||
/**
|
||||
* Transaction not found or not accessible
|
||||
*/
|
||||
404: unknown;
|
||||
};
|
||||
|
||||
export type GetSolanaActivityLogsResponses = {
|
||||
/**
|
||||
* Solana Activity Logs
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
activityLogs: Array<{
|
||||
id: string;
|
||||
transactionId: string;
|
||||
eventType: string;
|
||||
stageName: string;
|
||||
executorName: string;
|
||||
notificationId: string;
|
||||
payload:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
timestamp: string;
|
||||
createdAt: string;
|
||||
}>;
|
||||
transaction: {
|
||||
id: string;
|
||||
clientId: string;
|
||||
};
|
||||
pagination: {
|
||||
totalCount: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type GetSolanaActivityLogsResponse =
|
||||
GetSolanaActivityLogsResponses[keyof GetSolanaActivityLogsResponses];
|
||||
|
||||
export type SearchSolanaActivityLogsData = {
|
||||
body?: {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
transactionIds?: Array<string>;
|
||||
eventType?: "SUCCESS" | "FAILURE" | "NACK";
|
||||
stageName?: string;
|
||||
executorName?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
sortBy?: "timestamp" | "createdAt";
|
||||
sortDirection?: "asc" | "desc";
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/v1/solana/transactions/activity-logs/search";
|
||||
};
|
||||
|
||||
export type SearchSolanaActivityLogsErrors = {
|
||||
/**
|
||||
* Invalid request parameters
|
||||
*/
|
||||
400: unknown;
|
||||
};
|
||||
|
||||
export type SearchSolanaActivityLogsResponses = {
|
||||
/**
|
||||
* Solana Activity Logs Search Results
|
||||
*/
|
||||
200: {
|
||||
result: {
|
||||
activityLogs: Array<{
|
||||
id: string;
|
||||
transactionId: string;
|
||||
eventType: string;
|
||||
stageName: string;
|
||||
executorName: string;
|
||||
notificationId: string;
|
||||
payload:
|
||||
| (string | number | boolean | null)
|
||||
| {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
| Array<unknown>;
|
||||
timestamp: string;
|
||||
createdAt: string;
|
||||
}>;
|
||||
pagination: {
|
||||
totalCount: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type SearchSolanaActivityLogsResponse =
|
||||
SearchSolanaActivityLogsResponses[keyof SearchSolanaActivityLogsResponses];
|
||||
|
||||
export type ClientOptions = {
|
||||
baseUrl: "https://engine.thirdweb.com" | (string & {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user