New:Socket for Asana Is Now Available.Learn more
Get Started

@pear-protocol/types

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pear-protocol/types - npm Package Compare versions

Comparing version
1.26.1
to
1.27.0
+13
-0
dist/execution/entities.d.ts

@@ -84,2 +84,3 @@ import { z } from 'zod';

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -136,2 +137,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -215,2 +217,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -298,2 +301,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -356,2 +360,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -414,2 +419,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -492,2 +498,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -574,2 +581,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -631,2 +639,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -689,2 +698,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -767,2 +777,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -849,2 +860,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -906,2 +918,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -908,0 +921,0 @@ updatedAt: z.ZodString;

@@ -41,2 +41,3 @@ import { z } from 'zod';

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -119,2 +120,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -201,2 +203,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -258,2 +261,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -319,2 +323,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -397,2 +402,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -479,2 +485,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -536,2 +543,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -538,0 +546,0 @@ updatedAt: z.ZodString;

+2
-0

@@ -27,2 +27,3 @@ import { z } from 'zod';

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -59,2 +60,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -61,0 +63,0 @@ updatedAt: z.ZodString;

@@ -31,2 +31,6 @@ import { z } from 'zod';

/**
* Venue-specific error code for the failure, when the venue provided one
*/
errorCode: z.string().optional(),
/**
* Created at timestamp

@@ -33,0 +37,0 @@ */

