@polyester/sdk 0.19.0 → 0.19.1
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 +6 -0
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +258 -3
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.js +55 -13
- package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/services/balances/balances.d.ts +9 -1
- package/dist/services/balances/balances.d.ts.map +1 -1
- package/dist/services/balances/balances.js +22 -1
- package/dist/services/balances/balances.js.map +1 -1
- package/dist/services/balances/balances.schemas.d.ts +165 -1
- package/dist/services/balances/balances.schemas.d.ts.map +1 -1
- package/dist/services/balances/balances.schemas.js +84 -3
- package/dist/services/balances/balances.schemas.js.map +1 -1
- package/dist/services/balances/balances.types.d.ts +2 -2
- package/dist/services/balances/index.d.ts +2 -2
- package/dist/services/orders/orders-input.schemas.d.ts +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger_read_pb.js","names":[],"sources":["../../../../../src/gen/ledger/read/v1/ledger_read_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file ledger/read/v1/ledger_read.proto (package ledger.read.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { AccountCode, TransferCode } from \"../../v1/catalog_pb.js\";\nimport { file_ledger_v1_catalog } from \"../../v1/catalog_pb.js\";\nimport type { U128 } from \"../../../polyester/type/v1/u128_pb.js\";\nimport { file_polyester_type_v1_u128 } from \"../../../polyester/type/v1/u128_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file ledger/read/v1/ledger_read.proto.\n */\nexport const file_ledger_read_v1_ledger_read: GenFile = /*@__PURE__*/\n fileDesc(\"CiBsZWRnZXIvcmVhZC92MS9sZWRnZXJfcmVhZC5wcm90bxIObGVkZ2VyLnJlYWQudjEiQgoSR2V0QmFsYW5jZXNSZXF1ZXN0EhoKDXN1YmFjY291bnRfaWQYASABKAZIAIgBAUIQCg5fc3ViYWNjb3VudF9pZCL/AQoMQXNzZXRCYWxhbmNlEhAKCGFzc2V0X2lkGAEgASgNEigKB3RyYWRpbmcYAiABKAsyFy5wb2x5ZXN0ZXIudHlwZS52MS5VMTI4EigKB2Z1bmRpbmcYAyABKAsyFy5wb2x5ZXN0ZXIudHlwZS52MS5VMTI4EikKCHJlc2VydmVkGAQgASgLMhcucG9seWVzdGVyLnR5cGUudjEuVTEyOBIqCglhdmFpbGFibGUYBSABKAsyFy5wb2x5ZXN0ZXIudHlwZS52MS5VMTI4EhgKEHRyYWRpbmdfcmV2aXNpb24YBiABKAQSGAoQZnVuZGluZ19yZXZpc2lvbhgHIAEoBCJFChNHZXRCYWxhbmNlc1Jlc3BvbnNlEi4KCGJhbGFuY2VzGAEgAygLMhwubGVkZ2VyLnJlYWQudjEuQXNzZXRCYWxhbmNlIrYBChhHZXRCYWxhbmNlSGlzdG9yeVJlcXVlc3QSGgoNc3ViYWNjb3VudF9pZBgBIAEoBkgAiAEBEi0KBXJhbmdlGAIgASgOMhwubGVkZ2VyLnJlYWQudjEuQmFsYW5jZVJhbmdlQgASDgoGbGVkZ2VyGAMgASgNEi0KDWFjY291bnRfY29kZXMYBCADKA4yFi5sZWRnZXIudjEuQWNjb3VudENvZGVCEAoOX3N1YmFjY291bnRf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UmVxdWVzdBouLmxlZGdlci5yZWFkLnYxLkdldEVxdWl0eUhpc3RvcnlTZXJpZXNSZXNwb25zZSIAEl4KDUxpc3RUcmFuc2ZlcnMSJC5sZWRnZXIucmVhZC52MS5MaXN0VHJhbnNmZXJzUmVxdWVzdBolLmxlZGdlci5yZWFkLnYxLkxpc3RUcmFuc2ZlcnNSZXNwb25zZSIAElIKCUxpc3RIb2xkcxIgLmxlZGdlci5yZWFkLnYxLkxpc3RIb2xkc1JlcXVlc3QaIS5sZWRnZXIucmVhZC52MS5MaXN0SG9sZHNSZXNwb25zZSIAElgKC0dldEJhbGFuY2VzEiIubGVkZ2VyLnJlYWQudjEuR2V0QmFsYW5jZXNSZXF1ZXN0GiMubGVkZ2VyLnJlYWQudjEuR2V0QmFsYW5jZXNSZXNwb25zZSIAQkdaRWdpdGh1Yi5jb20vRmFicmljLUxhYnMvcG9seWVzdGVyLXNkay1nby9nZW4vbGVkZ2VyL3JlYWQvdjE7bGVkZ2VycmR2MWIGcHJvdG8z\", [file_ledger_v1_catalog, file_polyester_type_v1_u128]);\n\n/**\n * @generated from message ledger.read.v1.GetBalancesRequest\n */\nexport type GetBalancesRequest = Message<\"ledger.read.v1.GetBalancesRequest\"> & {\n /**\n * Optional sub-account to scope balances to. If omitted, balances are\n * returned for the authenticated root account derived from the JWT or API\n * key. The logical account id itself is always derived from the caller's JWT\n * or API key, not from this payload.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalancesRequest.\n * Use `create(GetBalancesRequestSchema)` to create a new message.\n */\nexport const GetBalancesRequestSchema: GenMessage<GetBalancesRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 0);\n\n/**\n * Fixed-size representation for balances (for Protobuf/WS clients).\n * Uses common U128 messages for amounts to keep schema tidy and consistent.\n *\n * @generated from message ledger.read.v1.AssetBalance\n */\nexport type AssetBalance = Message<\"ledger.read.v1.AssetBalance\"> & {\n /**\n * Public unified asset id. Resolve symbol from SpotConfig; U128 amounts in\n * this message always use fixed 18-decimal ledger scale.\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * Trading balance at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 trading = 2;\n */\n trading?: U128 | undefined;\n\n /**\n * Funding balance at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 funding = 3;\n */\n funding?: U128 | undefined;\n\n /**\n * Reserved amount in the trading bucket at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 reserved = 4;\n */\n reserved?: U128 | undefined;\n\n /**\n * Amount currently available for new trading activity at fixed 18-decimal\n * ledger scale. This value already accounts for active reservations.\n *\n * @generated from field: polyester.type.v1.U128 available = 5;\n */\n available?: U128 | undefined;\n\n /**\n * Opaque monotonic revision for the atomic trading, reserved, and available\n * values. Higher means newer; zero means no trading state has been observed.\n *\n * @generated from field: uint64 trading_revision = 6;\n */\n tradingRevision: bigint;\n\n /**\n * Opaque monotonic revision for the funding value. Higher means newer; zero\n * means no funding state has been observed.\n *\n * @generated from field: uint64 funding_revision = 7;\n */\n fundingRevision: bigint;\n};\n\n/**\n * Describes the message ledger.read.v1.AssetBalance.\n * Use `create(AssetBalanceSchema)` to create a new message.\n */\nexport const AssetBalanceSchema: GenMessage<AssetBalance> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 1);\n\n/**\n * @generated from message ledger.read.v1.GetBalancesResponse\n */\nexport type GetBalancesResponse = Message<\"ledger.read.v1.GetBalancesResponse\"> & {\n /**\n * One entry for every supported unified asset, including assets with zero\n * balances. Sorted by available trading amount (highest first), then by\n * asset symbol alphabetically.\n *\n * @generated from field: repeated ledger.read.v1.AssetBalance balances = 1;\n */\n balances: AssetBalance[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalancesResponse.\n * Use `create(GetBalancesResponseSchema)` to create a new message.\n */\nexport const GetBalancesResponseSchema: GenMessage<GetBalancesResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 2);\n\n/**\n * @generated from message ledger.read.v1.GetBalanceHistoryRequest\n */\nexport type GetBalanceHistoryRequest = Message<\"ledger.read.v1.GetBalanceHistoryRequest\"> & {\n /**\n * Optional sub-account to scope balances to. If omitted, balances are\n * returned for the authenticated root account derived from the JWT or API\n * key. The logical account id itself is always derived from the caller's JWT\n * or API key, not from this payload.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * History window to return. When unset/UNSPECIFIED, defaults to 1D.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 2;\n */\n range: BalanceRange;\n\n /**\n * Optional public asset filter. When unset/0, returns all assets.\n *\n * @generated from field: uint32 ledger = 3;\n */\n ledger: number;\n\n /**\n * Optional subset of account buckets to return. When empty, returns all\n * account buckets.\n *\n * @generated from field: repeated ledger.v1.AccountCode account_codes = 4;\n */\n accountCodes: AccountCode[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalanceHistoryRequest.\n * Use `create(GetBalanceHistoryRequestSchema)` to create a new message.\n */\nexport const GetBalanceHistoryRequestSchema: GenMessage<GetBalanceHistoryRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 3);\n\n/**\n * Columnar balance series payload (scaled integers).\n * REST renders decimal strings from these values.\n *\n * @generated from message ledger.read.v1.BalanceSeries\n */\nexport type BalanceSeries = Message<\"ledger.read.v1.BalanceSeries\"> & {\n /**\n * public unified asset id\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * account bucket\n *\n * @generated from field: ledger.v1.AccountCode account_code = 2;\n */\n accountCode: AccountCode;\n\n /**\n * Chart balance in asset units scaled by 1e7 (7 decimals).\n * Values are downscaled from 18-decimal ledger balances for compact charting\n * and align 1:1 with implicit timestamps.\n *\n * @generated from field: repeated uint64 balance_q = 3;\n */\n balanceQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.BalanceSeries.\n * Use `create(BalanceSeriesSchema)` to create a new message.\n */\nexport const BalanceSeriesSchema: GenMessage<BalanceSeries> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 4);\n\n/**\n * GetBalanceHistoryResponse returns aligned balance chart series.\n *\n * @generated from message ledger.read.v1.GetBalanceHistoryResponse\n */\nexport type GetBalanceHistoryResponse = Message<\"ledger.read.v1.GetBalanceHistoryResponse\"> & {\n /**\n * Resolved history window.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 1;\n */\n range: BalanceRange;\n\n /**\n * Sampling interval between points, such as \"5m\" or \"1h\".\n *\n * @generated from field: string bucket = 2;\n */\n bucket: string;\n\n /**\n * First point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 start_ts_sec = 3;\n */\n startTsSec: number;\n\n /**\n * Last point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 end_ts_sec = 4;\n */\n endTsSec: number;\n\n /**\n * Number of aligned points in each returned series.\n *\n * @generated from field: uint32 points = 5;\n */\n points: number;\n\n /**\n * Balance series ordered by asset ID, then account bucket.\n *\n * @generated from field: repeated ledger.read.v1.BalanceSeries series = 6;\n */\n series: BalanceSeries[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalanceHistoryResponse.\n * Use `create(GetBalanceHistoryResponseSchema)` to create a new message.\n */\nexport const GetBalanceHistoryResponseSchema: GenMessage<GetBalanceHistoryResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 5);\n\n/**\n * Account grouping metadata (used when group_by = ACCOUNT).\n *\n * @generated from message ledger.read.v1.AccountGrouping\n */\nexport type AccountGrouping = Message<\"ledger.read.v1.AccountGrouping\"> & {\n /**\n * account bucket code\n *\n * @generated from field: uint32 account_code = 1;\n */\n accountCode: number;\n\n /**\n * human-readable name (\"funding\", \"trading\")\n *\n * @generated from field: string name = 2;\n */\n name: string;\n};\n\n/**\n * Describes the message ledger.read.v1.AccountGrouping.\n * Use `create(AccountGroupingSchema)` to create a new message.\n */\nexport const AccountGroupingSchema: GenMessage<AccountGrouping> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 6);\n\n/**\n * Asset grouping metadata (used when group_by = ASSET).\n *\n * @generated from message ledger.read.v1.AssetGrouping\n */\nexport type AssetGrouping = Message<\"ledger.read.v1.AssetGrouping\"> & {\n /**\n * public asset id (0 for \"OTHER\" bucket)\n *\n * @generated from field: uint32 id = 1;\n */\n id: number;\n\n /**\n * asset symbol (\"BTC\", \"ETH\", \"OTHER\")\n *\n * @generated from field: string symbol = 2;\n */\n symbol: string;\n};\n\n/**\n * Describes the message ledger.read.v1.AssetGrouping.\n * Use `create(AssetGroupingSchema)` to create a new message.\n */\nexport const AssetGroupingSchema: GenMessage<AssetGrouping> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 7);\n\n/**\n * Equity history in USDT (or BTC via client-side conversion using btc_prices).\n * Values are derived from per-asset balances and market prices (close ticks).\n *\n * @generated from message ledger.read.v1.GetEquityHistorySeriesRequest\n */\nexport type GetEquityHistorySeriesRequest = Message<\"ledger.read.v1.GetEquityHistorySeriesRequest\"> & {\n /**\n * Optional sub-account to scope equity to. If omitted, equity is returned for\n * the authenticated root account derived from the JWT or API key.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * History window to return. When unset/UNSPECIFIED, defaults to 1D.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 2;\n */\n range: BalanceRange;\n\n /**\n * Optional subset of account buckets.\n * When empty, server returns both funding and trading.\n * Only used when group_by = ACCOUNT.\n *\n * @generated from field: repeated ledger.v1.AccountCode account_codes = 4;\n */\n accountCodes: AccountCode[];\n\n /**\n * How to group the equity series. Defaults to ACCOUNT if unspecified.\n *\n * @generated from field: ledger.read.v1.EquityGroupBy group_by = 5;\n */\n groupBy: EquityGroupBy;\n};\n\n/**\n * Describes the message ledger.read.v1.GetEquityHistorySeriesRequest.\n * Use `create(GetEquityHistorySeriesRequestSchema)` to create a new message.\n */\nexport const GetEquityHistorySeriesRequestSchema: GenMessage<GetEquityHistorySeriesRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 8);\n\n/**\n * Columnar equity series payload (scaled integers).\n * REST renders decimal strings from these values.\n *\n * @generated from message ledger.read.v1.EquitySeries\n */\nexport type EquitySeries = Message<\"ledger.read.v1.EquitySeries\"> & {\n /**\n * Grouping identifier: either account or asset, depending on request group_by.\n *\n * @generated from oneof ledger.read.v1.EquitySeries.grouping\n */\n grouping: {\n /**\n * set when group_by = ACCOUNT\n *\n * @generated from field: ledger.read.v1.AccountGrouping account = 1;\n */\n value: AccountGrouping;\n case: \"account\";\n } | {\n /**\n * set when group_by = ASSET\n *\n * @generated from field: ledger.read.v1.AssetGrouping asset = 3;\n */\n value: AssetGrouping;\n case: \"asset\";\n } | { case: undefined; value?: undefined };\n\n /**\n * Equity in quote currency (USDT) scaled by 1e4 (4 decimals).\n * Values align 1:1 with timestamps.\n *\n * @generated from field: repeated sint64 equity_q = 2;\n */\n equityQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.EquitySeries.\n * Use `create(EquitySeriesSchema)` to create a new message.\n */\nexport const EquitySeriesSchema: GenMessage<EquitySeries> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 9);\n\n/**\n * GetEquityHistorySeriesResponse returns aligned equity chart series.\n *\n * @generated from message ledger.read.v1.GetEquityHistorySeriesResponse\n */\nexport type GetEquityHistorySeriesResponse = Message<\"ledger.read.v1.GetEquityHistorySeriesResponse\"> & {\n /**\n * Resolved history window.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 1;\n */\n range: BalanceRange;\n\n /**\n * Sampling interval between points, such as \"5m\" or \"1h\".\n *\n * @generated from field: string bucket = 2;\n */\n bucket: string;\n\n /**\n * First point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 start_ts_sec = 3;\n */\n startTsSec: number;\n\n /**\n * Last point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 end_ts_sec = 4;\n */\n endTsSec: number;\n\n /**\n * Human-readable quote asset symbol (always \"USDT\").\n *\n * @generated from field: string quote_asset = 6;\n */\n quoteAsset: string;\n\n /**\n * Number of aligned points in each returned series.\n *\n * @generated from field: uint32 points = 7;\n */\n points: number;\n\n /**\n * Equity series ordered by grouping identifier ascending.\n *\n * @generated from field: repeated ledger.read.v1.EquitySeries series = 8;\n */\n series: EquitySeries[];\n\n /**\n * BTC-USDT close price at each timestamp, scaled by 1e6 (same as price_ticks).\n * Enables client-side conversion to BTC denomination without refetch.\n *\n * @generated from field: repeated int64 btc_prices_q = 10;\n */\n btcPricesQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetEquityHistorySeriesResponse.\n * Use `create(GetEquityHistorySeriesResponseSchema)` to create a new message.\n */\nexport const GetEquityHistorySeriesResponseSchema: GenMessage<GetEquityHistorySeriesResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 10);\n\n/**\n * @generated from message ledger.read.v1.ListTransfersRequest\n */\nexport type ListTransfersRequest = Message<\"ledger.read.v1.ListTransfersRequest\"> & {\n /**\n * Optional sub-account to scope transfers to. If omitted, transfers are\n * listed for the authenticated root account derived from the JWT or API key.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * Maximum number of transfer rows to return. Defaults to 100 when omitted;\n * maximum is 1000.\n *\n * @generated from field: uint32 limit = 2;\n */\n limit: number;\n\n /**\n * Sort direction. When true, rows are returned newest first; when false,\n * rows are returned oldest first.\n *\n * @generated from field: bool reversed = 3;\n */\n reversed: boolean;\n\n /**\n * Optional lower transfer timestamp bound in microseconds since epoch (UTC),\n * inclusive.\n *\n * @generated from field: uint64 ts_min_us = 4;\n */\n tsMinUs: bigint;\n\n /**\n * Optional upper transfer timestamp bound in microseconds since epoch (UTC),\n * inclusive.\n *\n * @generated from field: uint64 ts_max_us = 5;\n */\n tsMaxUs: bigint;\n\n /**\n * Optional filter by transfer reason.\n *\n * @generated from field: ledger.v1.TransferCode transfer_code = 6;\n */\n transferCode: TransferCode;\n\n /**\n * Optional filter by asset ledger.\n *\n * @generated from field: uint32 ledger = 7;\n */\n ledger: number;\n\n /**\n * Opaque keyset cursor from a previous response. The cursor is exclusive and\n * bound to the authenticated account, sub-account scope, filters, timestamp\n * bounds, and sort direction.\n *\n * @generated from field: string page_token = 9;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListTransfersRequest.\n * Use `create(ListTransfersRequestSchema)` to create a new message.\n */\nexport const ListTransfersRequestSchema: GenMessage<ListTransfersRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 11);\n\n/**\n * TransferSide describes one side of a ledger transfer for display.\n *\n * @generated from message ledger.read.v1.TransferSide\n */\nexport type TransferSide = Message<\"ledger.read.v1.TransferSide\"> & {\n /**\n * Display classification for this transfer side.\n *\n * @generated from field: ledger.read.v1.TransferSideKind kind = 1;\n */\n kind: TransferSideKind;\n\n /**\n * Public root account or subaccount ID when this side is safe to identify. Never\n * populated for private counterparties or non-user ledger accounts.\n *\n * @generated from field: optional fixed64 account_id = 2;\n */\n accountId?: bigint | undefined;\n\n /**\n * Address for this side when known. For EXTERNAL_ADDRESS this is an\n * external-chain wallet address from lifecycle correlation; for identifiable\n * Polyester accounts this is a Polyester smart-account address.\n * May be empty until the corresponding lifecycle details are available.\n *\n * @generated from field: string address = 3;\n */\n address: string;\n\n /**\n * PolyChain-registered external network identifier for EXTERNAL_ADDRESS.\n * This matches chain.zipper.v1.ChainConfig.chain_id and is not the chain's\n * native identifier (for example, an EIP-155 id) or the Polyester chain id.\n *\n * @generated from field: optional uint32 chain_id = 4;\n */\n chainId?: number | undefined;\n};\n\n/**\n * Describes the message ledger.read.v1.TransferSide.\n * Use `create(TransferSideSchema)` to create a new message.\n */\nexport const TransferSideSchema: GenMessage<TransferSide> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 12);\n\n/**\n * TransferRow describes one debit or credit leg of a ledger transfer.\n *\n * @generated from message ledger.read.v1.TransferRow\n */\nexport type TransferRow = Message<\"ledger.read.v1.TransferRow\"> & {\n /**\n * Public unified asset ID. Resolve its symbol through the spot configuration\n * API. U128 amounts in this row always use a fixed 18-decimal ledger scale.\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * Transfer amount at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 amount_e18 = 2;\n */\n amountE18?: U128 | undefined;\n\n /**\n * Product reason for this transfer.\n *\n * @generated from field: ledger.v1.TransferCode transfer_code = 3;\n */\n transferCode: TransferCode;\n\n /**\n * Account bucket affected by this transfer.\n *\n * @generated from field: ledger.v1.AccountCode account_code = 4;\n */\n accountCode: AccountCode;\n\n /**\n * Transfer timestamp in microseconds since epoch (UTC).\n *\n * @generated from field: uint64 ts_us = 5;\n */\n tsUs: bigint;\n\n /**\n * Post-transfer balance at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 balance_after_e18 = 9;\n */\n balanceAfterE18?: U128 | undefined;\n\n /**\n * True when this row is the debit leg; false when it is the credit leg.\n *\n * @generated from field: bool is_debit = 10;\n */\n isDebit: boolean;\n\n /**\n * Correlation ID used to group related transfer legs. Zero when unavailable.\n *\n * @generated from field: uint64 link_id = 11;\n */\n linkId: bigint;\n\n /**\n * Public lifecycle flow ID when this transfer belongs to a chain lifecycle flow.\n *\n * @generated from field: string flow_id = 12;\n */\n flowId: string;\n\n /**\n * Debit side of the transfer. This relationship is debit-to-credit rather\n * than row-relative; use is_debit to determine whether this row is the debit leg.\n *\n * @generated from field: ledger.read.v1.TransferSide source = 13;\n */\n source?: TransferSide | undefined;\n\n /**\n * Credit side of the transfer. This relationship is debit-to-credit rather\n * than row-relative; use is_debit to determine whether this row is the credit leg.\n *\n * @generated from field: ledger.read.v1.TransferSide destination = 14;\n */\n destination?: TransferSide | undefined;\n};\n\n/**\n * Describes the message ledger.read.v1.TransferRow.\n * Use `create(TransferRowSchema)` to create a new message.\n */\nexport const TransferRowSchema: GenMessage<TransferRow> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 13);\n\n/**\n * ListTransfersResponse contains transfer rows and an optional continuation cursor.\n *\n * @generated from message ledger.read.v1.ListTransfersResponse\n */\nexport type ListTransfersResponse = Message<\"ledger.read.v1.ListTransfersResponse\"> & {\n /**\n * Transfer rows in requested order.\n *\n * @generated from field: repeated ledger.read.v1.TransferRow transfers = 1;\n */\n transfers: TransferRow[];\n\n /**\n * Opaque cursor for the next page. Empty when no more results exist.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListTransfersResponse.\n * Use `create(ListTransfersResponseSchema)` to create a new message.\n */\nexport const ListTransfersResponseSchema: GenMessage<ListTransfersResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 14);\n\n/**\n * @generated from message ledger.read.v1.ListHoldsRequest\n */\nexport type ListHoldsRequest = Message<\"ledger.read.v1.ListHoldsRequest\"> & {\n /**\n * Optional sub-account to scope holds to. If omitted, holds are listed for\n * the authenticated root account derived from the JWT or API key.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * Maximum number of holds to return. Defaults to 100 when omitted; maximum is\n * 1000.\n *\n * @generated from field: uint32 limit = 2;\n */\n limit: number;\n\n /**\n * true=newest first; false=oldest first.\n *\n * @generated from field: bool reversed = 3;\n */\n reversed: boolean;\n\n /**\n * Opaque keyset cursor from a previous response. The cursor is exclusive and\n * bound to account, sub-account scope, and sort direction.\n *\n * @generated from field: string page_token = 4;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListHoldsRequest.\n * Use `create(ListHoldsRequestSchema)` to create a new message.\n */\nexport const ListHoldsRequestSchema: GenMessage<ListHoldsRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 15);\n\n/**\n * Hold row with compact integers and client-side resolution.\n *\n * @generated from message ledger.read.v1.HoldRow\n */\nexport type HoldRow = Message<\"ledger.read.v1.HoldRow\"> & {\n /**\n * pending transfer id (numeric)\n *\n * @generated from field: fixed64 hold_id = 1;\n */\n holdId: bigint;\n\n /**\n * Reserved amount at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 amount_reserved_e18 = 2;\n */\n amountReservedE18?: U128 | undefined;\n\n /**\n * Public unified asset id.\n *\n * @generated from field: uint32 asset_id = 3;\n */\n assetId: number;\n\n /**\n * Expiration time in nanoseconds since epoch (UTC).\n *\n * @generated from field: uint64 expires_at_ns = 4;\n */\n expiresAtNs: bigint;\n};\n\n/**\n * Describes the message ledger.read.v1.HoldRow.\n * Use `create(HoldRowSchema)` to create a new message.\n */\nexport const HoldRowSchema: GenMessage<HoldRow> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 16);\n\n/**\n * @generated from message ledger.read.v1.ListHoldsResponse\n */\nexport type ListHoldsResponse = Message<\"ledger.read.v1.ListHoldsResponse\"> & {\n /**\n * Hold rows in the sort direction requested by the caller.\n *\n * @generated from field: repeated ledger.read.v1.HoldRow holds = 1;\n */\n holds: HoldRow[];\n\n /**\n * Opaque cursor for the next page. Empty when no more results exist.\n *\n * @generated from field: string next_page_token = 2;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListHoldsResponse.\n * Use `create(ListHoldsResponseSchema)` to create a new message.\n */\nexport const ListHoldsResponseSchema: GenMessage<ListHoldsResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 17);\n\n/**\n * ErrorDetail is attached to ConnectRPC errors for structured error handling.\n * Clients can inspect this to get a stable machine-readable error code.\n *\n * @generated from message ledger.read.v1.ErrorDetail\n */\nexport type ErrorDetail = Message<\"ledger.read.v1.ErrorDetail\"> & {\n /**\n * Stable error code matching the REST problem+json \"code\" field.\n *\n * @generated from field: ledger.read.v1.ErrorCode code = 1;\n */\n code: ErrorCode;\n};\n\n/**\n * Describes the message ledger.read.v1.ErrorDetail.\n * Use `create(ErrorDetailSchema)` to create a new message.\n */\nexport const ErrorDetailSchema: GenMessage<ErrorDetail> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 18);\n\n/**\n * Supported history windows for balance charts.\n *\n * @generated from enum ledger.read.v1.BalanceRange\n */\nexport enum BalanceRange {\n /**\n * @generated from enum value: RANGE_UNSPECIFIED = 0;\n */\n RANGE_UNSPECIFIED = 0,\n\n /**\n * 1 day\n *\n * @generated from enum value: DAY_1 = 1;\n */\n DAY_1 = 1,\n\n /**\n * 7 days\n *\n * @generated from enum value: DAY_7 = 2;\n */\n DAY_7 = 2,\n\n /**\n * 30 days\n *\n * @generated from enum value: DAY_30 = 3;\n */\n DAY_30 = 3,\n\n /**\n * 90 days\n *\n * @generated from enum value: DAY_90 = 4;\n */\n DAY_90 = 4,\n\n /**\n * 180 days\n *\n * @generated from enum value: DAY_180 = 5;\n */\n DAY_180 = 5,\n\n /**\n * 365 days\n *\n * @generated from enum value: DAY_365 = 6;\n */\n DAY_365 = 6,\n}\n\n/**\n * Describes the enum ledger.read.v1.BalanceRange.\n */\nexport const BalanceRangeSchema: GenEnum<BalanceRange> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 0);\n\n/**\n * How to group equity series data.\n *\n * @generated from enum ledger.read.v1.EquityGroupBy\n */\nexport enum EquityGroupBy {\n /**\n * defaults to ACCOUNT\n *\n * @generated from enum value: GROUP_BY_UNSPECIFIED = 0;\n */\n GROUP_BY_UNSPECIFIED = 0,\n\n /**\n * group by account bucket\n *\n * @generated from enum value: GROUP_BY_ACCOUNT = 1;\n */\n GROUP_BY_ACCOUNT = 1,\n\n /**\n * group by asset (BTC, ETH, etc.)\n *\n * @generated from enum value: GROUP_BY_ASSET = 2;\n */\n GROUP_BY_ASSET = 2,\n}\n\n/**\n * Describes the enum ledger.read.v1.EquityGroupBy.\n */\nexport const EquityGroupBySchema: GenEnum<EquityGroupBy> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 1);\n\n/**\n * TransferSideKind identifies the display class for one side of a transfer.\n *\n * @generated from enum ledger.read.v1.TransferSideKind\n */\nexport enum TransferSideKind {\n /**\n * Transfer side type was not specified.\n *\n * @generated from enum value: TRANSFER_SIDE_KIND_UNSPECIFIED = 0;\n */\n TRANSFER_SIDE_KIND_UNSPECIFIED = 0,\n\n /**\n * Polyester funding account.\n *\n * @generated from enum value: FUNDING_ACCOUNT = 1;\n */\n FUNDING_ACCOUNT = 1,\n\n /**\n * Polyester trading account.\n *\n * @generated from enum value: TRADING_ACCOUNT = 2;\n */\n TRADING_ACCOUNT = 2,\n\n /**\n * External wallet or chain address. The address is lifecycle-derived and may\n * be empty until ledger-to-lifecycle correlation is projected.\n *\n * @generated from enum value: EXTERNAL_ADDRESS = 3;\n */\n EXTERNAL_ADDRESS = 3,\n\n /**\n * Private off-chain counterparty that must not be identified to the caller.\n * account_id and address are intentionally omitted.\n *\n * @generated from enum value: PRIVATE_COUNTERPARTY = 4;\n */\n PRIVATE_COUNTERPARTY = 4,\n\n /**\n * Fee ledger side, for example spot or perp trading fees.\n *\n * @generated from enum value: FEE_ACCOUNT = 5;\n */\n FEE_ACCOUNT = 5,\n\n /**\n * System, operator, clearing, or other non-user side.\n *\n * @generated from enum value: SYSTEM_ACCOUNT = 6;\n */\n SYSTEM_ACCOUNT = 6,\n}\n\n/**\n * Describes the enum ledger.read.v1.TransferSideKind.\n */\nexport const TransferSideKindSchema: GenEnum<TransferSideKind> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 2);\n\n/**\n * ErrorCode enumerates stable machine-readable error codes for the Ledger Read\n * API. These mirror the REST problem+json \"code\" field for parity between REST\n * and ConnectRPC clients.\n *\n * @generated from enum ledger.read.v1.ErrorCode\n */\nexport enum ErrorCode {\n /**\n * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: ERROR_CODE_BAD_REQUEST = 1;\n */\n BAD_REQUEST = 1,\n\n /**\n * @generated from enum value: ERROR_CODE_UNAUTHENTICATED = 2;\n */\n UNAUTHENTICATED = 2,\n\n /**\n * @generated from enum value: ERROR_CODE_PERMISSION_DENIED = 3;\n */\n PERMISSION_DENIED = 3,\n\n /**\n * @generated from enum value: ERROR_CODE_NOT_FOUND = 4;\n */\n NOT_FOUND = 4,\n\n /**\n * Missing or invalid account identifier (legacy; used by older endpoints).\n *\n * @generated from enum value: ERROR_CODE_MISSING_ACCOUNT_ID = 5;\n */\n MISSING_ACCOUNT_ID = 5,\n\n /**\n * @generated from enum value: ERROR_CODE_INVALID_ACCOUNT_ID = 6;\n */\n INVALID_ACCOUNT_ID = 6,\n\n /**\n * Wallet-specific errors for balance lookups by wallet.\n *\n * @generated from enum value: ERROR_CODE_MISSING_WALLET = 7;\n */\n MISSING_WALLET = 7,\n\n /**\n * @generated from enum value: ERROR_CODE_WALLET_RESOLUTION_UNAVAILABLE = 8;\n */\n WALLET_RESOLUTION_UNAVAILABLE = 8,\n\n /**\n * @generated from enum value: ERROR_CODE_WALLET_NOT_FOUND = 9;\n */\n WALLET_NOT_FOUND = 9,\n\n /**\n * Upstream dependency error (e.g., transfers store, wallet resolver).\n *\n * @generated from enum value: ERROR_CODE_UPSTREAM_ERROR = 10;\n */\n UPSTREAM_ERROR = 10,\n}\n\n/**\n * Describes the enum ledger.read.v1.ErrorCode.\n */\nexport const ErrorCodeSchema: GenEnum<ErrorCode> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 3);\n\n/**\n * LedgerReadService exposes read-only ledger endpoints (balances, history, transfers, holds).\n *\n * @generated from service ledger.read.v1.LedgerReadService\n */\nexport const LedgerReadService: GenService<{\n /**\n * Retrieve balance history buckets for an account.\n * Supports optional subaccount, range, asset, and account-code filters.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetBalanceHistory\n */\n getBalanceHistory: {\n methodKind: \"unary\";\n input: typeof GetBalanceHistoryRequestSchema;\n output: typeof GetBalanceHistoryResponseSchema;\n },\n /**\n * Retrieve equity history as columnar series data.\n * Supports optional subaccount, range, account-code filtering, and grouping by account or asset.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetEquityHistorySeries\n */\n getEquityHistorySeries: {\n methodKind: \"unary\";\n input: typeof GetEquityHistorySeriesRequestSchema;\n output: typeof GetEquityHistorySeriesResponseSchema;\n },\n /**\n * List finalized transfer history for an account.\n * Supports optional subaccount, asset, ordering, and cursor filters.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.ListTransfers\n */\n listTransfers: {\n methodKind: \"unary\";\n input: typeof ListTransfersRequestSchema;\n output: typeof ListTransfersResponseSchema;\n },\n /**\n * ListHolds returns pending holds with integer amounts (u128) and asset ids.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.ListHolds\n */\n listHolds: {\n methodKind: \"unary\";\n input: typeof ListHoldsRequestSchema;\n output: typeof ListHoldsResponseSchema;\n },\n /**\n * Retrieve the latest balances for an account.\n * Supports optional subaccount scoping and returns asset symbols with decimal amounts on REST.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetBalances\n */\n getBalances: {\n methodKind: \"unary\";\n input: typeof GetBalancesRequestSchema;\n output: typeof GetBalancesResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_ledger_read_v1_ledger_read, 0);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAa,kCACX,uBAAS,gkLAAgkL,CAAC,wBAAwB,2BAA2B,CAAC;;;;;AAqBhoL,MAAa,2BACX,0BAAY,iCAAiC,CAAC;;;;;AAmEhD,MAAa,qBACX,0BAAY,iCAAiC,CAAC;;;;;AAoBhD,MAAa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AA,sBAAA,KAAA;;;;;;CAOA,cAAA,cAAA,oBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,sBACX,uBAAS,iCAAiC,CAAC;;;;;;AAO7C,IAAY,mBAAL,yBAAA,kBAAA;;;;;;CAML,iBAAA,iBAAA,oCAAA,KAAA;;;;;;CAOA,iBAAA,iBAAA,qBAAA,KAAA;;;;;;CAOA,iBAAA,iBAAA,qBAAA,KAAA;;;;;;;CAQA,iBAAA,iBAAA,sBAAA,KAAA;;;;;;;CAQA,iBAAA,iBAAA,0BAAA,KAAA;;;;;;CAOA,iBAAA,iBAAA,iBAAA,KAAA;;;;;;CAOA,iBAAA,iBAAA,oBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,yBACX,uBAAS,iCAAiC,CAAC;;;;;;;;AAS7C,IAAY,YAAL,yBAAA,WAAA;;;;CAIL,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,qBAAA,KAAA;;;;CAKA,UAAA,UAAA,uBAAA,KAAA;;;;CAKA,UAAA,UAAA,eAAA,KAAA;;;;;;CAOA,UAAA,UAAA,wBAAA,KAAA;;;;CAKA,UAAA,UAAA,wBAAA,KAAA;;;;;;CAOA,UAAA,UAAA,oBAAA,KAAA;;;;CAKA,UAAA,UAAA,mCAAA,KAAA;;;;CAKA,UAAA,UAAA,sBAAA,KAAA;;;;;;CAOA,UAAA,UAAA,oBAAA,MAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,kBACX,uBAAS,iCAAiC,CAAC;;;;;;AAO7C,MAAa,oBAwDX,0BAAY,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"ledger_read_pb.js","names":[],"sources":["../../../../../src/gen/ledger/read/v1/ledger_read_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file ledger/read/v1/ledger_read.proto (package ledger.read.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { AccountCode, TransferCode } from \"../../v1/catalog_pb.js\";\nimport { file_ledger_v1_catalog } from \"../../v1/catalog_pb.js\";\nimport type { U128 } from \"../../../polyester/type/v1/u128_pb.js\";\nimport { file_polyester_type_v1_u128 } from \"../../../polyester/type/v1/u128_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file ledger/read/v1/ledger_read.proto.\n */\nexport const file_ledger_read_v1_ledger_read: GenFile = /*@__PURE__*/\n fileDesc(\"CiBsZWRnZXIvcmVhZC92MS9sZWRnZXJfcmVhZC5wcm90bxIObGVkZ2VyLnJlYWQudjEiQgoSR2V0QmFsYW5jZXNSZXF1ZXN0EhoKDXN1YmFjY291bnRfaWQYASABKAZIAIgBAUIQCg5fc3ViYWNjb3VudF9pZCL/AQoMQXNzZXRCYWxhbmNlEhAKCGFzc2V0X2lkGAEgASgNEigKB3RyYWRpbmcYAiABKAsyFy5wb2x5ZXN0ZXIudHlwZS52MS5VMTI4EigKB2Z1bmRpbmcYAyABKAsyFy5wb2x5ZXN0ZXIudHlwZS52MS5VMTI4EikKCHJlc2VydmVkGAQgASgLMhcucG9seWVzdGVyLnR5cGUudjEuVTEyOBIqCglhdmFpbGFibGUYBSABKAsyFy5wb2x5ZXN0ZXIudHlwZS52MS5VMTI4EhgKEHRyYWRpbmdfcmV2aXNpb24YBiABKAQSGAoQZnVuZGluZ19yZXZpc2lvbhgHIAEoBCJFChNHZXRCYWxhbmNlc1Jlc3BvbnNlEi4KCGJhbGFuY2VzGAEgAygLMhwubGVkZ2VyLnJlYWQudjEuQXNzZXRCYWxhbmNlIrYBChhHZXRCYWxhbmNlSGlzdG9yeVJlcXVlc3QSGgoNc3ViYWNjb3VudF9pZBgBI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IucmVhZC52MS5HZXRCYWxhbmNlc1JlcXVlc3QaIy5sZWRnZXIucmVhZC52MS5HZXRCYWxhbmNlc1Jlc3BvbnNlIgBCR1pFZ2l0aHViLmNvbS9GYWJyaWMtTGFicy9wb2x5ZXN0ZXItc2RrLWdvL2dlbi9sZWRnZXIvcmVhZC92MTtsZWRnZXJyZHYxYgZwcm90bzM=\", [file_ledger_v1_catalog, file_polyester_type_v1_u128]);\n\n/**\n * @generated from message ledger.read.v1.GetBalancesRequest\n */\nexport type GetBalancesRequest = Message<\"ledger.read.v1.GetBalancesRequest\"> & {\n /**\n * Optional sub-account to scope balances to. If omitted, balances are\n * returned for the authenticated root account derived from the JWT or API\n * key. The logical account id itself is always derived from the caller's JWT\n * or API key, not from this payload.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalancesRequest.\n * Use `create(GetBalancesRequestSchema)` to create a new message.\n */\nexport const GetBalancesRequestSchema: GenMessage<GetBalancesRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 0);\n\n/**\n * Fixed-size representation for balances (for Protobuf/WS clients).\n * Uses common U128 messages for amounts to keep schema tidy and consistent.\n *\n * @generated from message ledger.read.v1.AssetBalance\n */\nexport type AssetBalance = Message<\"ledger.read.v1.AssetBalance\"> & {\n /**\n * Public unified asset id. Resolve symbol from SpotConfig; U128 amounts in\n * this message always use fixed 18-decimal ledger scale.\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * Trading balance at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 trading = 2;\n */\n trading?: U128 | undefined;\n\n /**\n * Funding balance at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 funding = 3;\n */\n funding?: U128 | undefined;\n\n /**\n * Reserved amount in the trading bucket at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 reserved = 4;\n */\n reserved?: U128 | undefined;\n\n /**\n * Amount currently available for new trading activity at fixed 18-decimal\n * ledger scale. This value already accounts for active reservations.\n *\n * @generated from field: polyester.type.v1.U128 available = 5;\n */\n available?: U128 | undefined;\n\n /**\n * Opaque monotonic revision for the atomic trading, reserved, and available\n * values. Higher means newer; zero means no trading state has been observed.\n *\n * @generated from field: uint64 trading_revision = 6;\n */\n tradingRevision: bigint;\n\n /**\n * Opaque monotonic revision for the funding value. Higher means newer; zero\n * means no funding state has been observed.\n *\n * @generated from field: uint64 funding_revision = 7;\n */\n fundingRevision: bigint;\n};\n\n/**\n * Describes the message ledger.read.v1.AssetBalance.\n * Use `create(AssetBalanceSchema)` to create a new message.\n */\nexport const AssetBalanceSchema: GenMessage<AssetBalance> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 1);\n\n/**\n * @generated from message ledger.read.v1.GetBalancesResponse\n */\nexport type GetBalancesResponse = Message<\"ledger.read.v1.GetBalancesResponse\"> & {\n /**\n * One entry for every supported unified asset, including assets with zero\n * balances. Sorted by available trading amount (highest first), then by\n * asset symbol alphabetically.\n *\n * @generated from field: repeated ledger.read.v1.AssetBalance balances = 1;\n */\n balances: AssetBalance[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalancesResponse.\n * Use `create(GetBalancesResponseSchema)` to create a new message.\n */\nexport const GetBalancesResponseSchema: GenMessage<GetBalancesResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 2);\n\n/**\n * @generated from message ledger.read.v1.GetBalanceHistoryRequest\n */\nexport type GetBalanceHistoryRequest = Message<\"ledger.read.v1.GetBalanceHistoryRequest\"> & {\n /**\n * Optional sub-account to scope balances to. If omitted, balances are\n * returned for the authenticated root account derived from the JWT or API\n * key. The logical account id itself is always derived from the caller's JWT\n * or API key, not from this payload.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * History window to return. When unset/UNSPECIFIED, defaults to 1D.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 2;\n */\n range: BalanceRange;\n\n /**\n * Optional public asset filter. When unset/0, returns all assets.\n *\n * @generated from field: uint32 ledger = 3;\n */\n ledger: number;\n\n /**\n * Optional subset of account buckets to return. When empty, returns all\n * account buckets.\n *\n * @generated from field: repeated ledger.v1.AccountCode account_codes = 4;\n */\n accountCodes: AccountCode[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalanceHistoryRequest.\n * Use `create(GetBalanceHistoryRequestSchema)` to create a new message.\n */\nexport const GetBalanceHistoryRequestSchema: GenMessage<GetBalanceHistoryRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 3);\n\n/**\n * Columnar balance series payload (scaled integers).\n * REST renders decimal strings from these values.\n *\n * @generated from message ledger.read.v1.BalanceSeries\n */\nexport type BalanceSeries = Message<\"ledger.read.v1.BalanceSeries\"> & {\n /**\n * public unified asset id\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * account bucket\n *\n * @generated from field: ledger.v1.AccountCode account_code = 2;\n */\n accountCode: AccountCode;\n\n /**\n * Chart balance in asset units scaled by 1e7 (7 decimals).\n * Values are downscaled from 18-decimal ledger balances for compact charting\n * and align 1:1 with implicit timestamps.\n *\n * @generated from field: repeated uint64 balance_q = 3;\n */\n balanceQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.BalanceSeries.\n * Use `create(BalanceSeriesSchema)` to create a new message.\n */\nexport const BalanceSeriesSchema: GenMessage<BalanceSeries> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 4);\n\n/**\n * GetBalanceHistoryResponse returns aligned balance chart series.\n *\n * @generated from message ledger.read.v1.GetBalanceHistoryResponse\n */\nexport type GetBalanceHistoryResponse = Message<\"ledger.read.v1.GetBalanceHistoryResponse\"> & {\n /**\n * Resolved history window.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 1;\n */\n range: BalanceRange;\n\n /**\n * Sampling interval between points, such as \"5m\" or \"1h\".\n *\n * @generated from field: string bucket = 2;\n */\n bucket: string;\n\n /**\n * First point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 start_ts_sec = 3;\n */\n startTsSec: number;\n\n /**\n * Last point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 end_ts_sec = 4;\n */\n endTsSec: number;\n\n /**\n * Number of aligned points in each returned series.\n *\n * @generated from field: uint32 points = 5;\n */\n points: number;\n\n /**\n * Balance series ordered by asset ID, then account bucket.\n *\n * @generated from field: repeated ledger.read.v1.BalanceSeries series = 6;\n */\n series: BalanceSeries[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetBalanceHistoryResponse.\n * Use `create(GetBalanceHistoryResponseSchema)` to create a new message.\n */\nexport const GetBalanceHistoryResponseSchema: GenMessage<GetBalanceHistoryResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 5);\n\n/**\n * Account grouping metadata (used when group_by = ACCOUNT).\n *\n * @generated from message ledger.read.v1.AccountGrouping\n */\nexport type AccountGrouping = Message<\"ledger.read.v1.AccountGrouping\"> & {\n /**\n * account bucket code\n *\n * @generated from field: uint32 account_code = 1;\n */\n accountCode: number;\n\n /**\n * human-readable name (\"funding\", \"trading\")\n *\n * @generated from field: string name = 2;\n */\n name: string;\n};\n\n/**\n * Describes the message ledger.read.v1.AccountGrouping.\n * Use `create(AccountGroupingSchema)` to create a new message.\n */\nexport const AccountGroupingSchema: GenMessage<AccountGrouping> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 6);\n\n/**\n * Asset grouping metadata (used when group_by = ASSET).\n *\n * @generated from message ledger.read.v1.AssetGrouping\n */\nexport type AssetGrouping = Message<\"ledger.read.v1.AssetGrouping\"> & {\n /**\n * public asset id (0 for \"OTHER\" bucket)\n *\n * @generated from field: uint32 id = 1;\n */\n id: number;\n\n /**\n * asset symbol (\"BTC\", \"ETH\", \"OTHER\")\n *\n * @generated from field: string symbol = 2;\n */\n symbol: string;\n};\n\n/**\n * Describes the message ledger.read.v1.AssetGrouping.\n * Use `create(AssetGroupingSchema)` to create a new message.\n */\nexport const AssetGroupingSchema: GenMessage<AssetGrouping> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 7);\n\n/**\n * Logical account grouping used by root portfolio equity history.\n *\n * @generated from message ledger.read.v1.PortfolioAccountGrouping\n */\nexport type PortfolioAccountGrouping = Message<\"ledger.read.v1.PortfolioAccountGrouping\"> & {\n /**\n * Public account or subaccount ID. Its encoded entity type distinguishes\n * the master account from an owned subaccount. Omitted for Remaining.\n *\n * @generated from field: optional fixed64 account_id = 1;\n */\n accountId?: bigint | undefined;\n\n /**\n * True when this series combines all non-selected owned subaccounts.\n *\n * @generated from field: bool remaining = 2;\n */\n remaining: boolean;\n};\n\n/**\n * Describes the message ledger.read.v1.PortfolioAccountGrouping.\n * Use `create(PortfolioAccountGroupingSchema)` to create a new message.\n */\nexport const PortfolioAccountGroupingSchema: GenMessage<PortfolioAccountGrouping> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 8);\n\n/**\n * Equity history in USDT (or BTC via client-side conversion using btc_prices).\n * Values are derived from per-asset balances and market prices (close ticks).\n *\n * @generated from message ledger.read.v1.GetEquityHistorySeriesRequest\n */\nexport type GetEquityHistorySeriesRequest = Message<\"ledger.read.v1.GetEquityHistorySeriesRequest\"> & {\n /**\n * Optional sub-account to scope equity to. If omitted, equity is returned for\n * the authenticated root account derived from the JWT or API key.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * History window to return. When unset/UNSPECIFIED, defaults to 1D.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 2;\n */\n range: BalanceRange;\n\n /**\n * Optional subset of account buckets.\n * When empty, server returns both funding and trading.\n * Only used when group_by = ACCOUNT.\n *\n * @generated from field: repeated ledger.v1.AccountCode account_codes = 4;\n */\n accountCodes: AccountCode[];\n\n /**\n * How to group the equity series. Defaults to ACCOUNT if unspecified.\n *\n * @generated from field: ledger.read.v1.EquityGroupBy group_by = 5;\n */\n groupBy: EquityGroupBy;\n};\n\n/**\n * Describes the message ledger.read.v1.GetEquityHistorySeriesRequest.\n * Use `create(GetEquityHistorySeriesRequestSchema)` to create a new message.\n */\nexport const GetEquityHistorySeriesRequestSchema: GenMessage<GetEquityHistorySeriesRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 9);\n\n/**\n * Columnar equity series payload (scaled integers).\n * REST renders decimal strings from these values.\n *\n * @generated from message ledger.read.v1.EquitySeries\n */\nexport type EquitySeries = Message<\"ledger.read.v1.EquitySeries\"> & {\n /**\n * Grouping identifier. The serving RPC documents which grouping is returned.\n *\n * @generated from oneof ledger.read.v1.EquitySeries.grouping\n */\n grouping: {\n /**\n * set when group_by = ACCOUNT\n *\n * @generated from field: ledger.read.v1.AccountGrouping account = 1;\n */\n value: AccountGrouping;\n case: \"account\";\n } | {\n /**\n * set when group_by = ASSET\n *\n * @generated from field: ledger.read.v1.AssetGrouping asset = 3;\n */\n value: AssetGrouping;\n case: \"asset\";\n } | {\n /**\n * set for root portfolio history\n *\n * @generated from field: ledger.read.v1.PortfolioAccountGrouping portfolio_account = 4;\n */\n value: PortfolioAccountGrouping;\n case: \"portfolioAccount\";\n } | { case: undefined; value?: undefined };\n\n /**\n * Equity in quote currency (USDT) scaled by 1e4 (4 decimals).\n * Values align 1:1 with timestamps.\n *\n * @generated from field: repeated sint64 equity_q = 2;\n */\n equityQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.EquitySeries.\n * Use `create(EquitySeriesSchema)` to create a new message.\n */\nexport const EquitySeriesSchema: GenMessage<EquitySeries> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 10);\n\n/**\n * GetEquityHistorySeriesResponse returns aligned equity chart series.\n *\n * @generated from message ledger.read.v1.GetEquityHistorySeriesResponse\n */\nexport type GetEquityHistorySeriesResponse = Message<\"ledger.read.v1.GetEquityHistorySeriesResponse\"> & {\n /**\n * Resolved history window.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 1;\n */\n range: BalanceRange;\n\n /**\n * Sampling interval between points, such as \"5m\" or \"1h\".\n *\n * @generated from field: string bucket = 2;\n */\n bucket: string;\n\n /**\n * First point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 start_ts_sec = 3;\n */\n startTsSec: number;\n\n /**\n * Last point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 end_ts_sec = 4;\n */\n endTsSec: number;\n\n /**\n * Human-readable quote asset symbol (always \"USDT\").\n *\n * @generated from field: string quote_asset = 6;\n */\n quoteAsset: string;\n\n /**\n * Number of aligned points in each returned series.\n *\n * @generated from field: uint32 points = 7;\n */\n points: number;\n\n /**\n * Equity series ordered by grouping identifier ascending.\n *\n * @generated from field: repeated ledger.read.v1.EquitySeries series = 8;\n */\n series: EquitySeries[];\n\n /**\n * BTC-USDT close price at each timestamp, scaled by 1e6 (same as price_ticks).\n * Enables client-side conversion to BTC denomination without refetch.\n *\n * @generated from field: repeated int64 btc_prices_q = 10;\n */\n btcPricesQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetEquityHistorySeriesResponse.\n * Use `create(GetEquityHistorySeriesResponseSchema)` to create a new message.\n */\nexport const GetEquityHistorySeriesResponseSchema: GenMessage<GetEquityHistorySeriesResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 11);\n\n/**\n * Requests root portfolio equity history.\n *\n * @generated from message ledger.read.v1.GetPortfolioEquityHistorySeriesRequest\n */\nexport type GetPortfolioEquityHistorySeriesRequest = Message<\"ledger.read.v1.GetPortfolioEquityHistorySeriesRequest\"> & {\n /**\n * History window to return. When unset/UNSPECIFIED, defaults to 1D.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 1;\n */\n range: BalanceRange;\n};\n\n/**\n * Describes the message ledger.read.v1.GetPortfolioEquityHistorySeriesRequest.\n * Use `create(GetPortfolioEquityHistorySeriesRequestSchema)` to create a new message.\n */\nexport const GetPortfolioEquityHistorySeriesRequestSchema: GenMessage<GetPortfolioEquityHistorySeriesRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 12);\n\n/**\n * Root portfolio equity history with aligned, implicit timestamps.\n *\n * @generated from message ledger.read.v1.GetPortfolioEquityHistorySeriesResponse\n */\nexport type GetPortfolioEquityHistorySeriesResponse = Message<\"ledger.read.v1.GetPortfolioEquityHistorySeriesResponse\"> & {\n /**\n * Resolved history window.\n *\n * @generated from field: ledger.read.v1.BalanceRange range = 1;\n */\n range: BalanceRange;\n\n /**\n * Sampling interval between points, such as \"5m\" or \"1h\".\n *\n * @generated from field: string bucket = 2;\n */\n bucket: string;\n\n /**\n * First point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 start_ts_sec = 3;\n */\n startTsSec: number;\n\n /**\n * Last point timestamp in seconds since epoch (UTC).\n *\n * @generated from field: fixed32 end_ts_sec = 4;\n */\n endTsSec: number;\n\n /**\n * Human-readable quote asset symbol (always \"USDT\").\n *\n * @generated from field: string quote_asset = 5;\n */\n quoteAsset: string;\n\n /**\n * Number of aligned points in each returned series.\n *\n * @generated from field: uint32 points = 6;\n */\n points: number;\n\n /**\n * Master account first, followed by up to nine owned subaccounts ordered by\n * current equity descending, then Remaining when other subaccounts exist.\n *\n * @generated from field: repeated ledger.read.v1.EquitySeries series = 7;\n */\n series: EquitySeries[];\n\n /**\n * BTC-USDT close price at each timestamp, scaled by 1e6 (same as price_ticks).\n * Enables client-side conversion to BTC denomination without refetch.\n *\n * @generated from field: repeated int64 btc_prices_q = 8;\n */\n btcPricesQ: bigint[];\n};\n\n/**\n * Describes the message ledger.read.v1.GetPortfolioEquityHistorySeriesResponse.\n * Use `create(GetPortfolioEquityHistorySeriesResponseSchema)` to create a new message.\n */\nexport const GetPortfolioEquityHistorySeriesResponseSchema: GenMessage<GetPortfolioEquityHistorySeriesResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 13);\n\n/**\n * Current equity for one logical account in the root portfolio.\n *\n * @generated from message ledger.read.v1.PortfolioAccountEquity\n */\nexport type PortfolioAccountEquity = Message<\"ledger.read.v1.PortfolioAccountEquity\"> & {\n /**\n * Public master-account or subaccount ID.\n *\n * @generated from field: fixed64 account_id = 1;\n */\n accountId: bigint;\n\n /**\n * Current equity in USDT scaled by 1e4 (4 decimals).\n *\n * @generated from field: sint64 equity_q = 2;\n */\n equityQ: bigint;\n\n /**\n * Up to three assets with the highest current equity value, ordered highest\n * first. Assets without a current value are omitted.\n *\n * @generated from field: repeated uint32 top_asset_ids = 3;\n */\n topAssetIds: number[];\n};\n\n/**\n * Describes the message ledger.read.v1.PortfolioAccountEquity.\n * Use `create(PortfolioAccountEquitySchema)` to create a new message.\n */\nexport const PortfolioAccountEquitySchema: GenMessage<PortfolioAccountEquity> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 14);\n\n/**\n * Current aggregate balance and equity for one asset in the root portfolio.\n *\n * @generated from message ledger.read.v1.PortfolioAssetEquity\n */\nexport type PortfolioAssetEquity = Message<\"ledger.read.v1.PortfolioAssetEquity\"> & {\n /**\n * Public unified asset ID.\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * Combined Funding and Trading balance in asset units scaled by 1e7\n * (7 decimals).\n *\n * @generated from field: uint64 balance_q = 2;\n */\n balanceQ: bigint;\n\n /**\n * Current equity in USDT scaled by 1e4 (4 decimals).\n *\n * @generated from field: sint64 equity_q = 3;\n */\n equityQ: bigint;\n};\n\n/**\n * Describes the message ledger.read.v1.PortfolioAssetEquity.\n * Use `create(PortfolioAssetEquitySchema)` to create a new message.\n */\nexport const PortfolioAssetEquitySchema: GenMessage<PortfolioAssetEquity> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 15);\n\n/**\n * Requests a current root portfolio equity snapshot.\n *\n * @generated from message ledger.read.v1.GetPortfolioEquitySnapshotRequest\n */\nexport type GetPortfolioEquitySnapshotRequest = Message<\"ledger.read.v1.GetPortfolioEquitySnapshotRequest\"> & {\n};\n\n/**\n * Describes the message ledger.read.v1.GetPortfolioEquitySnapshotRequest.\n * Use `create(GetPortfolioEquitySnapshotRequestSchema)` to create a new message.\n */\nexport const GetPortfolioEquitySnapshotRequestSchema: GenMessage<GetPortfolioEquitySnapshotRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 16);\n\n/**\n * Current root portfolio equity, grouped by logical account and asset.\n *\n * @generated from message ledger.read.v1.GetPortfolioEquitySnapshotResponse\n */\nexport type GetPortfolioEquitySnapshotResponse = Message<\"ledger.read.v1.GetPortfolioEquitySnapshotResponse\"> & {\n /**\n * Human-readable quote asset symbol (always \"USDT\").\n *\n * @generated from field: string quote_asset = 1;\n */\n quoteAsset: string;\n\n /**\n * Current equity across the master account and all owned subaccounts in USDT,\n * scaled by 1e4 (4 decimals).\n *\n * @generated from field: sint64 total_equity_q = 2;\n */\n totalEquityQ: bigint;\n\n /**\n * Master account first, followed by every owned subaccount ordered by current\n * equity descending and public ID ascending for ties.\n *\n * @generated from field: repeated ledger.read.v1.PortfolioAccountEquity accounts = 3;\n */\n accounts: PortfolioAccountEquity[];\n\n /**\n * Non-zero asset balances ordered by current equity descending and public\n * asset ID ascending for ties.\n *\n * @generated from field: repeated ledger.read.v1.PortfolioAssetEquity assets = 4;\n */\n assets: PortfolioAssetEquity[];\n\n /**\n * Current BTC-USDT price scaled by 1e6. Zero when unavailable.\n *\n * @generated from field: int64 btc_price_q = 5;\n */\n btcPriceQ: bigint;\n};\n\n/**\n * Describes the message ledger.read.v1.GetPortfolioEquitySnapshotResponse.\n * Use `create(GetPortfolioEquitySnapshotResponseSchema)` to create a new message.\n */\nexport const GetPortfolioEquitySnapshotResponseSchema: GenMessage<GetPortfolioEquitySnapshotResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 17);\n\n/**\n * @generated from message ledger.read.v1.ListTransfersRequest\n */\nexport type ListTransfersRequest = Message<\"ledger.read.v1.ListTransfersRequest\"> & {\n /**\n * Optional sub-account to scope transfers to. If omitted, transfers are\n * listed for the authenticated root account derived from the JWT or API key.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * Maximum number of transfer rows to return. Defaults to 100 when omitted;\n * maximum is 1000.\n *\n * @generated from field: uint32 limit = 2;\n */\n limit: number;\n\n /**\n * Sort direction. When true, rows are returned newest first; when false,\n * rows are returned oldest first.\n *\n * @generated from field: bool reversed = 3;\n */\n reversed: boolean;\n\n /**\n * Optional lower transfer timestamp bound in microseconds since epoch (UTC),\n * inclusive.\n *\n * @generated from field: uint64 ts_min_us = 4;\n */\n tsMinUs: bigint;\n\n /**\n * Optional upper transfer timestamp bound in microseconds since epoch (UTC),\n * inclusive.\n *\n * @generated from field: uint64 ts_max_us = 5;\n */\n tsMaxUs: bigint;\n\n /**\n * Optional filter by transfer reason.\n *\n * @generated from field: ledger.v1.TransferCode transfer_code = 6;\n */\n transferCode: TransferCode;\n\n /**\n * Optional filter by asset ledger.\n *\n * @generated from field: uint32 ledger = 7;\n */\n ledger: number;\n\n /**\n * Opaque keyset cursor from a previous response. The cursor is exclusive and\n * bound to the authenticated account, sub-account scope, filters, timestamp\n * bounds, and sort direction.\n *\n * @generated from field: string page_token = 9;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListTransfersRequest.\n * Use `create(ListTransfersRequestSchema)` to create a new message.\n */\nexport const ListTransfersRequestSchema: GenMessage<ListTransfersRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 18);\n\n/**\n * TransferSide describes one side of a ledger transfer for display.\n *\n * @generated from message ledger.read.v1.TransferSide\n */\nexport type TransferSide = Message<\"ledger.read.v1.TransferSide\"> & {\n /**\n * Display classification for this transfer side.\n *\n * @generated from field: ledger.read.v1.TransferSideKind kind = 1;\n */\n kind: TransferSideKind;\n\n /**\n * Public root account or subaccount ID when this side is safe to identify. Never\n * populated for private counterparties or non-user ledger accounts.\n *\n * @generated from field: optional fixed64 account_id = 2;\n */\n accountId?: bigint | undefined;\n\n /**\n * Address for this side when known. For EXTERNAL_ADDRESS this is an\n * external-chain wallet address from lifecycle correlation; for identifiable\n * Polyester accounts this is a Polyester smart-account address.\n * May be empty until the corresponding lifecycle details are available.\n *\n * @generated from field: string address = 3;\n */\n address: string;\n\n /**\n * PolyChain-registered external network identifier for EXTERNAL_ADDRESS.\n * This matches chain.zipper.v1.ChainConfig.chain_id and is not the chain's\n * native identifier (for example, an EIP-155 id) or the Polyester chain id.\n *\n * @generated from field: optional uint32 chain_id = 4;\n */\n chainId?: number | undefined;\n};\n\n/**\n * Describes the message ledger.read.v1.TransferSide.\n * Use `create(TransferSideSchema)` to create a new message.\n */\nexport const TransferSideSchema: GenMessage<TransferSide> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 19);\n\n/**\n * TransferRow describes one debit or credit leg of a ledger transfer.\n *\n * @generated from message ledger.read.v1.TransferRow\n */\nexport type TransferRow = Message<\"ledger.read.v1.TransferRow\"> & {\n /**\n * Public unified asset ID. Resolve its symbol through the spot configuration\n * API. U128 amounts in this row always use a fixed 18-decimal ledger scale.\n *\n * @generated from field: uint32 asset_id = 1;\n */\n assetId: number;\n\n /**\n * Transfer amount at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 amount_e18 = 2;\n */\n amountE18?: U128 | undefined;\n\n /**\n * Product reason for this transfer.\n *\n * @generated from field: ledger.v1.TransferCode transfer_code = 3;\n */\n transferCode: TransferCode;\n\n /**\n * Account bucket affected by this transfer.\n *\n * @generated from field: ledger.v1.AccountCode account_code = 4;\n */\n accountCode: AccountCode;\n\n /**\n * Transfer timestamp in microseconds since epoch (UTC).\n *\n * @generated from field: uint64 ts_us = 5;\n */\n tsUs: bigint;\n\n /**\n * Post-transfer balance at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 balance_after_e18 = 9;\n */\n balanceAfterE18?: U128 | undefined;\n\n /**\n * True when this row is the debit leg; false when it is the credit leg.\n *\n * @generated from field: bool is_debit = 10;\n */\n isDebit: boolean;\n\n /**\n * Correlation ID used to group related transfer legs. Zero when unavailable.\n *\n * @generated from field: uint64 link_id = 11;\n */\n linkId: bigint;\n\n /**\n * Public lifecycle flow ID when this transfer belongs to a chain lifecycle flow.\n *\n * @generated from field: string flow_id = 12;\n */\n flowId: string;\n\n /**\n * Debit side of the transfer. This relationship is debit-to-credit rather\n * than row-relative; use is_debit to determine whether this row is the debit leg.\n *\n * @generated from field: ledger.read.v1.TransferSide source = 13;\n */\n source?: TransferSide | undefined;\n\n /**\n * Credit side of the transfer. This relationship is debit-to-credit rather\n * than row-relative; use is_debit to determine whether this row is the credit leg.\n *\n * @generated from field: ledger.read.v1.TransferSide destination = 14;\n */\n destination?: TransferSide | undefined;\n};\n\n/**\n * Describes the message ledger.read.v1.TransferRow.\n * Use `create(TransferRowSchema)` to create a new message.\n */\nexport const TransferRowSchema: GenMessage<TransferRow> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 20);\n\n/**\n * ListTransfersResponse contains transfer rows and an optional continuation cursor.\n *\n * @generated from message ledger.read.v1.ListTransfersResponse\n */\nexport type ListTransfersResponse = Message<\"ledger.read.v1.ListTransfersResponse\"> & {\n /**\n * Transfer rows in requested order.\n *\n * @generated from field: repeated ledger.read.v1.TransferRow transfers = 1;\n */\n transfers: TransferRow[];\n\n /**\n * Opaque cursor for the next page. Empty when no more results exist.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListTransfersResponse.\n * Use `create(ListTransfersResponseSchema)` to create a new message.\n */\nexport const ListTransfersResponseSchema: GenMessage<ListTransfersResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 21);\n\n/**\n * @generated from message ledger.read.v1.ListHoldsRequest\n */\nexport type ListHoldsRequest = Message<\"ledger.read.v1.ListHoldsRequest\"> & {\n /**\n * Optional sub-account to scope holds to. If omitted, holds are listed for\n * the authenticated root account derived from the JWT or API key.\n *\n * @generated from field: optional fixed64 subaccount_id = 1;\n */\n subaccountId?: bigint | undefined;\n\n /**\n * Maximum number of holds to return. Defaults to 100 when omitted; maximum is\n * 1000.\n *\n * @generated from field: uint32 limit = 2;\n */\n limit: number;\n\n /**\n * true=newest first; false=oldest first.\n *\n * @generated from field: bool reversed = 3;\n */\n reversed: boolean;\n\n /**\n * Opaque keyset cursor from a previous response. The cursor is exclusive and\n * bound to account, sub-account scope, and sort direction.\n *\n * @generated from field: string page_token = 4;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListHoldsRequest.\n * Use `create(ListHoldsRequestSchema)` to create a new message.\n */\nexport const ListHoldsRequestSchema: GenMessage<ListHoldsRequest> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 22);\n\n/**\n * Hold row with compact integers and client-side resolution.\n *\n * @generated from message ledger.read.v1.HoldRow\n */\nexport type HoldRow = Message<\"ledger.read.v1.HoldRow\"> & {\n /**\n * pending transfer id (numeric)\n *\n * @generated from field: fixed64 hold_id = 1;\n */\n holdId: bigint;\n\n /**\n * Reserved amount at fixed 18-decimal ledger scale.\n *\n * @generated from field: polyester.type.v1.U128 amount_reserved_e18 = 2;\n */\n amountReservedE18?: U128 | undefined;\n\n /**\n * Public unified asset id.\n *\n * @generated from field: uint32 asset_id = 3;\n */\n assetId: number;\n\n /**\n * Expiration time in nanoseconds since epoch (UTC).\n *\n * @generated from field: uint64 expires_at_ns = 4;\n */\n expiresAtNs: bigint;\n};\n\n/**\n * Describes the message ledger.read.v1.HoldRow.\n * Use `create(HoldRowSchema)` to create a new message.\n */\nexport const HoldRowSchema: GenMessage<HoldRow> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 23);\n\n/**\n * @generated from message ledger.read.v1.ListHoldsResponse\n */\nexport type ListHoldsResponse = Message<\"ledger.read.v1.ListHoldsResponse\"> & {\n /**\n * Hold rows in the sort direction requested by the caller.\n *\n * @generated from field: repeated ledger.read.v1.HoldRow holds = 1;\n */\n holds: HoldRow[];\n\n /**\n * Opaque cursor for the next page. Empty when no more results exist.\n *\n * @generated from field: string next_page_token = 2;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message ledger.read.v1.ListHoldsResponse.\n * Use `create(ListHoldsResponseSchema)` to create a new message.\n */\nexport const ListHoldsResponseSchema: GenMessage<ListHoldsResponse> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 24);\n\n/**\n * ErrorDetail is attached to ConnectRPC errors for structured error handling.\n * Clients can inspect this to get a stable machine-readable error code.\n *\n * @generated from message ledger.read.v1.ErrorDetail\n */\nexport type ErrorDetail = Message<\"ledger.read.v1.ErrorDetail\"> & {\n /**\n * Stable error code matching the REST problem+json \"code\" field.\n *\n * @generated from field: ledger.read.v1.ErrorCode code = 1;\n */\n code: ErrorCode;\n};\n\n/**\n * Describes the message ledger.read.v1.ErrorDetail.\n * Use `create(ErrorDetailSchema)` to create a new message.\n */\nexport const ErrorDetailSchema: GenMessage<ErrorDetail> = /*@__PURE__*/\n messageDesc(file_ledger_read_v1_ledger_read, 25);\n\n/**\n * Supported history windows for balance charts.\n *\n * @generated from enum ledger.read.v1.BalanceRange\n */\nexport enum BalanceRange {\n /**\n * @generated from enum value: RANGE_UNSPECIFIED = 0;\n */\n RANGE_UNSPECIFIED = 0,\n\n /**\n * 1 day\n *\n * @generated from enum value: DAY_1 = 1;\n */\n DAY_1 = 1,\n\n /**\n * 7 days\n *\n * @generated from enum value: DAY_7 = 2;\n */\n DAY_7 = 2,\n\n /**\n * 30 days\n *\n * @generated from enum value: DAY_30 = 3;\n */\n DAY_30 = 3,\n\n /**\n * 90 days\n *\n * @generated from enum value: DAY_90 = 4;\n */\n DAY_90 = 4,\n\n /**\n * 180 days\n *\n * @generated from enum value: DAY_180 = 5;\n */\n DAY_180 = 5,\n\n /**\n * 365 days\n *\n * @generated from enum value: DAY_365 = 6;\n */\n DAY_365 = 6,\n}\n\n/**\n * Describes the enum ledger.read.v1.BalanceRange.\n */\nexport const BalanceRangeSchema: GenEnum<BalanceRange> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 0);\n\n/**\n * How to group equity series data.\n *\n * @generated from enum ledger.read.v1.EquityGroupBy\n */\nexport enum EquityGroupBy {\n /**\n * defaults to ACCOUNT\n *\n * @generated from enum value: GROUP_BY_UNSPECIFIED = 0;\n */\n GROUP_BY_UNSPECIFIED = 0,\n\n /**\n * group by account bucket\n *\n * @generated from enum value: GROUP_BY_ACCOUNT = 1;\n */\n GROUP_BY_ACCOUNT = 1,\n\n /**\n * group by asset (BTC, ETH, etc.)\n *\n * @generated from enum value: GROUP_BY_ASSET = 2;\n */\n GROUP_BY_ASSET = 2,\n}\n\n/**\n * Describes the enum ledger.read.v1.EquityGroupBy.\n */\nexport const EquityGroupBySchema: GenEnum<EquityGroupBy> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 1);\n\n/**\n * TransferSideKind identifies the display class for one side of a transfer.\n *\n * @generated from enum ledger.read.v1.TransferSideKind\n */\nexport enum TransferSideKind {\n /**\n * Transfer side type was not specified.\n *\n * @generated from enum value: TRANSFER_SIDE_KIND_UNSPECIFIED = 0;\n */\n TRANSFER_SIDE_KIND_UNSPECIFIED = 0,\n\n /**\n * Polyester funding account.\n *\n * @generated from enum value: FUNDING_ACCOUNT = 1;\n */\n FUNDING_ACCOUNT = 1,\n\n /**\n * Polyester trading account.\n *\n * @generated from enum value: TRADING_ACCOUNT = 2;\n */\n TRADING_ACCOUNT = 2,\n\n /**\n * External wallet or chain address. The address is lifecycle-derived and may\n * be empty until ledger-to-lifecycle correlation is projected.\n *\n * @generated from enum value: EXTERNAL_ADDRESS = 3;\n */\n EXTERNAL_ADDRESS = 3,\n\n /**\n * Private off-chain counterparty that must not be identified to the caller.\n * account_id and address are intentionally omitted.\n *\n * @generated from enum value: PRIVATE_COUNTERPARTY = 4;\n */\n PRIVATE_COUNTERPARTY = 4,\n\n /**\n * Fee ledger side, for example spot or perp trading fees.\n *\n * @generated from enum value: FEE_ACCOUNT = 5;\n */\n FEE_ACCOUNT = 5,\n\n /**\n * System, operator, clearing, or other non-user side.\n *\n * @generated from enum value: SYSTEM_ACCOUNT = 6;\n */\n SYSTEM_ACCOUNT = 6,\n}\n\n/**\n * Describes the enum ledger.read.v1.TransferSideKind.\n */\nexport const TransferSideKindSchema: GenEnum<TransferSideKind> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 2);\n\n/**\n * ErrorCode enumerates stable machine-readable error codes for the Ledger Read\n * API. These mirror the REST problem+json \"code\" field for parity between REST\n * and ConnectRPC clients.\n *\n * @generated from enum ledger.read.v1.ErrorCode\n */\nexport enum ErrorCode {\n /**\n * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: ERROR_CODE_BAD_REQUEST = 1;\n */\n BAD_REQUEST = 1,\n\n /**\n * @generated from enum value: ERROR_CODE_UNAUTHENTICATED = 2;\n */\n UNAUTHENTICATED = 2,\n\n /**\n * @generated from enum value: ERROR_CODE_PERMISSION_DENIED = 3;\n */\n PERMISSION_DENIED = 3,\n\n /**\n * @generated from enum value: ERROR_CODE_NOT_FOUND = 4;\n */\n NOT_FOUND = 4,\n\n /**\n * Missing or invalid account identifier (legacy; used by older endpoints).\n *\n * @generated from enum value: ERROR_CODE_MISSING_ACCOUNT_ID = 5;\n */\n MISSING_ACCOUNT_ID = 5,\n\n /**\n * @generated from enum value: ERROR_CODE_INVALID_ACCOUNT_ID = 6;\n */\n INVALID_ACCOUNT_ID = 6,\n\n /**\n * Wallet-specific errors for balance lookups by wallet.\n *\n * @generated from enum value: ERROR_CODE_MISSING_WALLET = 7;\n */\n MISSING_WALLET = 7,\n\n /**\n * @generated from enum value: ERROR_CODE_WALLET_RESOLUTION_UNAVAILABLE = 8;\n */\n WALLET_RESOLUTION_UNAVAILABLE = 8,\n\n /**\n * @generated from enum value: ERROR_CODE_WALLET_NOT_FOUND = 9;\n */\n WALLET_NOT_FOUND = 9,\n\n /**\n * Upstream dependency error (e.g., transfers store, wallet resolver).\n *\n * @generated from enum value: ERROR_CODE_UPSTREAM_ERROR = 10;\n */\n UPSTREAM_ERROR = 10,\n}\n\n/**\n * Describes the enum ledger.read.v1.ErrorCode.\n */\nexport const ErrorCodeSchema: GenEnum<ErrorCode> = /*@__PURE__*/\n enumDesc(file_ledger_read_v1_ledger_read, 3);\n\n/**\n * LedgerReadService exposes read-only ledger endpoints (balances, history, transfers, holds).\n *\n * @generated from service ledger.read.v1.LedgerReadService\n */\nexport const LedgerReadService: GenService<{\n /**\n * Retrieve balance history buckets for an account.\n * Supports optional subaccount, range, asset, and account-code filters.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetBalanceHistory\n */\n getBalanceHistory: {\n methodKind: \"unary\";\n input: typeof GetBalanceHistoryRequestSchema;\n output: typeof GetBalanceHistoryResponseSchema;\n },\n /**\n * Retrieve equity history as columnar series data.\n * Supports optional subaccount, range, account-code filtering, and grouping by account or asset.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetEquityHistorySeries\n */\n getEquityHistorySeries: {\n methodKind: \"unary\";\n input: typeof GetEquityHistorySeriesRequestSchema;\n output: typeof GetEquityHistorySeriesResponseSchema;\n },\n /**\n * Retrieve root portfolio equity history as master, top owned subaccounts,\n * and an aggregate of the remaining owned subaccounts. Requires an\n * interactive root-account session; API keys are not supported.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetPortfolioEquityHistorySeries\n */\n getPortfolioEquityHistorySeries: {\n methodKind: \"unary\";\n input: typeof GetPortfolioEquityHistorySeriesRequestSchema;\n output: typeof GetPortfolioEquityHistorySeriesResponseSchema;\n },\n /**\n * Retrieve current root portfolio equity grouped by logical account and\n * asset. Requires an interactive root-account session; API keys are not\n * supported.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetPortfolioEquitySnapshot\n */\n getPortfolioEquitySnapshot: {\n methodKind: \"unary\";\n input: typeof GetPortfolioEquitySnapshotRequestSchema;\n output: typeof GetPortfolioEquitySnapshotResponseSchema;\n },\n /**\n * List finalized transfer history for an account.\n * Supports optional subaccount, asset, ordering, and cursor filters.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.ListTransfers\n */\n listTransfers: {\n methodKind: \"unary\";\n input: typeof ListTransfersRequestSchema;\n output: typeof ListTransfersResponseSchema;\n },\n /**\n * ListHolds returns pending holds with integer amounts (u128) and asset ids.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.ListHolds\n */\n listHolds: {\n methodKind: \"unary\";\n input: typeof ListHoldsRequestSchema;\n output: typeof ListHoldsResponseSchema;\n },\n /**\n * Retrieve the latest balances for an account.\n * Supports optional subaccount scoping and returns asset symbols with decimal amounts on REST.\n *\n * @generated from rpc ledger.read.v1.LedgerReadService.GetBalances\n */\n getBalances: {\n methodKind: \"unary\";\n input: typeof GetBalancesRequestSchema;\n output: typeof GetBalancesResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_ledger_read_v1_ledger_read, 0);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAa,kCACX,uBAAS,4oOAA4oO,CAAC,wBAAwB,2BAA2B,CAAC;;;;;AAqB5sO,MAAa,2BACX,0BAAY,iCAAiC,CAAC;;;;;AAmEhD,MAAa,qBACX,0BAAY,iCAAiC,CAAC;;;;;AAoBhD,MAAa,4BACX,0BAAY,iCAAiC,CAAC;;;;;AA2ChD,MAAa,iCACX,0BAAY,iCAAiC,CAAC;;;;;AAqChD,MAAa,sBACX,0BAAY,iCAAiC,CAAC;;;;;AAuDhD,MAAa,kCACX,0BAAY,iCAAiC,CAAC;;;;;AA2BhD,MAAa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,7 +38,7 @@ import { CancelTriggerInput, CreateTriggerInput, GetTriggerInput, ListTriggerEve
|
|
|
38
38
|
import { CancelTriggerResult, CreateTriggerResult, LadderDetailsOutput, ListTriggerEventsResult, ModifyTriggerResult, PauseTriggerResult, ResumeTriggerResult, StopDetailsOutput, TrailingDetailsOutput, Trigger, TriggerDetailsOutput, TriggerEvent, TwapDetailsOutput } from "./services/triggers/triggers-output.schemas.js";
|
|
39
39
|
import { ListTriggersResult } from "./services/triggers/triggers.js";
|
|
40
40
|
import { AccountCodeValue, TransferCodeValue } from "./shared/ledger-codes.js";
|
|
41
|
-
import { BalanceHistoryInput, BalanceHistoryResponse, BalanceRange, EquityGroupBy, EquityHistoryInput, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping, LedgerBalance } from "./services/balances/balances.schemas.js";
|
|
41
|
+
import { BalanceHistoryInput, BalanceHistoryResponse, BalanceRange, EquityGroupBy, EquityHistoryInput, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping, LedgerBalance, PortfolioEquityHistoryInput, PortfolioEquityHistoryResponse, PortfolioEquitySeries, PortfolioEquitySeriesGrouping, PortfolioEquitySnapshotResponse } from "./services/balances/balances.schemas.js";
|
|
42
42
|
import { mergeLedgerBalances } from "./services/balances/balances.merge.js";
|
|
43
43
|
import { LedgerTransfer, LedgerTransferSide, ListTransfersInput } from "./services/transfers/transfers.schemas.js";
|
|
44
44
|
import { TransferSideKind } from "./services/transfers/transfers.codecs.js";
|
|
@@ -105,4 +105,4 @@ import "./services/triggers/triggers.types.js";
|
|
|
105
105
|
import "./services/vip/vip.types.js";
|
|
106
106
|
import "./services/whiteboard/whiteboard.types.js";
|
|
107
107
|
import "./services/zipper/zipper.types.js";
|
|
108
|
-
export { type AccountCodeValue, type AccountIdentity, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type ActiveAccountInfo, type AddressBook, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type ArchiveWhiteboardBoardInput, type ArchiveWhiteboardBoardResult, type AssetConfig, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOrderInput, type CancelOrderResult, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, type ColumnarTimeWindow, type CompleteMfaChallengeResult, ConfigurationError, type ConnectChannelParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWhiteboardBoardInput, type CreateWhiteboardBoardResult, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWhiteboardBoardInput, type GetWhiteboardBoardResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferDestination, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListDepositAddressesInput, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type ListWhiteboardBoardsInput, type ListWhiteboardBoardsResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MintWhiteboardJoinTokenInput, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, type Nonce, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, PreconditionFailedError, type PreparedTradingWithdraw, type PreviewOrderResult, type Profile, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetSubaccountMemberMfaRequirementInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type TakeProfitInput, type Timeframe, TimeoutError, type Trade, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TradingWithdrawWalletTypedData, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, type UpdateWhiteboardBoardAclInput, type UpdateWhiteboardBoardAclResult, type UpdateWhiteboardBoardInput, type UpdateWhiteboardBoardResult, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipStatus, type VipTier, type VipTierCatalog, type WhiteboardAccess, type WhiteboardAclEntry, type WhiteboardAclEntryInput, type WhiteboardAclSubjectType, type WhiteboardAudience, type WhiteboardBoard, type WhiteboardBoardDetails, type WhiteboardBoardListItem, type WhiteboardJoinTokenResult, type WhiteboardPermissions, type WhiteboardPresencePayload, type WhiteboardResolvedRole, type WhiteboardSnapshot, type WhiteboardWritableRole, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatUserFacingError, getOrderErrorDetail, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, isStaleQuoteError, keccak256Hex, mergeLedgerBalances, normalizeErrorMessage, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
|
108
|
+
export { type AccountCodeValue, type AccountIdentity, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type ActiveAccountInfo, type AddressBook, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type ArchiveWhiteboardBoardInput, type ArchiveWhiteboardBoardResult, type AssetConfig, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOrderInput, type CancelOrderResult, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, type ColumnarTimeWindow, type CompleteMfaChallengeResult, ConfigurationError, type ConnectChannelParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWhiteboardBoardInput, type CreateWhiteboardBoardResult, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWhiteboardBoardInput, type GetWhiteboardBoardResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferDestination, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListDepositAddressesInput, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type ListWhiteboardBoardsInput, type ListWhiteboardBoardsResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MintWhiteboardJoinTokenInput, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, type Nonce, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PreparedTradingWithdraw, type PreviewOrderResult, type Profile, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetSubaccountMemberMfaRequirementInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type TakeProfitInput, type Timeframe, TimeoutError, type Trade, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TradingWithdrawWalletTypedData, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, type UpdateWhiteboardBoardAclInput, type UpdateWhiteboardBoardAclResult, type UpdateWhiteboardBoardInput, type UpdateWhiteboardBoardResult, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipStatus, type VipTier, type VipTierCatalog, type WhiteboardAccess, type WhiteboardAclEntry, type WhiteboardAclEntryInput, type WhiteboardAclSubjectType, type WhiteboardAudience, type WhiteboardBoard, type WhiteboardBoardDetails, type WhiteboardBoardListItem, type WhiteboardJoinTokenResult, type WhiteboardPermissions, type WhiteboardPresencePayload, type WhiteboardResolvedRole, type WhiteboardSnapshot, type WhiteboardWritableRole, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatUserFacingError, getOrderErrorDetail, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, isStaleQuoteError, keccak256Hex, mergeLedgerBalances, normalizeErrorMessage, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
|
@@ -6,7 +6,7 @@ import { PolyesterRealtime } from "../../realtime/types.js";
|
|
|
6
6
|
import "../../realtime/index.js";
|
|
7
7
|
import { BaseSubscribeInput } from "../../shared/types.js";
|
|
8
8
|
import { SdkScales } from "../../shared/decimal-surface.js";
|
|
9
|
-
import { BalanceHistoryInput, BalanceHistoryResponse, EquityHistoryInput, EquityHistoryResponse, LedgerBalance } from "./balances.schemas.js";
|
|
9
|
+
import { BalanceHistoryInput, BalanceHistoryResponse, EquityHistoryInput, EquityHistoryResponse, LedgerBalance, PortfolioEquityHistoryInput, PortfolioEquityHistoryResponse, PortfolioEquitySnapshotResponse } from "./balances.schemas.js";
|
|
10
10
|
//#region src/services/balances/balances.d.ts
|
|
11
11
|
interface SubscribeBalancesInput extends BaseSubscribeInput<LedgerBalance> {
|
|
12
12
|
accountId: string;
|
|
@@ -29,6 +29,14 @@ declare class BalancesService {
|
|
|
29
29
|
* Returns equity history series for the resolved account scope over a selected range, optionally grouped by account or asset and filtered by account buckets.
|
|
30
30
|
*/
|
|
31
31
|
getEquityHistory(input: EquityHistoryInput, options?: PolyesterRequestOptions): Promise<EquityHistoryResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns root portfolio equity history grouped by the master account, leading owned subaccounts, and an optional remaining-subaccounts series.
|
|
34
|
+
*/
|
|
35
|
+
getPortfolioEquityHistory(input: PortfolioEquityHistoryInput, options?: PolyesterRequestOptions): Promise<PortfolioEquityHistoryResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns current root portfolio equity grouped by logical account and asset.
|
|
38
|
+
*/
|
|
39
|
+
getPortfolioEquitySnapshot(options?: PolyesterRequestOptions): Promise<PortfolioEquitySnapshotResponse>;
|
|
32
40
|
/**
|
|
33
41
|
* Subscribes to private balance updates on private:ledger:balances:{accountId}:proto and emits every balance record as a decimal-string row. Records for assets unknown to the catalog route a CatalogLookupError to onError.
|
|
34
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.d.ts","names":[],"sources":["../../../src/services/balances/balances.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"balances.d.ts","names":[],"sources":["../../../src/services/balances/balances.ts"],"mappings":";;;;;;;;;;UAmCU,+BAA+B,mBAAmB;EACxD;;;;;cAMS;;EAgBL,YAAA,YAAY,mBACZ,UAAU,mBACV,UAAU,gCACV,QAAQ;;;;EAkBN,KACF,QAAO,oBACP,UAAU,0BACX,QAAQ;;;;EAgBL,kBACF,OAAO,qBACP,UAAU,0BACX,QAAQ;;;;EAWL,iBACF,OAAO,oBACP,UAAU,0BACX,QAAQ;;;;EAcL,0BACF,OAAO,6BACP,UAAU,0BACX,QAAQ;;;;EAaL,2BACF,UAAU,0BACX,QAAQ;;;;EAYX,UAAU,OAAO"}
|
|
@@ -4,7 +4,7 @@ import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
|
4
4
|
import { accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
5
5
|
import { AssetBalanceSchema, LedgerReadService } from "../../gen/ledger/read/v1/ledger_read_pb.js";
|
|
6
6
|
import { connectReadyGatedProtoChannel } from "../../realtime/ready-gated-subscription.js";
|
|
7
|
-
import { BalanceHistoryInputSchema, BalancesListInputSchema, EquityHistoryInputSchema, createBalanceHistoryResponseSchema, createEquityHistoryResponseSchema, createLedgerBalanceSchema } from "./balances.schemas.js";
|
|
7
|
+
import { BalanceHistoryInputSchema, BalancesListInputSchema, EquityHistoryInputSchema, PortfolioEquityHistoryInputSchema, createBalanceHistoryResponseSchema, createEquityHistoryResponseSchema, createLedgerBalanceSchema, createPortfolioEquityHistoryResponseSchema, createPortfolioEquitySnapshotResponseSchema } from "./balances.schemas.js";
|
|
8
8
|
import { createClient } from "@connectrpc/connect";
|
|
9
9
|
import * as v from "valibot";
|
|
10
10
|
//#region src/services/balances/balances.ts
|
|
@@ -19,6 +19,8 @@ var BalancesService = class {
|
|
|
19
19
|
#ledgerBalanceSchema;
|
|
20
20
|
#balanceHistoryResponseSchema;
|
|
21
21
|
#equityHistoryResponseSchema;
|
|
22
|
+
#portfolioEquityHistoryResponseSchema;
|
|
23
|
+
#portfolioEquitySnapshotResponseSchema;
|
|
22
24
|
constructor(transports, realtime, resolver, scales) {
|
|
23
25
|
this.#client = createClient(LedgerReadService, transports.authApi);
|
|
24
26
|
this.#realtime = realtime;
|
|
@@ -27,6 +29,8 @@ var BalancesService = class {
|
|
|
27
29
|
this.#ledgerBalanceSchema = createLedgerBalanceSchema();
|
|
28
30
|
this.#balanceHistoryResponseSchema = createBalanceHistoryResponseSchema();
|
|
29
31
|
this.#equityHistoryResponseSchema = createEquityHistoryResponseSchema(scales);
|
|
32
|
+
this.#portfolioEquityHistoryResponseSchema = createPortfolioEquityHistoryResponseSchema(scales);
|
|
33
|
+
this.#portfolioEquitySnapshotResponseSchema = createPortfolioEquitySnapshotResponseSchema(scales);
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
36
|
* Returns current asset balances for the resolved root account or subaccount, including trading, funding, reserved, and available amounts as decimal strings.
|
|
@@ -59,6 +63,23 @@ var BalancesService = class {
|
|
|
59
63
|
return parse(this.#equityHistoryResponseSchema, res);
|
|
60
64
|
}
|
|
61
65
|
/**
|
|
66
|
+
* Returns root portfolio equity history grouped by the master account, leading owned subaccounts, and an optional remaining-subaccounts series.
|
|
67
|
+
*/
|
|
68
|
+
async getPortfolioEquityHistory(input, options) {
|
|
69
|
+
await this.#scales.ready();
|
|
70
|
+
const validated = parse(PortfolioEquityHistoryInputSchema, input);
|
|
71
|
+
const res = await this.#client.getPortfolioEquityHistorySeries(validated, toConnectCallOptions(options));
|
|
72
|
+
return parse(this.#portfolioEquityHistoryResponseSchema, res);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Returns current root portfolio equity grouped by logical account and asset.
|
|
76
|
+
*/
|
|
77
|
+
async getPortfolioEquitySnapshot(options) {
|
|
78
|
+
await this.#scales.ready();
|
|
79
|
+
const res = await this.#client.getPortfolioEquitySnapshot({}, toConnectCallOptions(options));
|
|
80
|
+
return parse(this.#portfolioEquitySnapshotResponseSchema, res);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
62
83
|
* Subscribes to private balance updates on private:ledger:balances:{accountId}:proto and emits every balance record as a decimal-string row. Records for assets unknown to the catalog route a CatalogLookupError to onError.
|
|
63
84
|
*/
|
|
64
85
|
subscribe(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.js","names":["#client","Proto.LedgerReadService","#realtime","#resolver","#scales","#ledgerBalanceSchema","#balanceHistoryResponseSchema","#equityHistoryResponseSchema","Proto.AssetBalanceSchema"],"sources":["../../../src/services/balances/balances.ts"],"sourcesContent":["import * as Proto from \"../../gen/ledger/read/v1/ledger_read_pb.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport type { PolyesterRealtime } from \"../../realtime/index.js\";\nimport { connectReadyGatedProtoChannel } from \"../../realtime/ready-gated-subscription.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { accountScopeToSubaccountId, type AccountScopedInput } from \"../../shared/account-scope.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport {\n BalanceHistoryInputSchema,\n BalancesListInputSchema,\n EquityHistoryInputSchema,\n createBalanceHistoryResponseSchema,\n createEquityHistoryResponseSchema,\n createLedgerBalanceSchema,\n type LedgerBalance,\n type BalanceHistoryInput,\n type BalanceHistoryResponse,\n type EquityHistoryInput,\n type EquityHistoryResponse,\n} from \"./balances.schemas.js\";\n\ninterface SubscribeBalancesInput extends BaseSubscribeInput<LedgerBalance> {\n accountId: string;\n}\n\n/**\n * Reads and streams ledger balances plus balance and equity history for the authenticated account scope.\n */\nexport class BalancesService {\n #client: Client<typeof Proto.LedgerReadService>;\n #realtime: PolyesterRealtime;\n #resolver?: SubaccountResolver;\n #scales: SdkScales;\n #ledgerBalanceSchema: ReturnType<typeof createLedgerBalanceSchema>;\n #balanceHistoryResponseSchema: ReturnType<typeof createBalanceHistoryResponseSchema>;\n #equityHistoryResponseSchema: ReturnType<typeof createEquityHistoryResponseSchema>;\n\n constructor(\n transports: AuthApiTransports,\n realtime: PolyesterRealtime,\n resolver: SubaccountResolver | undefined,\n scales: SdkScales,\n ) {\n this.#client = createClient(Proto.LedgerReadService, transports.authApi);\n this.#realtime = realtime;\n this.#resolver = resolver;\n this.#scales = scales;\n this.#ledgerBalanceSchema = createLedgerBalanceSchema();\n this.#balanceHistoryResponseSchema = createBalanceHistoryResponseSchema();\n this.#equityHistoryResponseSchema = createEquityHistoryResponseSchema(scales);\n }\n\n /**\n * Returns current asset balances for the resolved root account or subaccount, including trading, funding, reserved, and available amounts as decimal strings.\n */\n async list(\n input: AccountScopedInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<LedgerBalance[]> {\n await this.#scales.ready();\n const resolved = resolveAccountScopedInput(input, this.#resolver);\n const validated = parse(BalancesListInputSchema, resolved);\n const res = await this.#client.getBalances(\n {\n subaccountId: accountScopeToSubaccountId(validated.account),\n },\n toConnectCallOptions(options),\n );\n return parse(v.array(this.#ledgerBalanceSchema), res.balances);\n }\n\n /**\n * Returns columnar balance history for the resolved account scope over a selected range, optionally filtered by a non-negative integer ledger asset ID and account buckets. Ledger 0 or omission includes all assets.\n */\n async getBalanceHistory(\n input: BalanceHistoryInput,\n options?: PolyesterRequestOptions,\n ): Promise<BalanceHistoryResponse> {\n await this.#scales.ready();\n const resolved = resolveAccountScopedInput(input, this.#resolver);\n const validated = parse(BalanceHistoryInputSchema, resolved);\n const res = await this.#client.getBalanceHistory(validated, toConnectCallOptions(options));\n return parse(this.#balanceHistoryResponseSchema, res);\n }\n\n /**\n * Returns equity history series for the resolved account scope over a selected range, optionally grouped by account or asset and filtered by account buckets.\n */\n async getEquityHistory(\n input: EquityHistoryInput,\n options?: PolyesterRequestOptions,\n ): Promise<EquityHistoryResponse> {\n await this.#scales.ready();\n const resolved = resolveAccountScopedInput(input, this.#resolver);\n const validated = parse(EquityHistoryInputSchema, resolved);\n const res = await this.#client.getEquityHistorySeries(\n validated,\n toConnectCallOptions(options),\n );\n return parse(this.#equityHistoryResponseSchema, res);\n }\n\n /**\n * Subscribes to private balance updates on private:ledger:balances:{accountId}:proto and emits every balance record as a decimal-string row. Records for assets unknown to the catalog route a CatalogLookupError to onError.\n */\n subscribe(input: SubscribeBalancesInput): () => void {\n const channel = `private:ledger:balances:${input.accountId}:proto`;\n return connectReadyGatedProtoChannel(this.#realtime, {\n channel,\n schema: Proto.AssetBalanceSchema,\n ready: () => this.#scales.ready(),\n onPublication: (data) => {\n const b = parse(this.#ledgerBalanceSchema, data);\n input.onEvent(b);\n },\n onConnected: input.onOpen,\n onDisconnected: input.onClose,\n onError: input.onError,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"balances.js","names":["#client","Proto.LedgerReadService","#realtime","#resolver","#scales","#ledgerBalanceSchema","#balanceHistoryResponseSchema","#equityHistoryResponseSchema","#portfolioEquityHistoryResponseSchema","#portfolioEquitySnapshotResponseSchema","Proto.AssetBalanceSchema"],"sources":["../../../src/services/balances/balances.ts"],"sourcesContent":["import * as Proto from \"../../gen/ledger/read/v1/ledger_read_pb.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport type { PolyesterRealtime } from \"../../realtime/index.js\";\nimport { connectReadyGatedProtoChannel } from \"../../realtime/ready-gated-subscription.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { accountScopeToSubaccountId, type AccountScopedInput } from \"../../shared/account-scope.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport {\n BalanceHistoryInputSchema,\n BalancesListInputSchema,\n EquityHistoryInputSchema,\n PortfolioEquityHistoryInputSchema,\n createBalanceHistoryResponseSchema,\n createEquityHistoryResponseSchema,\n createLedgerBalanceSchema,\n createPortfolioEquityHistoryResponseSchema,\n createPortfolioEquitySnapshotResponseSchema,\n type LedgerBalance,\n type BalanceHistoryInput,\n type BalanceHistoryResponse,\n type EquityHistoryInput,\n type EquityHistoryResponse,\n type PortfolioEquityHistoryInput,\n type PortfolioEquityHistoryResponse,\n type PortfolioEquitySnapshotResponse,\n} from \"./balances.schemas.js\";\n\ninterface SubscribeBalancesInput extends BaseSubscribeInput<LedgerBalance> {\n accountId: string;\n}\n\n/**\n * Reads and streams ledger balances plus balance and equity history for the authenticated account scope.\n */\nexport class BalancesService {\n #client: Client<typeof Proto.LedgerReadService>;\n #realtime: PolyesterRealtime;\n #resolver?: SubaccountResolver;\n #scales: SdkScales;\n #ledgerBalanceSchema: ReturnType<typeof createLedgerBalanceSchema>;\n #balanceHistoryResponseSchema: ReturnType<typeof createBalanceHistoryResponseSchema>;\n #equityHistoryResponseSchema: ReturnType<typeof createEquityHistoryResponseSchema>;\n #portfolioEquityHistoryResponseSchema: ReturnType<\n typeof createPortfolioEquityHistoryResponseSchema\n >;\n #portfolioEquitySnapshotResponseSchema: ReturnType<\n typeof createPortfolioEquitySnapshotResponseSchema\n >;\n\n constructor(\n transports: AuthApiTransports,\n realtime: PolyesterRealtime,\n resolver: SubaccountResolver | undefined,\n scales: SdkScales,\n ) {\n this.#client = createClient(Proto.LedgerReadService, transports.authApi);\n this.#realtime = realtime;\n this.#resolver = resolver;\n this.#scales = scales;\n this.#ledgerBalanceSchema = createLedgerBalanceSchema();\n this.#balanceHistoryResponseSchema = createBalanceHistoryResponseSchema();\n this.#equityHistoryResponseSchema = createEquityHistoryResponseSchema(scales);\n this.#portfolioEquityHistoryResponseSchema =\n createPortfolioEquityHistoryResponseSchema(scales);\n this.#portfolioEquitySnapshotResponseSchema =\n createPortfolioEquitySnapshotResponseSchema(scales);\n }\n\n /**\n * Returns current asset balances for the resolved root account or subaccount, including trading, funding, reserved, and available amounts as decimal strings.\n */\n async list(\n input: AccountScopedInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<LedgerBalance[]> {\n await this.#scales.ready();\n const resolved = resolveAccountScopedInput(input, this.#resolver);\n const validated = parse(BalancesListInputSchema, resolved);\n const res = await this.#client.getBalances(\n {\n subaccountId: accountScopeToSubaccountId(validated.account),\n },\n toConnectCallOptions(options),\n );\n return parse(v.array(this.#ledgerBalanceSchema), res.balances);\n }\n\n /**\n * Returns columnar balance history for the resolved account scope over a selected range, optionally filtered by a non-negative integer ledger asset ID and account buckets. Ledger 0 or omission includes all assets.\n */\n async getBalanceHistory(\n input: BalanceHistoryInput,\n options?: PolyesterRequestOptions,\n ): Promise<BalanceHistoryResponse> {\n await this.#scales.ready();\n const resolved = resolveAccountScopedInput(input, this.#resolver);\n const validated = parse(BalanceHistoryInputSchema, resolved);\n const res = await this.#client.getBalanceHistory(validated, toConnectCallOptions(options));\n return parse(this.#balanceHistoryResponseSchema, res);\n }\n\n /**\n * Returns equity history series for the resolved account scope over a selected range, optionally grouped by account or asset and filtered by account buckets.\n */\n async getEquityHistory(\n input: EquityHistoryInput,\n options?: PolyesterRequestOptions,\n ): Promise<EquityHistoryResponse> {\n await this.#scales.ready();\n const resolved = resolveAccountScopedInput(input, this.#resolver);\n const validated = parse(EquityHistoryInputSchema, resolved);\n const res = await this.#client.getEquityHistorySeries(\n validated,\n toConnectCallOptions(options),\n );\n return parse(this.#equityHistoryResponseSchema, res);\n }\n\n /**\n * Returns root portfolio equity history grouped by the master account, leading owned subaccounts, and an optional remaining-subaccounts series.\n */\n async getPortfolioEquityHistory(\n input: PortfolioEquityHistoryInput,\n options?: PolyesterRequestOptions,\n ): Promise<PortfolioEquityHistoryResponse> {\n await this.#scales.ready();\n const validated = parse(PortfolioEquityHistoryInputSchema, input);\n const res = await this.#client.getPortfolioEquityHistorySeries(\n validated,\n toConnectCallOptions(options),\n );\n return parse(this.#portfolioEquityHistoryResponseSchema, res);\n }\n\n /**\n * Returns current root portfolio equity grouped by logical account and asset.\n */\n async getPortfolioEquitySnapshot(\n options?: PolyesterRequestOptions,\n ): Promise<PortfolioEquitySnapshotResponse> {\n await this.#scales.ready();\n const res = await this.#client.getPortfolioEquitySnapshot(\n {},\n toConnectCallOptions(options),\n );\n return parse(this.#portfolioEquitySnapshotResponseSchema, res);\n }\n\n /**\n * Subscribes to private balance updates on private:ledger:balances:{accountId}:proto and emits every balance record as a decimal-string row. Records for assets unknown to the catalog route a CatalogLookupError to onError.\n */\n subscribe(input: SubscribeBalancesInput): () => void {\n const channel = `private:ledger:balances:${input.accountId}:proto`;\n return connectReadyGatedProtoChannel(this.#realtime, {\n channel,\n schema: Proto.AssetBalanceSchema,\n ready: () => this.#scales.ready(),\n onPublication: (data) => {\n const b = parse(this.#ledgerBalanceSchema, data);\n input.onEvent(b);\n },\n onConnected: input.onOpen,\n onDisconnected: input.onClose,\n onError: input.onError,\n });\n }\n}\n"],"m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O,CAChC;EACA,OAAO,MAAM,KAAKO,8BAA8B,GAAG;CACvD;;;;CAKA,MAAM,0BACF,OACA,SACuC;EACvC,MAAM,KAAKH,QAAQ,MAAM;EACzB,MAAM,YAAY,MAAM,mCAAmC,KAAK;EAChE,MAAM,MAAM,MAAM,KAAKJ,QAAQ,gCAC3B,WACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,KAAKQ,uCAAuC,GAAG;CAChE;;;;CAKA,MAAM,2BACF,SACwC;EACxC,MAAM,KAAKJ,QAAQ,MAAM;EACzB,MAAM,MAAM,MAAM,KAAKJ,QAAQ,2BAC3B,CAAC,GACD,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,KAAKS,wCAAwC,GAAG;CACjE;;;;CAKA,UAAU,OAA2C;EACjD,MAAM,UAAU,2BAA2B,MAAM,UAAU;EAC3D,OAAO,8BAA8B,KAAKP,WAAW;GACjD;GACA,QAAQQ;GACR,aAAa,KAAKN,QAAQ,MAAM;GAChC,gBAAgB,SAAS;IACrB,MAAM,IAAI,MAAM,KAAKC,sBAAsB,IAAI;IAC/C,MAAM,QAAQ,CAAC;GACnB;GACA,aAAa,MAAM;GACnB,gBAAgB,MAAM;GACtB,SAAS,MAAM;EACnB,CAAC;CACL;AACJ"}
|
|
@@ -136,6 +136,10 @@ declare const EquityHistoryInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
|
|
|
136
136
|
groupBy: EquityGroupBy$1.GROUP_BY_ACCOUNT | EquityGroupBy$1.GROUP_BY_ASSET;
|
|
137
137
|
}>]>;
|
|
138
138
|
type EquityHistoryInput = v.InferInput<typeof EquityHistoryInputSchema>;
|
|
139
|
+
declare const PortfolioEquityHistoryInputSchema: v.StrictObjectSchema<{
|
|
140
|
+
readonly range: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1d", "7d", "30d", "90d", "180d", "365d"], undefined>, v.TransformAction<"1d" | "7d" | "30d" | "90d" | "180d" | "365d", BalanceRange$1.DAY_1 | BalanceRange$1.DAY_7 | BalanceRange$1.DAY_30 | BalanceRange$1.DAY_90 | BalanceRange$1.DAY_180 | BalanceRange$1.DAY_365>]>;
|
|
141
|
+
}, undefined>;
|
|
142
|
+
type PortfolioEquityHistoryInput = v.InferInput<typeof PortfolioEquityHistoryInputSchema>;
|
|
139
143
|
type EquitySeriesGrouping = {
|
|
140
144
|
type: "account";
|
|
141
145
|
accountCode: DecodedEnum<AccountCodeValue>;
|
|
@@ -260,6 +264,166 @@ declare function createEquityHistoryResponseSchema(scales: SdkScales): v.SchemaW
|
|
|
260
264
|
}>]>;
|
|
261
265
|
type EquitySeries = v.InferOutput<typeof EquitySeriesSchema>;
|
|
262
266
|
type EquityHistoryResponse = v.InferOutput<ReturnType<typeof createEquityHistoryResponseSchema>>;
|
|
267
|
+
type PortfolioEquitySeriesGrouping = {
|
|
268
|
+
type: "portfolioAccount";
|
|
269
|
+
accountId: string;
|
|
270
|
+
remaining: false;
|
|
271
|
+
} | {
|
|
272
|
+
type: "portfolioAccount";
|
|
273
|
+
accountId?: never;
|
|
274
|
+
remaining: true;
|
|
275
|
+
};
|
|
276
|
+
declare const PortfolioEquitySeriesSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
277
|
+
readonly grouping: v.ObjectSchema<{
|
|
278
|
+
readonly case: v.LiteralSchema<"portfolioAccount", undefined>;
|
|
279
|
+
readonly value: v.VariantSchema<"remaining", [v.ObjectSchema<{
|
|
280
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
281
|
+
readonly remaining: v.LiteralSchema<false, undefined>;
|
|
282
|
+
}, undefined>, v.ObjectSchema<{
|
|
283
|
+
readonly accountId: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
284
|
+
readonly remaining: v.LiteralSchema<true, undefined>;
|
|
285
|
+
}, undefined>], undefined>;
|
|
286
|
+
}, undefined>;
|
|
287
|
+
readonly equityQ: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
288
|
+
}, undefined>, v.TransformAction<{
|
|
289
|
+
grouping: {
|
|
290
|
+
case: "portfolioAccount";
|
|
291
|
+
value: {
|
|
292
|
+
accountId: string;
|
|
293
|
+
remaining: false;
|
|
294
|
+
} | {
|
|
295
|
+
accountId?: undefined;
|
|
296
|
+
remaining: true;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
equityQ: bigint[];
|
|
300
|
+
}, {
|
|
301
|
+
grouping: PortfolioEquitySeriesGrouping;
|
|
302
|
+
equity: string[];
|
|
303
|
+
}>]>;
|
|
304
|
+
declare function createPortfolioEquityHistoryResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
305
|
+
readonly range: v.SchemaWithPipe<readonly [v.EnumSchema<typeof BalanceRange$1, undefined>, v.TransformAction<BalanceRange$1, "unspecified" | "1d" | "7d" | "30d" | "90d" | "180d" | "365d">]>;
|
|
306
|
+
readonly bucket: v.StringSchema<undefined>;
|
|
307
|
+
readonly startTsSec: v.NumberSchema<undefined>;
|
|
308
|
+
readonly endTsSec: v.NumberSchema<undefined>;
|
|
309
|
+
readonly quoteAsset: v.StringSchema<undefined>;
|
|
310
|
+
readonly points: v.NumberSchema<undefined>;
|
|
311
|
+
readonly series: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
312
|
+
readonly grouping: v.ObjectSchema<{
|
|
313
|
+
readonly case: v.LiteralSchema<"portfolioAccount", undefined>;
|
|
314
|
+
readonly value: v.VariantSchema<"remaining", [v.ObjectSchema<{
|
|
315
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
316
|
+
readonly remaining: v.LiteralSchema<false, undefined>;
|
|
317
|
+
}, undefined>, v.ObjectSchema<{
|
|
318
|
+
readonly accountId: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
319
|
+
readonly remaining: v.LiteralSchema<true, undefined>;
|
|
320
|
+
}, undefined>], undefined>;
|
|
321
|
+
}, undefined>;
|
|
322
|
+
readonly equityQ: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
323
|
+
}, undefined>, v.TransformAction<{
|
|
324
|
+
grouping: {
|
|
325
|
+
case: "portfolioAccount";
|
|
326
|
+
value: {
|
|
327
|
+
accountId: string;
|
|
328
|
+
remaining: false;
|
|
329
|
+
} | {
|
|
330
|
+
accountId?: undefined;
|
|
331
|
+
remaining: true;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
equityQ: bigint[];
|
|
335
|
+
}, {
|
|
336
|
+
grouping: PortfolioEquitySeriesGrouping;
|
|
337
|
+
equity: string[];
|
|
338
|
+
}>]>, undefined>;
|
|
339
|
+
readonly btcPricesQ: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
340
|
+
}, undefined>, v.TransformAction<{
|
|
341
|
+
range: "unspecified" | "1d" | "7d" | "30d" | "90d" | "180d" | "365d";
|
|
342
|
+
bucket: string;
|
|
343
|
+
startTsSec: number;
|
|
344
|
+
endTsSec: number;
|
|
345
|
+
quoteAsset: string;
|
|
346
|
+
points: number;
|
|
347
|
+
series: {
|
|
348
|
+
grouping: PortfolioEquitySeriesGrouping;
|
|
349
|
+
equity: string[];
|
|
350
|
+
}[];
|
|
351
|
+
btcPricesQ: bigint[];
|
|
352
|
+
}, {
|
|
353
|
+
range: "unspecified" | "1d" | "7d" | "30d" | "90d" | "180d" | "365d";
|
|
354
|
+
bucket: string;
|
|
355
|
+
startTsSec: number;
|
|
356
|
+
endTsSec: number;
|
|
357
|
+
quoteAsset: string;
|
|
358
|
+
points: number;
|
|
359
|
+
series: {
|
|
360
|
+
grouping: PortfolioEquitySeriesGrouping;
|
|
361
|
+
equity: string[];
|
|
362
|
+
}[];
|
|
363
|
+
btcPrices: string[];
|
|
364
|
+
}>]>;
|
|
365
|
+
type PortfolioEquitySeries = v.InferOutput<typeof PortfolioEquitySeriesSchema>;
|
|
366
|
+
type PortfolioEquityHistoryResponse = v.InferOutput<ReturnType<typeof createPortfolioEquityHistoryResponseSchema>>;
|
|
367
|
+
declare function createPortfolioEquitySnapshotResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
368
|
+
readonly quoteAsset: v.StringSchema<undefined>;
|
|
369
|
+
readonly totalEquityQ: v.BigintSchema<undefined>;
|
|
370
|
+
readonly accounts: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
371
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
372
|
+
readonly equityQ: v.BigintSchema<undefined>;
|
|
373
|
+
readonly topAssetIds: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
|
|
374
|
+
}, undefined>, v.TransformAction<{
|
|
375
|
+
accountId: string;
|
|
376
|
+
equityQ: bigint;
|
|
377
|
+
topAssetIds: number[];
|
|
378
|
+
}, {
|
|
379
|
+
accountId: string;
|
|
380
|
+
equity: string;
|
|
381
|
+
topAssetIds: number[];
|
|
382
|
+
}>]>, undefined>;
|
|
383
|
+
readonly assets: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
384
|
+
readonly assetId: v.NumberSchema<undefined>;
|
|
385
|
+
readonly balanceQ: v.BigintSchema<undefined>;
|
|
386
|
+
readonly equityQ: v.BigintSchema<undefined>;
|
|
387
|
+
}, undefined>, v.TransformAction<{
|
|
388
|
+
assetId: number;
|
|
389
|
+
balanceQ: bigint;
|
|
390
|
+
equityQ: bigint;
|
|
391
|
+
}, {
|
|
392
|
+
assetId: number;
|
|
393
|
+
balance: string;
|
|
394
|
+
equity: string;
|
|
395
|
+
}>]>, undefined>;
|
|
396
|
+
readonly btcPriceQ: v.BigintSchema<undefined>;
|
|
397
|
+
}, undefined>, v.TransformAction<{
|
|
398
|
+
quoteAsset: string;
|
|
399
|
+
totalEquityQ: bigint;
|
|
400
|
+
accounts: {
|
|
401
|
+
accountId: string;
|
|
402
|
+
equity: string;
|
|
403
|
+
topAssetIds: number[];
|
|
404
|
+
}[];
|
|
405
|
+
assets: {
|
|
406
|
+
assetId: number;
|
|
407
|
+
balance: string;
|
|
408
|
+
equity: string;
|
|
409
|
+
}[];
|
|
410
|
+
btcPriceQ: bigint;
|
|
411
|
+
}, {
|
|
412
|
+
quoteAsset: string;
|
|
413
|
+
totalEquity: string;
|
|
414
|
+
accounts: {
|
|
415
|
+
accountId: string;
|
|
416
|
+
equity: string;
|
|
417
|
+
topAssetIds: number[];
|
|
418
|
+
}[];
|
|
419
|
+
assets: {
|
|
420
|
+
assetId: number;
|
|
421
|
+
balance: string;
|
|
422
|
+
equity: string;
|
|
423
|
+
}[];
|
|
424
|
+
btcPrice: string;
|
|
425
|
+
}>]>;
|
|
426
|
+
type PortfolioEquitySnapshotResponse = v.InferOutput<ReturnType<typeof createPortfolioEquitySnapshotResponseSchema>>;
|
|
263
427
|
//#endregion
|
|
264
|
-
export { BalanceHistoryInput, BalanceHistoryInputSchema, BalanceHistoryResponse, BalanceRange, BalanceRangeSchema, EquityGroupBy, EquityGroupBySchema, EquityHistoryInput, EquityHistoryInputSchema, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping, EquitySeriesSchema, LedgerBalance, createBalanceHistoryResponseSchema, createEquityHistoryResponseSchema, createLedgerBalanceSchema };
|
|
428
|
+
export { BalanceHistoryInput, BalanceHistoryInputSchema, BalanceHistoryResponse, BalanceRange, BalanceRangeSchema, EquityGroupBy, EquityGroupBySchema, EquityHistoryInput, EquityHistoryInputSchema, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping, EquitySeriesSchema, LedgerBalance, PortfolioEquityHistoryInput, PortfolioEquityHistoryInputSchema, PortfolioEquityHistoryResponse, PortfolioEquitySeries, PortfolioEquitySeriesGrouping, PortfolioEquitySeriesSchema, PortfolioEquitySnapshotResponse, createBalanceHistoryResponseSchema, createEquityHistoryResponseSchema, createLedgerBalanceSchema, createPortfolioEquityHistoryResponseSchema, createPortfolioEquitySnapshotResponseSchema };
|
|
265
429
|
//# sourceMappingURL=balances.schemas.d.ts.map
|