starknetkit
Version:
<!-- logo --> <p align="center"> <img width='300' src="https://starknetkit-website-git-blo-1541-argentlabs.vercel.app/starknetKit-logo.svg"> </p>
530 lines (528 loc) • 20 kB
TypeScript
import { CreateTRPCProxyClient } from '@trpc/client';
interface SetPopupOptions {
width?: number;
height?: number;
origin?: string;
location?: string;
atLeftBottom?: boolean;
}
export declare const setPopupOptions: ({ width, height, origin, location, atLeftBottom, }: SetPopupOptions) => void;
declare const appRouter: import('@trpc/server').CreateRouterInner<import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>, {
authorize: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: boolean;
_output_out: boolean;
}, unknown>;
connect: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: typeof import('@trpc/server').unsetMarker;
_output_out: typeof import('@trpc/server').unsetMarker;
_meta: object;
}, string>;
connectWebwallet: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: {
theme?: "light" | "dark" | "auto" | undefined;
};
_input_out: {
theme?: "light" | "dark" | "auto" | undefined;
};
_output_in: {
chainId?: string | undefined;
account?: string[] | undefined;
};
_output_out: {
chainId?: string | undefined;
account?: string[] | undefined;
};
}, unknown>;
connectWebwalletSSO: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: {
token: string;
authorizedPartyId?: string | undefined;
};
_input_out: {
token: string;
authorizedPartyId?: string | undefined;
};
_output_in: {
chainId?: string | undefined;
account?: string[] | undefined;
};
_output_out: {
chainId?: string | undefined;
account?: string[] | undefined;
};
}, unknown>;
connectAndSignSession: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: {
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;
};
_input_out: {
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;
};
_output_in: {
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;
};
_output_out: {
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;
};
}, unknown>;
enable: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: string;
_output_out: string;
}, unknown>;
execute: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: [{
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
} | [{
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}, ...{
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}[]], {
nonce?: string | number | bigint | undefined;
version?: string | number | bigint | undefined;
maxFee?: string | number | bigint | undefined;
} | undefined];
_input_out: [{
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
} | [{
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}, ...{
contractAddress: string;
entrypoint: string;
calldata?: (string | number | bigint | (string | number | bigint)[])[] | undefined;
}[]], {
nonce?: string | number | bigint | undefined;
version?: string | number | bigint | undefined;
maxFee?: string | number | bigint | undefined;
} | undefined];
_output_in: string;
_output_out: string;
}, unknown>;
signMessage: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: [{
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> | {};
}];
_input_out: [{
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> | {};
}];
_output_in: string[];
_output_out: string[];
}, unknown>;
getLoginStatus: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: {
isLoggedIn: boolean;
hasSession?: boolean | undefined;
isPreauthorized?: boolean | undefined;
};
_output_out: {
isLoggedIn: boolean;
hasSession?: boolean | undefined;
isPreauthorized?: boolean | undefined;
};
}, unknown>;
requestAccounts: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: {
silent_mode?: boolean | undefined;
};
_input_out: {
silent_mode?: boolean | undefined;
};
_output_in: string[];
_output_out: string[];
}, unknown>;
requestChainId: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: string;
_output_out: string;
}, unknown>;
signTypedData: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: [{
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> | {};
}];
_input_out: [{
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> | {};
}];
_output_in: string[];
_output_out: string[];
}, unknown>;
getPermissions: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: "accounts"[];
_output_out: "accounts"[];
}, unknown>;
addInvokeTransaction: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: {
contract_address: string;
entry_point: string;
calldata?: (string | number | bigint)[] | undefined;
} | [{
contract_address: string;
entry_point: string;
calldata?: (string | number | bigint)[] | undefined;
}, ...{
contract_address: string;
entry_point: string;
calldata?: (string | number | bigint)[] | undefined;
}[]];
_input_out: {
contractAddress: string;
entrypoint: string;
calldata: (string | number | bigint)[];
} | [{
contractAddress: string;
entrypoint: string;
calldata: (string | number | bigint)[];
}, ...{
contractAddress: string;
entrypoint: string;
calldata: (string | number | bigint)[];
}[]];
_output_in: string;
_output_out: string;
}, unknown>;
addStarknetChain: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: typeof import('@trpc/server').unsetMarker;
_output_out: typeof import('@trpc/server').unsetMarker;
_meta: object;
}, never>;
switchStarknetChain: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: typeof import('@trpc/server').unsetMarker;
_output_out: typeof import('@trpc/server').unsetMarker;
_meta: object;
}, never>;
watchAsset: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: typeof import('@trpc/server').unsetMarker;
_output_out: typeof import('@trpc/server').unsetMarker;
_meta: object;
}, never>;
updateModal: import('@trpc/server').BuildProcedure<"subscription", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: typeof import('@trpc/server').unsetMarker;
_output_out: typeof import('@trpc/server').unsetMarker;
_meta: object;
}, void>;
deploymentData: import('@trpc/server').BuildProcedure<"mutation", {
_config: import('@trpc/server').RootConfig<{
ctx: object;
meta: object;
errorShape: import('@trpc/server').DefaultErrorShape;
transformer: import('@trpc/server').DefaultDataTransformer;
}>;
_meta: object;
_ctx_out: object;
_input_in: typeof import('@trpc/server').unsetMarker;
_input_out: typeof import('@trpc/server').unsetMarker;
_output_in: {
class_hash: string;
version: 0 | 1;
salt: string;
calldata: string[];
address: string;
sigdata?: string[] | undefined;
};
_output_out: {
class_hash: string;
version: 0 | 1;
salt: string;
calldata: string[];
address: string;
sigdata?: string[] | undefined;
};
}, unknown>;
}>;
export type AppRouter = typeof appRouter;
type TRPCProxyClientOptions = {
iframe?: Window;
};
export declare const trpcProxyClient: ({ iframe, }: TRPCProxyClientOptions) => CreateTRPCProxyClient<AppRouter>;
export {};