@coinbase-sample/prime-sdk-ts 0.4.1 → 0.6.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 (155) hide show
  1. package/README.md +22 -0
  2. package/dist/activities/index.js +40 -4
  3. package/dist/addressBooks/index.js +4 -2
  4. package/dist/allocations/index.js +19 -3
  5. package/dist/balances/index.js +17 -5
  6. package/dist/client.js +7 -2
  7. package/dist/constants.js +5 -2
  8. package/dist/financing/index.js +18 -0
  9. package/dist/index.js +3 -1
  10. package/dist/invoices/index.js +16 -3
  11. package/dist/model/Counterparty.js +21 -0
  12. package/dist/model/CounterpartyDestination.js +21 -0
  13. package/dist/model/CreateNetAllocationRequest.js +21 -0
  14. package/dist/model/CreateWalletDepositAddressRequest.js +21 -0
  15. package/dist/model/FCMMarginCall.js +21 -0
  16. package/dist/model/GetFcmMarginCallDetailsResponse.js +21 -0
  17. package/dist/model/GetFcmRiskLimitsResponse.js +21 -0
  18. package/dist/model/GetOrderEditHistoryResponse.js +21 -0
  19. package/dist/model/GetPortfolioCounterpartyIDResponse.js +21 -0
  20. package/dist/model/LimitOrderEdit.js +21 -0
  21. package/dist/model/ListWalletAddressesResponse.js +21 -0
  22. package/dist/model/OrderEdit.js +21 -0
  23. package/dist/model/PortfolioStakingInitiateRequest.js +21 -0
  24. package/dist/model/PortfolioStakingInitiateResponse.js +21 -0
  25. package/dist/model/PortfolioStakingMetadata.js +21 -0
  26. package/dist/model/PortfolioStakingUnstakeRequest.js +21 -0
  27. package/dist/model/PortfolioStakingUnstakeResponse.js +21 -0
  28. package/dist/model/StakingUnstakeRequest.js +21 -0
  29. package/dist/model/WalletStakeInputs.js +21 -0
  30. package/dist/model/WalletUnstakeInputs.js +21 -0
  31. package/dist/model/enums/AllocationSizeType.js +0 -1
  32. package/dist/model/enums/AssetChangeType.js +0 -1
  33. package/dist/model/enums/CustodyActivityType.js +0 -1
  34. package/dist/model/enums/DestinationType.js +4 -4
  35. package/dist/model/enums/FcmMarginCallState.js +30 -0
  36. package/dist/model/enums/FcmMarginCallType.js +28 -0
  37. package/dist/model/enums/OrderSide.js +0 -1
  38. package/dist/model/enums/OrderStatus.js +0 -1
  39. package/dist/model/enums/OrderType.js +0 -1
  40. package/dist/model/enums/PaymentMethodType.js +3 -4
  41. package/dist/model/enums/PortfolioBalanceType.js +0 -1
  42. package/dist/model/enums/ProductPermissions.js +0 -1
  43. package/dist/model/enums/SigningStatus.js +0 -1
  44. package/dist/model/enums/TimeInForceType.js +0 -1
  45. package/dist/model/enums/TransactionStatus.js +1 -2
  46. package/dist/model/enums/TransactionType.js +0 -1
  47. package/dist/model/enums/TransferLocationType.js +0 -1
  48. package/dist/model/enums/UserRole.js +0 -1
  49. package/dist/model/enums/VisibilityStatus.js +0 -1
  50. package/dist/model/enums/WalletDepositInstructionType.js +0 -1
  51. package/dist/model/enums/WalletType.js +0 -1
  52. package/dist/model/enums/index.js +5 -1
  53. package/dist/orders/index.js +63 -8
  54. package/dist/portfolios/index.js +9 -0
  55. package/dist/portfolios/types.js +15 -0
  56. package/dist/positions/index.js +9 -6
  57. package/dist/products/index.js +4 -2
  58. package/dist/shared/brand.js +15 -0
  59. package/dist/shared/paginatedResponse.js +185 -0
  60. package/dist/shared/pagination.js +15 -0
  61. package/dist/shared/toCamelCase.js +15 -0
  62. package/dist/staking/index.js +24 -0
  63. package/dist/transactions/index.js +17 -2
  64. package/dist/types/activities/types.d.ts +6 -3
  65. package/dist/types/addressBooks/types.d.ts +4 -2
  66. package/dist/types/allocations/types.d.ts +4 -2
  67. package/dist/types/assets/types.d.ts +1 -1
  68. package/dist/types/balances/types.d.ts +6 -3
  69. package/dist/types/client.d.ts +2 -2
  70. package/dist/types/commission/types.d.ts +1 -1
  71. package/dist/types/constants.d.ts +4 -1
  72. package/dist/types/financing/index.d.ts +5 -1
  73. package/dist/types/financing/types.d.ts +10 -2
  74. package/dist/types/futures/types.d.ts +1 -1
  75. package/dist/types/index.d.ts +5 -4
  76. package/dist/types/invoices/index.d.ts +2 -2
  77. package/dist/types/invoices/types.d.ts +9 -3
  78. package/dist/types/model/Commission.d.ts +1 -1
  79. package/dist/types/model/Counterparty.d.ts +25 -0
  80. package/dist/types/model/CounterpartyDestination.d.ts +22 -0
  81. package/dist/types/model/CreateAllocationRequest.d.ts +0 -4
  82. package/dist/types/model/CreateNetAllocationRequest.d.ts +48 -0
  83. package/dist/types/model/CreateOnchainTransactionRequestEvmParams.d.ts +1 -1
  84. package/dist/types/model/CreateOrderRequest.d.ts +6 -2
  85. package/dist/types/model/CreateWalletDepositAddressRequest.d.ts +25 -0
  86. package/dist/types/model/CreateWalletWithdrawalRequest.d.ts +2 -0
  87. package/dist/types/model/CreateWalletWithdrawalResponse.d.ts +2 -0
  88. package/dist/types/model/FCMMarginCall.d.ts +41 -0
  89. package/dist/types/model/Fill.d.ts +9 -1
  90. package/dist/types/model/GetFcmBalanceResponse.d.ts +4 -0
  91. package/dist/types/model/GetFcmMarginCallDetailsResponse.d.ts +26 -0
  92. package/dist/types/model/GetFcmRiskLimitsResponse.d.ts +45 -0
  93. package/dist/types/model/GetOrderEditHistoryResponse.d.ts +35 -0
  94. package/dist/types/model/GetPortfolioCounterpartyIDResponse.d.ts +23 -0
  95. package/dist/types/model/LimitOrderEdit.d.ts +29 -0
  96. package/dist/types/model/ListWalletAddressesResponse.d.ts +25 -0
  97. package/dist/types/model/Order.d.ts +31 -1
  98. package/dist/types/model/OrderEdit.d.ts +30 -0
  99. package/dist/types/model/OrderPreviewRequest.d.ts +11 -2
  100. package/dist/types/model/PortfolioStakingInitiateRequest.d.ts +35 -0
  101. package/dist/types/model/PortfolioStakingInitiateResponse.d.ts +29 -0
  102. package/dist/types/model/PortfolioStakingMetadata.d.ts +25 -0
  103. package/dist/types/model/PortfolioStakingUnstakeRequest.d.ts +35 -0
  104. package/dist/types/model/PortfolioStakingUnstakeResponse.d.ts +29 -0
  105. package/dist/types/model/PostOrderPreviewResponse.d.ts +20 -0
  106. package/dist/types/model/RFQProductDetails.d.ts +4 -0
  107. package/dist/types/model/StakingInitiateRequest.d.ts +5 -2
  108. package/dist/types/model/StakingInitiateResponse.d.ts +3 -0
  109. package/dist/types/model/StakingUnstakeRequest.d.ts +30 -0
  110. package/dist/types/model/StakingUnstakeResponse.d.ts +3 -0
  111. package/dist/types/model/TransferLocation.d.ts +8 -0
  112. package/dist/types/model/WalletStakeInputs.d.ts +32 -0
  113. package/dist/types/model/WalletUnstakeInputs.d.ts +28 -0
  114. package/dist/types/model/enums/AllocationSizeType.d.ts +0 -1
  115. package/dist/types/model/enums/AssetChangeType.d.ts +0 -1
  116. package/dist/types/model/enums/CustodyActivityType.d.ts +0 -1
  117. package/dist/types/model/enums/DestinationType.d.ts +4 -4
  118. package/dist/types/model/enums/FcmMarginCallState.d.ts +26 -0
  119. package/dist/types/model/enums/FcmMarginCallType.d.ts +24 -0
  120. package/dist/types/model/enums/OrderSide.d.ts +0 -1
  121. package/dist/types/model/enums/OrderStatus.d.ts +0 -1
  122. package/dist/types/model/enums/OrderType.d.ts +0 -1
  123. package/dist/types/model/enums/PaymentMethodType.d.ts +3 -4
  124. package/dist/types/model/enums/PortfolioBalanceType.d.ts +0 -1
  125. package/dist/types/model/enums/ProductPermissions.d.ts +0 -1
  126. package/dist/types/model/enums/SigningStatus.d.ts +0 -1
  127. package/dist/types/model/enums/TimeInForceType.d.ts +0 -1
  128. package/dist/types/model/enums/TransactionStatus.d.ts +1 -2
  129. package/dist/types/model/enums/TransactionType.d.ts +0 -1
  130. package/dist/types/model/enums/TransferLocationType.d.ts +0 -1
  131. package/dist/types/model/enums/UserRole.d.ts +0 -1
  132. package/dist/types/model/enums/VisibilityStatus.d.ts +0 -1
  133. package/dist/types/model/enums/WalletDepositInstructionType.d.ts +0 -1
  134. package/dist/types/model/enums/WalletType.d.ts +0 -1
  135. package/dist/types/model/enums/index.d.ts +2 -0
  136. package/dist/types/model/index.d.ts +20 -0
  137. package/dist/types/onchainAddressBook/types.d.ts +1 -1
  138. package/dist/types/orders/index.d.ts +3 -1
  139. package/dist/types/orders/types.d.ts +17 -7
  140. package/dist/types/paymentMethods/types.d.ts +1 -1
  141. package/dist/types/portfolios/index.d.ts +3 -1
  142. package/dist/types/portfolios/types.d.ts +6 -2
  143. package/dist/types/positions/types.d.ts +9 -9
  144. package/dist/types/products/types.d.ts +4 -2
  145. package/dist/types/shared/brand.d.ts +15 -0
  146. package/dist/types/shared/paginatedResponse.d.ts +120 -0
  147. package/dist/types/shared/toCamelCase.d.ts +15 -0
  148. package/dist/types/staking/index.d.ts +5 -1
  149. package/dist/types/staking/types.d.ts +10 -2
  150. package/dist/types/transactions/types.d.ts +7 -3
  151. package/dist/types/users/types.d.ts +9 -5
  152. package/dist/types/wallets/types.d.ts +7 -5
  153. package/dist/users/index.js +11 -2
  154. package/dist/wallets/index.js +17 -21
  155. package/package.json +12 -11
