@pear-protocol/types 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ export declare const RequestNonceRequest: z.ZodObject<{
5
5
  export declare const EmailRegisterRequest: z.ZodObject<{
6
6
  email: z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>;
7
7
  password: z.ZodString;
8
+ accessCode: z.ZodOptional<z.ZodString>;
8
9
  }, z.core.$strip>;
9
10
  export declare const LinkEmailRequest: z.ZodObject<{
10
11
  email: z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>;
@@ -17,6 +18,7 @@ export declare const WalletLoginRequest: z.ZodObject<{
17
18
  method: z.ZodLiteral<"wallet">;
18
19
  address: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
19
20
  signature: z.ZodString;
21
+ accessCode: z.ZodOptional<z.ZodString>;
20
22
  }, z.core.$strip>;
21
23
  export declare const EmailLoginRequest: z.ZodObject<{
22
24
  method: z.ZodLiteral<"email">;
@@ -42,6 +44,7 @@ export declare const LoginRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
42
44
  method: z.ZodLiteral<"wallet">;
43
45
  address: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
44
46
  signature: z.ZodString;
47
+ accessCode: z.ZodOptional<z.ZodString>;
45
48
  }, z.core.$strip>, z.ZodObject<{
46
49
  method: z.ZodLiteral<"email">;
47
50
  email: z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>;
@@ -3,12 +3,14 @@ import { z } from 'zod';
3
3
  const EthereumAddress = z.string().regex(/^0x[a-fA-F0-9]{40}$/, "Invalid Ethereum address").transform((val) => val.toLowerCase()).describe("Ethereum wallet address (0x-prefixed, 40 hex chars, lowercase)");
4
4
  const Email = z.email("Invalid email address").transform((val) => val.toLowerCase()).describe("Email address (lowercase)");
5
5
  const Password = z.string().min(8, "Password must be at least 8 characters").max(128, "Password must be at most 128 characters").describe("Password for authentication");
6
+ const AccessCode = z.string().trim().max(64).optional().describe("Optional beta access code");
6
7
  const RequestNonceRequest = z.object({
7
8
  address: EthereumAddress
8
9
  }).describe("Request a nonce for wallet authentication");
9
10
  const EmailRegisterRequest = z.object({
10
11
  email: Email,
11
- password: Password
12
+ password: Password,
13
+ accessCode: AccessCode
12
14
  }).describe("Email registration request");
13
15
  const LinkEmailRequest = z.object({
14
16
  email: Email
@@ -20,7 +22,8 @@ const LinkWalletRequest = z.object({
20
22
  const WalletLoginRequest = z.object({
21
23
  method: z.literal("wallet").describe('Must be "wallet" for wallet authentication'),
22
24
  address: EthereumAddress,
23
- signature: z.string().min(1, "Signature is required").describe("Signature of the nonce message")
25
+ signature: z.string().min(1, "Signature is required").describe("Signature of the nonce message"),
26
+ accessCode: AccessCode
24
27
  }).describe("Wallet-based authentication using nonce signature");
25
28
  const EmailLoginRequest = z.object({
26
29
  method: z.literal("email").describe('Must be "email" for email authentication'),
package/dist/bundle.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './fill';
6
6
  export * from './funding';
7
7
  export * from './instrument';
8
8
  export * from './instrument-precision';
9
+ export * from './leverage';
9
10
  export * from './misc';
10
11
  export * from './order';
11
12
  export * from './position';
package/dist/bundle.js CHANGED
@@ -6,6 +6,7 @@ export * from './fill';
6
6
  export * from './funding';
7
7
  export * from './instrument';
8
8
  export * from './instrument-precision';
9
+ export * from './leverage';
9
10
  export * from './misc';
10
11
  export * from './order';
11
12
  export * from './position';
@@ -0,0 +1,2 @@
1
+ export * from './payloads';
2
+ export * from './response';
@@ -0,0 +1,2 @@
1
+ export * from './payloads';
2
+ export * from './response';
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const MarginMode: z.ZodEnum<{
3
+ cross: "cross";
4
+ isolated: "isolated";
5
+ }>;
6
+ export type MarginMode = z.infer<typeof MarginMode>;
7
+ export declare const SetLeverage: z.ZodObject<{
8
+ symbol: z.ZodString;
9
+ leverage: z.ZodInt;
10
+ marginMode: z.ZodOptional<z.ZodEnum<{
11
+ cross: "cross";
12
+ isolated: "isolated";
13
+ }>>;
14
+ }, z.core.$strip>;
15
+ export type SetLeverage = z.infer<typeof SetLeverage>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { InstrumentId } from '../instrument/entities';
3
+
4
+ const MarginMode = z.enum(["cross", "isolated"]);
5
+ const SetLeverage = z.object({
6
+ symbol: InstrumentId,
7
+ leverage: z.int().positive(),
8
+ marginMode: MarginMode.optional()
9
+ });
10
+
11
+ export { MarginMode, SetLeverage };
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const SetLeverageResponse: z.ZodObject<{}, z.core.$strip>;
3
+ export type SetLeverageResponse = z.infer<typeof SetLeverageResponse>;
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+
3
+ const SetLeverageResponse = z.object({});
4
+
5
+ export { SetLeverageResponse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",