@paxosglobal/sdk 0.0.0-stage → 0.1.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.
Files changed (212) hide show
  1. package/AGENTS.md +268 -0
  2. package/CHANGELOG.md +35 -0
  3. package/LICENSE +191 -0
  4. package/README.md +445 -2
  5. package/dist/auth.d.ts +60 -0
  6. package/dist/auth.js +248 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/client.d.ts +353 -0
  9. package/dist/client.js +967 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/constants.d.ts +16 -0
  12. package/dist/constants.js +17 -0
  13. package/dist/constants.js.map +1 -0
  14. package/dist/decimal-fields.d.ts +16 -0
  15. package/dist/decimal-fields.js +570 -0
  16. package/dist/decimal-fields.js.map +1 -0
  17. package/dist/decimal.d.ts +25 -0
  18. package/dist/decimal.js +93 -0
  19. package/dist/decimal.js.map +1 -0
  20. package/dist/decode.d.ts +34 -0
  21. package/dist/decode.js +118 -0
  22. package/dist/decode.js.map +1 -0
  23. package/dist/enums.d.ts +1080 -0
  24. package/dist/enums.js +1031 -0
  25. package/dist/enums.js.map +1 -0
  26. package/dist/errors.d.ts +142 -0
  27. package/dist/errors.js +261 -0
  28. package/dist/errors.js.map +1 -0
  29. package/dist/generated-types.d.ts +13629 -0
  30. package/dist/generated-types.js +3 -0
  31. package/dist/generated-types.js.map +1 -0
  32. package/dist/index.d.ts +32 -0
  33. package/dist/index.js +31 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/models.d.ts +299 -0
  36. package/dist/models.js +3 -0
  37. package/dist/models.js.map +1 -0
  38. package/dist/paxos-client.d.ts +107 -0
  39. package/dist/paxos-client.js +157 -0
  40. package/dist/paxos-client.js.map +1 -0
  41. package/dist/query-keys.d.ts +1 -0
  42. package/dist/query-keys.js +31 -0
  43. package/dist/query-keys.js.map +1 -0
  44. package/dist/response-defaults.d.ts +2 -0
  45. package/dist/response-defaults.js +109 -0
  46. package/dist/response-defaults.js.map +1 -0
  47. package/dist/services/account-members.d.ts +32 -0
  48. package/dist/services/account-members.js +46 -0
  49. package/dist/services/account-members.js.map +1 -0
  50. package/dist/services/accounts.d.ts +74 -0
  51. package/dist/services/accounts.js +71 -0
  52. package/dist/services/accounts.js.map +1 -0
  53. package/dist/services/address-verification.d.ts +72 -0
  54. package/dist/services/address-verification.js +64 -0
  55. package/dist/services/address-verification.js.map +1 -0
  56. package/dist/services/api-credentials.d.ts +44 -0
  57. package/dist/services/api-credentials.js +42 -0
  58. package/dist/services/api-credentials.js.map +1 -0
  59. package/dist/services/claims.d.ts +68 -0
  60. package/dist/services/claims.js +67 -0
  61. package/dist/services/claims.js.map +1 -0
  62. package/dist/services/cross-chain-transfer.d.ts +71 -0
  63. package/dist/services/cross-chain-transfer.js +68 -0
  64. package/dist/services/cross-chain-transfer.js.map +1 -0
  65. package/dist/services/crypto-deposits.d.ts +30 -0
  66. package/dist/services/crypto-deposits.js +39 -0
  67. package/dist/services/crypto-deposits.js.map +1 -0
  68. package/dist/services/crypto-withdrawals.d.ts +60 -0
  69. package/dist/services/crypto-withdrawals.js +42 -0
  70. package/dist/services/crypto-withdrawals.js.map +1 -0
  71. package/dist/services/deposit-addresses.d.ts +54 -0
  72. package/dist/services/deposit-addresses.js +36 -0
  73. package/dist/services/deposit-addresses.js.map +1 -0
  74. package/dist/services/events.d.ts +53 -0
  75. package/dist/services/events.js +39 -0
  76. package/dist/services/events.js.map +1 -0
  77. package/dist/services/exchange.d.ts +52 -0
  78. package/dist/services/exchange.js +30 -0
  79. package/dist/services/exchange.js.map +1 -0
  80. package/dist/services/fees.d.ts +15 -0
  81. package/dist/services/fees.js +24 -0
  82. package/dist/services/fees.js.map +1 -0
  83. package/dist/services/fiat-transfers.d.ts +133 -0
  84. package/dist/services/fiat-transfers.js +127 -0
  85. package/dist/services/fiat-transfers.js.map +1 -0
  86. package/dist/services/identity-controls.d.ts +43 -0
  87. package/dist/services/identity-controls.js +42 -0
  88. package/dist/services/identity-controls.js.map +1 -0
  89. package/dist/services/identity-documents.d.ts +45 -0
  90. package/dist/services/identity-documents.js +50 -0
  91. package/dist/services/identity-documents.js.map +1 -0
  92. package/dist/services/identity.d.ts +122 -0
  93. package/dist/services/identity.js +66 -0
  94. package/dist/services/identity.js.map +1 -0
  95. package/dist/services/index.d.ts +89 -0
  96. package/dist/services/index.js +55 -0
  97. package/dist/services/index.js.map +1 -0
  98. package/dist/services/institution-members.d.ts +30 -0
  99. package/dist/services/institution-members.js +44 -0
  100. package/dist/services/institution-members.js.map +1 -0
  101. package/dist/services/internal-transfers.d.ts +15 -0
  102. package/dist/services/internal-transfers.js +26 -0
  103. package/dist/services/internal-transfers.js.map +1 -0
  104. package/dist/services/issuer-quotes.d.ts +72 -0
  105. package/dist/services/issuer-quotes.js +66 -0
  106. package/dist/services/issuer-quotes.js.map +1 -0
  107. package/dist/services/limits.d.ts +20 -0
  108. package/dist/services/limits.js +23 -0
  109. package/dist/services/limits.js.map +1 -0
  110. package/dist/services/market-data.d.ts +15 -0
  111. package/dist/services/market-data.js +23 -0
  112. package/dist/services/market-data.js.map +1 -0
  113. package/dist/services/monitoring-addresses.d.ts +64 -0
  114. package/dist/services/monitoring-addresses.js +68 -0
  115. package/dist/services/monitoring-addresses.js.map +1 -0
  116. package/dist/services/orchestration-rules.d.ts +53 -0
  117. package/dist/services/orchestration-rules.js +47 -0
  118. package/dist/services/orchestration-rules.js.map +1 -0
  119. package/dist/services/orchestrations.d.ts +70 -0
  120. package/dist/services/orchestrations.js +45 -0
  121. package/dist/services/orchestrations.js.map +1 -0
  122. package/dist/services/orders.d.ts +86 -0
  123. package/dist/services/orders.js +67 -0
  124. package/dist/services/orders.js.map +1 -0
  125. package/dist/services/paxos-transfers.d.ts +24 -0
  126. package/dist/services/paxos-transfers.js +35 -0
  127. package/dist/services/paxos-transfers.js.map +1 -0
  128. package/dist/services/payments.d.ts +46 -0
  129. package/dist/services/payments.js +35 -0
  130. package/dist/services/payments.js.map +1 -0
  131. package/dist/services/payout-groups.d.ts +59 -0
  132. package/dist/services/payout-groups.js +59 -0
  133. package/dist/services/payout-groups.js.map +1 -0
  134. package/dist/services/pricing.d.ts +67 -0
  135. package/dist/services/pricing.js +42 -0
  136. package/dist/services/pricing.js.map +1 -0
  137. package/dist/services/profiles.d.ts +106 -0
  138. package/dist/services/profiles.js +84 -0
  139. package/dist/services/profiles.js.map +1 -0
  140. package/dist/services/quote-executions.d.ts +51 -0
  141. package/dist/services/quote-executions.js +41 -0
  142. package/dist/services/quote-executions.js.map +1 -0
  143. package/dist/services/quotes.d.ts +44 -0
  144. package/dist/services/quotes.js +48 -0
  145. package/dist/services/quotes.js.map +1 -0
  146. package/dist/services/reward-addresses.d.ts +80 -0
  147. package/dist/services/reward-addresses.js +79 -0
  148. package/dist/services/reward-addresses.js.map +1 -0
  149. package/dist/services/rewards-statements.d.ts +35 -0
  150. package/dist/services/rewards-statements.js +32 -0
  151. package/dist/services/rewards-statements.js.map +1 -0
  152. package/dist/services/rewards.d.ts +34 -0
  153. package/dist/services/rewards.js +37 -0
  154. package/dist/services/rewards.js.map +1 -0
  155. package/dist/services/sandbox-deposits.d.ts +15 -0
  156. package/dist/services/sandbox-deposits.js +22 -0
  157. package/dist/services/sandbox-deposits.js.map +1 -0
  158. package/dist/services/sandbox-fiat-transfers.d.ts +15 -0
  159. package/dist/services/sandbox-fiat-transfers.js +24 -0
  160. package/dist/services/sandbox-fiat-transfers.js.map +1 -0
  161. package/dist/services/sandbox-identity.d.ts +39 -0
  162. package/dist/services/sandbox-identity.js +60 -0
  163. package/dist/services/sandbox-identity.js.map +1 -0
  164. package/dist/services/settlement.d.ts +76 -0
  165. package/dist/services/settlement.js +79 -0
  166. package/dist/services/settlement.js.map +1 -0
  167. package/dist/services/stablecoin-conversion.d.ts +70 -0
  168. package/dist/services/stablecoin-conversion.js +65 -0
  169. package/dist/services/stablecoin-conversion.js.map +1 -0
  170. package/dist/services/statements.d.ts +44 -0
  171. package/dist/services/statements.js +35 -0
  172. package/dist/services/statements.js.map +1 -0
  173. package/dist/services/tax-documentation.d.ts +21 -0
  174. package/dist/services/tax-documentation.js +33 -0
  175. package/dist/services/tax-documentation.js.map +1 -0
  176. package/dist/services/tax-forms.d.ts +45 -0
  177. package/dist/services/tax-forms.js +38 -0
  178. package/dist/services/tax-forms.js.map +1 -0
  179. package/dist/services/transfers.d.ts +96 -0
  180. package/dist/services/transfers.js +37 -0
  181. package/dist/services/transfers.js.map +1 -0
  182. package/dist/services/travel-rule.d.ts +32 -0
  183. package/dist/services/travel-rule.js +30 -0
  184. package/dist/services/travel-rule.js.map +1 -0
  185. package/dist/services/user-audit-logs.d.ts +45 -0
  186. package/dist/services/user-audit-logs.js +27 -0
  187. package/dist/services/user-audit-logs.js.map +1 -0
  188. package/dist/services/webhooks.d.ts +58 -0
  189. package/dist/services/webhooks.js +42 -0
  190. package/dist/services/webhooks.js.map +1 -0
  191. package/dist/signing.d.ts +33 -0
  192. package/dist/signing.js +186 -0
  193. package/dist/signing.js.map +1 -0
  194. package/dist/testing/fixtures.d.ts +40 -0
  195. package/dist/testing/fixtures.js +131 -0
  196. package/dist/testing/fixtures.js.map +1 -0
  197. package/dist/testing/index.d.ts +28 -0
  198. package/dist/testing/index.js +28 -0
  199. package/dist/testing/index.js.map +1 -0
  200. package/dist/testing/mock-server.d.ts +121 -0
  201. package/dist/testing/mock-server.js +276 -0
  202. package/dist/testing/mock-server.js.map +1 -0
  203. package/dist/timeouts.d.ts +13 -0
  204. package/dist/timeouts.js +71 -0
  205. package/dist/timeouts.js.map +1 -0
  206. package/dist/types.d.ts +6 -0
  207. package/dist/types.js +7 -0
  208. package/dist/types.js.map +1 -0
  209. package/dist/version.d.ts +1 -0
  210. package/dist/version.js +2 -0
  211. package/dist/version.js.map +1 -0
  212. package/package.json +67 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments.js","sourceRoot":"","sources":["../../src/services/payments.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAyBpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,eAAe;IAEG;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;;OAKG;IACH,YAAY,CAAC,MAA2B,EAAE,IAAqB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAmB,sBAAsB,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;YAC9F,cAAc,EAAE,sBAAsB;SACvC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownPaymentStatus, KnownProduct, KnownSortOrder } from \"../enums.js\";\nimport type { Payment } from \"../models.js\";\n\nexport interface ListPaymentsParams {\n /** No other parameters are allowed if ref_ids are provided */\n ref_ids?: string[];\n /** No other parameters are allowed if payment_ids are provided */\n payment_ids?: string[];\n /** Use together with product to list for a specific customer and product */\n customer_id?: string;\n /** Use together with product to list for a specific customer and product */\n product?: KnownProduct | (string & {});\n /** Optional, filter by payment status */\n payment_status?: KnownPaymentStatus | (string & {});\n /** Number of results to return. Defaults to 100 if no limit is provided. */\n limit?: number;\n /** Sort order for the results by created at, defaults to DESC if not provided. */\n order?: KnownSortOrder | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * PaymentsService — Payments represent actual transfers of rewards to the\n * payout address associated with a given statement. Payments are made on-chain\n * to a specified payout address. Payments tie 1:1 with a statement amount.\n *\n * Use the `ref_id` to link payments to statements.\n *\n * \\> Some fields (e.g., `account_id`, `profile_id`) are populated for\n * consistency but are not relevant to reward-specific flows.\n *\n * *These endpoints are only relevant for Global Dollar Network (GDN)\n * partners.*\n *\n * Access via `client.payments`.\n */\nexport class PaymentsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Payments\n *\n * Requires scope: statements:read_payment\n * @deprecated This API operation is deprecated.\n */\n listPayments(params?: ListPaymentsParams, opts?: RequestOptions): PageIterator<WithRaw<Payment>> {\n return this.client.paginate<WithRaw<Payment>>(\"/statements/payments\", \"payments\", params, opts, {\n responseSchema: \"ListPaymentsResponse\",\n });\n }\n}\n"]}