+1
-1
import { z } from 'zod';
export declare const LeaderboardRow: z.ZodObject<{
tradeAccountId: z.ZodString;
exchangeIdentifier: z.ZodString;
userId: z.ZodString;
connector: z.ZodEnum<{

@@ -6,0 +6,0 @@ hyperliquid: "hyperliquid";

@@ -5,7 +5,10 @@ import { z } from 'zod';

const LeaderboardRow = z.object({
// The row's identity. Two accounts may register the same exchange identifier, so this
// is the only field that separates their rows — and the only safe key to render by.
// The row's identity, and the only safe key to render or join by.
tradeAccountId: z.string(),
// Address for Hyperliquid/Lighter, exchange account UID for CEXes.
exchangeIdentifier: z.string(),
// The trader the account belongs to, so a consumer can group the several rows one person
// earns across venues. The board deliberately publishes no exchange identifier: a wallet
// address beside a real name and a PnL deanonymizes a trader for good, and an address is
// not reversible once scraped. Neither id here is a credential — every route that takes
// one checks ownership or role, never knowledge of the id.
userId: z.string(),
connector: Connector,

@@ -50,7 +53,6 @@ // Every fill inside the window, whatever period its position began in — so unlike the

roi: z.string().optional(),
// The trader's linked X account. Absent for an account whose owner has connected no X
// account, and absent for an anonymous caller: the board itself is public, but pairing a
// real name with a wallet address and a PnL for the open internet is a wider promise than
// the one the user accepted when connecting X. Never null-with-a-key: absence is the
// signal.
// The trader's linked X account, published to every caller — the board names its traders
// on the open internet, signed in or not. Absent for an account whose owner has connected
// no X account, and absent for one who hid the link from the board. Never null-with-a-key:
// absence is the signal.
//

@@ -57,0 +59,0 @@ // Whatever X reported at the owner's last authorization. Nothing re-reads X in between,

@@ -78,2 +78,3 @@ import { z } from 'zod';

endDate: z.ZodOptional<z.ZodPipe<z.ZodCoercedNumber<number>, z.ZodTransform<Date, number>>>;
includeUnlinkedX: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
limit: z.ZodDefault<z.ZodCoercedNumber<number>>;

@@ -80,0 +81,0 @@ }, z.core.$strip>;

@@ -74,2 +74,16 @@ import { z } from 'zod';

endDate: UnixSeconds.optional(),
// Whether an account whose owner linked no X account may hold a row. Off by default,
// because a trader who has not linked X does not qualify for the campaign the board
// feeds. Eligibility turns on linking, so admission does too: a trader who linked X
// and then withheld the handle keeps their rank and loses only their name.
// The gate is on the account, not on the viewer: it applies before the top-N cut, so
// it selects who makes the board rather than thinning the rows that came back, and
// every caller is served exactly the same board.
//
// Deliberately not `z.coerce.boolean()`, which reads the string "false" as true and
// would leave the default impossible to restore explicitly from a URL.
includeUnlinkedX: z.union([
z.boolean(),
z.stringbool()
]).optional().default(false),
limit: z.coerce.number().int().positive().max(LEADERBOARD_MAX_LIMIT).default(LEADERBOARD_MAX_LIMIT)

@@ -76,0 +90,0 @@ }).refine((data) => !data.startDate || !data.endDate || data.startDate < data.endDate, {

@@ -5,3 +5,3 @@ import { z } from 'zod';

tradeAccountId: z.ZodString;
exchangeIdentifier: z.ZodString;
userId: z.ZodString;
connector: z.ZodEnum<{

@@ -8,0 +8,0 @@ hyperliquid: "hyperliquid";

@@ -39,2 +39,3 @@ import { z } from 'zod';

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -117,2 +118,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -199,2 +201,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -256,2 +259,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -317,2 +321,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -395,2 +400,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -477,2 +483,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -534,2 +541,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -595,2 +603,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -673,2 +682,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -755,2 +765,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -812,2 +823,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -873,2 +885,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -951,2 +964,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1033,2 +1047,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1090,2 +1105,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1151,2 +1167,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1229,2 +1246,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1311,2 +1329,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1368,2 +1387,3 @@ updatedAt: z.ZodString;

error: z.ZodOptional<z.ZodString>;
errorCode: z.ZodOptional<z.ZodString>;
createdAt: z.ZodString;

@@ -1370,0 +1390,0 @@ updatedAt: z.ZodString;

@@ -22,3 +22,4 @@ import { z } from 'zod';

export type UserProfile = z.infer<typeof UserProfile>;
export declare const ReferralReferee: z.ZodObject<{
export declare const BoundReferralReferee: z.ZodObject<{
status: z.ZodLiteral<"BOUND">;
address: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;

@@ -28,2 +29,17 @@ referredAt: z.ZodOptional<z.ZodNumber>;

}, z.core.$strip>;
export declare const PendingReferralReferee: z.ZodObject<{
status: z.ZodLiteral<"PENDING">;
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
}, z.core.$strip>;
export declare const ReferralReferee: z.ZodDiscriminatedUnion<[z.ZodObject<{
status: z.ZodLiteral<"BOUND">;
address: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
referredAt: z.ZodOptional<z.ZodNumber>;
tradeCount: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
status: z.ZodLiteral<"PENDING">;
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
}, z.core.$strip>], "status">;
export type BoundReferralReferee = z.infer<typeof BoundReferralReferee>;
export type PendingReferralReferee = z.infer<typeof PendingReferralReferee>;
export type ReferralReferee = z.infer<typeof ReferralReferee>;

@@ -27,8 +27,17 @@ import { z } from 'zod';

}).describe("User profile of the authenticated user");
const ReferralReferee = z.object({
const BoundReferralReferee = z.object({
status: z.literal("BOUND").describe("The referee resolves to a V3 user with a permanent binding"),
address: EthereumAddress.optional().describe("Linked EVM wallet address when the referee has one"),
referredAt: z.number().int().nonnegative().optional().describe("V3 attribution time in epoch milliseconds; not the original legacy on-chain referral time"),
referredAt: z.number().int().nonnegative().optional().describe("V3 attribution time in epoch milliseconds; not the original legacy on-chain referral time, and absent on a historical binding without a recoverable date"),
tradeCount: z.number().int().nonnegative().describe("Distinct Pear executions with at least one real confirmed fill")
});
const PendingReferralReferee = z.object({
status: z.literal("PENDING").describe("A verified legacy referee that has no V3 identity yet"),
address: EthereumAddress.describe("The verified legacy wallet, the only fact a pending referee carries")
});
const ReferralReferee = z.discriminatedUnion("status", [
BoundReferralReferee,
PendingReferralReferee
]).describe("One referral-history entry, shaped by whether the referee is bound to a V3 user yet");
export { ReferralReferee, UserPreferences, UserProfile };
export { BoundReferralReferee, PendingReferralReferee, ReferralReferee, UserPreferences, UserProfile };

@@ -42,8 +42,13 @@ import { z } from 'zod';

count: z.ZodNumber;
referees: z.ZodArray<z.ZodObject<{
pendingCount: z.ZodNumber;
referees: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
status: z.ZodLiteral<"BOUND">;
address: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
referredAt: z.ZodOptional<z.ZodNumber>;
tradeCount: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
status: z.ZodLiteral<"PENDING">;
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
}, z.core.$strip>], "status">>;
}, z.core.$strip>;
export type ReferralRefereeListResponse = z.infer<typeof ReferralRefereeListResponse>;

@@ -20,3 +20,4 @@ import { z } from 'zod';

const ReferralRefereeListResponse = CursorResponse.extend({
count: z.number().int().nonnegative().describe("Total V3 users permanently bound to the authenticated referrer"),
count: z.number().int().nonnegative().describe("Total referees this list yields, counting bound V3 users and pending legacy wallets together"),
pendingCount: z.number().int().nonnegative().describe("Subset of count whose verified legacy wallet has no V3 identity yet, so no binding exists"),
referees: z.array(ReferralReferee)

@@ -23,0 +24,0 @@ });

{
"name": "@pear-protocol/types",
"version": "1.26.1",
"version": "1.27.0",
"description": "Pear Protocol Types definitions",

@@ -5,0 +5,0 @@ "private": false,