@polyester/sdk 0.4.1 → 0.4.2
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.
- package/CHANGELOG.md +10 -0
- package/dist/core-client.d.ts +9 -0
- package/dist/core-client.d.ts.map +1 -1
- package/dist/core-client.js +21 -0
- package/dist/core-client.js.map +1 -1
- package/dist/gen/fees/v1/fees_pb.d.ts +124 -0
- package/dist/gen/fees/v1/fees_pb.d.ts.map +1 -0
- package/dist/gen/fees/v1/fees_pb.js +39 -0
- package/dist/gen/fees/v1/fees_pb.js.map +1 -0
- package/dist/gen/index.d.ts +4 -1
- package/dist/gen/index.js +4 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +223 -0
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts.map +1 -0
- package/dist/gen/ratelimit/v1/ratelimit_pb.js +86 -0
- package/dist/gen/ratelimit/v1/ratelimit_pb.js.map +1 -0
- package/dist/gen/vip/v1/vip_pb.d.ts +277 -0
- package/dist/gen/vip/v1/vip_pb.d.ts.map +1 -0
- package/dist/gen/vip/v1/vip_pb.js +60 -0
- package/dist/gen/vip/v1/vip_pb.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/services/fees/fees.d.ts +19 -0
- package/dist/services/fees/fees.d.ts.map +1 -0
- package/dist/services/fees/fees.js +32 -0
- package/dist/services/fees/fees.js.map +1 -0
- package/dist/services/fees/fees.schemas.d.ts +28 -0
- package/dist/services/fees/fees.schemas.d.ts.map +1 -0
- package/dist/services/fees/fees.schemas.js +25 -0
- package/dist/services/fees/fees.schemas.js.map +1 -0
- package/dist/services/fees/fees.types.d.ts +2 -0
- package/dist/services/fees/index.d.ts +3 -0
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +14 -14
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/rate-limits/index.d.ts +4 -0
- package/dist/services/rate-limits/rate-limits.codecs.d.ts +6 -0
- package/dist/services/rate-limits/rate-limits.codecs.d.ts.map +1 -0
- package/dist/services/rate-limits/rate-limits.codecs.js +11 -0
- package/dist/services/rate-limits/rate-limits.codecs.js.map +1 -0
- package/dist/services/rate-limits/rate-limits.d.ts +24 -0
- package/dist/services/rate-limits/rate-limits.d.ts.map +1 -0
- package/dist/services/rate-limits/rate-limits.js +40 -0
- package/dist/services/rate-limits/rate-limits.js.map +1 -0
- package/dist/services/rate-limits/rate-limits.schemas.d.ts +58 -0
- package/dist/services/rate-limits/rate-limits.schemas.d.ts.map +1 -0
- package/dist/services/rate-limits/rate-limits.schemas.js +30 -0
- package/dist/services/rate-limits/rate-limits.schemas.js.map +1 -0
- package/dist/services/rate-limits/rate-limits.types.d.ts +3 -0
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +5 -5
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +13 -13
- package/dist/services/vip/index.d.ts +3 -0
- package/dist/services/vip/vip.d.ts +22 -0
- package/dist/services/vip/vip.d.ts.map +1 -0
- package/dist/services/vip/vip.js +35 -0
- package/dist/services/vip/vip.js.map +1 -0
- package/dist/services/vip/vip.schemas.d.ts +90 -0
- package/dist/services/vip/vip.schemas.d.ts.map +1 -0
- package/dist/services/vip/vip.schemas.js +47 -0
- package/dist/services/vip/vip.schemas.js.map +1 -0
- package/dist/services/vip/vip.types.d.ts +2 -0
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +6 -0
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { parse } from "../../shared/validation.js";
|
|
2
|
+
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
|
+
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
|
+
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
5
|
+
import { RateLimitService as RateLimitService$1 } from "../../gen/ratelimit/v1/ratelimit_pb.js";
|
|
6
|
+
import { GetTradingRateLimitsInputSchema, RateLimitConfigSchema, TradingRateLimitsSchema } from "./rate-limits.schemas.js";
|
|
7
|
+
import { createClient } from "@connectrpc/connect";
|
|
8
|
+
//#region src/services/rate-limits/rate-limits.ts
|
|
9
|
+
/**
|
|
10
|
+
* Reads public trading quota catalogs and authenticated effective trading limits.
|
|
11
|
+
*/
|
|
12
|
+
var RateLimitService = class {
|
|
13
|
+
#publicClient;
|
|
14
|
+
#authClient;
|
|
15
|
+
#resolver;
|
|
16
|
+
constructor(transports, resolver) {
|
|
17
|
+
this.#publicClient = createClient(RateLimitService$1, transports.publicApi);
|
|
18
|
+
this.#authClient = createClient(RateLimitService$1, transports.authApi);
|
|
19
|
+
this.#resolver = resolver;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns the complete active placement and cancellation quota catalog for VIP0+.
|
|
23
|
+
*/
|
|
24
|
+
async getConfig(options) {
|
|
25
|
+
const res = await this.#publicClient.getRateLimitConfig({}, toConnectCallOptions(options));
|
|
26
|
+
return parse(RateLimitConfigSchema, res);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns the effective placement and cancellation limits for the resolved account target, including API-key-scoped rules when the caller authenticated with an API key.
|
|
30
|
+
*/
|
|
31
|
+
async getTradingLimits(input = {}, options) {
|
|
32
|
+
const resolvedInput = resolveAccountScopedInput(input, this.#resolver);
|
|
33
|
+
const res = await this.#authClient.getTradingRateLimits(removeUndefined(parse(GetTradingRateLimitsInputSchema, resolvedInput)), toConnectCallOptions(options));
|
|
34
|
+
return parse(TradingRateLimitsSchema, res);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { RateLimitService };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=rate-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limits.js","names":["#publicClient","Proto.RateLimitService","#authClient","#resolver"],"sources":["../../../src/services/rate-limits/rate-limits.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/ratelimit/v1/ratelimit_pb.js\";\nimport type { AccountScopedInput } from \"../../shared/account-scope.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { Transports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport {\n GetTradingRateLimitsInputSchema,\n RateLimitConfigSchema,\n TradingRateLimitsSchema,\n type RateLimitConfig,\n type TradingRateLimits,\n} from \"./rate-limits.schemas.js\";\n\n/**\n * Reads public trading quota catalogs and authenticated effective trading limits.\n */\nexport class RateLimitService {\n #publicClient: Client<typeof Proto.RateLimitService>;\n #authClient: Client<typeof Proto.RateLimitService>;\n #resolver?: SubaccountResolver;\n\n constructor(transports: Transports, resolver?: SubaccountResolver) {\n this.#publicClient = createClient(Proto.RateLimitService, transports.publicApi);\n this.#authClient = createClient(Proto.RateLimitService, transports.authApi);\n this.#resolver = resolver;\n }\n\n /**\n * Returns the complete active placement and cancellation quota catalog for VIP0+.\n */\n async getConfig(options?: PolyesterRequestOptions): Promise<RateLimitConfig> {\n const res = await this.#publicClient.getRateLimitConfig({}, toConnectCallOptions(options));\n return parse(RateLimitConfigSchema, res);\n }\n\n /**\n * Returns the effective placement and cancellation limits for the resolved account target, including API-key-scoped rules when the caller authenticated with an API key.\n */\n async getTradingLimits(\n input: AccountScopedInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<TradingRateLimits> {\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const res = await this.#authClient.getTradingRateLimits(\n removeUndefined(parse(GetTradingRateLimitsInputSchema, resolvedInput)),\n toConnectCallOptions(options),\n );\n return parse(TradingRateLimitsSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;;;AAsBA,IAAa,mBAAb,MAA8B;CAC1B;CACA;CACA;CAEA,YAAY,YAAwB,UAA+B;EAC/D,KAAKA,gBAAgB,aAAaC,oBAAwB,WAAW,SAAS;EAC9E,KAAKC,cAAc,aAAaD,oBAAwB,WAAW,OAAO;EAC1E,KAAKE,YAAY;CACrB;;;;CAKA,MAAM,UAAU,SAA6D;EACzE,MAAM,MAAM,MAAM,KAAKH,cAAc,mBAAmB,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACzF,OAAO,MAAM,uBAAuB,GAAG;CAC3C;;;;CAKA,MAAM,iBACF,QAA4B,CAAC,GAC7B,SAC0B;EAC1B,MAAM,gBAAgB,0BAA0B,OAAO,KAAKG,SAAS;EACrE,MAAM,MAAM,MAAM,KAAKD,YAAY,qBAC/B,gBAAgB,MAAM,iCAAiC,aAAa,CAAC,GACrE,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,yBAAyB,GAAG;CAC7C;AACJ"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TradingRateLimitClass } from "../../gen/ratelimit/v1/ratelimit_pb.js";
|
|
2
|
+
import { TradingRateLimitClass as TradingRateLimitClass$1 } from "./rate-limits.codecs.js";
|
|
3
|
+
import * as v from "valibot";
|
|
4
|
+
//#region src/services/rate-limits/rate-limits.schemas.d.ts
|
|
5
|
+
declare const TradingRateLimitRuleSchema: v.ObjectSchema<{
|
|
6
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TradingRateLimitClass, undefined>, v.TransformAction<TradingRateLimitClass, TradingRateLimitClass$1>]>;
|
|
7
|
+
readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
8
|
+
readonly quotaWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
9
|
+
readonly periodMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
10
|
+
readonly burstWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
type TradingRateLimitRule = v.InferOutput<typeof TradingRateLimitRuleSchema>;
|
|
13
|
+
declare const RateLimitConfigSchema: v.ObjectSchema<{
|
|
14
|
+
readonly policyVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
15
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
16
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
17
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
18
|
+
}, undefined>, v.TransformAction<{
|
|
19
|
+
seconds: bigint;
|
|
20
|
+
nanos: number;
|
|
21
|
+
}, number>]>;
|
|
22
|
+
readonly rules: v.ArraySchema<v.ObjectSchema<{
|
|
23
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TradingRateLimitClass, undefined>, v.TransformAction<TradingRateLimitClass, TradingRateLimitClass$1>]>;
|
|
24
|
+
readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
25
|
+
readonly quotaWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
26
|
+
readonly periodMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
27
|
+
readonly burstWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
28
|
+
}, undefined>, undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
type RateLimitConfig = v.InferOutput<typeof RateLimitConfigSchema>;
|
|
31
|
+
declare const TradingRateLimitsSchema: v.ObjectSchema<{
|
|
32
|
+
readonly apiKeyRules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
33
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TradingRateLimitClass, undefined>, v.TransformAction<TradingRateLimitClass, TradingRateLimitClass$1>]>;
|
|
34
|
+
readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
35
|
+
readonly quotaWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
36
|
+
readonly periodMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
37
|
+
readonly burstWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
38
|
+
}, undefined>, undefined>, readonly []>;
|
|
39
|
+
readonly policyVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
40
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
41
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
42
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
43
|
+
}, undefined>, v.TransformAction<{
|
|
44
|
+
seconds: bigint;
|
|
45
|
+
nanos: number;
|
|
46
|
+
}, number>]>;
|
|
47
|
+
readonly rules: v.ArraySchema<v.ObjectSchema<{
|
|
48
|
+
readonly policyClass: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TradingRateLimitClass, undefined>, v.TransformAction<TradingRateLimitClass, TradingRateLimitClass$1>]>;
|
|
49
|
+
readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
50
|
+
readonly quotaWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
51
|
+
readonly periodMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
52
|
+
readonly burstWeight: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
53
|
+
}, undefined>, undefined>;
|
|
54
|
+
}, undefined>;
|
|
55
|
+
type TradingRateLimits = v.InferOutput<typeof TradingRateLimitsSchema>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { RateLimitConfig, RateLimitConfigSchema, type TradingRateLimitClass$1 as TradingRateLimitClass, TradingRateLimitRule, TradingRateLimitRuleSchema, TradingRateLimits, TradingRateLimitsSchema };
|
|
58
|
+
//# sourceMappingURL=rate-limits.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limits.schemas.d.ts","names":[],"sources":["../../../src/services/rate-limits/rate-limits.schemas.ts"],"mappings":";;;;cA0Ba,4BAA0B,EAAA;;;;;;;KAQ3B,uBAAuB,EAAE,mBAAmB;cAE3C,uBAAqB,EAAA;;;;;;;;;;;;;;;;;KAMtB,kBAAkB,EAAE,mBAAmB;cAWtC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;KAKxB,oBAAoB,EAAE,mBAAmB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
2
|
+
import { BigIntStringSchema, TimestampMsSchema } from "../../shared/schemas.js";
|
|
3
|
+
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
4
|
+
import { VipTierNumberSchema } from "../vip/vip.schemas.js";
|
|
5
|
+
import { TradingRateLimitClass } from "../../gen/ratelimit/v1/ratelimit_pb.js";
|
|
6
|
+
import { TradingRateLimitClassCodec } from "./rate-limits.codecs.js";
|
|
7
|
+
import * as v from "valibot";
|
|
8
|
+
//#region src/services/rate-limits/rate-limits.schemas.ts
|
|
9
|
+
const TradingRateLimitClassOutputSchema = v.pipe(v.enum(TradingRateLimitClass), v.transform((value) => requiredEnumLabel(TradingRateLimitClassCodec.protoToOutput, value, "TradingRateLimitRuleSchema", "policyClass")));
|
|
10
|
+
const TradingRateLimitRuleSchema = v.object({
|
|
11
|
+
policyClass: TradingRateLimitClassOutputSchema,
|
|
12
|
+
tier: VipTierNumberSchema,
|
|
13
|
+
quotaWeight: BigIntStringSchema,
|
|
14
|
+
periodMs: BigIntStringSchema,
|
|
15
|
+
burstWeight: BigIntStringSchema
|
|
16
|
+
});
|
|
17
|
+
const RateLimitConfigSchema = v.object({
|
|
18
|
+
policyVersion: BigIntStringSchema,
|
|
19
|
+
effectiveFrom: TimestampMsSchema,
|
|
20
|
+
rules: v.array(TradingRateLimitRuleSchema)
|
|
21
|
+
});
|
|
22
|
+
const GetTradingRateLimitsInputSchema = v.pipe(v.strictObject({ ...AccountScopeInputEntries }), v.transform(({ account }) => ({ subaccountId: accountScopeToSubaccountId(account) })));
|
|
23
|
+
const TradingRateLimitsSchema = v.object({
|
|
24
|
+
...RateLimitConfigSchema.entries,
|
|
25
|
+
apiKeyRules: v.optional(v.array(TradingRateLimitRuleSchema), [])
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { GetTradingRateLimitsInputSchema, RateLimitConfigSchema, TradingRateLimitRuleSchema, TradingRateLimitsSchema };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=rate-limits.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limits.schemas.js","names":["Proto.TradingRateLimitClass"],"sources":["../../../src/services/rate-limits/rate-limits.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport * as Proto from \"../../gen/ratelimit/v1/ratelimit_pb.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { BigIntStringSchema, TimestampMsSchema } from \"../../shared/schemas.js\";\nimport { VipTierNumberSchema } from \"../vip/vip.schemas.js\";\nimport { TradingRateLimitClassCodec, type TradingRateLimitClass } from \"./rate-limits.codecs.js\";\n\nexport type { TradingRateLimitClass } from \"./rate-limits.codecs.js\";\n\nconst TradingRateLimitClassOutputSchema = v.pipe(\n v.enum(Proto.TradingRateLimitClass),\n v.transform(\n (value): TradingRateLimitClass =>\n requiredEnumLabel(\n TradingRateLimitClassCodec.protoToOutput,\n value,\n \"TradingRateLimitRuleSchema\",\n \"policyClass\",\n ),\n ),\n);\n\nexport const TradingRateLimitRuleSchema = v.object({\n policyClass: TradingRateLimitClassOutputSchema,\n tier: VipTierNumberSchema,\n quotaWeight: BigIntStringSchema,\n periodMs: BigIntStringSchema,\n burstWeight: BigIntStringSchema,\n});\n\nexport type TradingRateLimitRule = v.InferOutput<typeof TradingRateLimitRuleSchema>;\n\nexport const RateLimitConfigSchema = v.object({\n policyVersion: BigIntStringSchema,\n effectiveFrom: TimestampMsSchema,\n rules: v.array(TradingRateLimitRuleSchema),\n});\n\nexport type RateLimitConfig = v.InferOutput<typeof RateLimitConfigSchema>;\n\nexport const GetTradingRateLimitsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n }),\n v.transform(({ account }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport const TradingRateLimitsSchema = v.object({\n ...RateLimitConfigSchema.entries,\n apiKeyRules: v.optional(v.array(TradingRateLimitRuleSchema), []),\n});\n\nexport type TradingRateLimits = v.InferOutput<typeof TradingRateLimitsSchema>;\n"],"mappings":";;;;;;;;AAaA,MAAM,oCAAoC,EAAE,KACxC,EAAE,KAAKA,qBAA2B,GAClC,EAAE,WACG,UACG,kBACI,2BAA2B,eAC3B,OACA,8BACA,aACJ,CACR,CACJ;AAEA,MAAa,6BAA6B,EAAE,OAAO;CAC/C,aAAa;CACb,MAAM;CACN,aAAa;CACb,UAAU;CACV,aAAa;AACjB,CAAC;AAID,MAAa,wBAAwB,EAAE,OAAO;CAC1C,eAAe;CACf,eAAe;CACf,OAAO,EAAE,MAAM,0BAA0B;AAC7C,CAAC;AAID,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa,EACX,GAAG,yBACP,CAAC,GACD,EAAE,WAAW,EAAE,eAAe,EAC1B,cAAc,2BAA2B,OAAO,EACpD,EAAE,CACN;AAEA,MAAa,0BAA0B,EAAE,OAAO;CAC5C,GAAG,sBAAsB;CACzB,aAAa,EAAE,SAAS,EAAE,MAAM,0BAA0B,GAAG,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -176,7 +176,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
176
176
|
readonly granteeAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
177
177
|
readonly inviterAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
178
178
|
readonly role: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountRole$1, undefined>, v.TransformAction<SubaccountRole$1, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
179
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountInviteStatus$1, undefined>, v.TransformAction<SubaccountInviteStatus$1, "unspecified" | "pending" | "
|
|
179
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountInviteStatus$1, undefined>, v.TransformAction<SubaccountInviteStatus$1, "unspecified" | "pending" | "cancelled" | "accepted" | "declined">]>;
|
|
180
180
|
readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
181
181
|
readonly seconds: v.BigintSchema<undefined>;
|
|
182
182
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -203,7 +203,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
203
203
|
granteeAccountId: string;
|
|
204
204
|
inviterAccountId: string;
|
|
205
205
|
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
206
|
-
status: "unspecified" | "pending" | "
|
|
206
|
+
status: "unspecified" | "pending" | "cancelled" | "accepted" | "declined";
|
|
207
207
|
createdAt?: number | undefined;
|
|
208
208
|
respondedAt?: number | undefined;
|
|
209
209
|
granteeUsername: string;
|
|
@@ -221,7 +221,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
221
221
|
granteeAccountId: string;
|
|
222
222
|
inviterAccountId: string;
|
|
223
223
|
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
224
|
-
status: "unspecified" | "pending" | "
|
|
224
|
+
status: "unspecified" | "pending" | "cancelled" | "accepted" | "declined";
|
|
225
225
|
createdAt?: number | undefined;
|
|
226
226
|
respondedAt?: number | undefined;
|
|
227
227
|
granteeUsername: string;
|
|
@@ -243,8 +243,8 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
243
243
|
seconds: bigint;
|
|
244
244
|
nanos: number;
|
|
245
245
|
} | undefined, number | undefined>]>;
|
|
246
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "
|
|
247
|
-
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "unspecified" | "enabled" | "disabled" | "deleted" | "created" | "updated" | "removed" | "role_set" | "received" | "replied" | "
|
|
246
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "policy" | "member" | "invite" | "security">]>;
|
|
247
|
+
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "unspecified" | "enabled" | "disabled" | "failed" | "deleted" | "created" | "updated" | "removed" | "role_set" | "received" | "replied" | "revoked" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
248
248
|
readonly source: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventSource, undefined>, v.TransformAction<ActivityEventSource, "unspecified" | "web" | "mobile" | "api">]>;
|
|
249
249
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
250
250
|
readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -787,7 +787,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
|
|
|
787
787
|
declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
788
788
|
readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
|
|
789
789
|
readonly symbol: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
|
|
790
|
-
readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("
|
|
790
|
+
readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
|
|
791
791
|
readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop" | undefined, TriggerType>]>;
|
|
792
792
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
|
|
793
793
|
readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
|
|
@@ -31,62 +31,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
31
31
|
type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
|
|
32
32
|
declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
33
33
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
34
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
34
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
|
|
35
35
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
36
36
|
}, undefined>, v.TransformAction<{
|
|
37
37
|
triggerId: string;
|
|
38
|
-
status: "unspecified" | "
|
|
38
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
39
39
|
tsNs: bigint;
|
|
40
40
|
}, {
|
|
41
41
|
ts: number;
|
|
42
42
|
tsNs: string;
|
|
43
43
|
triggerId: string;
|
|
44
|
-
status: "unspecified" | "
|
|
44
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
45
45
|
}>]>;
|
|
46
46
|
type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
|
|
47
47
|
declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
48
48
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
49
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
49
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
|
|
50
50
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
51
51
|
}, undefined>, v.TransformAction<{
|
|
52
52
|
triggerId: string;
|
|
53
|
-
status: "unspecified" | "
|
|
53
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
54
54
|
tsNs: bigint;
|
|
55
55
|
}, {
|
|
56
56
|
ts: number;
|
|
57
57
|
tsNs: string;
|
|
58
58
|
triggerId: string;
|
|
59
|
-
status: "unspecified" | "
|
|
59
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
60
60
|
}>]>;
|
|
61
61
|
type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
|
|
62
62
|
declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
63
63
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
64
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
64
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
|
|
65
65
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
66
66
|
}, undefined>, v.TransformAction<{
|
|
67
67
|
triggerId: string;
|
|
68
|
-
status: "unspecified" | "
|
|
68
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
69
69
|
tsNs: bigint;
|
|
70
70
|
}, {
|
|
71
71
|
ts: number;
|
|
72
72
|
tsNs: string;
|
|
73
73
|
triggerId: string;
|
|
74
|
-
status: "unspecified" | "
|
|
74
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
75
75
|
}>]>;
|
|
76
76
|
type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
|
|
77
77
|
declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
78
78
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
79
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
79
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
|
|
80
80
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
81
81
|
}, undefined>, v.TransformAction<{
|
|
82
82
|
triggerId: string;
|
|
83
|
-
status: "unspecified" | "
|
|
83
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
84
84
|
tsNs: bigint;
|
|
85
85
|
}, {
|
|
86
86
|
ts: number;
|
|
87
87
|
tsNs: string;
|
|
88
88
|
triggerId: string;
|
|
89
|
-
status: "unspecified" | "
|
|
89
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
90
90
|
}>]>;
|
|
91
91
|
type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
|
|
92
92
|
type StopDetailsOutput = {
|
|
@@ -507,7 +507,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
507
507
|
subaccountId: string;
|
|
508
508
|
symbolId: number;
|
|
509
509
|
symbol: string;
|
|
510
|
-
status: "unspecified" | "
|
|
510
|
+
status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
|
|
511
511
|
parentOrderId: string | undefined;
|
|
512
512
|
qty: string;
|
|
513
513
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NextVipTierThresholds, NextVipTierThresholdsSchema, VipStatus, VipStatusSchema, VipTier, VipTierCatalog, VipTierCatalogSchema, VipTierSchema } from "./vip.schemas.js";
|
|
2
|
+
import { VipService } from "./vip.js";
|
|
3
|
+
export { NextVipTierThresholds, NextVipTierThresholdsSchema, VipService, VipStatus, VipStatusSchema, VipTier, VipTierCatalog, VipTierCatalogSchema, VipTierSchema };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Transports } from "../../shared/transports.js";
|
|
2
|
+
import { PolyesterRequestOptions } from "../../shared/request-options.js";
|
|
3
|
+
import { VipStatus, VipTierCatalog } from "./vip.schemas.js";
|
|
4
|
+
//#region src/services/vip/vip.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Reads public VIP policy catalogs and authenticated caller-root VIP status.
|
|
7
|
+
*/
|
|
8
|
+
declare class VipService {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(transports: Transports);
|
|
11
|
+
/**
|
|
12
|
+
* Returns the complete active VIP0+ tier catalog, including policy version, effective time, retention threshold, and per-tier volume/AOP thresholds and fee rates.
|
|
13
|
+
*/
|
|
14
|
+
listTiers(options?: PolyesterRequestOptions): Promise<VipTierCatalog>;
|
|
15
|
+
/**
|
|
16
|
+
* Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds.
|
|
17
|
+
*/
|
|
18
|
+
getStatus(options?: PolyesterRequestOptions): Promise<VipStatus>;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { VipService };
|
|
22
|
+
//# sourceMappingURL=vip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vip.d.ts","names":[],"sources":["../../../src/services/vip/vip.ts"],"mappings":";;;;;;;cAkBa;;EAIG,YAAA,YAAY;;;;EAQlB,UAAU,UAAU,0BAA0B,QAAQ;;;;EAQtD,UAAU,UAAU,0BAA0B,QAAQ"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { parse } from "../../shared/validation.js";
|
|
2
|
+
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
|
+
import { VIPService } from "../../gen/vip/v1/vip_pb.js";
|
|
4
|
+
import { VipStatusSchema, VipTierCatalogSchema } from "./vip.schemas.js";
|
|
5
|
+
import { createClient } from "@connectrpc/connect";
|
|
6
|
+
//#region src/services/vip/vip.ts
|
|
7
|
+
/**
|
|
8
|
+
* Reads public VIP policy catalogs and authenticated caller-root VIP status.
|
|
9
|
+
*/
|
|
10
|
+
var VipService = class {
|
|
11
|
+
#publicClient;
|
|
12
|
+
#authClient;
|
|
13
|
+
constructor(transports) {
|
|
14
|
+
this.#publicClient = createClient(VIPService, transports.publicApi);
|
|
15
|
+
this.#authClient = createClient(VIPService, transports.authApi);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Returns the complete active VIP0+ tier catalog, including policy version, effective time, retention threshold, and per-tier volume/AOP thresholds and fee rates.
|
|
19
|
+
*/
|
|
20
|
+
async listTiers(options) {
|
|
21
|
+
const res = await this.#publicClient.listVIPTiers({}, toConnectCallOptions(options));
|
|
22
|
+
return parse(VipTierCatalogSchema, res);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds.
|
|
26
|
+
*/
|
|
27
|
+
async getStatus(options) {
|
|
28
|
+
const res = await this.#authClient.getVIPStatus({}, toConnectCallOptions(options));
|
|
29
|
+
return parse(VipStatusSchema, res);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { VipService };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=vip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vip.js","names":["#publicClient","Proto.VIPService","#authClient"],"sources":["../../../src/services/vip/vip.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/vip/v1/vip_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { Transports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n VipStatusSchema,\n VipTierCatalogSchema,\n type VipStatus,\n type VipTierCatalog,\n} from \"./vip.schemas.js\";\n\n/**\n * Reads public VIP policy catalogs and authenticated caller-root VIP status.\n */\nexport class VipService {\n #publicClient: Client<typeof Proto.VIPService>;\n #authClient: Client<typeof Proto.VIPService>;\n\n constructor(transports: Transports) {\n this.#publicClient = createClient(Proto.VIPService, transports.publicApi);\n this.#authClient = createClient(Proto.VIPService, transports.authApi);\n }\n\n /**\n * Returns the complete active VIP0+ tier catalog, including policy version, effective time, retention threshold, and per-tier volume/AOP thresholds and fee rates.\n */\n async listTiers(options?: PolyesterRequestOptions): Promise<VipTierCatalog> {\n const res = await this.#publicClient.listVIPTiers({}, toConnectCallOptions(options));\n return parse(VipTierCatalogSchema, res);\n }\n\n /**\n * Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds.\n */\n async getStatus(options?: PolyesterRequestOptions): Promise<VipStatus> {\n const res = await this.#authClient.getVIPStatus({}, toConnectCallOptions(options));\n return parse(VipStatusSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAa,aAAb,MAAwB;CACpB;CACA;CAEA,YAAY,YAAwB;EAChC,KAAKA,gBAAgB,aAAaC,YAAkB,WAAW,SAAS;EACxE,KAAKC,cAAc,aAAaD,YAAkB,WAAW,OAAO;CACxE;;;;CAKA,MAAM,UAAU,SAA4D;EACxE,MAAM,MAAM,MAAM,KAAKD,cAAc,aAAa,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACnF,OAAO,MAAM,sBAAsB,GAAG;CAC1C;;;;CAKA,MAAM,UAAU,SAAuD;EACnE,MAAM,MAAM,MAAM,KAAKE,YAAY,aAAa,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACjF,OAAO,MAAM,iBAAiB,GAAG;CACrC;AACJ"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
//#region src/services/vip/vip.schemas.d.ts
|
|
3
|
+
declare const VipTierSchema: v.UnionSchema<[v.ObjectSchema<{
|
|
4
|
+
readonly volumeThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
5
|
+
readonly makerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
6
|
+
readonly takerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
7
|
+
readonly tier: v.LiteralSchema<0, undefined>;
|
|
8
|
+
}, undefined>, v.ObjectSchema<{
|
|
9
|
+
readonly volumeThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
10
|
+
readonly makerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
11
|
+
readonly takerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
12
|
+
readonly tier: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>]>;
|
|
13
|
+
readonly aopThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
14
|
+
}, undefined>], undefined>;
|
|
15
|
+
type VipTier = v.InferOutput<typeof VipTierSchema>;
|
|
16
|
+
declare const NextVipTierThresholdsSchema: v.ObjectSchema<{
|
|
17
|
+
readonly tier: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>]>;
|
|
18
|
+
readonly volumeThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
19
|
+
readonly aopThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
type NextVipTierThresholds = v.InferOutput<typeof NextVipTierThresholdsSchema>;
|
|
22
|
+
declare const VipTierCatalogSchema: v.ObjectSchema<{
|
|
23
|
+
readonly policyVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
24
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
25
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
26
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
27
|
+
}, undefined>, v.TransformAction<{
|
|
28
|
+
seconds: bigint;
|
|
29
|
+
nanos: number;
|
|
30
|
+
}, number>]>;
|
|
31
|
+
readonly retentionThresholdBp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 10000, undefined>]>;
|
|
32
|
+
readonly tiers: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
33
|
+
readonly volumeThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
34
|
+
readonly makerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
35
|
+
readonly takerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
36
|
+
readonly tier: v.LiteralSchema<0, undefined>;
|
|
37
|
+
}, undefined>, v.ObjectSchema<{
|
|
38
|
+
readonly volumeThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
39
|
+
readonly makerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
40
|
+
readonly takerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
41
|
+
readonly tier: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>]>;
|
|
42
|
+
readonly aopThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
43
|
+
}, undefined>], undefined>, undefined>;
|
|
44
|
+
}, undefined>;
|
|
45
|
+
type VipTierCatalog = v.InferOutput<typeof VipTierCatalogSchema>;
|
|
46
|
+
declare const VipStatusSchema: v.ObjectSchema<{
|
|
47
|
+
readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
48
|
+
readonly volumeTier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
49
|
+
readonly aopTier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
50
|
+
readonly settledVolume30dUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
51
|
+
readonly averageAop30dUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
52
|
+
readonly policyVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
53
|
+
readonly policyEffectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
54
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
55
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
56
|
+
}, undefined>, v.TransformAction<{
|
|
57
|
+
seconds: bigint;
|
|
58
|
+
nanos: number;
|
|
59
|
+
}, number>]>;
|
|
60
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
61
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
62
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
63
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
64
|
+
seconds: bigint;
|
|
65
|
+
nanos: number;
|
|
66
|
+
} | undefined, number | undefined>]>;
|
|
67
|
+
readonly evaluatedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
68
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
69
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
70
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
71
|
+
seconds: bigint;
|
|
72
|
+
nanos: number;
|
|
73
|
+
} | undefined, number | undefined>]>;
|
|
74
|
+
readonly metricsAsOf: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
75
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
76
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
77
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
78
|
+
seconds: bigint;
|
|
79
|
+
nanos: number;
|
|
80
|
+
} | undefined, number | undefined>]>;
|
|
81
|
+
readonly nextTierThresholds: v.OptionalSchema<v.ObjectSchema<{
|
|
82
|
+
readonly tier: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>]>;
|
|
83
|
+
readonly volumeThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
84
|
+
readonly aopThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
85
|
+
}, undefined>, undefined>;
|
|
86
|
+
}, undefined>;
|
|
87
|
+
type VipStatus = v.InferOutput<typeof VipStatusSchema>;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { NextVipTierThresholds, NextVipTierThresholdsSchema, VipStatus, VipStatusSchema, VipTier, VipTierCatalog, VipTierCatalogSchema, VipTierSchema };
|
|
90
|
+
//# sourceMappingURL=vip.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vip.schemas.d.ts","names":[],"sources":["../../../src/services/vip/vip.schemas.ts"],"mappings":";;cAmBa,eAAa,EAAA,aAAA,EAAA;;;;;;;;;;;;KAYd,UAAU,EAAE,mBAAmB;cAE9B,6BAA2B,EAAA;;;;;KAM5B,wBAAwB,EAAE,mBAAmB;cAE5C,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;KAOrB,iBAAiB,EAAE,mBAAmB;cAErC,iBAAe,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAchB,YAAY,EAAE,mBAAmB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BigIntStringSchema, OptionalTimestampMsSchema, TimestampMsSchema } from "../../shared/schemas.js";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
//#region src/services/vip/vip.schemas.ts
|
|
4
|
+
const DecimalStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));
|
|
5
|
+
const OptionalDecimalStringSchema = v.optional(DecimalStringSchema);
|
|
6
|
+
const VipTierNumberSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
|
|
7
|
+
const VipTierRates = {
|
|
8
|
+
volumeThresholdUsd: DecimalStringSchema,
|
|
9
|
+
makerFeeRatePercent: DecimalStringSchema,
|
|
10
|
+
takerFeeRatePercent: DecimalStringSchema
|
|
11
|
+
};
|
|
12
|
+
const VipTierSchema = v.union([v.object({
|
|
13
|
+
tier: v.literal(0),
|
|
14
|
+
...VipTierRates
|
|
15
|
+
}), v.object({
|
|
16
|
+
tier: v.pipe(VipTierNumberSchema, v.minValue(1)),
|
|
17
|
+
aopThresholdUsd: DecimalStringSchema,
|
|
18
|
+
...VipTierRates
|
|
19
|
+
})]);
|
|
20
|
+
const NextVipTierThresholdsSchema = v.object({
|
|
21
|
+
tier: v.pipe(VipTierNumberSchema, v.minValue(1)),
|
|
22
|
+
volumeThresholdUsd: DecimalStringSchema,
|
|
23
|
+
aopThresholdUsd: DecimalStringSchema
|
|
24
|
+
});
|
|
25
|
+
const VipTierCatalogSchema = v.object({
|
|
26
|
+
policyVersion: BigIntStringSchema,
|
|
27
|
+
effectiveFrom: TimestampMsSchema,
|
|
28
|
+
retentionThresholdBp: v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(1e4)),
|
|
29
|
+
tiers: v.array(VipTierSchema)
|
|
30
|
+
});
|
|
31
|
+
const VipStatusSchema = v.object({
|
|
32
|
+
tier: VipTierNumberSchema,
|
|
33
|
+
volumeTier: VipTierNumberSchema,
|
|
34
|
+
aopTier: VipTierNumberSchema,
|
|
35
|
+
settledVolume30dUsd: OptionalDecimalStringSchema,
|
|
36
|
+
averageAop30dUsd: OptionalDecimalStringSchema,
|
|
37
|
+
policyVersion: BigIntStringSchema,
|
|
38
|
+
policyEffectiveFrom: TimestampMsSchema,
|
|
39
|
+
effectiveFrom: OptionalTimestampMsSchema,
|
|
40
|
+
evaluatedAt: OptionalTimestampMsSchema,
|
|
41
|
+
metricsAsOf: OptionalTimestampMsSchema,
|
|
42
|
+
nextTierThresholds: v.optional(NextVipTierThresholdsSchema)
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { NextVipTierThresholdsSchema, VipStatusSchema, VipTierCatalogSchema, VipTierNumberSchema, VipTierSchema };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=vip.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vip.schemas.js","names":[],"sources":["../../../src/services/vip/vip.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n BigIntStringSchema,\n OptionalTimestampMsSchema,\n TimestampMsSchema,\n} from \"../../shared/schemas.js\";\n\nconst DecimalStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nconst OptionalDecimalStringSchema = v.optional(DecimalStringSchema);\n\nexport const VipTierNumberSchema = v.pipe(v.number(), v.integer(), v.minValue(0));\n\nconst VipTierRates = {\n volumeThresholdUsd: DecimalStringSchema,\n makerFeeRatePercent: DecimalStringSchema,\n takerFeeRatePercent: DecimalStringSchema,\n};\n\nexport const VipTierSchema = v.union([\n v.object({\n tier: v.literal(0),\n ...VipTierRates,\n }),\n v.object({\n tier: v.pipe(VipTierNumberSchema, v.minValue(1)),\n aopThresholdUsd: DecimalStringSchema,\n ...VipTierRates,\n }),\n]);\n\nexport type VipTier = v.InferOutput<typeof VipTierSchema>;\n\nexport const NextVipTierThresholdsSchema = v.object({\n tier: v.pipe(VipTierNumberSchema, v.minValue(1)),\n volumeThresholdUsd: DecimalStringSchema,\n aopThresholdUsd: DecimalStringSchema,\n});\n\nexport type NextVipTierThresholds = v.InferOutput<typeof NextVipTierThresholdsSchema>;\n\nexport const VipTierCatalogSchema = v.object({\n policyVersion: BigIntStringSchema,\n effectiveFrom: TimestampMsSchema,\n retentionThresholdBp: v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(10_000)),\n tiers: v.array(VipTierSchema),\n});\n\nexport type VipTierCatalog = v.InferOutput<typeof VipTierCatalogSchema>;\n\nexport const VipStatusSchema = v.object({\n tier: VipTierNumberSchema,\n volumeTier: VipTierNumberSchema,\n aopTier: VipTierNumberSchema,\n settledVolume30dUsd: OptionalDecimalStringSchema,\n averageAop30dUsd: OptionalDecimalStringSchema,\n policyVersion: BigIntStringSchema,\n policyEffectiveFrom: TimestampMsSchema,\n effectiveFrom: OptionalTimestampMsSchema,\n evaluatedAt: OptionalTimestampMsSchema,\n metricsAsOf: OptionalTimestampMsSchema,\n nextTierThresholds: v.optional(NextVipTierThresholdsSchema),\n});\n\nexport type VipStatus = v.InferOutput<typeof VipStatusSchema>;\n"],"mappings":";;;AAOA,MAAM,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAEvE,MAAM,8BAA8B,EAAE,SAAS,mBAAmB;AAElE,MAAa,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,CAAC;AAEhF,MAAM,eAAe;CACjB,oBAAoB;CACpB,qBAAqB;CACrB,qBAAqB;AACzB;AAEA,MAAa,gBAAgB,EAAE,MAAM,CACjC,EAAE,OAAO;CACL,MAAM,EAAE,QAAQ,CAAC;CACjB,GAAG;AACP,CAAC,GACD,EAAE,OAAO;CACL,MAAM,EAAE,KAAK,qBAAqB,EAAE,SAAS,CAAC,CAAC;CAC/C,iBAAiB;CACjB,GAAG;AACP,CAAC,CACL,CAAC;AAID,MAAa,8BAA8B,EAAE,OAAO;CAChD,MAAM,EAAE,KAAK,qBAAqB,EAAE,SAAS,CAAC,CAAC;CAC/C,oBAAoB;CACpB,iBAAiB;AACrB,CAAC;AAID,MAAa,uBAAuB,EAAE,OAAO;CACzC,eAAe;CACf,eAAe;CACf,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAM,CAAC;CACvF,OAAO,EAAE,MAAM,aAAa;AAChC,CAAC;AAID,MAAa,kBAAkB,EAAE,OAAO;CACpC,MAAM;CACN,YAAY;CACZ,SAAS;CACT,qBAAqB;CACrB,kBAAkB;CAClB,eAAe;CACf,qBAAqB;CACrB,eAAe;CACf,aAAa;CACb,aAAa;CACb,oBAAoB,EAAE,SAAS,2BAA2B;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wired-services.d.ts","names":[],"sources":["../src/wired-services.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"wired-services.d.ts","names":[],"sources":["../src/wired-services.ts"],"mappings":";;;;;;;;;;;cAuCa,oCAAoC"}
|
package/dist/wired-services.js
CHANGED
|
@@ -23,6 +23,9 @@ import { GuardSignerService } from "./gen/chain/guard/v1/guard_signer_pb.js";
|
|
|
23
23
|
import { SocialVerificationService } from "./gen/auth/v1/social_verification_pb.js";
|
|
24
24
|
import { WhiteboardService } from "./gen/collab/v1/whiteboard_pb.js";
|
|
25
25
|
import { ZipperService } from "./gen/chain/zipper/v1/zipper_pb.js";
|
|
26
|
+
import { VIPService } from "./gen/vip/v1/vip_pb.js";
|
|
27
|
+
import { FeeService } from "./gen/fees/v1/fees_pb.js";
|
|
28
|
+
import { RateLimitService } from "./gen/ratelimit/v1/ratelimit_pb.js";
|
|
26
29
|
//#region src/wired-services.ts
|
|
27
30
|
/**
|
|
28
31
|
* Every proto service descriptor the SDK's service layer wires a client for.
|
|
@@ -39,6 +42,7 @@ const WIRED_SERVICE_DESCRIPTORS = [
|
|
|
39
42
|
AuthService,
|
|
40
43
|
ChainAnalyticsService,
|
|
41
44
|
DepositAddressService,
|
|
45
|
+
FeeService,
|
|
42
46
|
GuardSignerService,
|
|
43
47
|
HeatmapService,
|
|
44
48
|
InternalTransferService,
|
|
@@ -52,11 +56,13 @@ const WIRED_SERVICE_DESCRIPTORS = [
|
|
|
52
56
|
OrdersService,
|
|
53
57
|
PolicyService,
|
|
54
58
|
ProfileService,
|
|
59
|
+
RateLimitService,
|
|
55
60
|
ResolveService,
|
|
56
61
|
SocialVerificationService,
|
|
57
62
|
SubaccountService,
|
|
58
63
|
SubaccountViewService,
|
|
59
64
|
TriggersService,
|
|
65
|
+
VIPService,
|
|
60
66
|
WhiteboardService,
|
|
61
67
|
WithdrawService,
|
|
62
68
|
ZipperService
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wired-services.js","names":[],"sources":["../src/wired-services.ts"],"sourcesContent":["import type { DescService } from \"@bufbuild/protobuf\";\nimport { AddressBookService } from \"./gen/auth/v1/address_book_pb.js\";\nimport { ApiKeyService } from \"./gen/auth/v1/api_keys_pb.js\";\nimport { AuthService } from \"./gen/auth/v1/auth_pb.js\";\nimport { MFAService } from \"./gen/auth/v1/mfa_pb.js\";\nimport { PolicyService } from \"./gen/auth/v1/policies_pb.js\";\nimport { ProfileService } from \"./gen/auth/v1/profile_pb.js\";\nimport { ResolveService } from \"./gen/auth/v1/resolve_pb.js\";\nimport { SocialVerificationService } from \"./gen/auth/v1/social_verification_pb.js\";\nimport { SubaccountService, SubaccountViewService } from \"./gen/auth/v1/subaccounts_pb.js\";\nimport { ChainAnalyticsService } from \"./gen/chain/analytics/v1/analytics_read_pb.js\";\nimport { DepositAddressService } from \"./gen/chain/deposit/v1/deposit_pb.js\";\nimport { GuardSignerService } from \"./gen/chain/guard/v1/guard_signer_pb.js\";\nimport { LifecycleReadService } from \"./gen/chain/lifecycle/v1/lifecycle_read_pb.js\";\nimport { WithdrawService } from \"./gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { ZipperService } from \"./gen/chain/zipper/v1/zipper_pb.js\";\nimport { WhiteboardService } from \"./gen/collab/v1/whiteboard_pb.js\";\nimport { LedgerReadService } from \"./gen/ledger/read/v1/ledger_read_pb.js\";\nimport { HeatmapService } from \"./gen/marketdata/v1/heatmap_pb.js\";\nimport { MarketDataService } from \"./gen/marketdata/v1/marketdata_pb.js\";\nimport { MarketOverviewService } from \"./gen/marketoverview/v1/marketoverview_pb.js\";\nimport { OrderbookService } from \"./gen/orderbook/v1/orderbook_pb.js\";\nimport { OrdersService } from \"./gen/orders/v1/orders_pb.js\";\nimport { OrdersReadService } from \"./gen/orders/v1/orders_read_pb.js\";\nimport { InternalTransferService } from \"./gen/transfer/v1/internal_transfer_pb.js\";\nimport { TriggersService } from \"./gen/triggers/v1/triggers_pb.js\";\n\n/**\n * Every proto service descriptor the SDK's service layer wires a client for.\n * This is the authoritative surface for transport-level mocks: an in-memory\n * transport that routes all of these can serve the whole SDK.\n *\n * Kept in sync mechanically — `wired-services.test.ts` scans every\n * `createClient(...)` call site under `src/services` and `src/realtime` and\n * fails when this list drifts from the code.\n */\nexport const WIRED_SERVICE_DESCRIPTORS: readonly DescService[] = [\n AddressBookService,\n ApiKeyService,\n AuthService,\n ChainAnalyticsService,\n DepositAddressService,\n GuardSignerService,\n HeatmapService,\n InternalTransferService,\n LedgerReadService,\n LifecycleReadService,\n MarketDataService,\n MarketOverviewService,\n MFAService,\n OrderbookService,\n OrdersReadService,\n OrdersService,\n PolicyService,\n ProfileService,\n ResolveService,\n SocialVerificationService,\n SubaccountService,\n SubaccountViewService,\n TriggersService,\n WhiteboardService,\n WithdrawService,\n ZipperService,\n];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"wired-services.js","names":[],"sources":["../src/wired-services.ts"],"sourcesContent":["import type { DescService } from \"@bufbuild/protobuf\";\nimport { AddressBookService } from \"./gen/auth/v1/address_book_pb.js\";\nimport { ApiKeyService } from \"./gen/auth/v1/api_keys_pb.js\";\nimport { AuthService } from \"./gen/auth/v1/auth_pb.js\";\nimport { MFAService } from \"./gen/auth/v1/mfa_pb.js\";\nimport { PolicyService } from \"./gen/auth/v1/policies_pb.js\";\nimport { ProfileService } from \"./gen/auth/v1/profile_pb.js\";\nimport { ResolveService } from \"./gen/auth/v1/resolve_pb.js\";\nimport { SocialVerificationService } from \"./gen/auth/v1/social_verification_pb.js\";\nimport { SubaccountService, SubaccountViewService } from \"./gen/auth/v1/subaccounts_pb.js\";\nimport { ChainAnalyticsService } from \"./gen/chain/analytics/v1/analytics_read_pb.js\";\nimport { DepositAddressService } from \"./gen/chain/deposit/v1/deposit_pb.js\";\nimport { GuardSignerService } from \"./gen/chain/guard/v1/guard_signer_pb.js\";\nimport { LifecycleReadService } from \"./gen/chain/lifecycle/v1/lifecycle_read_pb.js\";\nimport { WithdrawService } from \"./gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { ZipperService } from \"./gen/chain/zipper/v1/zipper_pb.js\";\nimport { WhiteboardService } from \"./gen/collab/v1/whiteboard_pb.js\";\nimport { FeeService } from \"./gen/fees/v1/fees_pb.js\";\nimport { LedgerReadService } from \"./gen/ledger/read/v1/ledger_read_pb.js\";\nimport { HeatmapService } from \"./gen/marketdata/v1/heatmap_pb.js\";\nimport { MarketDataService } from \"./gen/marketdata/v1/marketdata_pb.js\";\nimport { MarketOverviewService } from \"./gen/marketoverview/v1/marketoverview_pb.js\";\nimport { OrderbookService } from \"./gen/orderbook/v1/orderbook_pb.js\";\nimport { OrdersService } from \"./gen/orders/v1/orders_pb.js\";\nimport { OrdersReadService } from \"./gen/orders/v1/orders_read_pb.js\";\nimport { RateLimitService } from \"./gen/ratelimit/v1/ratelimit_pb.js\";\nimport { InternalTransferService } from \"./gen/transfer/v1/internal_transfer_pb.js\";\nimport { TriggersService } from \"./gen/triggers/v1/triggers_pb.js\";\nimport { VIPService } from \"./gen/vip/v1/vip_pb.js\";\n\n/**\n * Every proto service descriptor the SDK's service layer wires a client for.\n * This is the authoritative surface for transport-level mocks: an in-memory\n * transport that routes all of these can serve the whole SDK.\n *\n * Kept in sync mechanically — `wired-services.test.ts` scans every\n * `createClient(...)` call site under `src/services` and `src/realtime` and\n * fails when this list drifts from the code.\n */\nexport const WIRED_SERVICE_DESCRIPTORS: readonly DescService[] = [\n AddressBookService,\n ApiKeyService,\n AuthService,\n ChainAnalyticsService,\n DepositAddressService,\n FeeService,\n GuardSignerService,\n HeatmapService,\n InternalTransferService,\n LedgerReadService,\n LifecycleReadService,\n MarketDataService,\n MarketOverviewService,\n MFAService,\n OrderbookService,\n OrdersReadService,\n OrdersService,\n PolicyService,\n ProfileService,\n RateLimitService,\n ResolveService,\n SocialVerificationService,\n SubaccountService,\n SubaccountViewService,\n TriggersService,\n VIPService,\n WhiteboardService,\n WithdrawService,\n ZipperService,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,4BAAoD;CAC7D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ"}
|
package/package.json
CHANGED