@dfinity/oisy-wallet-signer
Version:
A library designed to facilitate communication between a dApp and the OISY Wallet on the Internet Computer.
249 lines (248 loc) • 8.46 kB
TypeScript
import * as z from 'zod';
declare const IcrcRequestedScopesSchema: z.ZodObject<{
scopes: z.ZodArray<z.ZodObject<{
method: z.ZodEnum<["icrc27_accounts", "icrc49_call_canister"]>;
}, "strip", z.ZodTypeAny, {
method: "icrc27_accounts" | "icrc49_call_canister";
}, {
method: "icrc27_accounts" | "icrc49_call_canister";
}>, "many">;
}, "strip", z.ZodTypeAny, {
scopes: {
method: "icrc27_accounts" | "icrc49_call_canister";
}[];
}, {
scopes: {
method: "icrc27_accounts" | "icrc49_call_canister";
}[];
}>;
export type IcrcRequestedScopes = z.infer<typeof IcrcRequestedScopesSchema>;
declare const IcrcAnyRequestedScopesSchema: z.ZodObject<{
scopes: z.ZodArray<z.ZodObject<{
method: z.ZodString;
}, "strip", z.ZodTypeAny, {
method: string;
}, {
method: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
scopes: {
method: string;
}[];
}, {
scopes: {
method: string;
}[];
}>;
export type IcrcAnyRequestedScopes = z.infer<typeof IcrcAnyRequestedScopesSchema>;
export declare const IcrcRequestAnyPermissionsRequestSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
jsonrpc: z.ZodLiteral<"2.0">;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
}, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
}>, {
method: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
}>, "method">, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
method: z.ZodLiteral<"icrc25_request_permissions">;
}>, {
params: z.ZodObject<{
scopes: z.ZodArray<z.ZodObject<{
method: z.ZodString;
}, "strip", z.ZodTypeAny, {
method: string;
}, {
method: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
scopes: {
method: string;
}[];
}, {
scopes: {
method: string;
}[];
}>;
}>, "strip", z.ZodTypeAny, {
id: string | number | null;
method: "icrc25_request_permissions";
params: {
scopes: {
method: string;
}[];
};
jsonrpc: "2.0";
}, {
id: string | number | null;
method: "icrc25_request_permissions";
params: {
scopes: {
method: string;
}[];
};
jsonrpc: "2.0";
}>;
export type IcrcRequestAnyPermissionsRequest = z.infer<typeof IcrcRequestAnyPermissionsRequestSchema>;
export declare const IcrcPermissionsRequestSchema: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
jsonrpc: z.ZodLiteral<"2.0">;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
}, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
}>, {
method: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
}>, "method" | "params">, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
method: z.ZodLiteral<"icrc25_permissions">;
}>, "strict", z.ZodTypeAny, {
id: string | number | null;
method: "icrc25_permissions";
jsonrpc: "2.0";
}, {
id: string | number | null;
method: "icrc25_permissions";
jsonrpc: "2.0";
}>;
export type IcrcPermissionsRequest = z.infer<typeof IcrcPermissionsRequestSchema>;
export declare const IcrcSupportedStandardsRequestSchema: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
jsonrpc: z.ZodLiteral<"2.0">;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
}, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
}>, {
method: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
}>, "method" | "params">, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
method: z.ZodLiteral<"icrc25_supported_standards">;
}>, "strict", z.ZodTypeAny, {
id: string | number | null;
method: "icrc25_supported_standards";
jsonrpc: "2.0";
}, {
id: string | number | null;
method: "icrc25_supported_standards";
jsonrpc: "2.0";
}>;
export type IcrcSupportedStandardsRequest = z.infer<typeof IcrcSupportedStandardsRequestSchema>;
export declare const IcrcStatusRequestSchema: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
jsonrpc: z.ZodLiteral<"2.0">;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
}, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
}>, {
method: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
}>, "method" | "params">, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
method: z.ZodLiteral<"icrc29_status">;
}>, "strict", z.ZodTypeAny, {
id: string | number | null;
method: "icrc29_status";
jsonrpc: "2.0";
}, {
id: string | number | null;
method: "icrc29_status";
jsonrpc: "2.0";
}>;
export type IcrcStatusRequest = z.infer<typeof IcrcStatusRequestSchema>;
export declare const IcrcAccountsRequestSchema: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
jsonrpc: z.ZodLiteral<"2.0">;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
}, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
}>, {
method: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
}>, "method" | "params">, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
method: z.ZodLiteral<"icrc27_accounts">;
}>, "strict", z.ZodTypeAny, {
id: string | number | null;
method: "icrc27_accounts";
jsonrpc: "2.0";
}, {
id: string | number | null;
method: "icrc27_accounts";
jsonrpc: "2.0";
}>;
export type IcrcAccountsRequest = z.infer<typeof IcrcAccountsRequestSchema>;
declare const MethodSchema: z.ZodString;
export type Method = z.infer<typeof MethodSchema>;
export declare const IcrcCallCanisterRequestParamsSchema: z.ZodObject<{
canisterId: z.ZodEffects<z.ZodString, string, string>;
sender: z.ZodEffects<z.ZodString, string, string>;
method: z.ZodString;
arg: z.ZodEffects<z.ZodString, string, string>;
nonce: z.ZodEffects<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, string | undefined, string | undefined>;
}, "strip", z.ZodTypeAny, {
method: string;
arg: string;
sender: string;
canisterId: string;
nonce?: string | undefined;
}, {
method: string;
arg: string;
sender: string;
canisterId: string;
nonce?: string | undefined;
}>;
export type IcrcCallCanisterRequestParams = z.infer<typeof IcrcCallCanisterRequestParamsSchema>;
export declare const IcrcCallCanisterRequestSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<z.objectUtil.extendShape<{
jsonrpc: z.ZodLiteral<"2.0">;
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
}, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
}>, {
method: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
}>, "method">, {
id: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>;
method: z.ZodLiteral<"icrc49_call_canister">;
}>, {
params: z.ZodObject<{
canisterId: z.ZodEffects<z.ZodString, string, string>;
sender: z.ZodEffects<z.ZodString, string, string>;
method: z.ZodString;
arg: z.ZodEffects<z.ZodString, string, string>;
nonce: z.ZodEffects<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, string | undefined, string | undefined>;
}, "strip", z.ZodTypeAny, {
method: string;
arg: string;
sender: string;
canisterId: string;
nonce?: string | undefined;
}, {
method: string;
arg: string;
sender: string;
canisterId: string;
nonce?: string | undefined;
}>;
}>, "strip", z.ZodTypeAny, {
id: string | number | null;
method: "icrc49_call_canister";
params: {
method: string;
arg: string;
sender: string;
canisterId: string;
nonce?: string | undefined;
};
jsonrpc: "2.0";
}, {
id: string | number | null;
method: "icrc49_call_canister";
params: {
method: string;
arg: string;
sender: string;
canisterId: string;
nonce?: string | undefined;
};
jsonrpc: "2.0";
}>;
export type IcrcCallCanisterRequest = z.infer<typeof IcrcCallCanisterRequestSchema>;
export {};