Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
881c7a96f7 | ||
|
|
ad68969559 | ||
|
|
915d955da1 | ||
|
|
7da16cff2f | ||
|
|
f0edc0f253 | ||
|
|
0a2d269782 |
@@ -7,6 +7,8 @@ const customClaimAmounts: Record<number, number> = {
|
||||
531050104: 5,
|
||||
// Arc testnet
|
||||
5042002: 1,
|
||||
// Injective testnet
|
||||
1439: 1,
|
||||
};
|
||||
|
||||
const defaultClaimAmount = 0.01;
|
||||
|
||||
@@ -44,3 +44,7 @@ The admin key is temporarily stored in dashboard when performing actions that re
|
||||
Please note, you should never share your admin key with third parties.
|
||||
</Details>
|
||||
|
||||
<Details summary="Is Vault open source?">
|
||||
Vault is not yet open source, but we plan to release it soon.
|
||||
</Details>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export default async function Layout(props: { children: React.ReactNode }) {
|
||||
|
||||
export const metadata = createMetadata({
|
||||
description:
|
||||
"Vault is an open-source non-custodial key management service, secured with TEE architecture (AWS Nitro Enclaves) and designed for blockchain applications.",
|
||||
"Vault is a non-custodial key management service secured with TEE architecture (AWS Nitro Enclaves), designed for blockchain applications.",
|
||||
title: "Vault",
|
||||
image: {
|
||||
icon: "vault",
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ArrowLeftRightIcon, UserLockIcon, UsersIcon, WalletIcon } from "lucide-
|
||||
|
||||
export const metadata = createMetadata({
|
||||
title: "thirdweb Vault",
|
||||
description: "An open-source, secure key management service for storing, managing, and protecting cryptographic keys and secrets.",
|
||||
description: "A secure key management service for storing, managing, and protecting cryptographic keys and secrets.",
|
||||
image: {
|
||||
icon: "vault",
|
||||
title: "thirdweb Vault",
|
||||
@@ -14,7 +14,7 @@ export const metadata = createMetadata({
|
||||
|
||||
# Vault
|
||||
|
||||
Vault is an open-source non-custodial key management service, secured with TEE architecture (AWS Nitro Enclaves) and designed for blockchain applications.
|
||||
Vault is a non-custodial key management service secured with TEE architecture (AWS Nitro Enclaves), designed for blockchain applications.
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# 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
|
||||
|
||||
- Updated dependencies [[`7da16cf`](https://github.com/thirdweb-dev/js/commit/7da16cff2ff3aaa80c7fe5614639d950d88b5bf2)]:
|
||||
- thirdweb@5.111.5
|
||||
- @thirdweb-dev/wagmi-adapter@0.2.180
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "wagmi-inapp",
|
||||
"private": true,
|
||||
"version": "0.0.24",
|
||||
"version": "0.0.26",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/nebula
|
||||
|
||||
## 0.2.84
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- thirdweb@5.111.6
|
||||
|
||||
## 0.2.83
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`7da16cf`](https://github.com/thirdweb-dev/js/commit/7da16cff2ff3aaa80c7fe5614639d950d88b5bf2)]:
|
||||
- thirdweb@5.111.5
|
||||
|
||||
## 0.2.82
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -57,5 +57,5 @@
|
||||
"type": "module",
|
||||
"types": "./dist/types/exports/thirdweb.d.ts",
|
||||
"typings": "./dist/types/exports/thirdweb.d.ts",
|
||||
"version": "0.2.82"
|
||||
"version": "0.2.84"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# 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
|
||||
|
||||
- [#8369](https://github.com/thirdweb-dev/js/pull/8369) [`7da16cf`](https://github.com/thirdweb-dev/js/commit/7da16cff2ff3aaa80c7fe5614639d950d88b5bf2) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Make maxAmount optional in wrapFetchWithPayment and loosen schema validation for payment payloads
|
||||
|
||||
## 5.111.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -430,5 +430,5 @@
|
||||
}
|
||||
},
|
||||
"typings": "./dist/types/exports/thirdweb.d.ts",
|
||||
"version": "5.111.4"
|
||||
"version": "5.111.6"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import type { ExactEvmPayload } from "x402/types";
|
||||
import {
|
||||
type RequestedPaymentPayload,
|
||||
RequestedPaymentPayloadSchema,
|
||||
} from "./schemas.js";
|
||||
import type { RequestedPaymentPayload } from "./schemas.js";
|
||||
|
||||
/**
|
||||
* Encodes a payment payload into a base64 string, ensuring bigint values are properly stringified
|
||||
@@ -44,8 +41,7 @@ export function decodePayment(payment: string): RequestedPaymentPayload {
|
||||
...parsed,
|
||||
payload: parsed.payload as ExactEvmPayload,
|
||||
};
|
||||
const validated = RequestedPaymentPayloadSchema.parse(obj);
|
||||
return validated;
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ export function wrapFetchWithPayment(
|
||||
fetch: typeof globalThis.fetch,
|
||||
client: ThirdwebClient,
|
||||
wallet: Wallet,
|
||||
maxValue: bigint = BigInt(1 * 10 ** 6), // Default to 1 USDC
|
||||
maxValue?: bigint,
|
||||
) {
|
||||
return async (input: RequestInfo, init?: RequestInit) => {
|
||||
const response = await fetch(input, init);
|
||||
@@ -91,7 +91,10 @@ export function wrapFetchWithPayment(
|
||||
);
|
||||
}
|
||||
|
||||
if (BigInt(selectedPaymentRequirements.maxAmountRequired) > maxValue) {
|
||||
if (
|
||||
maxValue &&
|
||||
BigInt(selectedPaymentRequirements.maxAmountRequired) > maxValue
|
||||
) {
|
||||
throw new Error(
|
||||
`Payment amount exceeds maximum allowed (currently set to ${maxValue} in base units)`,
|
||||
);
|
||||
|
||||
@@ -15,7 +15,7 @@ const FacilitatorNetworkSchema = z.string();
|
||||
|
||||
export type FacilitatorNetwork = z.infer<typeof FacilitatorNetworkSchema>;
|
||||
|
||||
export const RequestedPaymentPayloadSchema = PaymentPayloadSchema.extend({
|
||||
const RequestedPaymentPayloadSchema = PaymentPayloadSchema.extend({
|
||||
network: FacilitatorNetworkSchema,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# @thirdweb-dev/wagmi-adapter
|
||||
|
||||
## 0.2.181
|
||||
|
||||
## 0.2.180
|
||||
|
||||
## 0.2.179
|
||||
|
||||
## 0.2.178
|
||||
|
||||
@@ -56,5 +56,5 @@
|
||||
"type": "module",
|
||||
"types": "./dist/types/exports/thirdweb.d.ts",
|
||||
"typings": "./dist/types/exports/thirdweb.d.ts",
|
||||
"version": "0.2.179"
|
||||
"version": "0.2.181"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user