starknetkit
Version:
<!-- logo --> <p align="center"> <img width='300' src="https://starknetkit-website-git-blo-1541-argentlabs.vercel.app/starknetKit-logo.svg"> </p>
185 lines (183 loc) • 6.53 kB
TypeScript
import { z } from 'zod';
export declare const connectAndSignSessionInputSchema: z.ZodObject<{
callbackData: z.ZodOptional<z.ZodString>;
approvalRequests: z.ZodArray<z.ZodObject<{
tokenAddress: z.ZodString;
amount: z.ZodString;
spender: z.ZodString;
}, "strip", z.ZodTypeAny, {
tokenAddress: string;
amount: string;
spender: string;
}, {
tokenAddress: string;
amount: string;
spender: string;
}>, "many">;
sessionTypedData: z.ZodObject<{
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
name: z.ZodString;
type: z.ZodLiteral<"merkletree">;
contains: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "merkletree";
name: string;
contains: string;
}, {
type: "merkletree";
name: string;
contains: string;
}>, z.ZodObject<{
name: z.ZodString;
type: z.ZodLiteral<"enum">;
contains: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "enum";
name: string;
contains: string;
}, {
type: "enum";
name: string;
contains: string;
}>, z.ZodObject<{
name: z.ZodString;
type: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: string;
name: string;
}, {
type: string;
name: string;
}>]>, "many">>;
primaryType: z.ZodString;
domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
message: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>;
}, "strip", z.ZodTypeAny, {
types: Record<string, ({
type: "merkletree";
name: string;
contains: string;
} | {
type: "enum";
name: string;
contains: string;
} | {
type: string;
name: string;
})[]>;
primaryType: string;
domain: Record<string, unknown>;
message: Record<string, unknown> | {};
}, {
types: Record<string, ({
type: "merkletree";
name: string;
contains: string;
} | {
type: "enum";
name: string;
contains: string;
} | {
type: string;
name: string;
})[]>;
primaryType: string;
domain: Record<string, unknown>;
message: Record<string, unknown> | {};
}>;
}, "strip", z.ZodTypeAny, {
approvalRequests: {
tokenAddress: string;
amount: string;
spender: string;
}[];
sessionTypedData: {
types: Record<string, ({
type: "merkletree";
name: string;
contains: string;
} | {
type: "enum";
name: string;
contains: string;
} | {
type: string;
name: string;
})[]>;
primaryType: string;
domain: Record<string, unknown>;
message: Record<string, unknown> | {};
};
callbackData?: string | undefined;
}, {
approvalRequests: {
tokenAddress: string;
amount: string;
spender: string;
}[];
sessionTypedData: {
types: Record<string, ({
type: "merkletree";
name: string;
contains: string;
} | {
type: "enum";
name: string;
contains: string;
} | {
type: string;
name: string;
})[]>;
primaryType: string;
domain: Record<string, unknown>;
message: Record<string, unknown> | {};
};
callbackData?: string | undefined;
}>;
export declare const connectAndSignSessionOutputSchema: z.ZodObject<{
account: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
chainId: z.ZodOptional<z.ZodString>;
signature: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
approvalTransactionHash: z.ZodOptional<z.ZodString>;
deploymentPayload: z.ZodOptional<z.ZodAny>;
approvalRequestsCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
contractAddress: z.ZodString;
entrypoint: z.ZodString;
calldata: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, z.ZodNumber, z.ZodBigInt]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, z.ZodNumber, z.ZodBigInt]>, "many">]>, "many">>;
}, "strip", z.ZodTypeAny, {
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}, {
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}>, "many">>;
errorCode: z.ZodOptional<z.ZodEnum<["USER_REJECTED", "ACCOUNT_NOT_DEPLOYED", "NOT_ENOUGH_BALANCE", "NOT_ENOUGH_BALANCE_DEPLOYMENT", "GENERIC_ERROR"]>>;
}, "strip", z.ZodTypeAny, {
chainId?: string | undefined;
signature?: string[] | undefined;
account?: string[] | undefined;
approvalTransactionHash?: string | undefined;
deploymentPayload?: any;
approvalRequestsCalls?: {
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}[] | undefined;
errorCode?: "USER_REJECTED" | "ACCOUNT_NOT_DEPLOYED" | "NOT_ENOUGH_BALANCE" | "NOT_ENOUGH_BALANCE_DEPLOYMENT" | "GENERIC_ERROR" | undefined;
}, {
chainId?: string | undefined;
signature?: string[] | undefined;
account?: string[] | undefined;
approvalTransactionHash?: string | undefined;
deploymentPayload?: any;
approvalRequestsCalls?: {
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}[] | undefined;
errorCode?: "USER_REJECTED" | "ACCOUNT_NOT_DEPLOYED" | "NOT_ENOUGH_BALANCE" | "NOT_ENOUGH_BALANCE_DEPLOYMENT" | "GENERIC_ERROR" | undefined;
}>;
export type ConnectAndSignSessionInput = z.infer<typeof connectAndSignSessionInputSchema>;
export type ConnectAndSignSessionOutput = z.infer<typeof connectAndSignSessionOutputSchema>;