@polyester/sdk 0.11.0 → 0.12.0
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 +12 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts +21 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/address_book_pb.js +1 -1
- package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.d.ts +39 -3
- package/dist/gen/auth/v1/mfa_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.js +1 -1
- package/dist/gen/auth/v1/mfa_pb.js.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts +2 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +3 -2
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +3 -0
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +347 -5
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +307 -3
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/services/address-book/address-book.d.ts +3 -1
- package/dist/services/address-book/address-book.d.ts.map +1 -1
- package/dist/services/address-book/address-book.js +3 -1
- package/dist/services/address-book/address-book.js.map +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +6 -0
- package/dist/services/address-book/address-book.schemas.d.ts.map +1 -1
- package/dist/services/address-book/address-book.schemas.js +10 -5
- package/dist/services/address-book/address-book.schemas.js.map +1 -1
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/heatmap/heatmap.schemas.d.ts +9 -9
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/mfa/mfa.d.ts +2 -2
- package/dist/services/mfa/mfa.js +2 -2
- package/dist/services/mfa/mfa.js.map +1 -1
- package/dist/services/mfa/mfa.schemas.d.ts +132 -4
- package/dist/services/mfa/mfa.schemas.d.ts.map +1 -1
- package/dist/services/mfa/mfa.schemas.js +13 -7
- package/dist/services/mfa/mfa.schemas.js.map +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 +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +365 -18
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +36 -4
- package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
- package/dist/services/triggers/triggers.codecs.js +51 -1
- package/dist/services/triggers/triggers.codecs.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-book.schemas.js","names":["Proto.AccountScopeType","Proto.DestinationWhitelistStatus","Proto.AddressBookEntryKind","Proto.TransferCounterpartyDirection","Proto.InternalWhitelistResolutionStatus","RequiredTimestampMsSchema"],"sources":["../../../src/services/address-book/address-book.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport * as Proto from \"../../gen/auth/v1/address_book_pb.js\";\nimport { SubaccountRole } from \"../../gen/auth/v1/subaccounts_pb.js\";\nimport {\n OptionalTimestampMsSchema,\n BigIntStringSchema,\n PublicIdSchema,\n TimestampMsSchema as RequiredTimestampMsSchema,\n idInputSchema,\n optionalSubaccountIdInputSchema,\n positiveBigintStringInputSchema,\n} from \"../../shared/schemas.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport {\n ADDRESS_BOOK_ENTRY_KIND_VALUES,\n AccountScopeTypeCodec,\n AddressBookEntryKindCodec,\n DestinationWhitelistStatusCodec,\n InternalWhitelistResolutionStatusCodec,\n TRANSFER_COUNTERPARTY_DIRECTION_VALUES,\n TransferCounterpartyDirectionCodec,\n} from \"./address-book.codecs.js\";\nimport { SubaccountRoleCodec } from \"../subaccounts/subaccounts.codecs.js\";\nimport { buildProtoPatch, defineProtoPatchFields } from \"../../utils/proto-patch.js\";\n\nconst OptionalSubaccountIdSchema = optionalSubaccountIdInputSchema();\nconst IdSchema = idInputSchema;\n\nconst AddressBookLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)),\n);\nconst AddressBookCounterpartyLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst AddressBookViewLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst PageTokenSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\n\nconst TimestampMsSchema = OptionalTimestampMsSchema;\n\nconst AddressBookTagInputSchema = v.strictObject({\n name: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(48)),\n color: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(32)), \"\"),\n});\nconst AddressBookTagInputsSchema = v.pipe(v.array(AddressBookTagInputSchema), v.maxLength(10));\n\nexport const ListAddressBookEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListAddressBookEntriesInput = v.InferInput<typeof ListAddressBookEntriesInputSchema>;\n\nexport const CreateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n label: v.pipe(v.string(), v.trim(), v.minLength(1)),\n note: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n entry: v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"external\"),\n polychainChainId: v.pipe(v.number(), v.integer(), v.gtValue(0)),\n address: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.strictObject({\n kind: v.literal(\"internal\"),\n smartAccountAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n ]),\n tagIds: v.optional(v.array(IdSchema(\"tagId\")), []),\n newTags: v.optional(AddressBookTagInputsSchema, []),\n }),\n v.transform(({ account, entry, ...rest }) => ({\n ...rest,\n subaccountId: accountScopeToSubaccountId(account),\n entry:\n entry.kind === \"external\"\n ? {\n case: \"external\" as const,\n value: {\n polychainChainId: entry.polychainChainId,\n address: entry.address,\n },\n }\n : {\n case: \"internal\" as const,\n value: {\n smartAccountAddress: entry.smartAccountAddress,\n },\n },\n })),\n);\n\nexport type CreateAddressBookEntryInput = v.InferInput<typeof CreateAddressBookEntryInputSchema>;\n\nexport function validateCreateAddressBookEntryInput(input: CreateAddressBookEntryInput): void {\n parse(CreateAddressBookEntryInputSchema, input);\n}\n\ntype AddressBookEntryPatch = {\n label?: string;\n note?: string;\n tagIds?: bigint[];\n newTags?: v.InferOutput<typeof AddressBookTagInputSchema>[];\n};\n\nconst ADDRESS_BOOK_ENTRY_PATCH_FIELDS = defineProtoPatchFields<AddressBookEntryPatch>()({\n label: { path: \"label\", encode: (label) => ({ label }) },\n note: { path: \"note\", encode: (note) => ({ note }) },\n tagIds: { path: \"tag_ids\", encode: (tagIds) => ({ tagIds }) },\n newTags: { path: \"new_tags\", encode: (newTags) => ({ newTags }) },\n});\n\nexport const UpdateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n expectedRevision: positiveBigintStringInputSchema(\"expectedRevision\"),\n label: v.optional(v.pipe(v.string(), v.trim())),\n note: v.optional(v.pipe(v.string(), v.trim())),\n tagIds: v.optional(v.array(IdSchema(\"tagId\"))),\n newTags: v.optional(AddressBookTagInputsSchema),\n }),\n v.check(\n ({ label, note, tagIds, newTags }) =>\n label !== undefined ||\n note !== undefined ||\n tagIds !== undefined ||\n newTags !== undefined,\n \"At least one address-book entry field must be provided\",\n ),\n v.transform(({ addressBookEntryId, expectedRevision, ...input }) => {\n const { patch: entry, updateMask } = buildProtoPatch(\n input,\n ADDRESS_BOOK_ENTRY_PATCH_FIELDS,\n );\n return { addressBookEntryId, entry, updateMask, expectedRevision };\n }),\n);\n\nexport type UpdateAddressBookEntryInput = v.InferInput<typeof UpdateAddressBookEntryInputSchema>;\n\nexport const DeleteAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n});\n\nexport type DeleteAddressBookEntryInput = v.InferInput<typeof DeleteAddressBookEntryInputSchema>;\n\nexport const CopyAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n targetSubaccountId: OptionalSubaccountIdSchema,\n});\n\nexport type CopyAddressBookEntryInput = v.InferInput<typeof CopyAddressBookEntryInputSchema>;\n\nexport const CreateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n name: v.pipe(v.string(), v.trim(), v.minLength(1)),\n color: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type CreateAddressBookTagInput = v.InferInput<typeof CreateAddressBookTagInputSchema>;\n\nexport const UpdateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n tagId: IdSchema(\"tagId\"),\n name: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),\n color: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.check(\n ({ name, color }) => name !== undefined || color !== undefined,\n \"At least one address-book tag field must be provided\",\n ),\n);\n\nexport type UpdateAddressBookTagInput = v.InferInput<typeof UpdateAddressBookTagInputSchema>;\n\nexport const DeleteAddressBookTagInputSchema = v.strictObject({\n tagId: IdSchema(\"tagId\"),\n});\n\nexport type DeleteAddressBookTagInput = v.InferInput<typeof DeleteAddressBookTagInputSchema>;\n\nexport const ListTransferCounterpartiesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n direction: v.optional(v.picklist(TRANSFER_COUNTERPARTY_DIRECTION_VALUES)),\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookCounterpartyLimitSchema,\n }),\n v.transform(({ account, direction, kind, limit }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n direction: direction\n ? TransferCounterpartyDirectionCodec.inputToProto[direction]\n : undefined,\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n })),\n);\n\nexport type ListTransferCounterpartiesInput = v.InferInput<\n typeof ListTransferCounterpartiesInputSchema\n>;\n\nexport const ListTransferDestinationsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListTransferDestinationsInput = v.InferInput<\n typeof ListTransferDestinationsInputSchema\n>;\n\nexport const SubaccountScopedInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n }),\n v.transform(({ account }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type SubaccountScopedInput = v.InferInput<typeof SubaccountScopedInputSchema>;\n\nexport const ListInternalTransferWhitelistEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n })),\n);\n\nexport type ListInternalTransferWhitelistEntriesInput = v.InferInput<\n typeof ListInternalTransferWhitelistEntriesInputSchema\n>;\n\nexport const GetAddressBookViewInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookViewLimitSchema,\n }),\n v.transform(({ account, limit }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n })),\n);\n\nexport type GetAddressBookViewInput = v.InferInput<typeof GetAddressBookViewInputSchema>;\n\nconst CountSchema = v.pipe(\n v.bigint(),\n v.transform((value) => Number(value)),\n);\n\nconst AccountScopeSchema = v.object({\n scopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AccountScopeSchema\",\n \"scope type\",\n ),\n ),\n ),\n rootAccountId: PublicIdSchema,\n subaccountId: PublicIdSchema,\n});\n\nconst ExternalWithdrawAddressSchema = v.object({\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n});\n\nconst InternalTransferAccountSchema = v.object({\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferAccountSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n});\n\nconst AddressBookEntryValueSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"external\"), value: ExternalWithdrawAddressSchema }),\n v.object({ case: v.literal(\"internal\"), value: InternalTransferAccountSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst DestinationWhitelistStatusSchema = v.pipe(\n v.enum(Proto.DestinationWhitelistStatus),\n v.transform((value) =>\n requiredEnumLabel(\n DestinationWhitelistStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.DestinationWhitelistStatusSchema\",\n \"whitelist status\",\n ),\n ),\n);\n\nconst AddressBookEntryKindSchema = v.pipe(\n v.enum(Proto.AddressBookEntryKind),\n v.transform((value) =>\n requiredEnumLabel(\n AddressBookEntryKindCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntryKindSchema\",\n \"entry kind\",\n ),\n ),\n);\n\nconst TransferCounterpartyDirectionSchema = v.pipe(\n v.enum(Proto.TransferCounterpartyDirection),\n v.transform((value) =>\n requiredEnumLabel(\n TransferCounterpartyDirectionCodec.protoToOutput,\n value,\n \"PolyesterClient.TransferCounterpartyDirectionSchema\",\n \"direction\",\n ),\n ),\n);\n\nexport const AddressBookSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n callerRole: v.pipe(\n v.enum(SubaccountRole),\n v.transform((role) =>\n requiredEnumLabel(\n SubaccountRoleCodec.protoToOutput,\n role,\n \"AddressBookEntrySchema\",\n \"caller role\",\n ),\n ),\n ),\n label: v.string(),\n ownerUsername: v.string(),\n smartAccountAddress: v.string(),\n});\n\nexport type AddressBook = v.InferOutput<typeof AddressBookSchema>;\n\nexport const AddressBookTagSummarySchema = v.object({\n tagId: PublicIdSchema,\n name: v.string(),\n color: v.string(),\n});\n\nexport type AddressBookTagSummary = v.InferOutput<typeof AddressBookTagSummarySchema>;\n\nexport const AddressBookTagSchema = v.object({\n tagId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n name: v.string(),\n color: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n});\n\nexport type AddressBookTag = v.InferOutput<typeof AddressBookTagSchema>;\n\nexport const AddressBookEntrySchema = v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n label: v.string(),\n note: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n entry: AddressBookEntryValueSchema,\n tags: v.array(AddressBookTagSchema),\n revision: BigIntStringSchema,\n});\n\nexport type AddressBookEntry = v.InferOutput<typeof AddressBookEntrySchema>;\n\nexport const AddressBookEntriesSchema = v.array(AddressBookEntrySchema);\nexport type AddressBookEntries = v.InferOutput<typeof AddressBookEntriesSchema>;\n\nexport const TransferCounterpartySchema = v.object({\n counterpartyId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n direction: TransferCounterpartyDirectionSchema,\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n firstSeenAt: TimestampMsSchema,\n lastSeenAt: TimestampMsSchema,\n counterparty: AddressBookEntryValueSchema,\n});\n\nexport type TransferCounterparty = v.InferOutput<typeof TransferCounterpartySchema>;\n\nexport const TransferCounterpartiesSchema = v.array(TransferCounterpartySchema);\nexport type TransferCounterparties = v.InferOutput<typeof TransferCounterpartiesSchema>;\n\nexport const TransferDestinationSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n whitelisted: v.boolean(),\n whitelistStatus: DestinationWhitelistStatusSchema,\n addressBookEntry: v.optional(AddressBookEntrySchema),\n destination: AddressBookEntryValueSchema,\n whitelistEffectiveAt: TimestampMsSchema,\n whitelistUpdatedAt: TimestampMsSchema,\n});\n\nexport type TransferDestination = v.InferOutput<typeof TransferDestinationSchema>;\n\nexport const TransferDestinationsSchema = v.array(TransferDestinationSchema);\nexport type TransferDestinations = v.InferOutput<typeof TransferDestinationsSchema>;\n\nexport const InternalTransferWhitelistEntrySchema = v.object({\n entryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n resolutionStatus: v.pipe(\n v.enum(Proto.InternalWhitelistResolutionStatus),\n v.transform((value) =>\n requiredEnumLabel(\n InternalWhitelistResolutionStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"resolution status\",\n ),\n ),\n ),\n});\n\nexport type InternalTransferWhitelistEntry = v.InferOutput<\n typeof InternalTransferWhitelistEntrySchema\n>;\n\nexport const InternalTransferWhitelistEntriesSchema = v.array(InternalTransferWhitelistEntrySchema);\n\nexport type InternalTransferWhitelistEntries = v.InferOutput<\n typeof InternalTransferWhitelistEntriesSchema\n>;\n\nexport const MirroredWithdrawWhitelistEntrySchema = v.object({\n canonicalAddress: v.string(),\n rawAddressHex: v.string(),\n updatedAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n});\n\nexport type MirroredWithdrawWhitelistEntry = v.InferOutput<\n typeof MirroredWithdrawWhitelistEntrySchema\n>;\n\nexport const WithdrawWhitelistViewSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n externalWhitelistRequired: v.boolean(),\n internalWhitelistRequired: v.boolean(),\n activeEntries: v.optional(v.array(MirroredWithdrawWhitelistEntrySchema), []),\n});\n\nexport type WithdrawWhitelistView = v.InferOutput<typeof WithdrawWhitelistViewSchema>;\n\nexport const AddressBookEntriesViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntriesViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookEntriesView = v.InferOutput<typeof AddressBookEntriesViewSchema>;\n\nexport const AddressBookRecentDestinationsViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookRecentDestinationsViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookRecentDestinationsView = v.InferOutput<\n typeof AddressBookRecentDestinationsViewSchema\n>;\n\nexport const AddressBookViewSchema = v.object({\n books: v.optional(v.array(AddressBookSchema), []),\n entries: v.optional(AddressBookEntriesViewSchema),\n recentDestinations: v.optional(AddressBookRecentDestinationsViewSchema),\n tags: v.optional(v.array(AddressBookTagSummarySchema), []),\n withdrawWhitelist: v.optional(WithdrawWhitelistViewSchema),\n recentDestinationsTruncated: v.optional(v.boolean(), false),\n});\n\nexport type AddressBookView = v.InferOutput<typeof AddressBookViewSchema>;\n\nexport const AddressBookViewInvalidatedSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n invalidatedAt: RequiredTimestampMsSchema,\n});\n\nexport type AddressBookViewInvalidated = v.InferOutput<typeof AddressBookViewInvalidatedSchema>;\n"],"mappings":";;;;;;;;;;;AA8BA,MAAM,6BAA6B,gCAAgC;AACnE,MAAM,WAAW;AAEjB,MAAM,yBAAyB,EAAE,SAC7B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,qCAAqC,EAAE,SACzC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,6BAA6B,EAAE,SACjC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,k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A,2DACA,mBACJ,CACJ,CACJ;EACA,qBAAqB,EAAE,OAAO;EAC9B,cAAc,EAAE,OAAO;EACvB,iBAAiB,EAAE,OAAO;CAC9B,CAAC,CACL,GACA,CAAC,CACL;AACJ,CAAC;AAMD,MAAa,wBAAwB,EAAE,OAAO;CAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,GAAG,CAAC,CAAC;CAChD,SAAS,EAAE,SAAS,4BAA4B;CAChD,oBAAoB,EAAE,SAAS,uCAAuC;CACtE,MAAM,EAAE,SAAS,EAAE,MAAM,2BAA2B,GAAG,CAAC,CAAC;CACzD,mBAAmB,EAAE,SAAS,2BAA2B;CACzD,6BAA6B,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAC9D,CAAC;AAID,MAAa,mCAAmC,EAAE,OAAO;CACrD,OAAO,EAAE,SAAS,kBAAkB;CACpC,eAAeK;AACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"address-book.schemas.js","names":["Proto.AccountScopeType","Proto.DestinationWhitelistStatus","Proto.AddressBookEntryKind","Proto.TransferCounterpartyDirection","Proto.InternalWhitelistResolutionStatus","RequiredTimestampMsSchema"],"sources":["../../../src/services/address-book/address-book.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport * as Proto from \"../../gen/auth/v1/address_book_pb.js\";\nimport { SubaccountRole } from \"../../gen/auth/v1/subaccounts_pb.js\";\nimport {\n OptionalTimestampMsSchema,\n BigIntStringSchema,\n PublicIdSchema,\n TimestampMsSchema as RequiredTimestampMsSchema,\n idInputSchema,\n optionalSubaccountIdInputSchema,\n positiveBigintStringInputSchema,\n} from \"../../shared/schemas.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport {\n ADDRESS_BOOK_ENTRY_KIND_VALUES,\n AccountScopeTypeCodec,\n AddressBookEntryKindCodec,\n DestinationWhitelistStatusCodec,\n InternalWhitelistResolutionStatusCodec,\n TRANSFER_COUNTERPARTY_DIRECTION_VALUES,\n TransferCounterpartyDirectionCodec,\n} from \"./address-book.codecs.js\";\nimport { SubaccountRoleCodec } from \"../subaccounts/subaccounts.codecs.js\";\nimport { buildProtoPatch, defineProtoPatchFields } from \"../../utils/proto-patch.js\";\n\nconst OptionalSubaccountIdSchema = optionalSubaccountIdInputSchema();\nconst IdSchema = idInputSchema;\n\nconst AddressBookLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)),\n);\nconst AddressBookCounterpartyLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst AddressBookViewLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst PageTokenSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\n\nconst TimestampMsSchema = OptionalTimestampMsSchema;\n\nconst AddressBookTagInputSchema = v.strictObject({\n name: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(48)),\n color: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(32)), \"\"),\n});\nconst AddressBookTagInputsSchema = v.pipe(v.array(AddressBookTagInputSchema), v.maxLength(10));\n\nexport const ListAddressBookEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListAddressBookEntriesInput = v.InferInput<typeof ListAddressBookEntriesInputSchema>;\n\nexport const CreateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n label: v.pipe(v.string(), v.trim(), v.minLength(1)),\n note: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n entry: v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"external\"),\n polychainChainId: v.pipe(v.number(), v.integer(), v.gtValue(0)),\n address: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.strictObject({\n kind: v.literal(\"internal\"),\n smartAccountAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n ]),\n tagIds: v.optional(v.array(IdSchema(\"tagId\")), []),\n newTags: v.optional(AddressBookTagInputsSchema, []),\n }),\n v.transform(({ account, entry, ...rest }) => ({\n ...rest,\n subaccountId: accountScopeToSubaccountId(account),\n entry:\n entry.kind === \"external\"\n ? {\n case: \"external\" as const,\n value: {\n polychainChainId: entry.polychainChainId,\n address: entry.address,\n },\n }\n : {\n case: \"internal\" as const,\n value: {\n smartAccountAddress: entry.smartAccountAddress,\n },\n },\n })),\n);\n\nexport type CreateAddressBookEntryInput = v.InferInput<typeof CreateAddressBookEntryInputSchema>;\n\nexport function validateCreateAddressBookEntryInput(input: CreateAddressBookEntryInput): void {\n parse(CreateAddressBookEntryInputSchema, input);\n}\n\ntype AddressBookEntryPatch = {\n label?: string;\n note?: string;\n tagIds?: bigint[];\n newTags?: v.InferOutput<typeof AddressBookTagInputSchema>[];\n};\n\nconst ADDRESS_BOOK_ENTRY_PATCH_FIELDS = defineProtoPatchFields<AddressBookEntryPatch>()({\n label: { path: \"label\", encode: (label) => ({ label }) },\n note: { path: \"note\", encode: (note) => ({ note }) },\n tagIds: { path: \"tag_ids\", encode: (tagIds) => ({ tagIds }) },\n newTags: { path: \"new_tags\", encode: (newTags) => ({ newTags }) },\n});\n\nexport const UpdateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n expectedRevision: positiveBigintStringInputSchema(\"expectedRevision\"),\n label: v.optional(v.pipe(v.string(), v.trim())),\n note: v.optional(v.pipe(v.string(), v.trim())),\n tagIds: v.optional(v.array(IdSchema(\"tagId\"))),\n newTags: v.optional(AddressBookTagInputsSchema),\n }),\n v.check(\n ({ label, note, tagIds, newTags }) =>\n label !== undefined ||\n note !== undefined ||\n tagIds !== undefined ||\n newTags !== undefined,\n \"At least one address-book entry field must be provided\",\n ),\n v.transform(({ addressBookEntryId, expectedRevision, ...input }) => {\n const { patch: entry, updateMask } = buildProtoPatch(\n input,\n ADDRESS_BOOK_ENTRY_PATCH_FIELDS,\n );\n return { addressBookEntryId, entry, updateMask, expectedRevision };\n }),\n);\n\nexport type UpdateAddressBookEntryInput = v.InferInput<typeof UpdateAddressBookEntryInputSchema>;\n\nexport const DeleteAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n});\n\nexport type DeleteAddressBookEntryInput = v.InferInput<typeof DeleteAddressBookEntryInputSchema>;\n\nexport const CopyAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n targetSubaccountId: OptionalSubaccountIdSchema,\n});\n\nexport type CopyAddressBookEntryInput = v.InferInput<typeof CopyAddressBookEntryInputSchema>;\n\nexport const CreateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n name: v.pipe(v.string(), v.trim(), v.minLength(1)),\n color: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type CreateAddressBookTagInput = v.InferInput<typeof CreateAddressBookTagInputSchema>;\n\nexport const UpdateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n tagId: IdSchema(\"tagId\"),\n name: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),\n color: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.check(\n ({ name, color }) => name !== undefined || color !== undefined,\n \"At least one address-book tag field must be provided\",\n ),\n);\n\nexport type UpdateAddressBookTagInput = v.InferInput<typeof UpdateAddressBookTagInputSchema>;\n\nexport const DeleteAddressBookTagInputSchema = v.strictObject({\n tagId: IdSchema(\"tagId\"),\n});\n\nexport type DeleteAddressBookTagInput = v.InferInput<typeof DeleteAddressBookTagInputSchema>;\n\nexport const ListTransferCounterpartiesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n direction: v.optional(v.picklist(TRANSFER_COUNTERPARTY_DIRECTION_VALUES)),\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookCounterpartyLimitSchema,\n }),\n v.transform(({ account, direction, kind, limit }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n direction: direction\n ? TransferCounterpartyDirectionCodec.inputToProto[direction]\n : undefined,\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n })),\n);\n\nexport type ListTransferCounterpartiesInput = v.InferInput<\n typeof ListTransferCounterpartiesInputSchema\n>;\n\nexport const ListTransferDestinationsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListTransferDestinationsInput = v.InferInput<\n typeof ListTransferDestinationsInputSchema\n>;\n\nexport const SubaccountScopedInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n }),\n v.transform(({ account }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type SubaccountScopedInput = v.InferInput<typeof SubaccountScopedInputSchema>;\n\nexport const ListInternalTransferWhitelistEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n })),\n);\n\nexport type ListInternalTransferWhitelistEntriesInput = v.InferInput<\n typeof ListInternalTransferWhitelistEntriesInputSchema\n>;\n\nexport const GetAddressBookViewInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookViewLimitSchema,\n /** Minimum `viewRevision` (from an invalidation event) the returned view must reach. */\n minimumViewRevision: v.optional(positiveBigintStringInputSchema(\"minimumViewRevision\")),\n }),\n v.transform(({ account, limit, minimumViewRevision }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n minimumViewRevision,\n })),\n);\n\nexport type GetAddressBookViewInput = v.InferInput<typeof GetAddressBookViewInputSchema>;\n\nconst CountSchema = v.pipe(\n v.bigint(),\n v.transform((value) => Number(value)),\n);\n\nconst AccountScopeSchema = v.object({\n scopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AccountScopeSchema\",\n \"scope type\",\n ),\n ),\n ),\n rootAccountId: PublicIdSchema,\n subaccountId: PublicIdSchema,\n});\n\nconst ExternalWithdrawAddressSchema = v.object({\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n});\n\nconst InternalTransferAccountSchema = v.object({\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferAccountSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n});\n\nconst AddressBookEntryValueSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"external\"), value: ExternalWithdrawAddressSchema }),\n v.object({ case: v.literal(\"internal\"), value: InternalTransferAccountSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst DestinationWhitelistStatusSchema = v.pipe(\n v.enum(Proto.DestinationWhitelistStatus),\n v.transform((value) =>\n requiredEnumLabel(\n DestinationWhitelistStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.DestinationWhitelistStatusSchema\",\n \"whitelist status\",\n ),\n ),\n);\n\nconst AddressBookEntryKindSchema = v.pipe(\n v.enum(Proto.AddressBookEntryKind),\n v.transform((value) =>\n requiredEnumLabel(\n AddressBookEntryKindCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntryKindSchema\",\n \"entry kind\",\n ),\n ),\n);\n\nconst TransferCounterpartyDirectionSchema = v.pipe(\n v.enum(Proto.TransferCounterpartyDirection),\n v.transform((value) =>\n requiredEnumLabel(\n TransferCounterpartyDirectionCodec.protoToOutput,\n value,\n \"PolyesterClient.TransferCounterpartyDirectionSchema\",\n \"direction\",\n ),\n ),\n);\n\nexport const AddressBookSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n callerRole: v.pipe(\n v.enum(SubaccountRole),\n v.transform((role) =>\n requiredEnumLabel(\n SubaccountRoleCodec.protoToOutput,\n role,\n \"AddressBookEntrySchema\",\n \"caller role\",\n ),\n ),\n ),\n label: v.string(),\n ownerUsername: v.string(),\n smartAccountAddress: v.string(),\n});\n\nexport type AddressBook = v.InferOutput<typeof AddressBookSchema>;\n\nexport const AddressBookTagSummarySchema = v.object({\n tagId: PublicIdSchema,\n name: v.string(),\n color: v.string(),\n});\n\nexport type AddressBookTagSummary = v.InferOutput<typeof AddressBookTagSummarySchema>;\n\nexport const AddressBookTagSchema = v.object({\n tagId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n name: v.string(),\n color: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n});\n\nexport type AddressBookTag = v.InferOutput<typeof AddressBookTagSchema>;\n\nexport const AddressBookEntrySchema = v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n label: v.string(),\n note: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n entry: AddressBookEntryValueSchema,\n tags: v.array(AddressBookTagSchema),\n revision: BigIntStringSchema,\n});\n\nexport type AddressBookEntry = v.InferOutput<typeof AddressBookEntrySchema>;\n\nexport const AddressBookEntriesSchema = v.array(AddressBookEntrySchema);\nexport type AddressBookEntries = v.InferOutput<typeof AddressBookEntriesSchema>;\n\nexport const TransferCounterpartySchema = v.object({\n counterpartyId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n direction: TransferCounterpartyDirectionSchema,\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n firstSeenAt: TimestampMsSchema,\n lastSeenAt: TimestampMsSchema,\n counterparty: AddressBookEntryValueSchema,\n});\n\nexport type TransferCounterparty = v.InferOutput<typeof TransferCounterpartySchema>;\n\nexport const TransferCounterpartiesSchema = v.array(TransferCounterpartySchema);\nexport type TransferCounterparties = v.InferOutput<typeof TransferCounterpartiesSchema>;\n\nexport const TransferDestinationSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n whitelisted: v.boolean(),\n whitelistStatus: DestinationWhitelistStatusSchema,\n addressBookEntry: v.optional(AddressBookEntrySchema),\n destination: AddressBookEntryValueSchema,\n whitelistEffectiveAt: TimestampMsSchema,\n whitelistUpdatedAt: TimestampMsSchema,\n});\n\nexport type TransferDestination = v.InferOutput<typeof TransferDestinationSchema>;\n\nexport const TransferDestinationsSchema = v.array(TransferDestinationSchema);\nexport type TransferDestinations = v.InferOutput<typeof TransferDestinationsSchema>;\n\nexport const InternalTransferWhitelistEntrySchema = v.object({\n entryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n resolutionStatus: v.pipe(\n v.enum(Proto.InternalWhitelistResolutionStatus),\n v.transform((value) =>\n requiredEnumLabel(\n InternalWhitelistResolutionStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"resolution status\",\n ),\n ),\n ),\n});\n\nexport type InternalTransferWhitelistEntry = v.InferOutput<\n typeof InternalTransferWhitelistEntrySchema\n>;\n\nexport const InternalTransferWhitelistEntriesSchema = v.array(InternalTransferWhitelistEntrySchema);\n\nexport type InternalTransferWhitelistEntries = v.InferOutput<\n typeof InternalTransferWhitelistEntriesSchema\n>;\n\nexport const MirroredWithdrawWhitelistEntrySchema = v.object({\n canonicalAddress: v.string(),\n rawAddressHex: v.string(),\n updatedAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n});\n\nexport type MirroredWithdrawWhitelistEntry = v.InferOutput<\n typeof MirroredWithdrawWhitelistEntrySchema\n>;\n\nexport const WithdrawWhitelistViewSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n externalWhitelistRequired: v.boolean(),\n internalWhitelistRequired: v.boolean(),\n activeEntries: v.optional(v.array(MirroredWithdrawWhitelistEntrySchema), []),\n});\n\nexport type WithdrawWhitelistView = v.InferOutput<typeof WithdrawWhitelistViewSchema>;\n\nexport const AddressBookEntriesViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntriesViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookEntriesView = v.InferOutput<typeof AddressBookEntriesViewSchema>;\n\nexport const AddressBookRecentDestinationsViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookRecentDestinationsViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookRecentDestinationsView = v.InferOutput<\n typeof AddressBookRecentDestinationsViewSchema\n>;\n\nexport const AddressBookViewSchema = v.object({\n books: v.optional(v.array(AddressBookSchema), []),\n entries: v.optional(AddressBookEntriesViewSchema),\n recentDestinations: v.optional(AddressBookRecentDestinationsViewSchema),\n tags: v.optional(v.array(AddressBookTagSummarySchema), []),\n withdrawWhitelist: v.optional(WithdrawWhitelistViewSchema),\n recentDestinationsTruncated: v.optional(v.boolean(), false),\n viewRevision: v.optional(BigIntStringSchema, 0n),\n});\n\nexport type AddressBookView = v.InferOutput<typeof AddressBookViewSchema>;\n\nexport const AddressBookViewInvalidatedSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n invalidatedAt: RequiredTimestampMsSchema,\n viewRevision: v.optional(BigIntStringSchema, 0n),\n});\n\nexport type AddressBookViewInvalidated = v.InferOutput<typeof AddressBookViewInvalidatedSchema>;\n"],"mappings":";;;;;;;;;;;AA8BA,MAAM,6BAA6B,gCAAgC;AACnE,MAAM,WAAW;AAEjB,MAAM,yBAAyB,EAAE,SAC7B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,qCAAqC,EAAE,SACzC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,6BAA6B,EAAE,SACjC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,kBAAkB,EAAE,SAAS,E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AC7B,EAAE,WAAW,UACT,kBACI,sBAAsB,eACtB,OACA,2DACA,mBACJ,CACJ,CACJ;EACA,qBAAqB,EAAE,OAAO;EAC9B,cAAc,EAAE,OAAO;EACvB,iBAAiB,EAAE,OAAO;CAC9B,CAAC,CACL,GACA,CAAC,CACL;AACJ,CAAC;AAMD,MAAa,wBAAwB,EAAE,OAAO;CAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,GAAG,CAAC,CAAC;CAChD,SAAS,EAAE,SAAS,4BAA4B;CAChD,oBAAoB,EAAE,SAAS,uCAAuC;CACtE,MAAM,EAAE,SAAS,EAAE,MAAM,2BAA2B,GAAG,CAAC,CAAC;CACzD,mBAAmB,EAAE,SAAS,2BAA2B;CACzD,6BAA6B,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;CAC1D,cAAc,EAAE,SAAS,oBAAoB,EAAE;AACnD,CAAC;AAID,MAAa,mCAAmC,EAAE,OAAO;CACrD,OAAO,EAAE,SAAS,kBAAkB;CACpC,eAAeK;CACf,cAAc,EAAE,SAAS,oBAAoB,EAAE;AACnD,CAAC"}
|
|
@@ -11,7 +11,7 @@ type TimestampInit = {
|
|
|
11
11
|
};
|
|
12
12
|
declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
13
13
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
14
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
14
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
|
|
15
15
|
readonly tsSec: v.BigintSchema<undefined>;
|
|
16
16
|
readonly open: v.BigintSchema<undefined>;
|
|
17
17
|
readonly high: v.BigintSchema<undefined>;
|
|
@@ -21,7 +21,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
21
21
|
readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
22
22
|
}, undefined>, v.TransformAction<{
|
|
23
23
|
symbolId: number;
|
|
24
|
-
timeframe: DecodedEnum<"1d" | "
|
|
24
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
25
25
|
tsSec: bigint;
|
|
26
26
|
open: bigint;
|
|
27
27
|
high: bigint;
|
|
@@ -31,7 +31,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
31
31
|
isClosed: boolean;
|
|
32
32
|
}, {
|
|
33
33
|
symbolId: number;
|
|
34
|
-
timeframe: DecodedEnum<"1d" | "
|
|
34
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
35
35
|
time: number;
|
|
36
36
|
open: string;
|
|
37
37
|
high: string;
|
|
@@ -43,7 +43,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
43
43
|
declare const createCandleRowIntSchema: typeof createCandleRowSchema;
|
|
44
44
|
declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
45
45
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
46
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
46
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
|
|
47
47
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
48
48
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
49
49
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
@@ -59,7 +59,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
59
59
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
60
60
|
}, undefined>, v.TransformAction<{
|
|
61
61
|
symbolId: number;
|
|
62
|
-
timeframe: DecodedEnum<"1d" | "
|
|
62
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
63
63
|
tsSec: bigint[];
|
|
64
64
|
open: bigint[];
|
|
65
65
|
high: bigint[];
|
|
@@ -75,7 +75,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
75
75
|
nextPageToken: string;
|
|
76
76
|
}, {
|
|
77
77
|
symbolId: number;
|
|
78
|
-
timeframe: DecodedEnum<"1d" | "
|
|
78
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
79
79
|
time: number[];
|
|
80
80
|
open: string[];
|
|
81
81
|
high: string[];
|
|
@@ -94,7 +94,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
94
94
|
}>]>;
|
|
95
95
|
declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
96
96
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
97
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
97
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
|
|
98
98
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
99
99
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
100
100
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
@@ -110,7 +110,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
110
110
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
111
111
|
}, undefined>, v.TransformAction<{
|
|
112
112
|
symbolId: number;
|
|
113
|
-
timeframe: DecodedEnum<"1d" | "
|
|
113
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
114
114
|
tsSec: bigint[];
|
|
115
115
|
open: bigint[];
|
|
116
116
|
high: bigint[];
|
|
@@ -126,7 +126,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
126
126
|
nextPageToken: string;
|
|
127
127
|
}, {
|
|
128
128
|
symbolId: number;
|
|
129
|
-
timeframe: DecodedEnum<"1d" | "
|
|
129
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
130
130
|
tsSec: number[];
|
|
131
131
|
open: string[];
|
|
132
132
|
high: string[];
|
|
@@ -149,7 +149,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
|
|
|
149
149
|
type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
|
|
150
150
|
declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
151
151
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>]>;
|
|
152
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "
|
|
152
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
|
|
153
153
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 10000, undefined>]>, undefined>;
|
|
154
154
|
readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
155
155
|
readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -13,7 +13,7 @@ type TimestampInit = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
15
15
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>]>;
|
|
16
|
-
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"
|
|
16
|
+
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1h" | "1m" | "1s" | "5m", HeatmapInterval>]>;
|
|
17
17
|
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<5 | 10 | 20 | 1 | 200 | 1000 | 500 | 100 | 50, HeatmapDepth>]>;
|
|
18
18
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
|
|
19
19
|
readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
|
|
@@ -122,7 +122,7 @@ declare function convertHeatmapDeltaBucket(bucket: OrderbookHeatmapDeltaBucketRa
|
|
|
122
122
|
type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;
|
|
123
123
|
declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
124
124
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
125
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
125
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
|
|
126
126
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
127
127
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
128
128
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -142,7 +142,7 @@ declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
|
142
142
|
type OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;
|
|
143
143
|
declare function convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales): {
|
|
144
144
|
symbolId: number;
|
|
145
|
-
interval: DecodedEnum<"
|
|
145
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
146
146
|
tsSec: number;
|
|
147
147
|
isFinal: boolean;
|
|
148
148
|
bids: {
|
|
@@ -226,7 +226,7 @@ declare function convertHeatmapDeltaChain(chain: OrderbookHeatmapDeltaChainRaw,
|
|
|
226
226
|
type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
|
|
227
227
|
declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
228
228
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
229
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
229
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
|
|
230
230
|
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 5 | 10 | 20 | 1 | "unspecified" | 200 | 1000 | 500 | 100 | 50>]>;
|
|
231
231
|
readonly chain: v.OptionalSchema<v.ObjectSchema<{
|
|
232
232
|
readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -267,7 +267,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
267
267
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"close" | "peak">>]>;
|
|
268
268
|
readonly liveBucket: v.OptionalSchema<v.ObjectSchema<{
|
|
269
269
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
270
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
270
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
|
|
271
271
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
272
272
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
273
273
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -286,7 +286,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
286
286
|
}, undefined>, undefined>;
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
|
-
interval: DecodedEnum<"
|
|
289
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
290
290
|
depth: 5 | 10 | 20 | 1 | "unspecified" | 200 | 1000 | 500 | 100 | 50;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
@@ -327,7 +327,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
327
327
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
328
328
|
liveBucket?: {
|
|
329
329
|
symbolId: number;
|
|
330
|
-
interval: DecodedEnum<"
|
|
330
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
331
331
|
tsSec: number;
|
|
332
332
|
isFinal: boolean;
|
|
333
333
|
bids?: {
|
|
@@ -346,7 +346,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
346
346
|
} | undefined;
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
|
-
interval: DecodedEnum<"
|
|
349
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
350
350
|
depth: 5 | 10 | 20 | 1 | "unspecified" | 200 | 1000 | 500 | 100 | 50;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
@@ -387,7 +387,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
387
387
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
388
388
|
liveBucket: {
|
|
389
389
|
symbolId: number;
|
|
390
|
-
interval: DecodedEnum<"
|
|
390
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
391
391
|
tsSec: number;
|
|
392
392
|
isFinal: boolean;
|
|
393
393
|
bids: {
|