@polyester/sdk 0.35.0-devnet-20261111031027 → 0.35.0-devnet-20261111161451
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 +35 -1
- package/dist/catalogs/snapshot-validation.js +2 -1
- package/dist/catalogs/snapshot-validation.js.map +1 -1
- package/dist/client.d.ts +6 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -0
- package/dist/client.js.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.d.ts +4164 -0
- package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -0
- package/dist/gen/ai/v1/assistant_pb.js +1174 -0
- package/dist/gen/ai/v1/assistant_pb.js.map +1 -0
- package/dist/gen/alerts/v1/price_alerts_pb.d.ts +776 -0
- package/dist/gen/alerts/v1/price_alerts_pb.d.ts.map +1 -0
- package/dist/gen/alerts/v1/price_alerts_pb.js +378 -0
- package/dist/gen/alerts/v1/price_alerts_pb.js.map +1 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts +6 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/address_book_pb.js +6 -0
- package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.d.ts +242 -2
- package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.js +81 -2
- package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +48 -6
- package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/auth_pb.js +48 -6
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +83 -19
- package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/policies_pb.js +74 -16
- package/dist/gen/auth/v1/policies_pb.js.map +1 -1
- package/dist/gen/auth/v1/social_verification_pb.d.ts +167 -11
- package/dist/gen/auth/v1/social_verification_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/social_verification_pb.js +41 -3
- package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts +17 -6
- package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +4 -2
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts.map +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.js.map +1 -1
- package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +5 -0
- package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts.map +1 -1
- package/dist/gen/chain/guard/v1/guard_signer_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +10 -0
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +32 -4
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.js +32 -4
- package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +391 -42
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js +103 -17
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +170 -3
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js +63 -2
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
- package/dist/gen/claims/v1/claims_pb.js +1 -1
- package/dist/gen/claims/v1/claims_pb.js.map +1 -1
- package/dist/gen/index.d.ts +14 -10
- package/dist/gen/index.js +11 -7
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +1 -1
- package/dist/gen/ledger/v1/catalog_pb.d.ts +9 -1
- package/dist/gen/ledger/v1/catalog_pb.d.ts.map +1 -1
- package/dist/gen/ledger/v1/catalog_pb.js +9 -1
- package/dist/gen/ledger/v1/catalog_pb.js.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +8 -0
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.js +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +4 -4
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +1 -1
- package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +20 -1
- package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts.map +1 -1
- package/dist/gen/polyester/ratelimit/v1/types_pb.js +20 -1
- package/dist/gen/polyester/ratelimit/v1/types_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1186 -127
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +282 -5
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +253 -38
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js +180 -36
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +933 -0
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts.map +1 -0
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js +292 -0
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -0
- package/dist/gen/system/v1/system_pb.d.ts +77 -0
- package/dist/gen/system/v1/system_pb.d.ts.map +1 -0
- package/dist/gen/system/v1/system_pb.js +34 -0
- package/dist/gen/system/v1/system_pb.js.map +1 -0
- package/dist/gen/tradews/v1/trade_ws_pb.d.ts +2 -2
- package/dist/gen/tradews/v1/trade_ws_pb.js.map +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/services/api-keys/api-keys.codecs.js +10 -1
- package/dist/services/api-keys/api-keys.codecs.js.map +1 -1
- package/dist/services/api-keys/api-keys.d.ts +16 -1
- package/dist/services/api-keys/api-keys.d.ts.map +1 -1
- package/dist/services/api-keys/api-keys.js +25 -1
- package/dist/services/api-keys/api-keys.js.map +1 -1
- package/dist/services/api-keys/api-keys.schemas.d.ts +116 -1
- package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
- package/dist/services/api-keys/api-keys.schemas.js +29 -3
- package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
- package/dist/services/api-keys/api-keys.types.d.ts +2 -2
- package/dist/services/api-keys/index.d.ts +2 -2
- package/dist/services/assistant/assistant-events.schemas.d.ts +4618 -0
- package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -0
- package/dist/services/assistant/assistant-events.schemas.js +485 -0
- package/dist/services/assistant/assistant-events.schemas.js.map +1 -0
- package/dist/services/assistant/assistant.codecs.d.ts +24 -0
- package/dist/services/assistant/assistant.codecs.d.ts.map +1 -0
- package/dist/services/assistant/assistant.codecs.js +88 -0
- package/dist/services/assistant/assistant.codecs.js.map +1 -0
- package/dist/services/assistant/assistant.d.ts +76 -0
- package/dist/services/assistant/assistant.d.ts.map +1 -0
- package/dist/services/assistant/assistant.js +133 -0
- package/dist/services/assistant/assistant.js.map +1 -0
- package/dist/services/assistant/assistant.schemas.d.ts +184 -0
- package/dist/services/assistant/assistant.schemas.d.ts.map +1 -0
- package/dist/services/assistant/assistant.schemas.js +135 -0
- package/dist/services/assistant/assistant.schemas.js.map +1 -0
- package/dist/services/assistant/assistant.types.d.ts +4 -0
- package/dist/services/assistant/service.d.ts +8 -0
- package/dist/services/assistant/service.d.ts.map +1 -0
- package/dist/services/assistant/service.js +9 -0
- package/dist/services/assistant/service.js.map +1 -0
- package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts +9 -2
- package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.codecs.js +9 -1
- package/dist/services/auto-withdraw/auto-withdraw.codecs.js.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.d.ts +15 -4
- package/dist/services/auto-withdraw/auto-withdraw.d.ts.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.js +24 -8
- package/dist/services/auto-withdraw/auto-withdraw.js.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +394 -26
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.js +67 -12
- package/dist/services/auto-withdraw/auto-withdraw.schemas.js.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.types.d.ts +3 -3
- package/dist/services/balances/balances.js +1 -1
- package/dist/services/balances/balances.schemas.d.ts +3 -3
- package/dist/services/candles/candles.js +1 -1
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/candles/candles.schemas.js +5 -2
- package/dist/services/candles/candles.schemas.js.map +1 -1
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
- package/dist/services/lifecycle/lifecycle.codecs.d.ts +2 -2
- package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.codecs.js +3 -1
- package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +210 -186
- package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.js +7 -1
- package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
- package/dist/services/market-data/market-data.js +1 -1
- package/dist/services/market-data/market-data.schemas.js +7 -2
- package/dist/services/market-data/market-data.schemas.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts +1 -1
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +2 -2
- package/dist/services/orders/orders-batch.schemas.d.ts +54 -54
- package/dist/services/orders/orders-input.schemas.d.ts +6 -6
- package/dist/services/orders/orders-input.schemas.js +1 -1
- package/dist/services/orders/orders-modify.schemas.js +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +16 -16
- package/dist/services/orders/orders-output.schemas.js +3 -3
- package/dist/services/orders/orders-risk.schemas.js +1 -1
- package/dist/services/orders/orders.codecs.js +1 -1
- package/dist/services/orders/orders.js +3 -3
- package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
- package/dist/services/policies/shared.codecs.js +24 -3
- package/dist/services/policies/shared.codecs.js.map +1 -1
- package/dist/services/policies/shared.d.ts +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
- package/dist/services/price-alerts/price-alerts.codecs.d.ts +20 -0
- package/dist/services/price-alerts/price-alerts.codecs.d.ts.map +1 -0
- package/dist/services/price-alerts/price-alerts.codecs.js +66 -0
- package/dist/services/price-alerts/price-alerts.codecs.js.map +1 -0
- package/dist/services/price-alerts/price-alerts.d.ts +38 -0
- package/dist/services/price-alerts/price-alerts.d.ts.map +1 -0
- package/dist/services/price-alerts/price-alerts.js +60 -0
- package/dist/services/price-alerts/price-alerts.js.map +1 -0
- package/dist/services/price-alerts/price-alerts.schemas.d.ts +309 -0
- package/dist/services/price-alerts/price-alerts.schemas.d.ts.map +1 -0
- package/dist/services/price-alerts/price-alerts.schemas.js +130 -0
- package/dist/services/price-alerts/price-alerts.schemas.js.map +1 -0
- package/dist/services/price-alerts/price-alerts.types.d.ts +3 -0
- package/dist/services/price-alerts/service.d.ts +8 -0
- package/dist/services/price-alerts/service.d.ts.map +1 -0
- package/dist/services/price-alerts/service.js +9 -0
- package/dist/services/price-alerts/service.js.map +1 -0
- package/dist/services/social-verification/social-verification.codecs.js +13 -5
- package/dist/services/social-verification/social-verification.codecs.js.map +1 -1
- package/dist/services/social-verification/social-verification.d.ts +18 -3
- package/dist/services/social-verification/social-verification.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.js +26 -3
- package/dist/services/social-verification/social-verification.js.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.d.ts +33 -7
- package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.js +35 -10
- package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
- package/dist/services/social-verification/social-verification.types.d.ts +2 -2
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +8 -8
- package/dist/services/system/service.d.ts +8 -0
- package/dist/services/system/service.d.ts.map +1 -0
- package/dist/services/system/service.js +9 -0
- package/dist/services/system/service.js.map +1 -0
- package/dist/services/system/system.d.ts +25 -0
- package/dist/services/system/system.d.ts.map +1 -0
- package/dist/services/system/system.js +24 -0
- package/dist/services/system/system.js.map +1 -0
- package/dist/services/trades/trades.js +1 -1
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trades/trades.schemas.js +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts +7 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +11 -1
- package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +42 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js +19 -3
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +2 -2
- package/dist/services/transfers/transfers.schemas.d.ts +5 -5
- package/dist/services/triggers/trigger-child-order.schemas.js +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
- package/dist/services/triggers/trigger-input.schemas.js +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +49 -49
- package/dist/services/triggers/triggers.codecs.js +1 -1
- package/dist/services/triggers/triggers.js +2 -2
- package/dist/shared/catalog-config.d.ts +5 -0
- package/dist/shared/catalog-config.d.ts.map +1 -1
- package/dist/shared/catalog-config.js.map +1 -1
- package/dist/shared/connect-error-mapping.d.ts.map +1 -1
- package/dist/shared/connect-error-mapping.js +1 -0
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/error-detail.d.ts +24 -10
- package/dist/shared/error-detail.d.ts.map +1 -1
- package/dist/shared/error-detail.js +2 -0
- package/dist/shared/error-detail.js.map +1 -1
- package/dist/shared/error-details/alerts.js +15 -0
- package/dist/shared/error-details/alerts.js.map +1 -0
- package/dist/shared/error-details/assistant.js +15 -0
- package/dist/shared/error-details/assistant.js.map +1 -0
- package/dist/shared/error-details/withdraw.js +11 -2
- package/dist/shared/error-details/withdraw.js.map +1 -1
- package/dist/shared/ledger-codes.d.ts +4 -2
- package/dist/shared/ledger-codes.d.ts.map +1 -1
- package/dist/shared/ledger-codes.js +6 -3
- package/dist/shared/ledger-codes.js.map +1 -1
- package/dist/shared/rate-limit.schemas.d.ts +3 -3
- package/dist/shared/rate-limit.schemas.d.ts.map +1 -1
- package/dist/shared/rate-limit.schemas.js +4 -1
- package/dist/shared/rate-limit.schemas.js.map +1 -1
- package/dist/shared/transports.d.ts +2 -1
- package/dist/shared/transports.d.ts.map +1 -1
- package/dist/shared/transports.js.map +1 -1
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +11 -5
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,14 +7,14 @@ import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
|
7
7
|
import { formatId, idToBigInt } from "../../utils/base58-id.js";
|
|
8
8
|
import { deliverBatch } from "../../shared/subscription-errors.js";
|
|
9
9
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
10
|
-
import { connectReadyGated } from "../../realtime/ready-gated-subscription.js";
|
|
11
10
|
import { OrdersService as OrdersService$1 } from "../../gen/orders/v1/orders_pb.js";
|
|
12
|
-
import { formatConnectError, isResourceNotFoundError } from "../../utils/errors.js";
|
|
13
11
|
import { OrdersReadService } from "../../gen/orders/v1/orders_read_pb.js";
|
|
12
|
+
import { createOrderDetailsSchema, formatOrder } from "./orders-output.schemas.js";
|
|
13
|
+
import { connectReadyGated } from "../../realtime/ready-gated-subscription.js";
|
|
14
|
+
import { formatConnectError, isResourceNotFoundError } from "../../utils/errors.js";
|
|
14
15
|
import { CancelAllOrdersInputSchema, CancelAllOrdersResponseSchema, CancelOrderInputSchema, CancelOrderResultSchema, GetOrderDetailsInputSchema, OpenOrdersInputSchema, OrderHistoryInputSchema, createCreateOrderResultSchema, createNewOrderInputSchema, createPreviewOrderResultSchema } from "./orders-input.schemas.js";
|
|
15
16
|
import { ModifyOrderResultSchema, assertKnownModifyOrderInputKeys, createModifyOrderInputSchema } from "./orders-modify.schemas.js";
|
|
16
17
|
import { BatchCancelOrdersInputSchema, BatchCancelOrdersResultSchema, BatchReplaceOrdersResultSchema, CancelAllAfterInputSchema, CancelAllAfterResultSchema, GetBatchReplaceStatusInputSchema, GetBatchReplaceStatusResultSchema, assertKnownBatchReplaceOrderItemInputKeys, createBatchCreateOrdersInputSchema, createBatchCreateOrdersResultSchema, createBatchReplaceOrdersInputSchema } from "./orders-batch.schemas.js";
|
|
17
|
-
import { createOrderDetailsSchema, formatOrder } from "./orders-output.schemas.js";
|
|
18
18
|
import { createClient } from "@connectrpc/connect";
|
|
19
19
|
//#region src/services/orders/orders.ts
|
|
20
20
|
function hasKnownOrderSymbol(scales, order) {
|
|
@@ -27,7 +27,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
27
27
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
28
28
|
}, undefined>, undefined>, readonly []>;
|
|
29
29
|
readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
|
|
30
|
-
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[]>]>;
|
|
30
|
+
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[]>]>;
|
|
31
31
|
readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
32
32
|
readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
33
33
|
readonly createdAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -50,7 +50,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
50
50
|
symbolId: number;
|
|
51
51
|
}[];
|
|
52
52
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
53
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
53
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
54
54
|
isTemplate: boolean;
|
|
55
55
|
sourceTemplateId?: string | undefined;
|
|
56
56
|
createdAt: number;
|
|
@@ -69,7 +69,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
69
69
|
symbolId: number;
|
|
70
70
|
}[];
|
|
71
71
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
72
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
72
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
73
73
|
isTemplate: boolean;
|
|
74
74
|
sourceTemplateId?: string | undefined;
|
|
75
75
|
createdAt: number;
|
|
@@ -85,7 +85,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
|
|
|
85
85
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
86
86
|
}, undefined>, undefined>, readonly []>;
|
|
87
87
|
readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
|
|
88
|
-
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[]>]>;
|
|
88
|
+
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[]>]>;
|
|
89
89
|
readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
90
90
|
readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
91
91
|
readonly createdAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -108,7 +108,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
|
|
|
108
108
|
symbolId: number;
|
|
109
109
|
}[];
|
|
110
110
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
111
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
111
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
112
112
|
isTemplate: boolean;
|
|
113
113
|
sourceTemplateId?: string | undefined;
|
|
114
114
|
createdAt: number;
|
|
@@ -127,7 +127,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
|
|
|
127
127
|
symbolId: number;
|
|
128
128
|
}[];
|
|
129
129
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
130
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
130
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
131
131
|
isTemplate: boolean;
|
|
132
132
|
sourceTemplateId?: string | undefined;
|
|
133
133
|
createdAt: number;
|
|
@@ -144,7 +144,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
|
|
|
144
144
|
symbolId: number;
|
|
145
145
|
}[];
|
|
146
146
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
147
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
147
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
148
148
|
isTemplate: boolean;
|
|
149
149
|
sourceTemplateId?: string | undefined;
|
|
150
150
|
createdAt: number;
|
|
@@ -160,7 +160,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
|
|
|
160
160
|
symbolId: number;
|
|
161
161
|
}[];
|
|
162
162
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
163
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
163
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
164
164
|
isTemplate: boolean;
|
|
165
165
|
sourceTemplateId?: string | undefined;
|
|
166
166
|
createdAt: number;
|
|
@@ -174,7 +174,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
174
174
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
175
175
|
}, undefined>, undefined>, readonly []>;
|
|
176
176
|
readonly spotMarketScope: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["all", "allowlist"], undefined>, v.TransformAction<"all" | "allowlist", MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST>]>;
|
|
177
|
-
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards"], undefined>, undefined>, readonly []>, v.TransformAction<("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards")[], (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS)[]>]>;
|
|
177
|
+
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status"], undefined>, undefined>, readonly []>, v.TransformAction<("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status")[], (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS)[]>]>;
|
|
178
178
|
readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
179
179
|
readonly assignToKeyId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
|
|
180
180
|
}, undefined>, v.TransformAction<{
|
|
@@ -184,7 +184,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
184
184
|
symbolId: number;
|
|
185
185
|
}[];
|
|
186
186
|
spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
|
|
187
|
-
actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS)[];
|
|
187
|
+
actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS)[];
|
|
188
188
|
isTemplate: boolean;
|
|
189
189
|
assignToKeyId?: string | undefined;
|
|
190
190
|
}, {
|
|
@@ -195,7 +195,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
195
195
|
symbolId: number;
|
|
196
196
|
}[];
|
|
197
197
|
spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
|
|
198
|
-
actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS)[];
|
|
198
|
+
actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS)[];
|
|
199
199
|
isTemplate: boolean;
|
|
200
200
|
};
|
|
201
201
|
assignToKeyId: string | undefined;
|
|
@@ -210,7 +210,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
210
210
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
211
211
|
}, undefined>, undefined>, undefined>;
|
|
212
212
|
readonly spotMarketScope: v.OptionalSchema<v.PicklistSchema<readonly ["all", "allowlist"], undefined>, undefined>;
|
|
213
|
-
readonly actions: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards"], undefined>, undefined>, undefined>;
|
|
213
|
+
readonly actions: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status"], undefined>, undefined>, undefined>;
|
|
214
214
|
readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
215
215
|
}, undefined>, v.CheckAction<{
|
|
216
216
|
policyId: bigint;
|
|
@@ -221,7 +221,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
221
221
|
symbolId: number;
|
|
222
222
|
}[] | undefined;
|
|
223
223
|
spotMarketScope?: "all" | "allowlist" | undefined;
|
|
224
|
-
actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards")[] | undefined;
|
|
224
|
+
actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status")[] | undefined;
|
|
225
225
|
isTemplate?: boolean | undefined;
|
|
226
226
|
}, "At least one API key policy field must be provided">, v.TransformAction<{
|
|
227
227
|
policyId: bigint;
|
|
@@ -232,7 +232,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
232
232
|
symbolId: number;
|
|
233
233
|
}[] | undefined;
|
|
234
234
|
spotMarketScope?: "all" | "allowlist" | undefined;
|
|
235
|
-
actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards")[] | undefined;
|
|
235
|
+
actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status")[] | undefined;
|
|
236
236
|
isTemplate?: boolean | undefined;
|
|
237
237
|
}, {
|
|
238
238
|
policyId: bigint;
|
|
@@ -247,7 +247,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
247
247
|
} & {
|
|
248
248
|
spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
|
|
249
249
|
} & {
|
|
250
|
-
actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS)[];
|
|
250
|
+
actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS)[];
|
|
251
251
|
} & {
|
|
252
252
|
isTemplate: boolean;
|
|
253
253
|
}>;
|
|
@@ -33,7 +33,14 @@ const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [
|
|
|
33
33
|
"read-daily-claims",
|
|
34
34
|
"claim-daily-reward",
|
|
35
35
|
"read-checkpoints",
|
|
36
|
-
"read-rewards"
|
|
36
|
+
"read-rewards",
|
|
37
|
+
"create-deposit-address",
|
|
38
|
+
"read-deposit-addresses",
|
|
39
|
+
"read-subaccounts",
|
|
40
|
+
"read-subaccount-activity",
|
|
41
|
+
"read-subaccount-members",
|
|
42
|
+
"read-subaccount-invites",
|
|
43
|
+
"read-guard-signer-status"
|
|
37
44
|
];
|
|
38
45
|
const POLICY_ACTION_LABELS = [...PRODUCT_POLICY_ACTION_LABELS, ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS];
|
|
39
46
|
const PolicyMarketScopeCodec = {
|
|
@@ -73,7 +80,14 @@ const PolicyActionCodec = {
|
|
|
73
80
|
[26]: "read-daily-claims",
|
|
74
81
|
[27]: "claim-daily-reward",
|
|
75
82
|
[28]: "read-checkpoints",
|
|
76
|
-
[29]: "read-rewards"
|
|
83
|
+
[29]: "read-rewards",
|
|
84
|
+
[10]: "create-deposit-address",
|
|
85
|
+
[30]: "read-deposit-addresses",
|
|
86
|
+
[31]: "read-subaccounts",
|
|
87
|
+
[32]: "read-subaccount-activity",
|
|
88
|
+
[33]: "read-subaccount-members",
|
|
89
|
+
[34]: "read-subaccount-invites",
|
|
90
|
+
[35]: "read-guard-signer-status"
|
|
77
91
|
},
|
|
78
92
|
inputToProto: {
|
|
79
93
|
"trade-spot": 1,
|
|
@@ -99,7 +113,14 @@ const PolicyActionCodec = {
|
|
|
99
113
|
"read-daily-claims": 26,
|
|
100
114
|
"claim-daily-reward": 27,
|
|
101
115
|
"read-checkpoints": 28,
|
|
102
|
-
"read-rewards": 29
|
|
116
|
+
"read-rewards": 29,
|
|
117
|
+
"create-deposit-address": 10,
|
|
118
|
+
"read-deposit-addresses": 30,
|
|
119
|
+
"read-subaccounts": 31,
|
|
120
|
+
"read-subaccount-activity": 32,
|
|
121
|
+
"read-subaccount-members": 33,
|
|
122
|
+
"read-subaccount-invites": 34,
|
|
123
|
+
"read-guard-signer-status": 35
|
|
103
124
|
}
|
|
104
125
|
};
|
|
105
126
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.codecs.js","names":[],"sources":["../../../src/services/policies/shared.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/policies_pb.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum, ProtoToOutput } from \"../../utils/types.js\";\n\n/** Product actions, accepted by sub-account and API-key policies. */\nexport const PRODUCT_POLICY_ACTION_LABELS = [\n \"trade-spot\",\n \"internal-transfer\",\n \"external-withdraw\",\n \"read-balances\",\n \"read-spot\",\n \"read-internal-transfers\",\n \"read-address-book\",\n \"manage-address-book\",\n \"read-auto-withdraw\",\n \"manage-auto-withdraw\",\n \"swap\",\n] as const;\n\n/**\n * Account permissions, accepted by API-key policies only: a sub-account policy refuses them.\n * Each grants exactly the calls it names, and main-account permissions apply only to keys\n * scoped to the main account.\n */\nexport const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [\n \"read-api-keys\",\n \"read-api-policies\",\n \"read-subaccount-policies\",\n \"read-subaccount-permissions\",\n \"read-vip-status\",\n \"read-social-verification\",\n \"read-profile\",\n \"read-account-directory\",\n \"read-withdraw-validation\",\n \"read-daily-claims\",\n \"claim-daily-reward\",\n \"read-checkpoints\",\n \"read-rewards\",\n] as const;\n\nexport const POLICY_ACTION_LABELS = [\n ...PRODUCT_POLICY_ACTION_LABELS,\n ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS,\n] as const;\nexport type PolicyActionLabel = (typeof POLICY_ACTION_LABELS)[number];\n\nexport const POLICY_MARKET_SCOPE_LABELS = [\"all\", \"allowlist\"] as const;\nexport type PolicyMarketScopeLabel = (typeof POLICY_MARKET_SCOPE_LABELS)[number];\n\nexport const PolicyMarketScopeCodec = {\n inputToProto: {\n all: Proto.MarketScope_Value.ALL,\n allowlist: Proto.MarketScope_Value.ALLOWLIST,\n } satisfies Record<PolicyMarketScopeLabel, Proto.MarketScope_Value>,\n protoToOutput: {\n [Proto.MarketScope_Value.UNSPECIFIED]: \"unspecified\",\n [Proto.MarketScope_Value.ALL]: \"all\",\n [Proto.MarketScope_Value.ALLOWLIST]: \"allowlist\",\n } satisfies ProtoToOutput<Proto.MarketScope_Value, PolicyMarketScopeLabel>,\n} as const;\n\nexport const PolicyActionCodec = {\n protoToOutput: {\n [Proto.PolicyAction.UNSPECIFIED]: \"unspecified\",\n [Proto.PolicyAction.TRADE_SPOT]: \"trade-spot\",\n [Proto.PolicyAction.INTERNAL_TRANSFER]: \"internal-transfer\",\n [Proto.PolicyAction.EXTERNAL_WITHDRAW]: \"external-withdraw\",\n [Proto.PolicyAction.READ_BALANCES]: \"read-balances\",\n [Proto.PolicyAction.READ_SPOT]: \"read-spot\",\n [Proto.PolicyAction.READ_INTERNAL_TRANSFERS]: \"read-internal-transfers\",\n [Proto.PolicyAction.READ_ADDRESS_BOOK]: \"read-address-book\",\n [Proto.PolicyAction.MANAGE_ADDRESS_BOOK]: \"manage-address-book\",\n [Proto.PolicyAction.READ_AUTO_WITHDRAW]: \"read-auto-withdraw\",\n [Proto.PolicyAction.MANAGE_AUTO_WITHDRAW]: \"manage-auto-withdraw\",\n [Proto.PolicyAction.SWAP]: \"swap\",\n [Proto.PolicyAction.READ_API_KEYS]: \"read-api-keys\",\n [Proto.PolicyAction.READ_API_POLICIES]: \"read-api-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_POLICIES]: \"read-subaccount-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS]: \"read-subaccount-permissions\",\n [Proto.PolicyAction.READ_VIP_STATUS]: \"read-vip-status\",\n [Proto.PolicyAction.READ_SOCIAL_VERIFICATION]: \"read-social-verification\",\n [Proto.PolicyAction.READ_PROFILE]: \"read-profile\",\n [Proto.PolicyAction.READ_ACCOUNT_DIRECTORY]: \"read-account-directory\",\n [Proto.PolicyAction.READ_WITHDRAW_VALIDATION]: \"read-withdraw-validation\",\n [Proto.PolicyAction.READ_DAILY_CLAIMS]: \"read-daily-claims\",\n [Proto.PolicyAction.CLAIM_DAILY_REWARD]: \"claim-daily-reward\",\n [Proto.PolicyAction.READ_CHECKPOINTS]: \"read-checkpoints\",\n [Proto.PolicyAction.READ_REWARDS]: \"read-rewards\",\n } satisfies ProtoToOutput<Proto.PolicyAction, PolicyActionLabel>,\n inputToProto: {\n \"trade-spot\": Proto.PolicyAction.TRADE_SPOT,\n \"internal-transfer\": Proto.PolicyAction.INTERNAL_TRANSFER,\n \"external-withdraw\": Proto.PolicyAction.EXTERNAL_WITHDRAW,\n \"read-balances\": Proto.PolicyAction.READ_BALANCES,\n \"read-spot\": Proto.PolicyAction.READ_SPOT,\n \"read-internal-transfers\": Proto.PolicyAction.READ_INTERNAL_TRANSFERS,\n \"read-address-book\": Proto.PolicyAction.READ_ADDRESS_BOOK,\n \"manage-address-book\": Proto.PolicyAction.MANAGE_ADDRESS_BOOK,\n \"read-auto-withdraw\": Proto.PolicyAction.READ_AUTO_WITHDRAW,\n \"manage-auto-withdraw\": Proto.PolicyAction.MANAGE_AUTO_WITHDRAW,\n swap: Proto.PolicyAction.SWAP,\n \"read-api-keys\": Proto.PolicyAction.READ_API_KEYS,\n \"read-api-policies\": Proto.PolicyAction.READ_API_POLICIES,\n \"read-subaccount-policies\": Proto.PolicyAction.READ_SUBACCOUNT_POLICIES,\n \"read-subaccount-permissions\": Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS,\n \"read-vip-status\": Proto.PolicyAction.READ_VIP_STATUS,\n \"read-social-verification\": Proto.PolicyAction.READ_SOCIAL_VERIFICATION,\n \"read-profile\": Proto.PolicyAction.READ_PROFILE,\n \"read-account-directory\": Proto.PolicyAction.READ_ACCOUNT_DIRECTORY,\n \"read-withdraw-validation\": Proto.PolicyAction.READ_WITHDRAW_VALIDATION,\n \"read-daily-claims\": Proto.PolicyAction.READ_DAILY_CLAIMS,\n \"claim-daily-reward\": Proto.PolicyAction.CLAIM_DAILY_REWARD,\n \"read-checkpoints\": Proto.PolicyAction.READ_CHECKPOINTS,\n \"read-rewards\": Proto.PolicyAction.READ_REWARDS,\n } satisfies Record<PolicyActionLabel, Proto.PolicyAction>,\n} as const;\n\n/**\n * Returns the display label for a policy market scope.\n */\nexport function policyMarketScopeLabelFor(value: number): DecodedEnum<PolicyMarketScopeLabel> {\n return enumLabel(PolicyMarketScopeCodec.protoToOutput, value);\n}\n\n/**\n * Returns the display label for a policy action.\n */\nexport function policyActionLabelFor(value: number): DecodedEnum<PolicyActionLabel> {\n return enumLabel(PolicyActionCodec.protoToOutput, value);\n}\n"],"mappings":";;;;AAKA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;;;;;AAOA,MAAa,0CAA0C;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAEA,MAAa,uBAAuB,CAChC,GAAG,8BACH,GAAG,uCACP;AAMA,MAAa,yBAAyB;CAClC,cAAc;EACV,KAAA;EACA,WAAA;CACJ;CACA,eAAe;GAC4B,IAAA;GACR,IAAA;GACM,IAAA;CACzC;AACJ;AAEA,MAAa,oBAAoB;CAC7B,eAAe;GACuB,IAAA;GACD,IAAA;GACO,IAAA;GACA,IAAA;GACJ,IAAA;GACJ,IAAA;GACc,IAAA;GACN,KAAA;GACE,KAAA;GACD,KAAA;GACE,KAAA;GAChB,KAAA;GACS,KAAA;GACI,KAAA;GACO,KAAA;GACG,KAAA;GACZ,KAAA;GACS,KAAA;GACZ,KAAA;GACU,KAAA;GACE,KAAA;GACP,KAAA;GACC,KAAA;GACF,KAAA;GACJ,KAAA;
|
|
1
|
+
{"version":3,"file":"shared.codecs.js","names":[],"sources":["../../../src/services/policies/shared.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/policies_pb.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum, ProtoToOutput } from \"../../utils/types.js\";\n\n/** Product actions, accepted by sub-account and API-key policies. */\nexport const PRODUCT_POLICY_ACTION_LABELS = [\n \"trade-spot\",\n \"internal-transfer\",\n \"external-withdraw\",\n \"read-balances\",\n \"read-spot\",\n \"read-internal-transfers\",\n \"read-address-book\",\n \"manage-address-book\",\n \"read-auto-withdraw\",\n \"manage-auto-withdraw\",\n \"swap\",\n] as const;\n\n/**\n * Account permissions, accepted by API-key policies only: a sub-account policy refuses them.\n * Each grants exactly the calls it names, and main-account permissions apply only to keys\n * scoped to the main account.\n */\nexport const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [\n \"read-api-keys\",\n \"read-api-policies\",\n \"read-subaccount-policies\",\n \"read-subaccount-permissions\",\n \"read-vip-status\",\n \"read-social-verification\",\n \"read-profile\",\n \"read-account-directory\",\n \"read-withdraw-validation\",\n \"read-daily-claims\",\n \"claim-daily-reward\",\n \"read-checkpoints\",\n \"read-rewards\",\n \"create-deposit-address\",\n \"read-deposit-addresses\",\n \"read-subaccounts\",\n \"read-subaccount-activity\",\n \"read-subaccount-members\",\n \"read-subaccount-invites\",\n \"read-guard-signer-status\",\n] as const;\n\nexport const POLICY_ACTION_LABELS = [\n ...PRODUCT_POLICY_ACTION_LABELS,\n ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS,\n] as const;\nexport type PolicyActionLabel = (typeof POLICY_ACTION_LABELS)[number];\n\nexport const POLICY_MARKET_SCOPE_LABELS = [\"all\", \"allowlist\"] as const;\nexport type PolicyMarketScopeLabel = (typeof POLICY_MARKET_SCOPE_LABELS)[number];\n\nexport const PolicyMarketScopeCodec = {\n inputToProto: {\n all: Proto.MarketScope_Value.ALL,\n allowlist: Proto.MarketScope_Value.ALLOWLIST,\n } satisfies Record<PolicyMarketScopeLabel, Proto.MarketScope_Value>,\n protoToOutput: {\n [Proto.MarketScope_Value.UNSPECIFIED]: \"unspecified\",\n [Proto.MarketScope_Value.ALL]: \"all\",\n [Proto.MarketScope_Value.ALLOWLIST]: \"allowlist\",\n } satisfies ProtoToOutput<Proto.MarketScope_Value, PolicyMarketScopeLabel>,\n} as const;\n\nexport const PolicyActionCodec = {\n protoToOutput: {\n [Proto.PolicyAction.UNSPECIFIED]: \"unspecified\",\n [Proto.PolicyAction.TRADE_SPOT]: \"trade-spot\",\n [Proto.PolicyAction.INTERNAL_TRANSFER]: \"internal-transfer\",\n [Proto.PolicyAction.EXTERNAL_WITHDRAW]: \"external-withdraw\",\n [Proto.PolicyAction.READ_BALANCES]: \"read-balances\",\n [Proto.PolicyAction.READ_SPOT]: \"read-spot\",\n [Proto.PolicyAction.READ_INTERNAL_TRANSFERS]: \"read-internal-transfers\",\n [Proto.PolicyAction.READ_ADDRESS_BOOK]: \"read-address-book\",\n [Proto.PolicyAction.MANAGE_ADDRESS_BOOK]: \"manage-address-book\",\n [Proto.PolicyAction.READ_AUTO_WITHDRAW]: \"read-auto-withdraw\",\n [Proto.PolicyAction.MANAGE_AUTO_WITHDRAW]: \"manage-auto-withdraw\",\n [Proto.PolicyAction.SWAP]: \"swap\",\n [Proto.PolicyAction.READ_API_KEYS]: \"read-api-keys\",\n [Proto.PolicyAction.READ_API_POLICIES]: \"read-api-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_POLICIES]: \"read-subaccount-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS]: \"read-subaccount-permissions\",\n [Proto.PolicyAction.READ_VIP_STATUS]: \"read-vip-status\",\n [Proto.PolicyAction.READ_SOCIAL_VERIFICATION]: \"read-social-verification\",\n [Proto.PolicyAction.READ_PROFILE]: \"read-profile\",\n [Proto.PolicyAction.READ_ACCOUNT_DIRECTORY]: \"read-account-directory\",\n [Proto.PolicyAction.READ_WITHDRAW_VALIDATION]: \"read-withdraw-validation\",\n [Proto.PolicyAction.READ_DAILY_CLAIMS]: \"read-daily-claims\",\n [Proto.PolicyAction.CLAIM_DAILY_REWARD]: \"claim-daily-reward\",\n [Proto.PolicyAction.READ_CHECKPOINTS]: \"read-checkpoints\",\n [Proto.PolicyAction.READ_REWARDS]: \"read-rewards\",\n [Proto.PolicyAction.CREATE_DEPOSIT_ADDRESS]: \"create-deposit-address\",\n [Proto.PolicyAction.READ_DEPOSIT_ADDRESSES]: \"read-deposit-addresses\",\n [Proto.PolicyAction.READ_SUBACCOUNTS]: \"read-subaccounts\",\n [Proto.PolicyAction.READ_SUBACCOUNT_ACTIVITY]: \"read-subaccount-activity\",\n [Proto.PolicyAction.READ_SUBACCOUNT_MEMBERS]: \"read-subaccount-members\",\n [Proto.PolicyAction.READ_SUBACCOUNT_INVITES]: \"read-subaccount-invites\",\n [Proto.PolicyAction.READ_GUARD_SIGNER_STATUS]: \"read-guard-signer-status\",\n } satisfies ProtoToOutput<Proto.PolicyAction, PolicyActionLabel>,\n inputToProto: {\n \"trade-spot\": Proto.PolicyAction.TRADE_SPOT,\n \"internal-transfer\": Proto.PolicyAction.INTERNAL_TRANSFER,\n \"external-withdraw\": Proto.PolicyAction.EXTERNAL_WITHDRAW,\n \"read-balances\": Proto.PolicyAction.READ_BALANCES,\n \"read-spot\": Proto.PolicyAction.READ_SPOT,\n \"read-internal-transfers\": Proto.PolicyAction.READ_INTERNAL_TRANSFERS,\n \"read-address-book\": Proto.PolicyAction.READ_ADDRESS_BOOK,\n \"manage-address-book\": Proto.PolicyAction.MANAGE_ADDRESS_BOOK,\n \"read-auto-withdraw\": Proto.PolicyAction.READ_AUTO_WITHDRAW,\n \"manage-auto-withdraw\": Proto.PolicyAction.MANAGE_AUTO_WITHDRAW,\n swap: Proto.PolicyAction.SWAP,\n \"read-api-keys\": Proto.PolicyAction.READ_API_KEYS,\n \"read-api-policies\": Proto.PolicyAction.READ_API_POLICIES,\n \"read-subaccount-policies\": Proto.PolicyAction.READ_SUBACCOUNT_POLICIES,\n \"read-subaccount-permissions\": Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS,\n \"read-vip-status\": Proto.PolicyAction.READ_VIP_STATUS,\n \"read-social-verification\": Proto.PolicyAction.READ_SOCIAL_VERIFICATION,\n \"read-profile\": Proto.PolicyAction.READ_PROFILE,\n \"read-account-directory\": Proto.PolicyAction.READ_ACCOUNT_DIRECTORY,\n \"read-withdraw-validation\": Proto.PolicyAction.READ_WITHDRAW_VALIDATION,\n \"read-daily-claims\": Proto.PolicyAction.READ_DAILY_CLAIMS,\n \"claim-daily-reward\": Proto.PolicyAction.CLAIM_DAILY_REWARD,\n \"read-checkpoints\": Proto.PolicyAction.READ_CHECKPOINTS,\n \"read-rewards\": Proto.PolicyAction.READ_REWARDS,\n \"create-deposit-address\": Proto.PolicyAction.CREATE_DEPOSIT_ADDRESS,\n \"read-deposit-addresses\": Proto.PolicyAction.READ_DEPOSIT_ADDRESSES,\n \"read-subaccounts\": Proto.PolicyAction.READ_SUBACCOUNTS,\n \"read-subaccount-activity\": Proto.PolicyAction.READ_SUBACCOUNT_ACTIVITY,\n \"read-subaccount-members\": Proto.PolicyAction.READ_SUBACCOUNT_MEMBERS,\n \"read-subaccount-invites\": Proto.PolicyAction.READ_SUBACCOUNT_INVITES,\n \"read-guard-signer-status\": Proto.PolicyAction.READ_GUARD_SIGNER_STATUS,\n } satisfies Record<PolicyActionLabel, Proto.PolicyAction>,\n} as const;\n\n/**\n * Returns the display label for a policy market scope.\n */\nexport function policyMarketScopeLabelFor(value: number): DecodedEnum<PolicyMarketScopeLabel> {\n return enumLabel(PolicyMarketScopeCodec.protoToOutput, value);\n}\n\n/**\n * Returns the display label for a policy action.\n */\nexport function policyActionLabelFor(value: number): DecodedEnum<PolicyActionLabel> {\n return enumLabel(PolicyActionCodec.protoToOutput, value);\n}\n"],"mappings":";;;;AAKA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;;;;;AAOA,MAAa,0CAA0C;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAEA,MAAa,uBAAuB,CAChC,GAAG,8BACH,GAAG,uCACP;AAMA,MAAa,yBAAyB;CAClC,cAAc;EACV,KAAA;EACA,WAAA;CACJ;CACA,eAAe;GAC4B,IAAA;GACR,IAAA;GACM,IAAA;CACzC;AACJ;AAEA,MAAa,oBAAoB;CAC7B,eAAe;GACuB,IAAA;GACD,IAAA;GACO,IAAA;GACA,IAAA;GACJ,IAAA;GACJ,IAAA;GACc,IAAA;GACN,KAAA;GACE,KAAA;GACD,KAAA;GACE,KAAA;GAChB,KAAA;GACS,KAAA;GACI,KAAA;GACO,KAAA;GACG,KAAA;GACZ,KAAA;GACS,KAAA;GACZ,KAAA;GACU,KAAA;GACE,KAAA;GACP,KAAA;GACC,KAAA;GACF,KAAA;GACJ,KAAA;GACU,KAAA;GACA,KAAA;GACN,KAAA;GACQ,KAAA;GACD,KAAA;GACA,KAAA;GACC,KAAA;CACnD;CACA,cAAc;EACV,cAAA;EACA,qBAAA;EACA,qBAAA;EACA,iBAAA;EACA,aAAA;EACA,2BAAA;EACA,qBAAA;EACA,uBAAA;EACA,sBAAA;EACA,wBAAA;EACA,MAAA;EACA,iBAAA;EACA,qBAAA;EACA,4BAAA;EACA,+BAAA;EACA,mBAAA;EACA,4BAAA;EACA,gBAAA;EACA,0BAAA;EACA,4BAAA;EACA,qBAAA;EACA,sBAAA;EACA,oBAAA;EACA,gBAAA;EACA,0BAAA;EACA,0BAAA;EACA,oBAAA;EACA,4BAAA;EACA,2BAAA;EACA,2BAAA;EACA,4BAAA;CACJ;AACJ;;;;AAKA,SAAgB,0BAA0B,OAAoD;CAC1F,OAAO,UAAU,uBAAuB,eAAe,KAAK;AAChE;;;;AAKA,SAAgB,qBAAqB,OAA+C;CAChF,OAAO,UAAU,kBAAkB,eAAe,KAAK;AAC3D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
//#region src/services/policies/shared.d.ts
|
|
3
|
-
declare const PolicyActionEnumSchema: v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards"], undefined>;
|
|
3
|
+
declare const PolicyActionEnumSchema: v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status"], undefined>;
|
|
4
4
|
declare const PolicyMarketScopeEnumSchema: v.PicklistSchema<readonly ["all", "allowlist"], undefined>;
|
|
5
5
|
type PolicyMarketScope = v.InferOutput<typeof PolicyMarketScopeEnumSchema>;
|
|
6
6
|
type PolicyAction = v.InferOutput<typeof PolicyActionEnumSchema>;
|
|
@@ -38,7 +38,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
38
38
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
39
39
|
}, undefined>, undefined>, readonly []>;
|
|
40
40
|
readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
|
|
41
|
-
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[]>]>;
|
|
41
|
+
readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[]>]>;
|
|
42
42
|
readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
43
43
|
readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
44
44
|
readonly maxOrderNotional: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
@@ -79,7 +79,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
79
79
|
symbolId: number;
|
|
80
80
|
}[];
|
|
81
81
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
82
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
82
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
83
83
|
isTemplate: boolean;
|
|
84
84
|
sourceTemplateId?: string | undefined;
|
|
85
85
|
maxOrderNotional: string;
|
|
@@ -104,7 +104,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
104
104
|
symbolId: number;
|
|
105
105
|
}[];
|
|
106
106
|
spotMarketScope: DecodedEnum<"all" | "allowlist">;
|
|
107
|
-
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards">[];
|
|
107
|
+
actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status">[];
|
|
108
108
|
isTemplate: boolean;
|
|
109
109
|
sourceTemplateId?: string | undefined;
|
|
110
110
|
maxOpenOrders: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "../../gen/alerts/v1/price_alerts_pb.js";
|
|
2
|
+
//#region src/services/price-alerts/price-alerts.codecs.d.ts
|
|
3
|
+
declare const PRICE_ALERT_DIRECTION_VALUES: readonly ["above", "below"];
|
|
4
|
+
/** `above` fires at or above the alert price, `below` at or below it. */
|
|
5
|
+
type PriceAlertDirection = (typeof PRICE_ALERT_DIRECTION_VALUES)[number];
|
|
6
|
+
declare const PRICE_ALERT_PRICE_SOURCE_VALUES: readonly ["last_price", "index_price"];
|
|
7
|
+
type PriceAlertPriceSource = (typeof PRICE_ALERT_PRICE_SOURCE_VALUES)[number];
|
|
8
|
+
declare const PRICE_ALERT_STATUS_VALUES: readonly ["active", "triggered", "cancelled"];
|
|
9
|
+
type PriceAlertStatus = (typeof PRICE_ALERT_STATUS_VALUES)[number];
|
|
10
|
+
declare const PRICE_ALERT_CHANNEL_VALUES: readonly ["in_app", "telegram"];
|
|
11
|
+
type PriceAlertChannel = (typeof PRICE_ALERT_CHANNEL_VALUES)[number];
|
|
12
|
+
declare const PRICE_ALERT_UPDATE_OUTCOME_VALUES: readonly ["applied", "unchanged", "replayed"];
|
|
13
|
+
/**
|
|
14
|
+
* What an update did: `applied` changed the alert, `unchanged` found it already as requested,
|
|
15
|
+
* and `replayed` recognized a reused idempotency key and changed nothing.
|
|
16
|
+
*/
|
|
17
|
+
type PriceAlertUpdateOutcome = (typeof PRICE_ALERT_UPDATE_OUTCOME_VALUES)[number];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { PRICE_ALERT_CHANNEL_VALUES, PRICE_ALERT_DIRECTION_VALUES, PRICE_ALERT_PRICE_SOURCE_VALUES, PRICE_ALERT_STATUS_VALUES, PRICE_ALERT_UPDATE_OUTCOME_VALUES, PriceAlertChannel, PriceAlertDirection, PriceAlertPriceSource, PriceAlertStatus, PriceAlertUpdateOutcome };
|
|
20
|
+
//# sourceMappingURL=price-alerts.codecs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-alerts.codecs.d.ts","names":[],"sources":["../../../src/services/price-alerts/price-alerts.codecs.ts"],"mappings":";;cAGa;;KAED,8BAA8B;cAE7B;KACD,gCAAgC;cAE/B;KACD,2BAA2B;cAE1B;KACD,4BAA4B;cAE3B;;;;;KAKD,kCAAkC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "../../gen/alerts/v1/price_alerts_pb.js";
|
|
2
|
+
//#region src/services/price-alerts/price-alerts.codecs.ts
|
|
3
|
+
const PRICE_ALERT_DIRECTION_VALUES = ["above", "below"];
|
|
4
|
+
const PRICE_ALERT_PRICE_SOURCE_VALUES = ["last_price", "index_price"];
|
|
5
|
+
const PRICE_ALERT_STATUS_VALUES = [
|
|
6
|
+
"active",
|
|
7
|
+
"triggered",
|
|
8
|
+
"cancelled"
|
|
9
|
+
];
|
|
10
|
+
const PRICE_ALERT_CHANNEL_VALUES = ["in_app", "telegram"];
|
|
11
|
+
const PriceAlertDirectionCodec = {
|
|
12
|
+
inputToProto: {
|
|
13
|
+
above: 1,
|
|
14
|
+
below: 2
|
|
15
|
+
},
|
|
16
|
+
protoToOutput: {
|
|
17
|
+
[0]: "unspecified",
|
|
18
|
+
[1]: "above",
|
|
19
|
+
[2]: "below"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const PriceAlertPriceSourceCodec = {
|
|
23
|
+
inputToProto: {
|
|
24
|
+
last_price: 1,
|
|
25
|
+
index_price: 2
|
|
26
|
+
},
|
|
27
|
+
protoToOutput: {
|
|
28
|
+
[0]: "unspecified",
|
|
29
|
+
[1]: "last_price",
|
|
30
|
+
[2]: "index_price"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const PriceAlertStatusCodec = {
|
|
34
|
+
inputToProto: {
|
|
35
|
+
active: 1,
|
|
36
|
+
triggered: 2,
|
|
37
|
+
cancelled: 3
|
|
38
|
+
},
|
|
39
|
+
protoToOutput: {
|
|
40
|
+
[0]: "unspecified",
|
|
41
|
+
[1]: "active",
|
|
42
|
+
[2]: "triggered",
|
|
43
|
+
[3]: "cancelled"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const PriceAlertChannelCodec = {
|
|
47
|
+
inputToProto: {
|
|
48
|
+
in_app: 1,
|
|
49
|
+
telegram: 2
|
|
50
|
+
},
|
|
51
|
+
protoToOutput: {
|
|
52
|
+
[0]: "unspecified",
|
|
53
|
+
[1]: "in_app",
|
|
54
|
+
[2]: "telegram"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const PriceAlertUpdateOutcomeCodec = { protoToOutput: {
|
|
58
|
+
[0]: "unspecified",
|
|
59
|
+
[1]: "applied",
|
|
60
|
+
[2]: "unchanged",
|
|
61
|
+
[3]: "replayed"
|
|
62
|
+
} };
|
|
63
|
+
//#endregion
|
|
64
|
+
export { PRICE_ALERT_CHANNEL_VALUES, PRICE_ALERT_DIRECTION_VALUES, PRICE_ALERT_PRICE_SOURCE_VALUES, PRICE_ALERT_STATUS_VALUES, PriceAlertChannelCodec, PriceAlertDirectionCodec, PriceAlertPriceSourceCodec, PriceAlertStatusCodec, PriceAlertUpdateOutcomeCodec };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=price-alerts.codecs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-alerts.codecs.js","names":[],"sources":["../../../src/services/price-alerts/price-alerts.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/alerts/v1/price_alerts_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const PRICE_ALERT_DIRECTION_VALUES = [\"above\", \"below\"] as const;\n/** `above` fires at or above the alert price, `below` at or below it. */\nexport type PriceAlertDirection = (typeof PRICE_ALERT_DIRECTION_VALUES)[number];\n\nexport const PRICE_ALERT_PRICE_SOURCE_VALUES = [\"last_price\", \"index_price\"] as const;\nexport type PriceAlertPriceSource = (typeof PRICE_ALERT_PRICE_SOURCE_VALUES)[number];\n\nexport const PRICE_ALERT_STATUS_VALUES = [\"active\", \"triggered\", \"cancelled\"] as const;\nexport type PriceAlertStatus = (typeof PRICE_ALERT_STATUS_VALUES)[number];\n\nexport const PRICE_ALERT_CHANNEL_VALUES = [\"in_app\", \"telegram\"] as const;\nexport type PriceAlertChannel = (typeof PRICE_ALERT_CHANNEL_VALUES)[number];\n\nexport const PRICE_ALERT_UPDATE_OUTCOME_VALUES = [\"applied\", \"unchanged\", \"replayed\"] as const;\n/**\n * What an update did: `applied` changed the alert, `unchanged` found it already as requested,\n * and `replayed` recognized a reused idempotency key and changed nothing.\n */\nexport type PriceAlertUpdateOutcome = (typeof PRICE_ALERT_UPDATE_OUTCOME_VALUES)[number];\n\nexport const PriceAlertDirectionCodec = {\n inputToProto: {\n above: Proto.AlertDirection.ABOVE,\n below: Proto.AlertDirection.BELOW,\n } satisfies InputToProto<PriceAlertDirection, Proto.AlertDirection>,\n protoToOutput: {\n [Proto.AlertDirection.DIRECTION_UNSPECIFIED]: \"unspecified\",\n [Proto.AlertDirection.ABOVE]: \"above\",\n [Proto.AlertDirection.BELOW]: \"below\",\n } satisfies ProtoToOutput<Proto.AlertDirection, PriceAlertDirection>,\n} as const;\n\nexport const PriceAlertPriceSourceCodec = {\n inputToProto: {\n last_price: Proto.AlertPriceSource.LAST_PRICE,\n index_price: Proto.AlertPriceSource.INDEX_PRICE,\n } satisfies InputToProto<PriceAlertPriceSource, Proto.AlertPriceSource>,\n protoToOutput: {\n [Proto.AlertPriceSource.PRICE_SOURCE_UNSPECIFIED]: \"unspecified\",\n [Proto.AlertPriceSource.LAST_PRICE]: \"last_price\",\n [Proto.AlertPriceSource.INDEX_PRICE]: \"index_price\",\n } satisfies ProtoToOutput<Proto.AlertPriceSource, PriceAlertPriceSource>,\n} as const;\n\nexport const PriceAlertStatusCodec = {\n inputToProto: {\n active: Proto.AlertStatus.ACTIVE,\n triggered: Proto.AlertStatus.TRIGGERED,\n cancelled: Proto.AlertStatus.CANCELLED,\n } satisfies InputToProto<PriceAlertStatus, Proto.AlertStatus>,\n protoToOutput: {\n [Proto.AlertStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.AlertStatus.ACTIVE]: \"active\",\n [Proto.AlertStatus.TRIGGERED]: \"triggered\",\n [Proto.AlertStatus.CANCELLED]: \"cancelled\",\n } satisfies ProtoToOutput<Proto.AlertStatus, PriceAlertStatus>,\n} as const;\n\nexport const PriceAlertChannelCodec = {\n inputToProto: {\n in_app: Proto.AlertChannel.IN_APP,\n telegram: Proto.AlertChannel.TELEGRAM,\n } satisfies InputToProto<PriceAlertChannel, Proto.AlertChannel>,\n protoToOutput: {\n [Proto.AlertChannel.CHANNEL_UNSPECIFIED]: \"unspecified\",\n [Proto.AlertChannel.IN_APP]: \"in_app\",\n [Proto.AlertChannel.TELEGRAM]: \"telegram\",\n } satisfies ProtoToOutput<Proto.AlertChannel, PriceAlertChannel>,\n} as const;\n\nexport const PriceAlertUpdateOutcomeCodec = {\n protoToOutput: {\n [Proto.UpdateOutcome.UPDATE_OUTCOME_UNSPECIFIED]: \"unspecified\",\n [Proto.UpdateOutcome.APPLIED]: \"applied\",\n [Proto.UpdateOutcome.UNCHANGED]: \"unchanged\",\n [Proto.UpdateOutcome.REPLAYED]: \"replayed\",\n } satisfies ProtoToOutput<Proto.UpdateOutcome, PriceAlertUpdateOutcome>,\n} as const;\n"],"mappings":";;AAGA,MAAa,+BAA+B,CAAC,SAAS,OAAO;AAI7D,MAAa,kCAAkC,CAAC,cAAc,aAAa;AAG3E,MAAa,4BAA4B;CAAC;CAAU;CAAa;AAAW;AAG5E,MAAa,6BAA6B,CAAC,UAAU,UAAU;AAU/D,MAAa,2BAA2B;CACpC,cAAc;EACV,OAAA;EACA,OAAA;CACJ;CACA,eAAe;GACmC,IAAA;GAChB,IAAA;GACA,IAAA;CAClC;AACJ;AAEA,MAAa,6BAA6B;CACtC,cAAc;EACV,YAAA;EACA,aAAA;CACJ;CACA,eAAe;GACwC,IAAA;GACd,IAAA;GACC,IAAA;CAC1C;AACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,QAAA;EACA,WAAA;EACA,WAAA;CACJ;CACA,eAAe;GAC6B,IAAA;GACZ,IAAA;GACG,IAAA;GACA,IAAA;CACnC;AACJ;AAEA,MAAa,yBAAyB;CAClC,cAAc;EACV,QAAA;EACA,UAAA;CACJ;CACA,eAAe;GAC+B,IAAA;GACb,IAAA;GACE,IAAA;CACnC;AACJ;AAEA,MAAa,+BAA+B,EACxC,eAAe;EACuC,IAAA;EACnB,IAAA;EACE,IAAA;EACD,IAAA;AACpC,EACJ"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AuthApiTransports } from "../../shared/transports.js";
|
|
2
|
+
import { PolyesterRequestOptions } from "../../shared/request-options.js";
|
|
3
|
+
import { CancelPriceAlertInput, CreatePriceAlertInput, ListPriceAlertsInput, ListPriceAlertsResult, PriceAlert, UpdatePriceAlertInput, UpdatePriceAlertResult } from "./price-alerts.schemas.js";
|
|
4
|
+
//#region src/services/price-alerts/price-alerts.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Manages the caller's price alerts. Alerts belong to the root account, not a trading account:
|
|
7
|
+
* a session and the root account's API keys see the same alerts, and an API key scoped to a
|
|
8
|
+
* subaccount is refused (`PermissionError`, detail `SUBACCOUNT_KEY_REFUSED`). An alert fires at
|
|
9
|
+
* most once, only on a crossing it observes from its `referencePrice`; `update` sets a fired
|
|
10
|
+
* alert again. No call changes balances, orders or account settings.
|
|
11
|
+
*/
|
|
12
|
+
declare class PriceAlertsService {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(transports: AuthApiTransports);
|
|
15
|
+
/**
|
|
16
|
+
* Creates an active alert. Throws `PreconditionFailedError` when the market has no index
|
|
17
|
+
* price (`PRICE_SOURCE_UNSUPPORTED`) or the active-alert limit is reached, and a retryable
|
|
18
|
+
* `ServiceUnavailableError` when the market has no current price yet.
|
|
19
|
+
*/
|
|
20
|
+
create(input: CreatePriceAlertInput, options?: PolyesterRequestOptions): Promise<PriceAlert>;
|
|
21
|
+
/** Lists the caller's alerts, newest first. */
|
|
22
|
+
list(input?: ListPriceAlertsInput, options?: PolyesterRequestOptions): Promise<ListPriceAlertsResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Changes an alert's direction, price or channels; omitted fields stay as they are. A new
|
|
25
|
+
* direction or price records a new reference price. Updating a triggered alert sets it
|
|
26
|
+
* again, even with no field given. A stale `expectedRevision` throws
|
|
27
|
+
* `RevisionConflictError`; a cancelled alert throws `PreconditionFailedError`.
|
|
28
|
+
*/
|
|
29
|
+
update(input: UpdatePriceAlertInput, options?: PolyesterRequestOptions): Promise<UpdatePriceAlertResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Cancels an active alert; cancelling a cancelled alert returns it unchanged. A triggered
|
|
32
|
+
* alert throws `PreconditionFailedError` (`ALERT_TRIGGERED`).
|
|
33
|
+
*/
|
|
34
|
+
cancel(input: CancelPriceAlertInput, options?: PolyesterRequestOptions): Promise<PriceAlert>;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { PriceAlertsService };
|
|
38
|
+
//# sourceMappingURL=price-alerts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-alerts.d.ts","names":[],"sources":["../../../src/services/price-alerts/price-alerts.ts"],"mappings":";;;;;;;;;;;cAiCa;;EAGG,YAAA,YAAY;;;;;;EASlB,OACF,OAAO,uBACP,UAAU,0BACX,QAAQ;;EAUL,KACF,QAAO,sBACP,UAAU,0BACX,QAAQ;;;;;;;EAeL,OACF,OAAO,uBACP,UAAU,0BACX,QAAQ;;;;;EAaL,OACF,OAAO,uBACP,UAAU,0BACX,QAAQ"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { parse } from "../../shared/validation.js";
|
|
2
|
+
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
3
|
+
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
|
+
import { PriceAlertService } from "../../gen/alerts/v1/price_alerts_pb.js";
|
|
5
|
+
import { CancelPriceAlertInputSchema, CreatePriceAlertInputSchema, ListPriceAlertsInputSchema, ListPriceAlertsResultSchema, PriceAlertSchema, UpdatePriceAlertInputSchema, UpdatePriceAlertResultSchema } from "./price-alerts.schemas.js";
|
|
6
|
+
import { createClient } from "@connectrpc/connect";
|
|
7
|
+
//#region src/services/price-alerts/price-alerts.ts
|
|
8
|
+
/**
|
|
9
|
+
* Manages the caller's price alerts. Alerts belong to the root account, not a trading account:
|
|
10
|
+
* a session and the root account's API keys see the same alerts, and an API key scoped to a
|
|
11
|
+
* subaccount is refused (`PermissionError`, detail `SUBACCOUNT_KEY_REFUSED`). An alert fires at
|
|
12
|
+
* most once, only on a crossing it observes from its `referencePrice`; `update` sets a fired
|
|
13
|
+
* alert again. No call changes balances, orders or account settings.
|
|
14
|
+
*/
|
|
15
|
+
var PriceAlertsService = class {
|
|
16
|
+
#client;
|
|
17
|
+
constructor(transports) {
|
|
18
|
+
this.#client = createClient(PriceAlertService, transports.authApi);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Creates an active alert. Throws `PreconditionFailedError` when the market has no index
|
|
22
|
+
* price (`PRICE_SOURCE_UNSUPPORTED`) or the active-alert limit is reached, and a retryable
|
|
23
|
+
* `ServiceUnavailableError` when the market has no current price yet.
|
|
24
|
+
*/
|
|
25
|
+
async create(input, options) {
|
|
26
|
+
const request = parse(CreatePriceAlertInputSchema, input);
|
|
27
|
+
const response = await this.#client.createAlert(removeUndefined(request), toConnectCallOptions(options));
|
|
28
|
+
return parse(PriceAlertSchema, response.alert);
|
|
29
|
+
}
|
|
30
|
+
/** Lists the caller's alerts, newest first. */
|
|
31
|
+
async list(input = {}, options) {
|
|
32
|
+
const request = parse(ListPriceAlertsInputSchema, input);
|
|
33
|
+
const response = await this.#client.listAlerts(removeUndefined(request), toConnectCallOptions(options));
|
|
34
|
+
return parse(ListPriceAlertsResultSchema, response);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Changes an alert's direction, price or channels; omitted fields stay as they are. A new
|
|
38
|
+
* direction or price records a new reference price. Updating a triggered alert sets it
|
|
39
|
+
* again, even with no field given. A stale `expectedRevision` throws
|
|
40
|
+
* `RevisionConflictError`; a cancelled alert throws `PreconditionFailedError`.
|
|
41
|
+
*/
|
|
42
|
+
async update(input, options) {
|
|
43
|
+
const request = parse(UpdatePriceAlertInputSchema, input);
|
|
44
|
+
const response = await this.#client.updateAlert(removeUndefined(request), toConnectCallOptions(options));
|
|
45
|
+
return parse(UpdatePriceAlertResultSchema, response);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Cancels an active alert; cancelling a cancelled alert returns it unchanged. A triggered
|
|
49
|
+
* alert throws `PreconditionFailedError` (`ALERT_TRIGGERED`).
|
|
50
|
+
*/
|
|
51
|
+
async cancel(input, options) {
|
|
52
|
+
const request = parse(CancelPriceAlertInputSchema, input);
|
|
53
|
+
const response = await this.#client.cancelAlert(request, toConnectCallOptions(options));
|
|
54
|
+
return parse(PriceAlertSchema, response.alert);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { PriceAlertsService };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=price-alerts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-alerts.js","names":["#client","Proto.PriceAlertService"],"sources":["../../../src/services/price-alerts/price-alerts.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/alerts/v1/price_alerts_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n CancelPriceAlertInputSchema,\n CreatePriceAlertInputSchema,\n ListPriceAlertsInputSchema,\n ListPriceAlertsResultSchema,\n PriceAlertSchema,\n UpdatePriceAlertInputSchema,\n UpdatePriceAlertResultSchema,\n type CancelPriceAlertInput,\n type CreatePriceAlertInput,\n type ListPriceAlertsInput,\n type ListPriceAlertsResult,\n type PriceAlert,\n type UpdatePriceAlertInput,\n type UpdatePriceAlertResult,\n} from \"./price-alerts.schemas.js\";\n\n/**\n * Manages the caller's price alerts. Alerts belong to the root account, not a trading account:\n * a session and the root account's API keys see the same alerts, and an API key scoped to a\n * subaccount is refused (`PermissionError`, detail `SUBACCOUNT_KEY_REFUSED`). An alert fires at\n * most once, only on a crossing it observes from its `referencePrice`; `update` sets a fired\n * alert again. No call changes balances, orders or account settings.\n */\nexport class PriceAlertsService {\n #client: Client<typeof Proto.PriceAlertService>;\n\n constructor(transports: AuthApiTransports) {\n this.#client = createClient(Proto.PriceAlertService, transports.authApi);\n }\n\n /**\n * Creates an active alert. Throws `PreconditionFailedError` when the market has no index\n * price (`PRICE_SOURCE_UNSUPPORTED`) or the active-alert limit is reached, and a retryable\n * `ServiceUnavailableError` when the market has no current price yet.\n */\n async create(\n input: CreatePriceAlertInput,\n options?: PolyesterRequestOptions,\n ): Promise<PriceAlert> {\n const request = parse(CreatePriceAlertInputSchema, input);\n const response = await this.#client.createAlert(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(PriceAlertSchema, response.alert);\n }\n\n /** Lists the caller's alerts, newest first. */\n async list(\n input: ListPriceAlertsInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<ListPriceAlertsResult> {\n const request = parse(ListPriceAlertsInputSchema, input);\n const response = await this.#client.listAlerts(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(ListPriceAlertsResultSchema, response);\n }\n\n /**\n * Changes an alert's direction, price or channels; omitted fields stay as they are. A new\n * direction or price records a new reference price. Updating a triggered alert sets it\n * again, even with no field given. A stale `expectedRevision` throws\n * `RevisionConflictError`; a cancelled alert throws `PreconditionFailedError`.\n */\n async update(\n input: UpdatePriceAlertInput,\n options?: PolyesterRequestOptions,\n ): Promise<UpdatePriceAlertResult> {\n const request = parse(UpdatePriceAlertInputSchema, input);\n const response = await this.#client.updateAlert(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(UpdatePriceAlertResultSchema, response);\n }\n\n /**\n * Cancels an active alert; cancelling a cancelled alert returns it unchanged. A triggered\n * alert throws `PreconditionFailedError` (`ALERT_TRIGGERED`).\n */\n async cancel(\n input: CancelPriceAlertInput,\n options?: PolyesterRequestOptions,\n ): Promise<PriceAlert> {\n const request = parse(CancelPriceAlertInputSchema, input);\n const response = await this.#client.cancelAlert(request, toConnectCallOptions(options));\n return parse(PriceAlertSchema, response.alert);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,IAAa,qBAAb,MAAgC;CAC5B;CAEA,YAAY,YAA+B;EACvC,KAAKA,UAAU,aAAaC,mBAAyB,WAAW,OAAO;CAC3E;;;;;;CAOA,MAAM,OACF,OACA,SACmB;EACnB,MAAM,UAAU,MAAM,6BAA6B,KAAK;EACxD,MAAM,WAAW,MAAM,KAAKD,QAAQ,YAChC,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,kBAAkB,SAAS,KAAK;CACjD;;CAGA,MAAM,KACF,QAA8B,CAAC,GAC/B,SAC8B;EAC9B,MAAM,UAAU,MAAM,4BAA4B,KAAK;EACvD,MAAM,WAAW,MAAM,KAAKA,QAAQ,WAChC,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,6BAA6B,QAAQ;CACtD;;;;;;;CAQA,MAAM,OACF,OACA,SAC+B;EAC/B,MAAM,UAAU,MAAM,6BAA6B,KAAK;EACxD,MAAM,WAAW,MAAM,KAAKA,QAAQ,YAChC,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,8BAA8B,QAAQ;CACvD;;;;;CAMA,MAAM,OACF,OACA,SACmB;EACnB,MAAM,UAAU,MAAM,6BAA6B,KAAK;EACxD,MAAM,WAAW,MAAM,KAAKA,QAAQ,YAAY,SAAS,qBAAqB,OAAO,CAAC;EACtF,OAAO,MAAM,kBAAkB,SAAS,KAAK;CACjD;AACJ"}
|