@@ -15,9 +15,10 @@
15
15
  */
16
16
  import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
17
17
  import { CoinbasePrimeClient } from '../client';
18
- import { ListOpenOrdersResponse, ListOpenOrdersRequest, ListOrderFillsRequest, ListOrderFillsResponse, ListPortfolioOrdersResponse, ListPortfolioOrdersRequest, GetOrderResponse, GetOrderRequest, ListPortfolioFillsRequest, ListPortfolioFillsResponse, CreateOrderPreviewRequest, CreateOrderPreviewResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, CreateQuoteRequest, CreateQuoteResponse, AcceptQuoteRequest, AcceptQuoteResponse } from './types';
18
+ import { ListOpenOrdersResponse, ListOpenOrdersRequest, ListOrderFillsRequest, ListOrderFillsResponse, ListPortfolioOrdersResponse, ListPortfolioOrdersRequest, GetOrderResponse, GetOrderRequest, GetOrderEditHistoryRequest, GetOrderEditHistoryResponse, ListPortfolioFillsRequest, ListPortfolioFillsResponse, CreateOrderPreviewRequest, CreateOrderPreviewResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, CreateQuoteRequest, CreateQuoteResponse, AcceptQuoteRequest, AcceptQuoteResponse } from './types';
19
19
  export interface IOrdersService {
20
20
  getOrder(request: GetOrderRequest, options?: CoinbaseCallOptions): Promise<GetOrderResponse>;
21
+ getOrderEditHistory(request: GetOrderEditHistoryRequest, options?: CoinbaseCallOptions): Promise<GetOrderEditHistoryResponse>;
21
22
  listPortfolioFills(request: ListPortfolioFillsRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioFillsResponse>;
22
23
  listPortfolioOrders(request: ListPortfolioOrdersRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioOrdersResponse>;
23
24
  listOrderFills(request: ListOrderFillsRequest, options?: CoinbaseCallOptions): Promise<ListOrderFillsResponse>;
@@ -32,6 +33,7 @@ export declare class OrdersService implements IOrdersService {
32
33
  private client;
33
34
  constructor(client: CoinbasePrimeClient);
34
35
  getOrder(request: GetOrderRequest, options?: CoinbaseCallOptions): Promise<GetOrderResponse>;
36
+ getOrderEditHistory(request: GetOrderEditHistoryRequest, options?: CoinbaseCallOptions): Promise<GetOrderEditHistoryResponse>;
35
37
  listPortfolioFills(request: ListPortfolioFillsRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioFillsResponse>;
36
38
  listPortfolioOrders(request: ListPortfolioOrdersRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioOrdersResponse>;
37
39
  listOrderFills(request: ListOrderFillsRequest, options?: CoinbaseCallOptions): Promise<ListOrderFillsResponse>;
@@ -13,10 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { OrderSide, OrderStatus, OrderType } from '../model/enums/';
18
- import { GetOpenOrdersResponse, GetOrderFillsResponse, GetOrderResponse as internalGet, GetOrdersResponse, GetPortfolioFillsResponse, OrderPreviewRequest, PostOrderPreviewResponse, CancelOrderResponse as internalCancel, CreateOrderResponse as internalCreateResp, CreateOrderRequest as internalCreate, QuoteResponse, AcceptQuoteRequest as internalAcceptQuoteReq, AcceptQuoteResponse as internalAcceptQuoteResp } from '../model/';
18
+ import { GetOpenOrdersResponse, GetOrderFillsResponse, GetOrderResponse as internalGet, GetOrdersResponse, GetPortfolioFillsResponse, GetOrderEditHistoryResponse as internalEditHistory, OrderPreviewRequest, PostOrderPreviewResponse, CancelOrderResponse as internalCancel, CreateOrderResponse as internalCreateResp, CreateOrderRequest as internalCreate, QuoteResponse, AcceptQuoteRequest as internalAcceptQuoteReq, AcceptQuoteResponse as internalAcceptQuoteResp } from '../model/';
19
19
  import { Pagination } from '../shared/pagination';
20
+ import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
20
21
  export type GetOrderRequest = {
21
22
  portfolioId: string;
22
23
  orderId: string;
@@ -27,22 +28,25 @@ export type ListPortfolioFillsRequest = Pagination & {
27
28
  startDate?: string;
28
29
  endDate?: string;
29
30
  };
30
- export type ListPortfolioFillsResponse = Brand<GetPortfolioFillsResponse, 'ListPortfolioFillsResponse'>;
31
+ export type BaseListPortfolioFillsResponse = Brand<GetPortfolioFillsResponse, 'ListPortfolioFillsResponse'>;
32
+ export type ListPortfolioFillsResponse = BaseListPortfolioFillsResponse & PaginatedResponseMethods<ListPortfolioFillsRequest & BasePaginatedRequest, BaseListPortfolioFillsResponse, any>;
31
33
  export type ListPortfolioOrdersRequest = Pagination & {
32
34
  portfolioId: string;
33
35
  orderStatuses?: OrderStatus[];
34
36
  productIds?: string[];
35
- orderTypes?: OrderType;
37
+ orderType?: OrderType;
36
38
  orderSide?: OrderSide;
37
39
  startDate?: string;
38
40
  endDate?: string;
39
41
  };
40
- export type ListPortfolioOrdersResponse = Brand<GetOrdersResponse, 'ListPortfolioOrdersResponse'>;
42
+ export type BaseListPortfolioOrdersResponse = Brand<GetOrdersResponse, 'ListPortfolioOrdersResponse'>;
43
+ export type ListPortfolioOrdersResponse = BaseListPortfolioOrdersResponse & PaginatedResponseMethods<ListPortfolioOrdersRequest & BasePaginatedRequest, BaseListPortfolioOrdersResponse, any>;
41
44
  export type ListOrderFillsRequest = Pagination & {
42
45
  portfolioId: string;
43
46
  orderId: string;
44
47
  };
45
- export type ListOrderFillsResponse = Brand<GetOrderFillsResponse, 'ListOrderFillsResponse'>;
48
+ export type BaseListOrderFillsResponse = Brand<GetOrderFillsResponse, 'ListOrderFillsResponse'>;
49
+ export type ListOrderFillsResponse = BaseListOrderFillsResponse & PaginatedResponseMethods<ListOrderFillsRequest & BasePaginatedRequest, BaseListOrderFillsResponse, any>;
46
50
  export type ListOpenOrdersRequest = Pagination & {
47
51
  portfolioId: string;
48
52
  productIds?: string[];
@@ -51,7 +55,8 @@ export type ListOpenOrdersRequest = Pagination & {
51
55
  startDate?: string;
52
56
  endDate: string;
53
57
  };
54
- export type ListOpenOrdersResponse = Brand<GetOpenOrdersResponse, 'ListOpenOrdersResponse'>;
58
+ export type BaseListOpenOrdersResponse = Brand<GetOpenOrdersResponse, 'ListOpenOrdersResponse'>;
59
+ export type ListOpenOrdersResponse = BaseListOpenOrdersResponse & PaginatedResponseMethods<ListOpenOrdersRequest & BasePaginatedRequest, BaseListOpenOrdersResponse, any>;
55
60
  export type CreateOrderPreviewRequest = OrderPreviewRequest & {
56
61
  portfolioId: string;
57
62
  };
@@ -73,3 +78,8 @@ export type AcceptQuoteRequest = internalAcceptQuoteReq & {
73
78
  portfolioId: string;
74
79
  };
75
80
  export type AcceptQuoteResponse = Brand<internalAcceptQuoteResp, 'AcceptQuoteResponse'>;
81
+ export type GetOrderEditHistoryRequest = {
82
+ portfolioId: string;
83
+ orderId: string;
84
+ };
85
+ export type GetOrderEditHistoryResponse = Brand<Omit<internalEditHistory, 'orderEditHistory'>, 'GetOrderEditHistoryResponse'>;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { GetEntityPaymentMethodsResponse, GetEntityPaymentMethodDetailsResponse } from '../model/';
18
18
  export type ListEntityPaymentMethodsRequest = {
19
19
  entityId: string;
@@ -15,10 +15,11 @@
15
15
  */
16
16
  import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
17
17
  import { CoinbasePrimeClient } from '../client';
18
- import { GetPortfolioRequest, GetPortfolioResponse, GetPortfolioCreditRequest, GetPortfolioCreditResponse, ListPortfoliosResponse, ListPortfoliosRequest } from './types';
18
+ import { GetPortfolioRequest, GetPortfolioResponse, GetPortfolioCreditRequest, GetPortfolioCreditResponse, GetCounterpartyIdRequest, GetCounterpartyIdResponse, ListPortfoliosResponse, ListPortfoliosRequest } from './types';
19
19
  export interface IPortfoliosService {
20
20
  getPortfolio(request: GetPortfolioRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioResponse>;
21
21
  getPortfolioCredit(request: GetPortfolioCreditRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioCreditResponse>;
22
+ getCounterpartyId(request: GetCounterpartyIdRequest, options?: CoinbaseCallOptions): Promise<GetCounterpartyIdResponse>;
22
23
  listPortfolios(request: ListPortfoliosRequest, options?: CoinbaseCallOptions): Promise<ListPortfoliosResponse>;
23
24
  }
24
25
  export declare class PortfoliosService implements IPortfoliosService {
@@ -26,5 +27,6 @@ export declare class PortfoliosService implements IPortfoliosService {
26
27
  constructor(client: CoinbasePrimeClient);
27
28
  getPortfolio(request: GetPortfolioRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioResponse>;
28
29
  getPortfolioCredit(request: GetPortfolioCreditRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioCreditResponse>;
30
+ getCounterpartyId(request: GetCounterpartyIdRequest, options?: CoinbaseCallOptions): Promise<GetCounterpartyIdResponse>;
29
31
  listPortfolios(request?: ListPortfoliosRequest, options?: CoinbaseCallOptions): Promise<ListPortfoliosResponse>;
30
32
  }
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
17
- import { GetPortfolioResponse as internalGet, GetPortfoliosResponse, GetPostTradeCreditResponse } from '../model/';
16
+ import { Brand } from '../shared/brand';
17
+ import { GetPortfolioResponse as internalGet, GetPortfoliosResponse, GetPostTradeCreditResponse, GetPortfolioCounterpartyIDResponse as internalGetCounterpartyIdResponse } from '../model/';
18
18
  export type GetPortfolioRequest = {
19
19
  /**
20
20
  * The portfolio ID.
@@ -28,3 +28,7 @@ export type GetPortfolioCreditRequest = {
28
28
  portfolioId: string;
29
29
  };
30
30
  export type GetPortfolioCreditResponse = Brand<GetPostTradeCreditResponse, 'GetPortfolioCreditResponse'>;
31
+ export type GetCounterpartyIdRequest = {
32
+ portfolioId: string;
33
+ };
34
+ export type GetCounterpartyIdResponse = Brand<internalGetCounterpartyIdResponse, 'GetCounterpartyIdResponse'>;
@@ -13,17 +13,17 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { ListAggregateEntityPositionsResponse as ListAggregateEntityPositionsInt, ListEntityPositionsResponse as ListEntityPositionsInt } from '../model/';
18
- export type ListAggregateEntityPositionsRequest = {
18
+ import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
19
+ import { Pagination } from '../shared/pagination';
20
+ export type ListAggregateEntityPositionsRequest = Pagination & {
19
21
  entityId: string;
20
- cursor?: string;
21
- limit?: number;
22
22
  };
23
- export type ListAggregateEntityPositionsResponse = Brand<ListAggregateEntityPositionsInt, 'ListAggregateEntityPositionsResponse'>;
24
- export type ListEntityPositionsRequest = {
23
+ export type BaseListAggregateEntityPositionsResponse = Brand<ListAggregateEntityPositionsInt, 'ListAggregateEntityPositionsResponse'>;
24
+ export type ListAggregateEntityPositionsResponse = BaseListAggregateEntityPositionsResponse & PaginatedResponseMethods<ListAggregateEntityPositionsRequest & BasePaginatedRequest, BaseListAggregateEntityPositionsResponse, any>;
25
+ export type ListEntityPositionsRequest = Pagination & {
25
26
  entityId: string;
26
- cursor?: string;
27
- limit?: number;
28
27
  };
29
- export type ListEntityPositionsResponse = Brand<ListEntityPositionsInt, 'ListEntityPositionsResponse'>;
28
+ export type BaseListEntityPositionsResponse = Brand<ListEntityPositionsInt, 'ListEntityPositionsResponse'>;
29
+ export type ListEntityPositionsResponse = BaseListEntityPositionsResponse & PaginatedResponseMethods<ListEntityPositionsRequest & BasePaginatedRequest, BaseListEntityPositionsResponse, any>;
@@ -13,10 +13,12 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { GetPortfolioProductsResponse } from '../model/';
18
18
  import { Pagination } from '../shared/pagination';
19
+ import { PaginatedResponseMethods, BasePaginatedRequest } from '../shared/paginatedResponse';
19
20
  export type ListProductsRequest = Pagination & {
20
21
  portfolioId: string;
21
22
  };
22
- export type ListProductsResponse = Brand<GetPortfolioProductsResponse, 'ListProductsResponse'>;
23
+ export type BaseListProductsResponse = Brand<GetPortfolioProductsResponse, 'ListProductsResponse'>;
24
+ export type ListProductsResponse = BaseListProductsResponse & PaginatedResponseMethods<ListProductsRequest & BasePaginatedRequest, BaseListProductsResponse, any>;
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export type Brand<T, B> = T & {
2
17
  __brand: B;
3
18
  };
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
17
+ import { CoinbasePrimeClient } from 'src/client';
18
+ /**
19
+ * Base type for paginated requests
20
+ */
21
+ export type BasePaginatedRequest = {
22
+ cursor?: string;
23
+ limit?: number;
24
+ };
25
+ /**
26
+ * API call signature for paginated endpoints
27
+ */
28
+ export type ApiCall<TRequest extends BasePaginatedRequest, TResponse> = (request: TRequest, options?: CoinbaseCallOptions) => Promise<TResponse>;
29
+ /**
30
+ * Configuration for pagination behavior
31
+ */
32
+ export interface PaginationConfig {
33
+ defaultLimit?: number;
34
+ maxPages?: number;
35
+ maxItems?: number;
36
+ }
37
+ /**
38
+ * Function to extract data array from response
39
+ */
40
+ export type DataExtractor<TResponse, TData> = (response: TResponse) => TData[];
41
+ /**
42
+ * Interface for pagination methods that will be added to response objects
43
+ */
44
+ export interface PaginatedResponseMethods<TRequest extends BasePaginatedRequest, TResponse, TData> {
45
+ __apiCall: ApiCall<TRequest, TResponse & PaginatedResponseMethods<TRequest, TResponse, TData>>;
46
+ __baseRequest: Omit<TRequest, 'cursor'>;
47
+ __dataExtractor: DataExtractor<TResponse, TData>;
48
+ __config: PaginationConfig;
49
+ __currentPage: number;
50
+ __totalItemsFetched: number;
51
+ /**
52
+ * Check if there are more pages available
53
+ */
54
+ hasNext(): boolean;
55
+ /**
56
+ * Get the next cursor
57
+ */
58
+ getNextCursor(): string | undefined;
59
+ /**
60
+ * Fetch the next page
61
+ */
62
+ next(options?: CoinbaseCallOptions): Promise<(TResponse & PaginatedResponseMethods<TRequest, TResponse, TData>) | null>;
63
+ /**
64
+ * Fetch all remaining pages and return combined data
65
+ */
66
+ fetchAll(options?: CoinbaseCallOptions, progressCallback?: (page: number, totalItems: number) => void): Promise<TData[]>;
67
+ }
68
+ /**
69
+ * Factory function to create enhanced response objects with pagination methods
70
+ */
71
+ export declare function createPaginatedResponse<TRequest extends BasePaginatedRequest, TResponse, TData>(responseData: TResponse, apiCall: ApiCall<TRequest, TResponse & PaginatedResponseMethods<TRequest, TResponse, TData>>, baseRequest: Omit<TRequest, 'cursor'>, dataExtractor: DataExtractor<TResponse, TData>, options?: CoinbaseCallOptions): TResponse & PaginatedResponseMethods<TRequest, TResponse, TData>;
72
+ /**
73
+ * Common data extractors for typical API responses
74
+ */
75
+ export declare const ResponseExtractors: {
76
+ activities: <T>(response: {
77
+ activities?: T[];
78
+ }) => T[];
79
+ addresses: <T>(response: {
80
+ addresses?: T[];
81
+ }) => T[];
82
+ allocations: <T>(response: {
83
+ allocations?: T[];
84
+ }) => T[];
85
+ balances: <T>(response: {
86
+ balances?: T[];
87
+ }) => T[];
88
+ fills: <T>(response: {
89
+ fills?: T[];
90
+ }) => T[];
91
+ invoices: <T>(response: {
92
+ invoices?: T[];
93
+ }) => T[];
94
+ orders: <T>(response: {
95
+ orders?: T[];
96
+ }) => T[];
97
+ positions: <T>(response: {
98
+ positions?: T[];
99
+ }) => T[];
100
+ products: <T>(response: {
101
+ products?: T[];
102
+ }) => T[];
103
+ portfolios: <T>(response: {
104
+ portfolios?: T[];
105
+ }) => T[];
106
+ transactions: <T>(response: {
107
+ transactions?: T[];
108
+ }) => T[];
109
+ users: <T>(response: {
110
+ users?: T[];
111
+ }) => T[];
112
+ wallets: <T>(response: {
113
+ wallets?: T[];
114
+ }) => T[];
115
+ };
116
+ /**
117
+ * Get the default pagination options for a client
118
+ */
119
+ export declare function getDefaultPaginationOptions(client: CoinbasePrimeClient, options: CoinbaseCallOptions | undefined): CoinbaseCallOptions;
120
+ export declare function getQueryParams(client: CoinbasePrimeClient, request: BasePaginatedRequest): Record<string, string | number | string[]>;
@@ -1 +1,16 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export declare function toCamelCase<T>(obj: T, seen?: WeakSet<object>): T;
@@ -15,14 +15,18 @@
15
15
  */
16
16
  import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
17
17
  import { CoinbasePrimeClient } from '../client';
18
- import { CreateStakeRequest, CreateStakeResponse, CreateUnstakeRequest, CreateUnstakeResponse } from './types';
18
+ import { CreateStakeRequest, CreateStakeResponse, CreateUnstakeRequest, CreateUnstakeResponse, CreatePortfolioStakeRequest, CreatePortfolioStakeResponse, CreatePortfolioUnstakeRequest, CreatePortfolioUnstakeResponse } from './types';
19
19
  export interface IStakingService {
20
20
  createStake(request: CreateStakeRequest, options?: CoinbaseCallOptions): Promise<CreateStakeResponse>;
21
21
  createUnstake(request: CreateUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreateUnstakeResponse>;
22
+ createPortfolioStake(request: CreatePortfolioStakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioStakeResponse>;
23
+ createPortfolioUnstake(request: CreatePortfolioUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioUnstakeResponse>;
22
24
  }
23
25
  export declare class StakingService implements IStakingService {
24
26
  private client;
25
27
  constructor(client: CoinbasePrimeClient);
26
28
  createStake(request: CreateStakeRequest, options?: CoinbaseCallOptions): Promise<CreateStakeResponse>;
27
29
  createUnstake(request: CreateUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreateUnstakeResponse>;
30
+ createPortfolioStake(request: CreatePortfolioStakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioStakeResponse>;
31
+ createPortfolioUnstake(request: CreatePortfolioUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioUnstakeResponse>;
28
32
  }
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
17
- import { StakingInitiateResponse, StakingInitiateRequest, StakingUnstakeResponse } from 'src/model/';
16
+ import { Brand } from '../shared/brand';
17
+ import { StakingInitiateResponse, StakingInitiateRequest, StakingUnstakeResponse, PortfolioStakingInitiateRequest, PortfolioStakingInitiateResponse, PortfolioStakingUnstakeRequest, PortfolioStakingUnstakeResponse } from 'src/model/';
18
18
  export type CreateStakeRequest = StakingInitiateRequest & {
19
19
  portfolioId: string;
20
20
  walletId: string;
@@ -25,3 +25,11 @@ export type CreateUnstakeRequest = StakingInitiateRequest & {
25
25
  walletId: string;
26
26
  };
27
27
  export type CreateUnstakeResponse = Brand<StakingUnstakeResponse, 'CreateUnstakeResponse'>;
28
+ export type CreatePortfolioStakeRequest = PortfolioStakingInitiateRequest & {
29
+ portfolioId: string;
30
+ };
31
+ export type CreatePortfolioStakeResponse = Brand<PortfolioStakingInitiateResponse, 'CreatePortfolioStakeResponse'>;
32
+ export type CreatePortfolioUnstakeRequest = PortfolioStakingUnstakeRequest & {
33
+ portfolioId: string;
34
+ };
35
+ export type CreatePortfolioUnstakeResponse = Brand<PortfolioStakingUnstakeResponse, 'CreatePortfolioUnstakeResponse'>;
@@ -13,10 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { TransactionType } from '../model/enums/';
18
18
  import { GetPortfolioTransactionsResponse, GetWalletTransactionsResponse, GetTransactionResponse as internalGet, CreateConversionRequest as internalCreateConversion, CreateConversionResponse as internalCreateConversionResp, CreateATransferBetweenTwoWallets, CreateWalletWithdrawalRequest, CreateWalletWithdrawalResponse, CreateWalletTransferResponse, CreateOnchainTransactionRequest as internalCreate, CreateOnchainTransactionResponse as internalCreateResp } from '../model/';
19
19
  import { Pagination } from '../shared/pagination';
20
+ import { PaginatedResponseMethods, BasePaginatedRequest } from '../shared/paginatedResponse';
20
21
  export type ListPortfolioTransactionsRequest = Pagination & {
21
22
  portfolioId: string;
22
23
  symbols?: string[];
@@ -24,7 +25,8 @@ export type ListPortfolioTransactionsRequest = Pagination & {
24
25
  startTime?: string;
25
26
  endTime?: string;
26
27
  };
27
- export type ListPortfolioTransactionsResponse = Brand<GetPortfolioTransactionsResponse, 'ListPortfolioTransactionsResponse'>;
28
+ type BaseListPortfolioTransactionsResponse = Brand<GetPortfolioTransactionsResponse, 'ListPortfolioTransactionsResponse'>;
29
+ export type ListPortfolioTransactionsResponse = BaseListPortfolioTransactionsResponse & PaginatedResponseMethods<ListPortfolioTransactionsRequest & BasePaginatedRequest, BaseListPortfolioTransactionsResponse, any>;
28
30
  export type ListWalletTransactionsRequest = Pagination & {
29
31
  portfolioId: string;
30
32
  walletId: string;
@@ -32,7 +34,8 @@ export type ListWalletTransactionsRequest = Pagination & {
32
34
  startTime?: string;
33
35
  endTime?: string;
34
36
  };
35
- export type ListWalletTransactionsResponse = Brand<GetWalletTransactionsResponse, 'ListWalletTransactionsResponse'>;
37
+ export type BaseListWalletTransactionsResponse = Brand<GetWalletTransactionsResponse, 'ListWalletTransactionsResponse'>;
38
+ export type ListWalletTransactionsResponse = BaseListWalletTransactionsResponse & PaginatedResponseMethods<ListWalletTransactionsRequest & BasePaginatedRequest, BaseListWalletTransactionsResponse, any>;
36
39
  export type GetTransactionRequest = {
37
40
  portfolioId: string;
38
41
  transactionId: string;
@@ -58,3 +61,4 @@ export type CreateOnchainTransactionRequest = internalCreate & {
58
61
  walletId: string;
59
62
  };
60
63
  export type CreateOnchainTransactionResponse = Brand<internalCreateResp, 'CreateOnchainTransactionResponse'>;
64
+ export {};
@@ -13,13 +13,17 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { GetEntityUsersResponse } from '../model/';
18
- export type ListUsersRequest = {
18
+ import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
19
+ import { Pagination } from '../shared/pagination';
20
+ export type ListUsersRequest = Pagination & {
19
21
  entityId: string;
20
22
  };
21
- export type ListUsersResponse = Brand<GetEntityUsersResponse, 'ListUsersResponse'>;
22
- export type ListPortfolioUsersRequest = {
23
+ export type BaseListUsersResponse = Brand<GetEntityUsersResponse, 'ListUsersResponse'>;
24
+ export type ListUsersResponse = BaseListUsersResponse & PaginatedResponseMethods<ListUsersRequest & BasePaginatedRequest, BaseListUsersResponse, any>;
25
+ export type ListPortfolioUsersRequest = Pagination & {
23
26
  portfolioId: string;
24
27
  };
25
- export type ListPortfolioUsersResponse = Brand<GetEntityUsersResponse, 'ListPortfolioUsersResponse'>;
28
+ export type BaseListPortfolioUsersResponse = Brand<GetEntityUsersResponse, 'ListPortfolioUsersResponse'>;
29
+ export type ListPortfolioUsersResponse = BaseListPortfolioUsersResponse & PaginatedResponseMethods<ListPortfolioUsersRequest & BasePaginatedRequest, BaseListPortfolioUsersResponse, any>;
@@ -13,16 +13,18 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Brand } from 'src/shared/brand';
16
+ import { Brand } from '../shared/brand';
17
17
  import { WalletType, WalletDepositInstructionType } from '../model/enums/';
18
18
  import { GetWalletsResponse, GetWalletResponse as internalGet, GetWalletAddressesResponse as internalGetAddresses, GetWalletDepositInstructionsResponse as internalGetInstructs, CreateWalletRequest as internalCreate, CreateWalletResponse as internalCreateResp, BlockchainAddress } from '../model/';
19
19
  import { Pagination } from '../shared/pagination';
20
+ import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
20
21
  export type ListWalletsRequest = Pagination & {
21
22
  portfolioId: string;
22
23
  type: WalletType;
23
24
  symbols?: string[];
24
25
  };
25
- export type ListWalletsResponse = Brand<GetWalletsResponse, 'ListWalletsResponse'>;
26
+ export type BaseListWalletsResponse = Brand<GetWalletsResponse, 'ListWalletsResponse'>;
27
+ export type ListWalletsResponse = BaseListWalletsResponse & PaginatedResponseMethods<ListWalletsRequest & BasePaginatedRequest, BaseListWalletsResponse, any>;
26
28
  export type GetWalletRequest = {
27
29
  portfolioId: string;
28
30
  walletId: string;
@@ -44,7 +46,8 @@ export type ListWalletAddressesRequest = {
44
46
  cursor?: string;
45
47
  limit?: number;
46
48
  };
47
- export type ListWalletAddressesResponse = Brand<internalGetAddresses, 'ListWalletAddressesResponse'>;
49
+ export type BaseListWalletAddressesResponse = Brand<internalGetAddresses, 'ListWalletAddressesResponse'>;
50
+ export type ListWalletAddressesResponse = BaseListWalletAddressesResponse & PaginatedResponseMethods<ListWalletAddressesRequest & BasePaginatedRequest, BaseListWalletAddressesResponse, any>;
48
51
  export type CreateWalletRequest = internalCreate & {
49
52
  portfolioId: string;
50
53
  };
@@ -52,7 +55,6 @@ export type CreateWalletResponse = Brand<internalCreateResp, 'CreateWalletRespon
52
55
  export type CreateWalletDepositAddressRequest = {
53
56
  portfolioId: string;
54
57
  walletId: string;
55
- networkId?: string;
56
- networkType?: string;
58
+ networkId: string;
57
59
  };
58
60
  export type CreateWalletDepositAddressResponse = Brand<BlockchainAddress, 'CreateWalletDepositAddressResponse'>;
@@ -10,26 +10,35 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UsersService = void 0;
13
+ const paginatedResponse_1 = require("../shared/paginatedResponse");
13
14
  class UsersService {
14
15
  constructor(client) {
15
16
  this.client = client;
16
17
  }
17
18
  listUsers(request, options) {
18
19
  return __awaiter(this, void 0, void 0, function* () {
20
+ const queryParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
19
21
  const response = yield this.client.request({
20
22
  url: `entities/${request.entityId}/users`,
23
+ queryParams,
21
24
  callOptions: options,
22
25
  });
23
- return response.data;
26
+ const responseData = response.data;
27
+ const paginationOptions = (0, paginatedResponse_1.getDefaultPaginationOptions)(this.client, options);
28
+ return (0, paginatedResponse_1.createPaginatedResponse)(responseData, this.listUsers.bind(this), request, paginatedResponse_1.ResponseExtractors.users, paginationOptions);
24
29
  });
25
30
  }
26
31
  listPortfolioUsers(request, options) {
27
32
  return __awaiter(this, void 0, void 0, function* () {
33
+ const queryParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
28
34
  const response = yield this.client.request({
29
35
  url: `portfolios/${request.portfolioId}/users`,
36
+ queryParams,
30
37
  callOptions: options,
31
38
  });
32
- return response.data;
39
+ const responseData = response.data;
40
+ const paginationOptions = (0, paginatedResponse_1.getDefaultPaginationOptions)(this.client, options);
41
+ return (0, paginatedResponse_1.createPaginatedResponse)(responseData, this.listPortfolioUsers.bind(this), request, paginatedResponse_1.ResponseExtractors.users, paginationOptions);
33
42
  });
34
43
  }
35
44
  }
@@ -26,17 +26,23 @@ exports.WalletsService = void 0;
26
26
  * limitations under the License.
27
27
  */
28
28
  const core_ts_1 = require("@coinbase-sample/core-ts");
29
+ const paginatedResponse_1 = require("../shared/paginatedResponse");
29
30
  class WalletsService {
30
31
  constructor(client) {
31
32
  this.client = client;
32
33
  }
33
34
  listWallets(request, options) {
34
35
  return __awaiter(this, void 0, void 0, function* () {
36
+ const queryParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
35
37
  const response = yield this.client.request({
36
38
  url: `portfolios/${request.portfolioId}/wallets`,
39
+ queryParams,
37
40
  callOptions: options,
38
41
  });
39
- return response.data;
42
+ const responseData = response.data;
43
+ // Merge client defaults with call options
44
+ const paginationOptions = (0, paginatedResponse_1.getDefaultPaginationOptions)(this.client, options);
45
+ return (0, paginatedResponse_1.createPaginatedResponse)(responseData, this.listWallets.bind(this), request, paginatedResponse_1.ResponseExtractors.wallets, paginationOptions);
40
46
  });
41
47
  }
42
48
  getWallet(request, options) {
@@ -69,25 +75,19 @@ class WalletsService {
69
75
  }
70
76
  listWalletAddresses(request, options) {
71
77
  return __awaiter(this, void 0, void 0, function* () {
72
- let queryParams = {};
78
+ const queryParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
73
79
  if (request.networkId) {
74
- queryParams['network.id'] = request.networkId;
75
- }
76
- if (request.networkType) {
77
- queryParams['network.type'] = request.networkType;
78
- }
79
- if (request.cursor) {
80
- queryParams.cursor = request.cursor;
81
- }
82
- if (request.limit) {
83
- queryParams.limit = request.limit;
80
+ queryParams.networkId = request.networkId;
84
81
  }
85
82
  const response = yield this.client.request({
86
83
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/addresses`,
87
84
  queryParams,
88
85
  callOptions: options,
89
86
  });
90
- return response.data;
87
+ const responseData = response.data;
88
+ // Merge client defaults with call options
89
+ const paginationOptions = (0, paginatedResponse_1.getDefaultPaginationOptions)(this.client, options);
90
+ return (0, paginatedResponse_1.createPaginatedResponse)(responseData, this.listWalletAddresses.bind(this), request, paginatedResponse_1.ResponseExtractors.addresses, paginationOptions);
91
91
  });
92
92
  }
93
93
  createWallet(request, options) {
@@ -104,16 +104,12 @@ class WalletsService {
104
104
  }
105
105
  createWalletDepositAddress(request, options) {
106
106
  return __awaiter(this, void 0, void 0, function* () {
107
- let queryParams = {};
108
- if (request.networkId) {
109
- queryParams['network.id'] = request.networkId;
110
- }
111
- if (request.networkType) {
112
- queryParams['network.type'] = request.networkType;
113
- }
107
+ const bodyParams = {
108
+ networkId: request.networkId,
109
+ };
114
110
  const response = yield this.client.request({
115
111
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/addresses`,
116
- queryParams,
112
+ bodyParams,
117
113
  method: core_ts_1.Method.POST,
118
114
  callOptions: options,
119
115
  });