@bit-gpt/h402
Version:
BitGPT's 402 open protocol for blockchain-native payments
209 lines • 5.95 kB
TypeScript
import { z } from "zod";
declare const EvmAuthorizationParametersSchema: z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
value: z.ZodBigInt;
validAfter: z.ZodBigInt;
validBefore: z.ZodBigInt;
nonce: z.ZodString;
version: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
}, {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
}>;
export type EvmAuthorizationParameters = z.infer<typeof EvmAuthorizationParametersSchema>;
declare const EvmSignAndSendTransactionParametersSchema: z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
value: z.ZodBigInt;
data: z.ZodString;
nonce: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: bigint;
from: string;
to: string;
nonce: string;
data: string;
}, {
value: bigint;
from: string;
to: string;
nonce: string;
data: string;
}>;
export type EvmSignAndSendTransactionParameters = z.infer<typeof EvmSignAndSendTransactionParametersSchema>;
declare const EvmAuthorizationPayloadSchema: z.ZodObject<{
type: z.ZodLiteral<"authorization">;
signature: z.ZodString;
authorization: z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
value: z.ZodBigInt;
validAfter: z.ZodBigInt;
validBefore: z.ZodBigInt;
nonce: z.ZodString;
version: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
}, {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "authorization";
signature: string;
authorization: {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
};
}, {
type: "authorization";
signature: string;
authorization: {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
};
}>;
export type EvmAuthorizationPayload = z.infer<typeof EvmAuthorizationPayloadSchema>;
declare const EvmSignAndSendTransactionPayloadSchema: z.ZodObject<{
type: z.ZodLiteral<"signAndSendTransaction">;
signedMessage: z.ZodString;
transactionHash: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "signAndSendTransaction";
transactionHash: string;
signedMessage: string;
}, {
type: "signAndSendTransaction";
transactionHash: string;
signedMessage: string;
}>;
export type EvmSignAndSendTransactionPayload = z.infer<typeof EvmSignAndSendTransactionPayloadSchema>;
declare const EvmSignedTransactionPayloadSchema: z.ZodObject<{
type: z.ZodLiteral<"signedTransaction">;
signedTransaction: z.ZodString;
signedMessage: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "signedTransaction";
signedTransaction: string;
signedMessage?: string | undefined;
}, {
type: "signedTransaction";
signedTransaction: string;
signedMessage?: string | undefined;
}>;
export type EvmSignedTransactionPayload = z.infer<typeof EvmSignedTransactionPayloadSchema>;
export declare const ExactEvmPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"authorization">;
signature: z.ZodString;
authorization: z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
value: z.ZodBigInt;
validAfter: z.ZodBigInt;
validBefore: z.ZodBigInt;
nonce: z.ZodString;
version: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
}, {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "authorization";
signature: string;
authorization: {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
};
}, {
type: "authorization";
signature: string;
authorization: {
value: bigint;
from: string;
to: string;
validAfter: bigint;
validBefore: bigint;
nonce: string;
version: string;
};
}>, z.ZodObject<{
type: z.ZodLiteral<"signAndSendTransaction">;
signedMessage: z.ZodString;
transactionHash: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "signAndSendTransaction";
transactionHash: string;
signedMessage: string;
}, {
type: "signAndSendTransaction";
transactionHash: string;
signedMessage: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"signedTransaction">;
signedTransaction: z.ZodString;
signedMessage: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "signedTransaction";
signedTransaction: string;
signedMessage?: string | undefined;
}, {
type: "signedTransaction";
signedTransaction: string;
signedMessage?: string | undefined;
}>]>;
export type ExactEvmPayload = z.infer<typeof ExactEvmPayloadSchema>;
export { EvmAuthorizationPayloadSchema, EvmSignAndSendTransactionPayloadSchema, EvmSignedTransactionPayloadSchema, EvmAuthorizationParametersSchema, EvmSignAndSendTransactionParametersSchema, };
//# sourceMappingURL=evmPayload.d.ts.map