@@ -0,0 +1,59 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownPayoutGroupOnchainStatus } from "../enums.js";
3
+ import type { CreatePayoutGroupRequest, CreatePayoutGroupResponse, DeletePayoutGroupResponse, PayoutGroup, UpdatePayoutGroupRequest, UpdatePayoutGroupResponse } from "../models.js";
4
+ export interface ListPayoutGroupsParams {
5
+ limit?: number;
6
+ /** When set, only payout groups for this asset type (e.g. "USDG", "PYUSD") are returned. */
7
+ asset_type?: string;
8
+ /** When set, only payout groups whose name starts with this prefix are returned (case-insensitive). */
9
+ name_prefix?: string;
10
+ /** When set, only payout groups with this claimer address are returned. */
11
+ claimer_address?: string;
12
+ /** When set, only payout groups for this ledger (network) are returned. */
13
+ ledger?: string;
14
+ /** When set, only payout groups for this jurisdiction are returned. */
15
+ jurisdiction?: string;
16
+ /** When set, only payout groups with one of these onchain statuses are returned. */
17
+ onchain_statuses?: (KnownPayoutGroupOnchainStatus | (string & {}))[];
18
+ /** When set, only payout groups with a balance >= this value are returned (in business units, e.g. "1000.50"). */
19
+ min_balance?: string;
20
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
21
+ page_cursor?: string;
22
+ }
23
+ /**
24
+ * PayoutGroupsService — Payout groups encapsulate common rewards
25
+ * characteristics. All monitored addresses that reference a payout group
26
+ * accumulate rewards at the same rate and claim to the payout destination
27
+ * specified for that group.
28
+ *
29
+ * *These endpoints are only relevant for whitelisted Rewards partners.*
30
+ *
31
+ * Access via `client.payoutGroups`.
32
+ */
33
+ export declare class PayoutGroupsService {
34
+ private readonly client;
35
+ /**
36
+ * List Payout Groups
37
+ *
38
+ * Requires scope: rewards:read_payout_groups
39
+ */
40
+ listPayoutGroups(params?: ListPayoutGroupsParams, opts?: RequestOptions): PageIterator<WithRaw<PayoutGroup>>;
41
+ /**
42
+ * Create Payout Group
43
+ *
44
+ * Requires one of: rewards:create_payout_groups; rewards:write_payout_groups
45
+ */
46
+ createPayoutGroup(request: CreatePayoutGroupRequest, opts?: RequestOptions): Promise<WithRaw<CreatePayoutGroupResponse>>;
47
+ /**
48
+ * Delete Payout Group
49
+ *
50
+ * Requires one of: rewards:delete_payout_groups; rewards:write_payout_groups
51
+ */
52
+ deletePayoutGroup(id: string, opts?: RequestOptions): Promise<WithRaw<DeletePayoutGroupResponse>>;
53
+ /**
54
+ * Update Payout Group
55
+ *
56
+ * Requires one of: rewards:update_payout_groups; rewards:write_payout_groups
57
+ */
58
+ updatePayoutGroup(id: string, request: UpdatePayoutGroupRequest, opts?: RequestOptions): Promise<WithRaw<UpdatePayoutGroupResponse>>;
59
+ }
@@ -0,0 +1,59 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * PayoutGroupsService — Payout groups encapsulate common rewards
5
+ * characteristics. All monitored addresses that reference a payout group
6
+ * accumulate rewards at the same rate and claim to the payout destination
7
+ * specified for that group.
8
+ *
9
+ * *These endpoints are only relevant for whitelisted Rewards partners.*
10
+ *
11
+ * Access via `client.payoutGroups`.
12
+ */
13
+ export class PayoutGroupsService {
14
+ client;
15
+ /** @internal */
16
+ constructor(client) {
17
+ this.client = client;
18
+ }
19
+ /**
20
+ * List Payout Groups
21
+ *
22
+ * Requires scope: rewards:read_payout_groups
23
+ */
24
+ listPayoutGroups(params, opts) {
25
+ return this.client.paginate("/rewards/payout-groups", "items", params, opts, {
26
+ responseSchema: "ListPayoutGroupsResponse",
27
+ });
28
+ }
29
+ /**
30
+ * Create Payout Group
31
+ *
32
+ * Requires one of: rewards:create_payout_groups; rewards:write_payout_groups
33
+ */
34
+ async createPayoutGroup(request, opts) {
35
+ return this.client.post("/rewards/payout-groups", request, opts, {
36
+ responseSchema: "CreatePayoutGroupResponse",
37
+ requestSchema: "CreatePayoutGroupRequest",
38
+ });
39
+ }
40
+ /**
41
+ * Delete Payout Group
42
+ *
43
+ * Requires one of: rewards:delete_payout_groups; rewards:write_payout_groups
44
+ */
45
+ async deletePayoutGroup(id, opts) {
46
+ return this.client.delete(buildPath("/rewards/payout-groups/{id}", { id: id }), undefined, opts, {
47
+ responseSchema: "DeletePayoutGroupResponse",
48
+ });
49
+ }
50
+ /**
51
+ * Update Payout Group
52
+ *
53
+ * Requires one of: rewards:update_payout_groups; rewards:write_payout_groups
54
+ */
55
+ async updatePayoutGroup(id, request, opts) {
56
+ return this.client.put(buildPath("/rewards/payout-groups/{id}", { id: id }), request, opts, { responseSchema: "UpdatePayoutGroupResponse", requestSchema: "UpdatePayoutGroupRequest" });
57
+ }
58
+ }
59
+ //# sourceMappingURL=payout-groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout-groups.js","sourceRoot":"","sources":["../../src/services/payout-groups.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAgCzC;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAmB;IAED;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,gBAAgB,CAAC,MAA+B,EAAE,IAAqB;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAuB,wBAAwB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YACjG,cAAc,EAAE,0BAA0B;SAC3C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAiC,EACjC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAqC,wBAAwB,EAAE,OAAO,EAAE,IAAI,EAAE;YACnG,cAAc,EAAE,2BAA2B;YAC3C,aAAa,EAAE,0BAA0B;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,EAAU,EAAE,IAAqB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,6BAA6B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;YAC/F,cAAc,EAAE,2BAA2B;SAC5C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CACrB,EAAU,EACV,OAAiC,EACjC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,6BAA6B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACpD,OAAO,EACP,IAAI,EACJ,EAAE,cAAc,EAAE,2BAA2B,EAAE,aAAa,EAAE,0BAA0B,EAAE,CAC3F,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownPayoutGroupOnchainStatus } from \"../enums.js\";\nimport type {\n CreatePayoutGroupRequest,\n CreatePayoutGroupResponse,\n DeletePayoutGroupResponse,\n PayoutGroup,\n UpdatePayoutGroupRequest,\n UpdatePayoutGroupResponse,\n} from \"../models.js\";\n\nexport interface ListPayoutGroupsParams {\n limit?: number;\n /** When set, only payout groups for this asset type (e.g. \"USDG\", \"PYUSD\") are returned. */\n asset_type?: string;\n /** When set, only payout groups whose name starts with this prefix are returned (case-insensitive). */\n name_prefix?: string;\n /** When set, only payout groups with this claimer address are returned. */\n claimer_address?: string;\n /** When set, only payout groups for this ledger (network) are returned. */\n ledger?: string;\n /** When set, only payout groups for this jurisdiction are returned. */\n jurisdiction?: string;\n /** When set, only payout groups with one of these onchain statuses are returned. */\n onchain_statuses?: (KnownPayoutGroupOnchainStatus | (string & {}))[];\n /** When set, only payout groups with a balance >= this value are returned (in business units, e.g. \"1000.50\"). */\n min_balance?: string;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * PayoutGroupsService — Payout groups encapsulate common rewards\n * characteristics. All monitored addresses that reference a payout group\n * accumulate rewards at the same rate and claim to the payout destination\n * specified for that group.\n *\n * *These endpoints are only relevant for whitelisted Rewards partners.*\n *\n * Access via `client.payoutGroups`.\n */\nexport class PayoutGroupsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Payout Groups\n *\n * Requires scope: rewards:read_payout_groups\n */\n listPayoutGroups(params?: ListPayoutGroupsParams, opts?: RequestOptions): PageIterator<WithRaw<PayoutGroup>> {\n return this.client.paginate<WithRaw<PayoutGroup>>(\"/rewards/payout-groups\", \"items\", params, opts, {\n responseSchema: \"ListPayoutGroupsResponse\",\n });\n }\n\n /**\n * Create Payout Group\n *\n * Requires one of: rewards:create_payout_groups; rewards:write_payout_groups\n */\n async createPayoutGroup(\n request: CreatePayoutGroupRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<CreatePayoutGroupResponse>> {\n return this.client.post<WithRaw<CreatePayoutGroupResponse>>(\"/rewards/payout-groups\", request, opts, {\n responseSchema: \"CreatePayoutGroupResponse\",\n requestSchema: \"CreatePayoutGroupRequest\",\n });\n }\n\n /**\n * Delete Payout Group\n *\n * Requires one of: rewards:delete_payout_groups; rewards:write_payout_groups\n */\n async deletePayoutGroup(id: string, opts?: RequestOptions): Promise<WithRaw<DeletePayoutGroupResponse>> {\n return this.client.delete(buildPath(\"/rewards/payout-groups/{id}\", { id: id }), undefined, opts, {\n responseSchema: \"DeletePayoutGroupResponse\",\n });\n }\n\n /**\n * Update Payout Group\n *\n * Requires one of: rewards:update_payout_groups; rewards:write_payout_groups\n */\n async updatePayoutGroup(\n id: string,\n request: UpdatePayoutGroupRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<UpdatePayoutGroupResponse>> {\n return this.client.put<WithRaw<UpdatePayoutGroupResponse>>(\n buildPath(\"/rewards/payout-groups/{id}\", { id: id }),\n request,\n opts,\n { responseSchema: \"UpdatePayoutGroupResponse\", requestSchema: \"UpdatePayoutGroupRequest\" },\n );\n }\n}\n"]}
@@ -0,0 +1,67 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownIncrement, KnownPricePriceMarket, KnownSortOrder } from "../enums.js";
3
+ import type { CandlestickPrice, ListHistoricalPricesResponse, ListPricesResponse } from "../models.js";
4
+ export interface ListPricesParams {
5
+ markets: (KnownPricePriceMarket | (string & {}))[];
6
+ }
7
+ export interface ListHistoricalPricesParams {
8
+ /** Maximum number of data points to return.
9
+
10
+ The time frame of the increments will be inferred by finding the most granular increment without breaching the `max_data_points` value based on a set of recording data points. */
11
+ max_data_points?: number;
12
+ /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
13
+ range_begin?: string;
14
+ /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
15
+ range_end?: string;
16
+ /** Number of results to return */
17
+ pagination_limit?: number;
18
+ /** Number of results to skip */
19
+ pagination_offset?: number;
20
+ /** Time increment between prices. Returns data exclusive from `range.begin` and `range.end`. Do not use with `max_data_points`, as this results in an error. */
21
+ increment?: KnownIncrement | (string & {});
22
+ }
23
+ export interface ListHistoricalCandlesParams {
24
+ /** Maximum number of data points to return.
25
+
26
+ The time frame of the increments will be inferred by finding the most granular increment without breaching the `max_data_points` value based on a set of recorded data points. */
27
+ max_data_points?: number;
28
+ /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
29
+ range_begin?: string;
30
+ /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
31
+ range_end?: string;
32
+ /** Number of results to return. Defaults to `100` if no limit is provided. Maximum `1000`. */
33
+ limit?: number;
34
+ /** Results are ordered by `timestamp`. Specify the ordering of the results. Defaults to `DESC`. */
35
+ order?: KnownSortOrder | (string & {});
36
+ /** Time increment between prices. Returns data inclusive from `range.begin` and `range.end`. Do not use with `max_data_points`, as this results in an error. */
37
+ increment?: KnownIncrement | (string & {});
38
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
39
+ page_cursor?: string;
40
+ }
41
+ /**
42
+ * PricingService — Pricing provides historical data related to charting of
43
+ * asset prices.
44
+ *
45
+ * Note: Some Pricing API markets may be unavailable for trading.
46
+ *
47
+ * Access via `client.pricing`.
48
+ */
49
+ export declare class PricingService {
50
+ private readonly client;
51
+ /**
52
+ * List Prices
53
+ */
54
+ listPrices(params?: ListPricesParams, opts?: RequestOptions): Promise<WithRaw<ListPricesResponse>>;
55
+ /**
56
+ * List Historical Prices
57
+ *
58
+ * Requires scope: exchange:historical_prices
59
+ */
60
+ listHistoricalPrices(market: string, params?: ListHistoricalPricesParams, opts?: RequestOptions): Promise<WithRaw<ListHistoricalPricesResponse>>;
61
+ /**
62
+ * List Historical Candles
63
+ *
64
+ * Requires scope: exchange:historical_prices
65
+ */
66
+ listHistoricalCandles(market: string, params?: ListHistoricalCandlesParams, opts?: RequestOptions): PageIterator<WithRaw<CandlestickPrice>>;
67
+ }
@@ -0,0 +1,42 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * PricingService — Pricing provides historical data related to charting of
5
+ * asset prices.
6
+ *
7
+ * Note: Some Pricing API markets may be unavailable for trading.
8
+ *
9
+ * Access via `client.pricing`.
10
+ */
11
+ export class PricingService {
12
+ client;
13
+ /** @internal */
14
+ constructor(client) {
15
+ this.client = client;
16
+ }
17
+ /**
18
+ * List Prices
19
+ */
20
+ async listPrices(params, opts) {
21
+ return this.client.get("/all-markets/prices", params, opts, {
22
+ responseSchema: "ListPricesResponse",
23
+ });
24
+ }
25
+ /**
26
+ * List Historical Prices
27
+ *
28
+ * Requires scope: exchange:historical_prices
29
+ */
30
+ async listHistoricalPrices(market, params, opts) {
31
+ return this.client.get(buildPath("/markets/{market}/historical-prices", { market: market }), params, opts, { responseSchema: "ListHistoricalPricesResponse" });
32
+ }
33
+ /**
34
+ * List Historical Candles
35
+ *
36
+ * Requires scope: exchange:historical_prices
37
+ */
38
+ listHistoricalCandles(market, params, opts) {
39
+ return this.client.paginate(buildPath("/markets/{market}/historical-candles", { market: market }), "items", params, opts, { responseSchema: "ListHistoricalCandlesResponse" });
40
+ }
41
+ }
42
+ //# sourceMappingURL=pricing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/services/pricing.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA6CzC;;;;;;;GAOG;AACH,MAAM,OAAO,cAAc;IAEI;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,MAAyB,EAAE,IAAqB;QAC/D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,EAAE,MAAM,EAAE,IAAI,EAAE;YACvF,cAAc,EAAE,oBAAoB;SACrC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CACxB,MAAc,EACd,MAAmC,EACnC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,qCAAqC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EACpE,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,8BAA8B,EAAE,CACnD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,qBAAqB,CACnB,MAAc,EACd,MAAoC,EACpC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CACzB,SAAS,CAAC,sCAAsC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EACrE,OAAO,EACP,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,+BAA+B,EAAE,CACpD,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownIncrement, KnownPricePriceMarket, KnownSortOrder } from \"../enums.js\";\nimport type { CandlestickPrice, ListHistoricalPricesResponse, ListPricesResponse } from \"../models.js\";\n\nexport interface ListPricesParams {\n markets: (KnownPricePriceMarket | (string & {}))[];\n}\n\nexport interface ListHistoricalPricesParams {\n /** Maximum number of data points to return.\n\nThe time frame of the increments will be inferred by finding the most granular increment without breaching the `max_data_points` value based on a set of recording data points. */\n max_data_points?: number;\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n range_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n range_end?: string;\n /** Number of results to return */\n pagination_limit?: number;\n /** Number of results to skip */\n pagination_offset?: number;\n /** Time increment between prices. Returns data exclusive from `range.begin` and `range.end`. Do not use with `max_data_points`, as this results in an error. */\n increment?: KnownIncrement | (string & {});\n}\n\nexport interface ListHistoricalCandlesParams {\n /** Maximum number of data points to return.\n\nThe time frame of the increments will be inferred by finding the most granular increment without breaching the `max_data_points` value based on a set of recorded data points. */\n max_data_points?: number;\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n range_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n range_end?: string;\n /** Number of results to return. Defaults to `100` if no limit is provided. Maximum `1000`. */\n limit?: number;\n /** Results are ordered by `timestamp`. Specify the ordering of the results. Defaults to `DESC`. */\n order?: KnownSortOrder | (string & {});\n /** Time increment between prices. Returns data inclusive from `range.begin` and `range.end`. Do not use with `max_data_points`, as this results in an error. */\n increment?: KnownIncrement | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * PricingService — Pricing provides historical data related to charting of\n * asset prices.\n *\n * Note: Some Pricing API markets may be unavailable for trading.\n *\n * Access via `client.pricing`.\n */\nexport class PricingService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Prices\n */\n async listPrices(params?: ListPricesParams, opts?: RequestOptions): Promise<WithRaw<ListPricesResponse>> {\n return this.client.get<WithRaw<ListPricesResponse>>(\"/all-markets/prices\", params, opts, {\n responseSchema: \"ListPricesResponse\",\n });\n }\n\n /**\n * List Historical Prices\n *\n * Requires scope: exchange:historical_prices\n */\n async listHistoricalPrices(\n market: string,\n params?: ListHistoricalPricesParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<ListHistoricalPricesResponse>> {\n return this.client.get<WithRaw<ListHistoricalPricesResponse>>(\n buildPath(\"/markets/{market}/historical-prices\", { market: market }),\n params,\n opts,\n { responseSchema: \"ListHistoricalPricesResponse\" },\n );\n }\n\n /**\n * List Historical Candles\n *\n * Requires scope: exchange:historical_prices\n */\n listHistoricalCandles(\n market: string,\n params?: ListHistoricalCandlesParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<CandlestickPrice>> {\n return this.client.paginate<WithRaw<CandlestickPrice>>(\n buildPath(\"/markets/{market}/historical-candles\", { market: market }),\n \"items\",\n params,\n opts,\n { responseSchema: \"ListHistoricalCandlesResponse\" },\n );\n }\n}\n"]}
@@ -0,0 +1,106 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownOrderBy, KnownSortOrder } from "../enums.js";
3
+ import type { CreateProfileRequest, DeactivateProfileResponse, ListProfileBalancesResponse, Profile, ProfileBalance, UpdateProfileRequest } from "../models.js";
4
+ export interface ListProfilesParams {
5
+ /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
6
+ created_at_lt?: string;
7
+ /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
8
+ created_at_lte?: string;
9
+ /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
10
+ created_at_eq?: string;
11
+ /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
12
+ created_at_gte?: string;
13
+ /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
14
+ created_at_gt?: string;
15
+ /** Number of results to return. */
16
+ limit?: number;
17
+ /** Return items in ascending (ASC) or descending (DESC) order. Defaults to ASC. */
18
+ order?: KnownSortOrder | (string & {});
19
+ /** The specific method by which the returned results will be ordered. */
20
+ order_by?: KnownOrderBy | (string & {});
21
+ /** Optionally filter by Profile display name. Retrieves nickname(s) based on the beginning characters of the given display name (prefix matching). Case insensitive. WIldcards and regular expressions not supported. */
22
+ nickname?: string;
23
+ /** Optionally filter by the UUIDs of the profiles. Limit 100. */
24
+ ids?: string[];
25
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
26
+ page_cursor?: string;
27
+ }
28
+ export interface GetProfileParams {
29
+ /** Used to include deactivated profiles in the response. */
30
+ include_deactivated?: boolean;
31
+ }
32
+ export interface ListProfileBalancesParams {
33
+ assets?: string[];
34
+ /** Optional. Balance types to return in `balances`. Case-insensitive.
35
+ Duplicates are collapsed to their first occurrence.
36
+ Accepts the four balance types AVAILABLE, TRADING, PENDING_DEBIT and PENDING_CREDIT, and any new
37
+ customer-visible balance type name from the registry.
38
+ An unknown balance type returns an invalid-argument error. */
39
+ balance_types?: string[];
40
+ }
41
+ export interface GetProfileBalanceParams {
42
+ /** Optional. Balance types to return in `balances`. Case-insensitive.
43
+ Duplicates are collapsed to their first occurrence.
44
+ Accepts the four balance types AVAILABLE, TRADING, PENDING_DEBIT and PENDING_CREDIT, and any new
45
+ customer-visible balance type name from the registry.
46
+ An unknown balance type returns an invalid-argument error. */
47
+ balance_types?: string[];
48
+ }
49
+ /**
50
+ * ProfilesService — Profiles hold asset balances, and every Paxos transaction
51
+ * is on a particular profile. Depending on your integration type, Profiles may
52
+ * be used to reflect both corporate balances or individual user balances.
53
+ * There are two types of Profiles:
54
+ *
55
+ * - `DEFAULT` Profiles are system-generated.
56
+ * - `NORMAL` Profiles are created using the
57
+ * {@link ProfilesService.createProfile | Create Profile} endpoint and are
58
+ * the only type of Profile you can create.
59
+ *
60
+ * Access via `client.profiles`.
61
+ */
62
+ export declare class ProfilesService {
63
+ private readonly client;
64
+ /**
65
+ * List Profiles
66
+ *
67
+ * Requires scope: funding:read_profile
68
+ */
69
+ listProfiles(params?: ListProfilesParams, opts?: RequestOptions): PageIterator<WithRaw<Profile>>;
70
+ /**
71
+ * Create Profile
72
+ *
73
+ * Requires scope: funding:write_profile
74
+ */
75
+ createProfile(request: CreateProfileRequest, opts?: RequestOptions): Promise<WithRaw<Profile>>;
76
+ /**
77
+ * Get Profile
78
+ *
79
+ * Requires scope: funding:read_profile
80
+ */
81
+ getProfile(profileId: string, params?: GetProfileParams, opts?: RequestOptions): Promise<WithRaw<Profile>>;
82
+ /**
83
+ * Update Profile
84
+ *
85
+ * Requires scope: funding:write_profile
86
+ */
87
+ updateProfile(profileId: string, request: UpdateProfileRequest, opts?: RequestOptions): Promise<WithRaw<Profile>>;
88
+ /**
89
+ * List Profile Balances
90
+ *
91
+ * Requires scope: funding:read_profile
92
+ */
93
+ listProfileBalances(profileId: string, params?: ListProfileBalancesParams, opts?: RequestOptions): Promise<WithRaw<ListProfileBalancesResponse>>;
94
+ /**
95
+ * Get Profile Balance
96
+ *
97
+ * Requires scope: funding:read_profile
98
+ */
99
+ getProfileBalance(profileId: string, asset: string, params?: GetProfileBalanceParams, opts?: RequestOptions): Promise<WithRaw<ProfileBalance>>;
100
+ /**
101
+ * Deactivate Profile
102
+ *
103
+ * Requires scope: funding:write_profile
104
+ */
105
+ deactivateProfile(profileId: string, opts?: RequestOptions): Promise<WithRaw<DeactivateProfileResponse>>;
106
+ }
@@ -0,0 +1,84 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * ProfilesService — Profiles hold asset balances, and every Paxos transaction
5
+ * is on a particular profile. Depending on your integration type, Profiles may
6
+ * be used to reflect both corporate balances or individual user balances.
7
+ * There are two types of Profiles:
8
+ *
9
+ * - `DEFAULT` Profiles are system-generated.
10
+ * - `NORMAL` Profiles are created using the
11
+ * {@link ProfilesService.createProfile | Create Profile} endpoint and are
12
+ * the only type of Profile you can create.
13
+ *
14
+ * Access via `client.profiles`.
15
+ */
16
+ export class ProfilesService {
17
+ client;
18
+ /** @internal */
19
+ constructor(client) {
20
+ this.client = client;
21
+ }
22
+ /**
23
+ * List Profiles
24
+ *
25
+ * Requires scope: funding:read_profile
26
+ */
27
+ listProfiles(params, opts) {
28
+ return this.client.paginate("/profiles", "items", params, opts, {
29
+ responseSchema: "ListProfilesResponse",
30
+ });
31
+ }
32
+ /**
33
+ * Create Profile
34
+ *
35
+ * Requires scope: funding:write_profile
36
+ */
37
+ async createProfile(request, opts) {
38
+ return this.client.post("/profiles", request, opts, {
39
+ responseSchema: "Profile",
40
+ requestSchema: "CreateProfileRequest",
41
+ });
42
+ }
43
+ /**
44
+ * Get Profile
45
+ *
46
+ * Requires scope: funding:read_profile
47
+ */
48
+ async getProfile(profileId, params, opts) {
49
+ return this.client.get(buildPath("/profiles/{profile_id}", { profile_id: profileId }), params, opts, { responseSchema: "Profile" });
50
+ }
51
+ /**
52
+ * Update Profile
53
+ *
54
+ * Requires scope: funding:write_profile
55
+ */
56
+ async updateProfile(profileId, request, opts) {
57
+ return this.client.put(buildPath("/profiles/{profile_id}", { profile_id: profileId }), request, opts, { responseSchema: "Profile", requestSchema: "UpdateProfileRequest" });
58
+ }
59
+ /**
60
+ * List Profile Balances
61
+ *
62
+ * Requires scope: funding:read_profile
63
+ */
64
+ async listProfileBalances(profileId, params, opts) {
65
+ return this.client.get(buildPath("/profiles/{profile_id}/balances", { profile_id: profileId }), params, opts, { responseSchema: "ListProfileBalancesResponse" });
66
+ }
67
+ /**
68
+ * Get Profile Balance
69
+ *
70
+ * Requires scope: funding:read_profile
71
+ */
72
+ async getProfileBalance(profileId, asset, params, opts) {
73
+ return this.client.get(buildPath("/profiles/{profile_id}/balances/{asset}", { profile_id: profileId, asset: asset }), params, opts, { responseSchema: "ProfileBalance" });
74
+ }
75
+ /**
76
+ * Deactivate Profile
77
+ *
78
+ * Requires scope: funding:write_profile
79
+ */
80
+ async deactivateProfile(profileId, opts) {
81
+ return this.client.put(buildPath("/profiles/{profile_id}/deactivate", { profile_id: profileId }), undefined, opts, { responseSchema: "DeactivateProfileResponse" });
82
+ }
83
+ }
84
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/services/profiles.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA6DzC;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,eAAe;IAEG;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,YAAY,CAAC,MAA2B,EAAE,IAAqB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAmB,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YAChF,cAAc,EAAE,sBAAsB;SACvC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,OAA6B,EAAE,IAAqB;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAmB,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE;YACpE,cAAc,EAAE,SAAS;YACzB,aAAa,EAAE,sBAAsB;SACtC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,SAAiB,EAAE,MAAyB,EAAE,IAAqB;QAClF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,wBAAwB,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAC9D,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,SAAS,EAAE,CAC9B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CACjB,SAAiB,EACjB,OAA6B,EAC7B,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,wBAAwB,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAC9D,OAAO,EACP,IAAI,EACJ,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,sBAAsB,EAAE,CACrE,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,mBAAmB,CACvB,SAAiB,EACjB,MAAkC,EAClC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,iCAAiC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EACvE,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,6BAA6B,EAAE,CAClD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CACrB,SAAiB,EACjB,KAAa,EACb,MAAgC,EAChC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,yCAAyC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAC7F,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,gBAAgB,EAAE,CACrC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,SAAiB,EAAE,IAAqB;QAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,mCAAmC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EACzE,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,2BAA2B,EAAE,CAChD,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownOrderBy, KnownSortOrder } from \"../enums.js\";\nimport type {\n CreateProfileRequest,\n DeactivateProfileResponse,\n ListProfileBalancesResponse,\n Profile,\n ProfileBalance,\n UpdateProfileRequest,\n} from \"../models.js\";\n\nexport interface ListProfilesParams {\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Number of results to return. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order. Defaults to ASC. */\n order?: KnownSortOrder | (string & {});\n /** The specific method by which the returned results will be ordered. */\n order_by?: KnownOrderBy | (string & {});\n /** Optionally filter by Profile display name. Retrieves nickname(s) based on the beginning characters of the given display name (prefix matching). Case insensitive. WIldcards and regular expressions not supported. */\n nickname?: string;\n /** Optionally filter by the UUIDs of the profiles. Limit 100. */\n ids?: string[];\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\nexport interface GetProfileParams {\n /** Used to include deactivated profiles in the response. */\n include_deactivated?: boolean;\n}\n\nexport interface ListProfileBalancesParams {\n assets?: string[];\n /** Optional. Balance types to return in `balances`. Case-insensitive.\nDuplicates are collapsed to their first occurrence.\nAccepts the four balance types AVAILABLE, TRADING, PENDING_DEBIT and PENDING_CREDIT, and any new\ncustomer-visible balance type name from the registry.\nAn unknown balance type returns an invalid-argument error. */\n balance_types?: string[];\n}\n\nexport interface GetProfileBalanceParams {\n /** Optional. Balance types to return in `balances`. Case-insensitive.\nDuplicates are collapsed to their first occurrence.\nAccepts the four balance types AVAILABLE, TRADING, PENDING_DEBIT and PENDING_CREDIT, and any new\ncustomer-visible balance type name from the registry.\nAn unknown balance type returns an invalid-argument error. */\n balance_types?: string[];\n}\n\n/**\n * ProfilesService — Profiles hold asset balances, and every Paxos transaction\n * is on a particular profile. Depending on your integration type, Profiles may\n * be used to reflect both corporate balances or individual user balances.\n * There are two types of Profiles:\n *\n * - `DEFAULT` Profiles are system-generated.\n * - `NORMAL` Profiles are created using the\n * {@link ProfilesService.createProfile | Create Profile} endpoint and are\n * the only type of Profile you can create.\n *\n * Access via `client.profiles`.\n */\nexport class ProfilesService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Profiles\n *\n * Requires scope: funding:read_profile\n */\n listProfiles(params?: ListProfilesParams, opts?: RequestOptions): PageIterator<WithRaw<Profile>> {\n return this.client.paginate<WithRaw<Profile>>(\"/profiles\", \"items\", params, opts, {\n responseSchema: \"ListProfilesResponse\",\n });\n }\n\n /**\n * Create Profile\n *\n * Requires scope: funding:write_profile\n */\n async createProfile(request: CreateProfileRequest, opts?: RequestOptions): Promise<WithRaw<Profile>> {\n return this.client.post<WithRaw<Profile>>(\"/profiles\", request, opts, {\n responseSchema: \"Profile\",\n requestSchema: \"CreateProfileRequest\",\n });\n }\n\n /**\n * Get Profile\n *\n * Requires scope: funding:read_profile\n */\n async getProfile(profileId: string, params?: GetProfileParams, opts?: RequestOptions): Promise<WithRaw<Profile>> {\n return this.client.get<WithRaw<Profile>>(\n buildPath(\"/profiles/{profile_id}\", { profile_id: profileId }),\n params,\n opts,\n { responseSchema: \"Profile\" },\n );\n }\n\n /**\n * Update Profile\n *\n * Requires scope: funding:write_profile\n */\n async updateProfile(\n profileId: string,\n request: UpdateProfileRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<Profile>> {\n return this.client.put<WithRaw<Profile>>(\n buildPath(\"/profiles/{profile_id}\", { profile_id: profileId }),\n request,\n opts,\n { responseSchema: \"Profile\", requestSchema: \"UpdateProfileRequest\" },\n );\n }\n\n /**\n * List Profile Balances\n *\n * Requires scope: funding:read_profile\n */\n async listProfileBalances(\n profileId: string,\n params?: ListProfileBalancesParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<ListProfileBalancesResponse>> {\n return this.client.get<WithRaw<ListProfileBalancesResponse>>(\n buildPath(\"/profiles/{profile_id}/balances\", { profile_id: profileId }),\n params,\n opts,\n { responseSchema: \"ListProfileBalancesResponse\" },\n );\n }\n\n /**\n * Get Profile Balance\n *\n * Requires scope: funding:read_profile\n */\n async getProfileBalance(\n profileId: string,\n asset: string,\n params?: GetProfileBalanceParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<ProfileBalance>> {\n return this.client.get<WithRaw<ProfileBalance>>(\n buildPath(\"/profiles/{profile_id}/balances/{asset}\", { profile_id: profileId, asset: asset }),\n params,\n opts,\n { responseSchema: \"ProfileBalance\" },\n );\n }\n\n /**\n * Deactivate Profile\n *\n * Requires scope: funding:write_profile\n */\n async deactivateProfile(profileId: string, opts?: RequestOptions): Promise<WithRaw<DeactivateProfileResponse>> {\n return this.client.put<WithRaw<DeactivateProfileResponse>>(\n buildPath(\"/profiles/{profile_id}/deactivate\", { profile_id: profileId }),\n undefined,\n opts,\n { responseSchema: \"DeactivateProfileResponse\" },\n );\n }\n}\n"]}
@@ -0,0 +1,51 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownMarket, KnownOrderBy, KnownOrderSide, KnownQuoteExecutionStatus, KnownSortOrder } from "../enums.js";
3
+ import type { CreateQuoteExecutionRequest, QuoteExecution } from "../models.js";
4
+ export interface ListQuoteExecutionsParams {
5
+ /** Filter by buy or sell side. */
6
+ side?: KnownOrderSide | (string & {});
7
+ /** Filter by the trading pair. */
8
+ market?: KnownMarket | (string & {});
9
+ /** Filter by the status of the order. */
10
+ status?: KnownQuoteExecutionStatus | (string & {});
11
+ /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
12
+ created_at_begin?: string;
13
+ /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
14
+ created_at_end?: string;
15
+ /** Number of results to return. */
16
+ limit?: number;
17
+ /** Return items in ascending (ASC) or descending (DESC) order.
18
+ Default order is descending (DESC). */
19
+ order?: KnownSortOrder | (string & {});
20
+ /** The specific method by which the returned results will be ordered. */
21
+ order_by?: KnownOrderBy | (string & {});
22
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
23
+ page_cursor?: string;
24
+ }
25
+ /**
26
+ * QuoteExecutionsService — Quote Executions buy or sell assets using a Quote
27
+ * obtained from the Quotes flow.
28
+ *
29
+ * Access via `client.quoteExecutions`.
30
+ */
31
+ export declare class QuoteExecutionsService {
32
+ private readonly client;
33
+ /**
34
+ * List Quote Executions
35
+ *
36
+ * Requires scope: exchange:read_quote_execution
37
+ */
38
+ listQuoteExecutions(profileId: string, params?: ListQuoteExecutionsParams, opts?: RequestOptions): PageIterator<WithRaw<QuoteExecution>>;
39
+ /**
40
+ * Create Quote Execution
41
+ *
42
+ * Requires scope: exchange:write_quote_execution
43
+ */
44
+ createQuoteExecution(profileId: string, request: CreateQuoteExecutionRequest, opts?: RequestOptions): Promise<WithRaw<QuoteExecution>>;
45
+ /**
46
+ * Get Quote Execution
47
+ *
48
+ * Requires scope: exchange:read_quote_execution
49
+ */
50
+ getQuoteExecution(profileId: string, id: string, opts?: RequestOptions): Promise<WithRaw<QuoteExecution>>;
51
+ }
@@ -0,0 +1,41 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * QuoteExecutionsService — Quote Executions buy or sell assets using a Quote
5
+ * obtained from the Quotes flow.
6
+ *
7
+ * Access via `client.quoteExecutions`.
8
+ */
9
+ export class QuoteExecutionsService {
10
+ client;
11
+ /** @internal */
12
+ constructor(client) {
13
+ this.client = client;
14
+ }
15
+ /**
16
+ * List Quote Executions
17
+ *
18
+ * Requires scope: exchange:read_quote_execution
19
+ */
20
+ listQuoteExecutions(profileId, params, opts) {
21
+ return this.client.paginate(buildPath("/profiles/{profile_id}/quote-executions", { profile_id: profileId }), "items", params, opts, { responseSchema: "ListQuoteExecutionsResponse" });
22
+ }
23
+ /**
24
+ * Create Quote Execution
25
+ *
26
+ * Requires scope: exchange:write_quote_execution
27
+ */
28
+ async createQuoteExecution(profileId, request, opts) {
29
+ const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
30
+ return this.client.post(buildPath("/profiles/{profile_id}/quote-executions", { profile_id: profileId }), body, opts, { responseSchema: "QuoteExecution", requestSchema: "CreateQuoteExecutionRequest", replayProtected: true });
31
+ }
32
+ /**
33
+ * Get Quote Execution
34
+ *
35
+ * Requires scope: exchange:read_quote_execution
36
+ */
37
+ async getQuoteExecution(profileId, id, opts) {
38
+ return this.client.get(buildPath("/profiles/{profile_id}/quote-executions/{id}", { profile_id: profileId, id: id }), undefined, opts, { responseSchema: "QuoteExecution" });
39
+ }
40
+ }
41
+ //# sourceMappingURL=quote-executions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quote-executions.js","sourceRoot":"","sources":["../../src/services/quote-executions.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA2BzC;;;;;GAKG;AACH,MAAM,OAAO,sBAAsB;IAEJ;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,mBAAmB,CACjB,SAAiB,EACjB,MAAkC,EAClC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CACzB,SAAS,CAAC,yCAAyC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAC/E,OAAO,EACP,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,6BAA6B,EAAE,CAClD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CACxB,SAAiB,EACjB,OAAoC,EACpC,IAAqB;QAErB,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB,SAAS,CAAC,yCAAyC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAC/E,IAAI,EACJ,IAAI,EACJ,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,6BAA6B,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1G,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,SAAiB,EAAE,EAAU,EAAE,IAAqB;QAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,8CAA8C,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAC5F,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,gBAAgB,EAAE,CACrC,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownMarket, KnownOrderBy, KnownOrderSide, KnownQuoteExecutionStatus, KnownSortOrder } from \"../enums.js\";\nimport type { CreateQuoteExecutionRequest, QuoteExecution } from \"../models.js\";\n\nexport interface ListQuoteExecutionsParams {\n /** Filter by buy or sell side. */\n side?: KnownOrderSide | (string & {});\n /** Filter by the trading pair. */\n market?: KnownMarket | (string & {});\n /** Filter by the status of the order. */\n status?: KnownQuoteExecutionStatus | (string & {});\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_end?: string;\n /** Number of results to return. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order.\nDefault order is descending (DESC). */\n order?: KnownSortOrder | (string & {});\n /** The specific method by which the returned results will be ordered. */\n order_by?: KnownOrderBy | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * QuoteExecutionsService — Quote Executions buy or sell assets using a Quote\n * obtained from the Quotes flow.\n *\n * Access via `client.quoteExecutions`.\n */\nexport class QuoteExecutionsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Quote Executions\n *\n * Requires scope: exchange:read_quote_execution\n */\n listQuoteExecutions(\n profileId: string,\n params?: ListQuoteExecutionsParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<QuoteExecution>> {\n return this.client.paginate<WithRaw<QuoteExecution>>(\n buildPath(\"/profiles/{profile_id}/quote-executions\", { profile_id: profileId }),\n \"items\",\n params,\n opts,\n { responseSchema: \"ListQuoteExecutionsResponse\" },\n );\n }\n\n /**\n * Create Quote Execution\n *\n * Requires scope: exchange:write_quote_execution\n */\n async createQuoteExecution(\n profileId: string,\n request: CreateQuoteExecutionRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<QuoteExecution>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<QuoteExecution>>(\n buildPath(\"/profiles/{profile_id}/quote-executions\", { profile_id: profileId }),\n body,\n opts,\n { responseSchema: \"QuoteExecution\", requestSchema: \"CreateQuoteExecutionRequest\", replayProtected: true },\n );\n }\n\n /**\n * Get Quote Execution\n *\n * Requires scope: exchange:read_quote_execution\n */\n async getQuoteExecution(profileId: string, id: string, opts?: RequestOptions): Promise<WithRaw<QuoteExecution>> {\n return this.client.get<WithRaw<QuoteExecution>>(\n buildPath(\"/profiles/{profile_id}/quote-executions/{id}\", { profile_id: profileId, id: id }),\n undefined,\n opts,\n { responseSchema: \"QuoteExecution\" },\n );\n }\n}\n"]}
@@ -0,0 +1,44 @@
1
+ import type { RequestOptions, WithRaw } from "../client.js";
2
+ import type { KnownMarket } from "../enums.js";
3
+ import type { ListQuotesResponse } from "../models.js";
4
+ export interface ListQuotesParams {
5
+ markets: (KnownMarket | (string & {}))[];
6
+ }
7
+ /**
8
+ * QuotesService — Quotes are "held rates" offered by Paxos to buy or sell
9
+ * assets at a specific price within a period of time - for example, the option
10
+ * to buy BTC within the next 30 seconds for $8,000.
11
+ *
12
+ * The typical Quotes workflow is as follows:
13
+ *
14
+ * 1. Call {@link QuotesService.listQuotes | List Quotes} to get the latest
15
+ * available quoted prices for the assets you want to buy or sell.
16
+ * 2. Present the offered price to one or more end-users, with a timer
17
+ * indicating the time to expiration.
18
+ * 3. If a user accepts the price, call
19
+ * {@link QuoteExecutionsService.createQuoteExecution | Create Quote Execution}
20
+ * with the amount to buy or sell.
21
+ * 4. Call
22
+ * {@link QuoteExecutionsService.getQuoteExecution | Get Quote Execution} to
23
+ * monitor for completion and know when the funds from the execution are
24
+ * available.
25
+ *
26
+ * It's important to show end-users the latest available price. If you cache
27
+ * prices to show them to multiple users, you should refresh the cache once per
28
+ * second.
29
+ *
30
+ * You can call
31
+ * {@link QuoteExecutionsService.listQuoteExecutions | List Quote Executions}
32
+ * to review or construct reports on quote execution activity.
33
+ *
34
+ * Access via `client.quotes`.
35
+ */
36
+ export declare class QuotesService {
37
+ private readonly client;
38
+ /**
39
+ * List Quotes
40
+ *
41
+ * Requires scope: exchange:read_quote
42
+ */
43
+ listQuotes(params?: ListQuotesParams, opts?: RequestOptions): Promise<WithRaw<ListQuotesResponse>>;
44
+ }