@coinbase-sample/prime-sdk-ts 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/dist/balances/index.js +12 -1
  2. package/dist/client.js +2 -2
  3. package/dist/financing/index.js +144 -0
  4. package/dist/index.js +5 -1
  5. package/dist/model/BuyingPower.js +21 -0
  6. package/dist/model/Conversion.js +21 -0
  7. package/dist/model/ConversionDetail.js +21 -0
  8. package/dist/model/CreateNewLocatesRequest.js +21 -0
  9. package/dist/model/CreateNewLocatesResponse.js +21 -0
  10. package/dist/model/EntityBalance.js +21 -0
  11. package/dist/model/ExistingLocate.js +21 -0
  12. package/dist/model/GetBuyingPowerResponse.js +21 -0
  13. package/dist/model/GetExistingLocatesResponse.js +21 -0
  14. package/dist/model/GetInterestAccrualsResponse.js +21 -0
  15. package/dist/model/GetLocateAvailabilitiesResponse.js +21 -0
  16. package/dist/model/GetMarginConversionsResponse.js +21 -0
  17. package/dist/model/GetMarginInformationResponse.js +21 -0
  18. package/dist/model/GetMarginSummariesResponse.js +21 -0
  19. package/dist/model/GetPortfolioInterestAccrualsResponse.js +21 -0
  20. package/dist/model/GetTFTieredPricingFeesResponse.js +21 -0
  21. package/dist/model/GetWithdrawalPowerResponse.js +21 -0
  22. package/dist/model/ListAggregateEntityPositionsResponse.js +21 -0
  23. package/dist/model/ListEntityBalancesResponse.js +21 -0
  24. package/dist/model/ListEntityPositionsResponse.js +21 -0
  25. package/dist/model/LoanInfo.js +21 -0
  26. package/dist/model/Locate.js +21 -0
  27. package/dist/model/MarginAddOn.js +21 -0
  28. package/dist/model/MarginCallRecord.js +21 -0
  29. package/dist/model/MarginInformation.js +21 -0
  30. package/dist/model/MarginSummary.js +21 -0
  31. package/dist/model/MarginSummaryHistorical.js +21 -0
  32. package/dist/model/MarketRate.js +21 -0
  33. package/dist/model/PMAssetInfo.js +21 -0
  34. package/dist/model/Portfolio.js +21 -0
  35. package/dist/model/Position.js +21 -0
  36. package/dist/model/PositionReference.js +21 -0
  37. package/dist/model/RFQProductDetails.js +21 -0
  38. package/dist/model/ShortCollateral.js +21 -0
  39. package/dist/model/StakingInitiateRequest.js +21 -0
  40. package/dist/model/StakingInitiateResponse.js +21 -0
  41. package/dist/model/StakingInputs.js +21 -0
  42. package/dist/model/StakingUnstakeResponse.js +21 -0
  43. package/dist/model/TieredPricingFee.js +21 -0
  44. package/dist/model/WithdrawalPower.js +21 -0
  45. package/dist/model/enums/Benchmark.js +30 -0
  46. package/dist/model/enums/LoanType.js +31 -0
  47. package/dist/model/enums/MarginAddOnType.js +30 -0
  48. package/dist/model/enums/NetworkType.js +1 -0
  49. package/dist/model/enums/PortfolioBalanceType.js +1 -0
  50. package/dist/model/enums/PositionReferenceType.js +28 -0
  51. package/dist/model/enums/RateType.js +30 -0
  52. package/dist/portfolios/index.js +1 -1
  53. package/dist/{paymentMethods/service.js → positions/index.js} +11 -7
  54. package/dist/{addressBooks/service.js → staking/index.js} +11 -9
  55. package/dist/{balances → types/balances}/index.d.ts +3 -1
  56. package/dist/{balances → types/balances}/types.d.ts +9 -0
  57. package/dist/{client.d.ts → types/client.d.ts} +1 -1
  58. package/dist/types/financing/index.d.ts +49 -0
  59. package/dist/types/financing/types.d.ts +94 -0
  60. package/dist/{futures → types/futures}/index.d.ts +5 -5
  61. package/dist/{futures → types/futures}/types.d.ts +2 -2
  62. package/dist/types/index.d.ts +54 -0
  63. package/dist/{model → types/model}/AcceptQuoteRequest.d.ts +1 -0
  64. package/dist/types/model/Accrual.d.ts +83 -0
  65. package/dist/types/model/AddressEntry.d.ts +24 -0
  66. package/dist/{model → types/model}/AddressGroup.d.ts +1 -0
  67. package/dist/types/model/AssetBalance.d.ts +41 -0
  68. package/dist/{model → types/model}/Balance.d.ts +4 -0
  69. package/dist/types/model/BuyingPower.d.ts +41 -0
  70. package/dist/types/model/Conversion.d.ts +36 -0
  71. package/dist/types/model/ConversionDetail.d.ts +49 -0
  72. package/dist/types/model/CreateNewLocatesRequest.d.ts +37 -0
  73. package/dist/types/model/CreateNewLocatesResponse.d.ts +22 -0
  74. package/dist/{model → types/model}/CreateOnchainTransactionRequestEvmParams.d.ts +9 -1
  75. package/dist/{model → types/model}/CreateOrderRequest.d.ts +4 -0
  76. package/dist/types/model/EntityBalance.d.ts +41 -0
  77. package/dist/types/model/ExistingLocate.d.ts +65 -0
  78. package/dist/{model → types/model}/Fill.d.ts +4 -0
  79. package/dist/types/model/GetBuyingPowerResponse.d.ts +23 -0
  80. package/dist/types/model/GetExistingLocatesResponse.d.ts +23 -0
  81. package/dist/types/model/GetInterestAccrualsResponse.d.ts +24 -0
  82. package/dist/types/model/GetLocateAvailabilitiesResponse.d.ts +23 -0
  83. package/dist/types/model/GetMarginConversionsResponse.d.ts +23 -0
  84. package/dist/types/model/GetMarginInformationResponse.d.ts +23 -0
  85. package/dist/types/model/GetMarginSummariesResponse.d.ts +23 -0
  86. package/dist/types/model/GetPortfolioInterestAccrualsResponse.d.ts +24 -0
  87. package/dist/types/model/GetTFTieredPricingFeesResponse.d.ts +23 -0
  88. package/dist/types/model/GetWithdrawalPowerResponse.d.ts +23 -0
  89. package/dist/types/model/ListAggregateEntityPositionsResponse.d.ts +25 -0
  90. package/dist/types/model/ListEntityBalancesResponse.d.ts +25 -0
  91. package/dist/types/model/ListEntityPositionsResponse.d.ts +25 -0
  92. package/dist/types/model/LoanInfo.d.ts +41 -0
  93. package/dist/types/model/Locate.d.ts +33 -0
  94. package/dist/types/model/MarginAddOn.d.ts +27 -0
  95. package/dist/types/model/MarginCallRecord.d.ts +41 -0
  96. package/dist/{model/AddressEntry.d.ts → types/model/MarginInformation.d.ts} +6 -5
  97. package/dist/types/model/MarginSummary.d.ts +151 -0
  98. package/dist/types/model/MarginSummaryHistorical.d.ts +31 -0
  99. package/dist/types/model/MarketRate.d.ts +29 -0
  100. package/dist/{model → types/model}/Order.d.ts +4 -0
  101. package/dist/{model → types/model}/OrderPreviewRequest.d.ts +4 -0
  102. package/dist/types/model/PMAssetInfo.d.ts +89 -0
  103. package/dist/types/model/Position.d.ts +35 -0
  104. package/dist/types/model/PositionReference.d.ts +27 -0
  105. package/dist/{model → types/model}/Product.d.ts +2 -0
  106. package/dist/{model → types/model}/RFQ.d.ts +1 -0
  107. package/dist/types/model/RFQProductDetails.d.ts +24 -0
  108. package/dist/{model → types/model}/RpcConfig.d.ts +1 -1
  109. package/dist/types/model/ShortCollateral.d.ts +37 -0
  110. package/dist/types/model/StakingInitiateRequest.d.ts +27 -0
  111. package/dist/types/model/StakingInitiateResponse.d.ts +33 -0
  112. package/dist/types/model/StakingInputs.d.ts +25 -0
  113. package/dist/types/model/StakingUnstakeResponse.d.ts +33 -0
  114. package/dist/types/model/TieredPricingFee.d.ts +29 -0
  115. package/dist/types/model/WithdrawalPower.d.ts +29 -0
  116. package/dist/types/model/enums/Benchmark.d.ts +26 -0
  117. package/dist/types/model/enums/LoanType.d.ts +27 -0
  118. package/dist/types/model/enums/MarginAddOnType.d.ts +26 -0
  119. package/dist/{model → types/model}/enums/NetworkType.d.ts +1 -0
  120. package/dist/{model → types/model}/enums/PortfolioBalanceType.d.ts +2 -1
  121. package/dist/types/model/enums/PositionReferenceType.d.ts +24 -0
  122. package/dist/types/model/enums/RateType.d.ts +26 -0
  123. package/dist/{portfolios → types/portfolios}/index.d.ts +3 -3
  124. package/dist/{portfolios → types/portfolios}/types.d.ts +1 -0
  125. package/dist/types/positions/index.d.ts +29 -0
  126. package/dist/types/positions/types.d.ts +14 -0
  127. package/dist/types/staking/index.d.ts +29 -0
  128. package/dist/types/staking/types.d.ts +28 -0
  129. package/dist/{wallets → types/wallets}/index.d.ts +5 -1
  130. package/dist/{wallets → types/wallets}/types.d.ts +22 -0
  131. package/dist/wallets/index.js +51 -0
  132. package/package.json +14 -12
  133. package/dist/activities/service.d.ts +0 -18
  134. package/dist/activities/service.js +0 -54
  135. package/dist/addressBooks/service.d.ts +0 -11
  136. package/dist/allocations/service.d.ts +0 -14
  137. package/dist/allocations/service.js +0 -65
  138. package/dist/assets/service.d.ts +0 -10
  139. package/dist/assets/service.js +0 -27
  140. package/dist/index.d.ts +0 -33
  141. package/dist/invoices/service.d.ts +0 -10
  142. package/dist/invoices/service.js +0 -27
  143. package/dist/model/assets.d.ts +0 -13
  144. package/dist/model/assets.js +0 -2
  145. package/dist/model/changeOnchainAddressGroupRequestIsARequestToCreateOrUpdateANewOnchainAddressGroup.d.ts +0 -23
  146. package/dist/model/enums/ActivityType.d.ts +0 -63
  147. package/dist/model/enums/ActivityType.js +0 -67
  148. package/dist/model/services/activitityService.d.ts +0 -33
  149. package/dist/model/services/addressBookService.d.ts +0 -14
  150. package/dist/model/services/allocationService.d.ts +0 -24
  151. package/dist/model/services/allocationService.js +0 -2
  152. package/dist/model/services/assetService.d.ts +0 -5
  153. package/dist/model/services/assetService.js +0 -2
  154. package/dist/model/services/balanceService.d.ts +0 -24
  155. package/dist/model/services/balanceService.js +0 -2
  156. package/dist/model/services/commissionService.d.ts +0 -5
  157. package/dist/model/services/commissionService.js +0 -2
  158. package/dist/model/services/invoiceService.d.ts +0 -5
  159. package/dist/model/services/invoiceService.js +0 -2
  160. package/dist/model/services/orderService.d.ts +0 -62
  161. package/dist/model/services/orderService.js +0 -2
  162. package/dist/model/services/pagination.d.ts +0 -9
  163. package/dist/model/services/pagination.js +0 -2
  164. package/dist/model/services/paymentMethodsService.d.ts +0 -10
  165. package/dist/model/services/paymentMethodsService.js +0 -2
  166. package/dist/model/services/portfolioService.d.ts +0 -15
  167. package/dist/model/services/portfolioService.js +0 -2
  168. package/dist/model/services/productService.d.ts +0 -6
  169. package/dist/model/services/productService.js +0 -2
  170. package/dist/model/services/shared.d.ts +0 -6
  171. package/dist/model/services/shared.js +0 -2
  172. package/dist/model/services/transactionService.d.ts +0 -47
  173. package/dist/model/services/transactionService.js +0 -2
  174. package/dist/model/services/usersService.d.ts +0 -9
  175. package/dist/model/services/usersService.js +0 -2
  176. package/dist/model/services/walletService.d.ts +0 -27
  177. package/dist/model/services/walletService.js +0 -2
  178. package/dist/onchainAddressGroups/index.d.ts +0 -27
  179. package/dist/onchainAddressGroups/index.js +0 -27
  180. package/dist/onchainAddressGroups/types.d.ts +0 -20
  181. package/dist/paymentMethods/service.d.ts +0 -11
  182. package/dist/portfolio/service.d.ts +0 -12
  183. package/dist/portfolio/service.js +0 -42
  184. package/dist/users/service.d.ts +0 -11
  185. package/dist/users/service.js +0 -36
  186. /package/dist/{onchainAddressGroups → financing}/types.js +0 -0
  187. /package/dist/model/{changeOnchainAddressGroupRequestIsARequestToCreateOrUpdateANewOnchainAddressGroup.js → Accrual.js} +0 -0
  188. /package/dist/model/{portfolio.js → AssetBalance.js} +0 -0
  189. /package/dist/{model/services/activitityService.js → positions/types.js} +0 -0
  190. /package/dist/{model/services/addressBookService.js → staking/types.js} +0 -0
  191. /package/dist/{activities → types/activities}/index.d.ts +0 -0
  192. /package/dist/{activities → types/activities}/types.d.ts +0 -0
  193. /package/dist/{addressBooks → types/addressBooks}/index.d.ts +0 -0
  194. /package/dist/{addressBooks → types/addressBooks}/types.d.ts +0 -0
  195. /package/dist/{allocations → types/allocations}/index.d.ts +0 -0
  196. /package/dist/{allocations → types/allocations}/types.d.ts +0 -0
  197. /package/dist/{assets → types/assets}/index.d.ts +0 -0
  198. /package/dist/{assets → types/assets}/types.d.ts +0 -0
  199. /package/dist/{commission → types/commission}/index.d.ts +0 -0
  200. /package/dist/{commission → types/commission}/types.d.ts +0 -0
  201. /package/dist/{constants.d.ts → types/constants.d.ts} +0 -0
  202. /package/dist/{credentials → types/credentials}/index.d.ts +0 -0
  203. /package/dist/{errors → types/errors}/index.d.ts +0 -0
  204. /package/dist/{invoices → types/invoices}/index.d.ts +0 -0
  205. /package/dist/{invoices → types/invoices}/types.d.ts +0 -0
  206. /package/dist/{model → types/model}/AcceptQuoteResponse.d.ts +0 -0
  207. /package/dist/{model → types/model}/Activity.d.ts +0 -0
  208. /package/dist/{model → types/model}/ActivityCreationResponse.d.ts +0 -0
  209. /package/dist/{model → types/model}/ActivityMetadataAccount.d.ts +0 -0
  210. /package/dist/{model → types/model}/ActivityMetadataConsensus.d.ts +0 -0
  211. /package/dist/{model → types/model}/ActivityMetadataTransactions.d.ts +0 -0
  212. /package/dist/{model → types/model}/AddressBookEntry.d.ts +0 -0
  213. /package/dist/{model → types/model}/AggregatedFiatBalance.d.ts +0 -0
  214. /package/dist/{model → types/model}/Allocation.d.ts +0 -0
  215. /package/dist/{model → types/model}/AllocationLeg.d.ts +0 -0
  216. /package/dist/{model → types/model}/AmountDue.d.ts +0 -0
  217. /package/dist/{model → types/model}/Asset.d.ts +0 -0
  218. /package/dist/{model → types/model}/AssetChange.d.ts +0 -0
  219. /package/dist/{model → types/model}/BlockchainAddress.d.ts +0 -0
  220. /package/dist/{model → types/model}/CancelFuturesSweepResponse.d.ts +0 -0
  221. /package/dist/{model → types/model}/CancelOrderResponse.d.ts +0 -0
  222. /package/dist/{model → types/model}/Commission.d.ts +0 -0
  223. /package/dist/{model → types/model}/CreateAddressGroup.d.ts +0 -0
  224. /package/dist/{model → types/model}/CreateAllocationRequest.d.ts +0 -0
  225. /package/dist/{model → types/model}/CreateAllocationResponse.d.ts +0 -0
  226. /package/dist/{model → types/model}/CreateAllocationResponseBody.d.ts +0 -0
  227. /package/dist/{model → types/model}/CreateConversionRequest.d.ts +0 -0
  228. /package/dist/{model → types/model}/CreateConversionResponse.d.ts +0 -0
  229. /package/dist/{model → types/model}/CreateNetAllocationResponse.d.ts +0 -0
  230. /package/dist/{model → types/model}/CreateNetAllocationResponseBody.d.ts +0 -0
  231. /package/dist/{model → types/model}/CreateOnchainTransactionRequest.d.ts +0 -0
  232. /package/dist/{model → types/model}/CreateOnchainTransactionResponse.d.ts +0 -0
  233. /package/dist/{model → types/model}/CreateOrderResponse.d.ts +0 -0
  234. /package/dist/{model → types/model}/CreatePortfolioAddressBookEntryRequest.d.ts +0 -0
  235. /package/dist/{model → types/model}/CreatePortfolioAddressBookEntryResponse.d.ts +0 -0
  236. /package/dist/{model → types/model}/CreateWalletRequest.d.ts +0 -0
  237. /package/dist/{model → types/model}/CreateWalletResponse.d.ts +0 -0
  238. /package/dist/{model → types/model}/CreateWalletTransferResponse.d.ts +0 -0
  239. /package/dist/{model → types/model}/CreateWalletWithdrawalRequest.d.ts +0 -0
  240. /package/dist/{model → types/model}/CreateWalletWithdrawalResponse.d.ts +0 -0
  241. /package/dist/{model → types/model}/DefiBalance.d.ts +0 -0
  242. /package/dist/{model → types/model}/DestinationAlloc.d.ts +0 -0
  243. /package/dist/{model → types/model}/DisplayUser.d.ts +0 -0
  244. /package/dist/{model → types/model}/EntityUser.d.ts +0 -0
  245. /package/dist/{model → types/model}/EstimatedNetworkFees.d.ts +0 -0
  246. /package/dist/{model → types/model}/FcmFuturesSweep.d.ts +0 -0
  247. /package/dist/{model → types/model}/FcmFuturesSweepRequestAmount.d.ts +0 -0
  248. /package/dist/{model → types/model}/FcmPosition.d.ts +0 -0
  249. /package/dist/{model → types/model}/GetActivityResponse.d.ts +0 -0
  250. /package/dist/{model → types/model}/GetAllocationResponse.d.ts +0 -0
  251. /package/dist/{model → types/model}/GetAllocationsByClientNettingIdResponse.d.ts +0 -0
  252. /package/dist/{model → types/model}/GetEntityActivitiesResponse.d.ts +0 -0
  253. /package/dist/{model → types/model}/GetEntityAssetsResponse.d.ts +0 -0
  254. /package/dist/{model → types/model}/GetEntityPaymentMethodDetailsResponse.d.ts +0 -0
  255. /package/dist/{model → types/model}/GetEntityPaymentMethodsResponse.d.ts +0 -0
  256. /package/dist/{model → types/model}/GetEntityUsersResponse.d.ts +0 -0
  257. /package/dist/{model → types/model}/GetFcmBalanceResponse.d.ts +0 -0
  258. /package/dist/{model → types/model}/GetFuturesSweepsResponse.d.ts +0 -0
  259. /package/dist/{model → types/model}/GetInvoicesResponse.d.ts +0 -0
  260. /package/dist/{model → types/model}/GetOpenOrdersResponse.d.ts +0 -0
  261. /package/dist/{model → types/model}/GetOrderFillsResponse.d.ts +0 -0
  262. /package/dist/{model → types/model}/GetOrderResponse.d.ts +0 -0
  263. /package/dist/{model → types/model}/GetOrdersResponse.d.ts +0 -0
  264. /package/dist/{model → types/model}/GetPortfolioActivitiesResponse.d.ts +0 -0
  265. /package/dist/{model → types/model}/GetPortfolioActivityResponse.d.ts +0 -0
  266. /package/dist/{model → types/model}/GetPortfolioAddressBookResponse.d.ts +0 -0
  267. /package/dist/{model → types/model}/GetPortfolioAllocationsResponse.d.ts +0 -0
  268. /package/dist/{model → types/model}/GetPortfolioBalancesResponse.d.ts +0 -0
  269. /package/dist/{model → types/model}/GetPortfolioCommissionResponse.d.ts +0 -0
  270. /package/dist/{model → types/model}/GetPortfolioFillsResponse.d.ts +0 -0
  271. /package/dist/{model → types/model}/GetPortfolioProductsResponse.d.ts +0 -0
  272. /package/dist/{model → types/model}/GetPortfolioResponse.d.ts +0 -0
  273. /package/dist/{model → types/model}/GetPortfolioTransactionsResponse.d.ts +0 -0
  274. /package/dist/{model → types/model}/GetPortfolioUsersResponse.d.ts +0 -0
  275. /package/dist/{model → types/model}/GetPortfoliosResponse.d.ts +0 -0
  276. /package/dist/{model → types/model}/GetPositionsResponse.d.ts +0 -0
  277. /package/dist/{model → types/model}/GetPostTradeCreditResponse.d.ts +0 -0
  278. /package/dist/{model → types/model}/GetTransactionResponse.d.ts +0 -0
  279. /package/dist/{model → types/model}/GetWalletAddressesResponse.d.ts +0 -0
  280. /package/dist/{model → types/model}/GetWalletBalanceResponse.d.ts +0 -0
  281. /package/dist/{model → types/model}/GetWalletDepositInstructionsResponse.d.ts +0 -0
  282. /package/dist/{model → types/model}/GetWalletResponse.d.ts +0 -0
  283. /package/dist/{model → types/model}/GetWalletTransactionsResponse.d.ts +0 -0
  284. /package/dist/{model → types/model}/GetWalletsResponse.d.ts +0 -0
  285. /package/dist/{model → types/model}/Invoice.d.ts +0 -0
  286. /package/dist/{model → types/model}/InvoiceItem.d.ts +0 -0
  287. /package/dist/{model → types/model}/ListOnchainAddressGroupsResponse.d.ts +0 -0
  288. /package/dist/{model → types/model}/ListWeb3WalletBalancesResponse.d.ts +0 -0
  289. /package/dist/{model → types/model}/MatchMetadata.d.ts +0 -0
  290. /package/dist/{model → types/model}/NFTCollection.d.ts +0 -0
  291. /package/dist/{model → types/model}/NFTItem.d.ts +0 -0
  292. /package/dist/{model → types/model}/Network.d.ts +0 -0
  293. /package/dist/{model → types/model}/NetworkDetails.d.ts +0 -0
  294. /package/dist/{model → types/model}/OnchainTransactionDetails.d.ts +0 -0
  295. /package/dist/{model → types/model}/PaginatedResponse.d.ts +0 -0
  296. /package/dist/{model → types/model}/PaymentMethodDestination.d.ts +0 -0
  297. /package/dist/{model → types/model}/PaymentMethodDetails.d.ts +0 -0
  298. /package/dist/{model → types/model}/PaymentMethodSummary.d.ts +0 -0
  299. /package/dist/{model/portfolio.d.ts → types/model/Portfolio.d.ts} +0 -0
  300. /package/dist/{model → types/model}/PortfolioUser.d.ts +0 -0
  301. /package/dist/{model → types/model}/PostOrderPreviewResponse.d.ts +0 -0
  302. /package/dist/{model → types/model}/PostTradeCreditInformation.d.ts +0 -0
  303. /package/dist/{model → types/model}/QuoteResponse.d.ts +0 -0
  304. /package/dist/{model → types/model}/RiskAssessment.d.ts +0 -0
  305. /package/dist/{model → types/model}/ScheduleFuturesSweepRequest.d.ts +0 -0
  306. /package/dist/{model → types/model}/ScheduleFuturesSweepResponse.d.ts +0 -0
  307. /package/dist/{model → types/model}/SetAutoSweepRequest.d.ts +0 -0
  308. /package/dist/{model → types/model}/SetAutoSweepResponse.d.ts +0 -0
  309. /package/dist/{model → types/model}/Transaction.d.ts +0 -0
  310. /package/dist/{model → types/model}/TransactionMetadata.d.ts +0 -0
  311. /package/dist/{model → types/model}/TransferLocation.d.ts +0 -0
  312. /package/dist/{model → types/model}/UserAction.d.ts +0 -0
  313. /package/dist/{model → types/model}/Wallet.d.ts +0 -0
  314. /package/dist/{model → types/model}/WalletCryptoDepositInstructions.d.ts +0 -0
  315. /package/dist/{model → types/model}/WalletFiatDepositInstructions.d.ts +0 -0
  316. /package/dist/{model → types/model}/Web3Asset.d.ts +0 -0
  317. /package/dist/{model → types/model}/Web3Balance.d.ts +0 -0
  318. /package/dist/{model → types/model}/Web3TransactionMetadata.d.ts +0 -0
  319. /package/dist/{model → types/model}/createATransferBetweenTwoWallets.d.ts +0 -0
  320. /package/dist/{model → types/model}/enums/Action.d.ts +0 -0
  321. /package/dist/{model → types/model}/enums/ActivityCategory.d.ts +0 -0
  322. /package/dist/{model → types/model}/enums/ActivityLevel.d.ts +0 -0
  323. /package/dist/{model → types/model}/enums/ActivitySecondaryType.d.ts +0 -0
  324. /package/dist/{model → types/model}/enums/ActivityStatus.d.ts +0 -0
  325. /package/dist/{model → types/model}/enums/AddressBookType.d.ts +0 -0
  326. /package/dist/{model → types/model}/enums/AllocationSizeType.d.ts +0 -0
  327. /package/dist/{model → types/model}/enums/AllocationStatus.d.ts +0 -0
  328. /package/dist/{model → types/model}/enums/AssetChangeType.d.ts +0 -0
  329. /package/dist/{model → types/model}/enums/CustodyActivityType.d.ts +0 -0
  330. /package/dist/{model → types/model}/enums/DestinationType.d.ts +0 -0
  331. /package/dist/{model → types/model}/enums/FcmFuturesSweepStatus.d.ts +0 -0
  332. /package/dist/{model → types/model}/enums/FcmPositionSide.d.ts +0 -0
  333. /package/dist/{model → types/model}/enums/HierarchyType.d.ts +0 -0
  334. /package/dist/{model → types/model}/enums/InvoiceState.d.ts +0 -0
  335. /package/dist/{model → types/model}/enums/InvoiceType.d.ts +0 -0
  336. /package/dist/{model → types/model}/enums/NetworkFamily.d.ts +0 -0
  337. /package/dist/{model → types/model}/enums/OrderSide.d.ts +0 -0
  338. /package/dist/{model → types/model}/enums/OrderStatus.d.ts +0 -0
  339. /package/dist/{model → types/model}/enums/OrderType.d.ts +0 -0
  340. /package/dist/{model → types/model}/enums/PaymentMethodType.d.ts +0 -0
  341. /package/dist/{model → types/model}/enums/PrimeActivityType.d.ts +0 -0
  342. /package/dist/{model → types/model}/enums/ProductPermissions.d.ts +0 -0
  343. /package/dist/{model → types/model}/enums/SigningStatus.d.ts +0 -0
  344. /package/dist/{model → types/model}/enums/SortDirection.d.ts +0 -0
  345. /package/dist/{model → types/model}/enums/TimeInForceType.d.ts +0 -0
  346. /package/dist/{model → types/model}/enums/TransactionStatus.d.ts +0 -0
  347. /package/dist/{model → types/model}/enums/TransactionType.d.ts +0 -0
  348. /package/dist/{model → types/model}/enums/TransferLocationType.d.ts +0 -0
  349. /package/dist/{model → types/model}/enums/UserRole.d.ts +0 -0
  350. /package/dist/{model → types/model}/enums/VisibilityStatus.d.ts +0 -0
  351. /package/dist/{model → types/model}/enums/WalletDepositInstructionType.d.ts +0 -0
  352. /package/dist/{model → types/model}/enums/WalletType.d.ts +0 -0
  353. /package/dist/{model → types/model}/enums/WalletVisibility.d.ts +0 -0
  354. /package/dist/{onchainAddressBook → types/onchainAddressBook}/index.d.ts +0 -0
  355. /package/dist/{onchainAddressBook → types/onchainAddressBook}/types.d.ts +0 -0
  356. /package/dist/{orders → types/orders}/index.d.ts +0 -0
  357. /package/dist/{orders → types/orders}/types.d.ts +0 -0
  358. /package/dist/{paymentMethods → types/paymentMethods}/index.d.ts +0 -0
  359. /package/dist/{paymentMethods → types/paymentMethods}/types.d.ts +0 -0
  360. /package/dist/{products → types/products}/index.d.ts +0 -0
  361. /package/dist/{products → types/products}/types.d.ts +0 -0
  362. /package/dist/{shared → types/shared}/pagination.d.ts +0 -0
  363. /package/dist/{shared → types/shared}/toCamelCase.d.ts +0 -0
  364. /package/dist/{transactions → types/transactions}/index.d.ts +0 -0
  365. /package/dist/{transactions → types/transactions}/types.d.ts +0 -0
  366. /package/dist/{users → types/users}/index.d.ts +0 -0
  367. /package/dist/{users → types/users}/types.d.ts +0 -0
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type StakingUnstakeResponse = {
21
+ /**
22
+ * The wallet ID
23
+ */
24
+ walletId: string;
25
+ /**
26
+ * ID of the newly created transaction, can be used to fetch details of the current state of execution
27
+ */
28
+ transactionId: string;
29
+ /**
30
+ * The ID for the activity generated for this request
31
+ */
32
+ activityId: string;
33
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type TieredPricingFee = {
21
+ /**
22
+ * Asset symbol
23
+ */
24
+ symbol?: string;
25
+ /**
26
+ * The fee in bps
27
+ */
28
+ fee?: string;
29
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type WithdrawalPower = {
21
+ /**
22
+ * The currency symbol
23
+ */
24
+ symbol?: string;
25
+ /**
26
+ * Withdrawal power
27
+ */
28
+ amount?: string;
29
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export declare enum Benchmark {
21
+ BenchmarkUnset = "BENCHMARK_UNSET",
22
+ Zero = "ZERO",
23
+ Sofr360 = "SOFR_360",
24
+ Sofr365 = "SOFR_365",
25
+ CryptoRfr = "CRYPTO_RFR"
26
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export declare enum LoanType {
21
+ LoanTypeUnset = "LOAN_TYPE_UNSET",
22
+ BilateralLending = "BILATERAL_LENDING",
23
+ TradeFinance = "TRADE_FINANCE",
24
+ PortfolioMargin = "PORTFOLIO_MARGIN",
25
+ ShortCollateralLoan = "SHORT_COLLATERAL_LOAN",
26
+ ShortCollateral = "SHORT_COLLATERAL"
27
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export declare enum MarginAddOnType {
21
+ MarginAddOnTypeUnspecified = "MARGIN_ADD_ON_TYPE_UNSPECIFIED",
22
+ SingleCoinStress = "SINGLE_COIN_STRESS",
23
+ ConcentrationStress = "CONCENTRATION_STRESS",
24
+ MacroStress = "MACRO_STRESS",
25
+ ShortBiasedStress = "SHORT_BIASED_STRESS"
26
+ }
@@ -18,6 +18,7 @@
18
18
  * Do not edit the class manually.
19
19
  */
20
20
  export declare enum NetworkType {
21
+ Unspecified = "NETWORK_TYPE_UNSPECIFIED",
21
22
  Evm = "NETWORK_TYPE_EVM",
22
23
  Solana = "NETWORK_TYPE_SOLANA"
23
24
  }
@@ -22,5 +22,6 @@ export declare enum PortfolioBalanceType {
22
22
  TradingBalances = "TRADING_BALANCES",
23
23
  VaultBalances = "VAULT_BALANCES",
24
24
  TotalBalances = "TOTAL_BALANCES",
25
- PrimeCustodyBalances = "PRIME_CUSTODY_BALANCES"
25
+ PrimeCustodyBalances = "PRIME_CUSTODY_BALANCES",
26
+ UnifiedTotalBalances = "UNIFIED_TOTAL_BALANCES"
26
27
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export declare enum PositionReferenceType {
21
+ PositionReferenceTypeUnspecified = "POSITION_REFERENCE_TYPE_UNSPECIFIED",
22
+ Entity = "ENTITY",
23
+ Portfolio = "PORTFOLIO"
24
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export declare enum RateType {
21
+ RateTypeUnset = "RATE_TYPE_UNSET",
22
+ Bps = "BPS",
23
+ Apr360 = "APR_360",
24
+ Apr365 = "APR_365",
25
+ Apr = "APR"
26
+ }
@@ -16,16 +16,16 @@
16
16
  import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
17
17
  import { CoinbasePrimeClient } from '../client';
18
18
  import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
19
- import { GetPortfolioRequest, GetPortfolioResponse, GetPortfolioCreditRequest, GetPortfolioCreditResponse, ListPortfoliosResponse } from './types';
19
+ import { GetPortfolioRequest, GetPortfolioResponse, GetPortfolioCreditRequest, GetPortfolioCreditResponse, ListPortfoliosResponse, ListPortfoliosRequest } from './types';
20
20
  export interface IPortfoliosService {
21
21
  getPortfolio(request: GetPortfolioRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
22
22
  getPortfolioCredit(request: GetPortfolioCreditRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioCreditResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
23
- listPortfolios(options?: CoinbaseCallOptions): Promise<ListPortfoliosResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
23
+ listPortfolios(request: ListPortfoliosRequest, options?: CoinbaseCallOptions): Promise<ListPortfoliosResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
24
24
  }
25
25
  export declare class PortfoliosService implements IPortfoliosService {
26
26
  private client;
27
27
  constructor(client: CoinbasePrimeClient);
28
28
  getPortfolio(request: GetPortfolioRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioResponse>;
29
29
  getPortfolioCredit(request: GetPortfolioCreditRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioCreditResponse>;
30
- listPortfolios(options?: CoinbaseCallOptions): Promise<ListPortfoliosResponse>;
30
+ listPortfolios(request?: ListPortfoliosRequest, options?: CoinbaseCallOptions): Promise<ListPortfoliosResponse>;
31
31
  }
@@ -23,6 +23,7 @@ export type GetPortfolioRequest = {
23
23
  portfolioId: string;
24
24
  };
25
25
  export type GetPortfolioResponse = internalGet;
26
+ export type ListPortfoliosRequest = Record<string, never>;
26
27
  export type ListPortfoliosResponse = GetPortfoliosResponse;
27
28
  export type GetPortfolioCreditRequest = {
28
29
  portfolioId: string;
@@ -0,0 +1,29 @@
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 '../client';
18
+ import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
19
+ import { ListAggregateEntityPositionsRequest, ListAggregateEntityPositionsResponse, ListEntityPositionsRequest, ListEntityPositionsResponse } from './types';
20
+ export interface IPositionsService {
21
+ listAggregateEntityPositions(request: ListAggregateEntityPositionsRequest, options?: CoinbaseCallOptions): Promise<ListAggregateEntityPositionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
22
+ listEntityPositions(request: ListEntityPositionsRequest, options?: CoinbaseCallOptions): Promise<ListEntityPositionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
23
+ }
24
+ export declare class PositionsService implements IPositionsService {
25
+ private client;
26
+ constructor(client: CoinbasePrimeClient);
27
+ listAggregateEntityPositions(request: ListAggregateEntityPositionsRequest, options?: CoinbaseCallOptions): Promise<ListAggregateEntityPositionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
28
+ listEntityPositions(request: ListEntityPositionsRequest, options?: CoinbaseCallOptions): Promise<ListEntityPositionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
29
+ }
@@ -0,0 +1,14 @@
1
+ import { ListAggregateEntityPositionsResponse as ListAggregateEntityPositionsInt } from '../model/ListAggregateEntityPositionsResponse';
2
+ import { ListEntityPositionsResponse as ListEntityPositionsInt } from '../model/ListEntityPositionsResponse';
3
+ export type ListAggregateEntityPositionsRequest = {
4
+ entityId: string;
5
+ cursor?: string;
6
+ limit?: number;
7
+ };
8
+ export type ListAggregateEntityPositionsResponse = ListAggregateEntityPositionsInt;
9
+ export type ListEntityPositionsRequest = {
10
+ entityId: string;
11
+ cursor?: string;
12
+ limit?: number;
13
+ };
14
+ export type ListEntityPositionsResponse = ListEntityPositionsInt;
@@ -0,0 +1,29 @@
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 '../client';
18
+ import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
19
+ import { CreateStakeRequest, CreateStakeResponse, CreateUnstakeRequest, CreateUnstakeResponse } from './types';
20
+ export interface IStakingService {
21
+ createStake(request: CreateStakeRequest, options?: CoinbaseCallOptions): Promise<CreateStakeResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
22
+ createUnstake(request: CreateUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreateUnstakeResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
23
+ }
24
+ export declare class StakingService implements IStakingService {
25
+ private client;
26
+ constructor(client: CoinbasePrimeClient);
27
+ createStake(request: CreateStakeRequest, options?: CoinbaseCallOptions): Promise<CreateStakeResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
28
+ createUnstake(request: CreateUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreateUnstakeResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
29
+ }
@@ -0,0 +1,28 @@
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 { StakingInitiateResponse } from 'src/model/StakingInitiateResponse';
17
+ import { StakingInitiateRequest } from 'src/model/StakingInitiateRequest';
18
+ import { StakingUnstakeResponse } from 'src/model/StakingUnstakeResponse';
19
+ export type CreateStakeRequest = StakingInitiateRequest & {
20
+ portfolioId: string;
21
+ walletId: string;
22
+ };
23
+ export type CreateStakeResponse = StakingInitiateResponse;
24
+ export type CreateUnstakeRequest = StakingInitiateRequest & {
25
+ portfolioId: string;
26
+ walletId: string;
27
+ };
28
+ export type CreateUnstakeResponse = StakingUnstakeResponse;
@@ -16,12 +16,14 @@
16
16
  import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
17
17
  import { CoinbasePrimeClient } from '../client';
18
18
  import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
19
- import { ListWalletsRequest, ListWalletsResponse, GetWalletRequest, GetWalletResponse, GetWalletDepositInstructionsRequest, GetWalletDepositInstructionsResponse, CreateWalletRequest, CreateWalletResponse } from './types';
19
+ import { ListWalletsRequest, ListWalletsResponse, GetWalletRequest, GetWalletResponse, GetWalletDepositInstructionsRequest, GetWalletDepositInstructionsResponse, ListWalletAddressesRequest, ListWalletAddressesResponse, CreateWalletRequest, CreateWalletResponse, CreateWalletDepositAddressRequest, CreateWalletDepositAddressResponse } from './types';
20
20
  export interface IWalletsService {
21
21
  listWallets(request: ListWalletsRequest, options?: CoinbaseCallOptions): Promise<ListWalletsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
22
22
  getWallet(request: GetWalletRequest, options?: CoinbaseCallOptions): Promise<GetWalletResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
23
23
  getWalletDepositInstructions(request: GetWalletDepositInstructionsRequest, options?: CoinbaseCallOptions): Promise<GetWalletDepositInstructionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
24
+ listWalletAddresses(request: ListWalletAddressesRequest, options?: CoinbaseCallOptions): Promise<ListWalletAddressesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
24
25
  createWallet(request: CreateWalletRequest, options?: CoinbaseCallOptions): Promise<CreateWalletResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
26
+ createWalletDepositAddress(request: CreateWalletDepositAddressRequest, options?: CoinbaseCallOptions): Promise<CreateWalletDepositAddressResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
25
27
  }
26
28
  export declare class WalletsService implements IWalletsService {
27
29
  private client;
@@ -29,5 +31,7 @@ export declare class WalletsService implements IWalletsService {
29
31
  listWallets(request: ListWalletsRequest, options?: CoinbaseCallOptions): Promise<ListWalletsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
30
32
  getWallet(request: GetWalletRequest, options?: CoinbaseCallOptions): Promise<GetWalletResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
31
33
  getWalletDepositInstructions(request: GetWalletDepositInstructionsRequest, options?: CoinbaseCallOptions): Promise<GetWalletDepositInstructionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
34
+ listWalletAddresses(request: ListWalletAddressesRequest, options?: CoinbaseCallOptions): Promise<ListWalletAddressesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
32
35
  createWallet(request: CreateWalletRequest, options?: CoinbaseCallOptions): Promise<CreateWalletResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
36
+ createWalletDepositAddress(request: CreateWalletDepositAddressRequest, options?: CoinbaseCallOptions): Promise<CreateWalletDepositAddressResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
33
37
  }
@@ -17,9 +17,12 @@ import { WalletType } from '../model/enums/WalletType';
17
17
  import { Pagination } from '../shared/pagination';
18
18
  import { GetWalletsResponse } from '../model/GetWalletsResponse';
19
19
  import { GetWalletResponse as internalGet } from '../model/GetWalletResponse';
20
+ import { GetWalletAddressesResponse as internalGetAddresses } from '../model/GetWalletAddressesResponse';
20
21
  import { GetWalletDepositInstructionsResponse as internalGetInstructs } from '../model/GetWalletDepositInstructionsResponse';
21
22
  import { CreateWalletRequest as internalCreate } from '../model/CreateWalletRequest';
22
23
  import { CreateWalletResponse as internalCreateResp } from '../model/CreateWalletResponse';
24
+ import { BlockchainAddress } from '../model/BlockchainAddress';
25
+ import { WalletDepositInstructionType } from '../model/enums/WalletDepositInstructionType';
23
26
  export type ListWalletsRequest = Pagination & {
24
27
  portfolioId: string;
25
28
  type: WalletType;
@@ -34,9 +37,28 @@ export type GetWalletResponse = internalGet;
34
37
  export type GetWalletDepositInstructionsRequest = {
35
38
  portfolioId: string;
36
39
  walletId: string;
40
+ depositType: WalletDepositInstructionType;
41
+ networkId?: string;
42
+ networkType?: string;
37
43
  };
38
44
  export type GetWalletDepositInstructionsResponse = internalGetInstructs;
45
+ export type ListWalletAddressesRequest = {
46
+ portfolioId: string;
47
+ walletId: string;
48
+ networkId?: string;
49
+ networkType?: string;
50
+ cursor?: string;
51
+ limit?: number;
52
+ };
53
+ export type ListWalletAddressesResponse = internalGetAddresses;
39
54
  export type CreateWalletRequest = internalCreate & {
40
55
  portfolioId: string;
41
56
  };
42
57
  export type CreateWalletResponse = internalCreateResp;
58
+ export type CreateWalletDepositAddressRequest = {
59
+ portfolioId: string;
60
+ walletId: string;
61
+ networkId?: string;
62
+ networkType?: string;
63
+ };
64
+ export type CreateWalletDepositAddressResponse = BlockchainAddress;
@@ -50,9 +50,42 @@ class WalletsService {
50
50
  }
51
51
  getWalletDepositInstructions(request, options) {
52
52
  return __awaiter(this, void 0, void 0, function* () {
53
+ let queryParams = {
54
+ depositType: request.depositType,
55
+ };
56
+ if (request.networkType) {
57
+ queryParams['network.type'] = request.networkType;
58
+ }
59
+ if (request.networkId) {
60
+ queryParams['network.id'] = request.networkId;
61
+ }
53
62
  const response = yield this.client.request({
54
63
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/deposit_instructions`,
55
64
  callOptions: options,
65
+ queryParams,
66
+ });
67
+ return response.data;
68
+ });
69
+ }
70
+ listWalletAddresses(request, options) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ let queryParams = {};
73
+ 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;
84
+ }
85
+ const response = yield this.client.request({
86
+ url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/addresses`,
87
+ queryParams,
88
+ callOptions: options,
56
89
  });
57
90
  return response.data;
58
91
  });
@@ -69,5 +102,23 @@ class WalletsService {
69
102
  return response.data;
70
103
  });
71
104
  }
105
+ createWalletDepositAddress(request, options) {
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
+ }
114
+ const response = yield this.client.request({
115
+ url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/addresses`,
116
+ queryParams,
117
+ method: core_ts_1.Method.POST,
118
+ callOptions: options,
119
+ });
120
+ return response.data;
121
+ });
122
+ }
72
123
  }
73
124
  exports.WalletsService = WalletsService;
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@coinbase-sample/prime-sdk-ts",
3
- "version": "0.2.1",
4
- "main": "dist/main.js",
3
+ "version": "0.3.1",
4
+ "main": "dist/index.js",
5
+ "types": "dist/types/index.d.ts",
5
6
  "scripts": {
6
7
  "test": "echo \"Error: no test specified\" && exit 1",
7
8
  "build": "tsc",
8
9
  "lint": "eslint . --ext .js,.ts",
9
10
  "format": "prettier --write \"**/*.{js,ts,tsx,json,css,md}\"",
10
11
  "gen-types": "openapi-generator-cli generate -i apiSpec/prime-public-api-spec.json -g typescript-node --global-property models -o apiSpec/types --additional-properties=supportsES6=true --additional-properties=snapshot=true && cd apiSpec && node generateTypes.js",
11
- "replace-model": "rm -r src/model && cp -r apiSpec/types/processed src/model"
12
+ "replace-model": "rm -r src/model && cp -r apiSpec/types/processed src/model",
13
+ "update-spec": "npm run gen-types && npm run replace-model"
12
14
  },
13
15
  "files": [
14
16
  "dist/"
@@ -22,17 +24,17 @@
22
24
  "license": "ISC",
23
25
  "description": "",
24
26
  "devDependencies": {
25
- "@types/node": "^20",
26
- "@typescript-eslint/eslint-plugin": "^8.18.0",
27
- "@typescript-eslint/parser": "^8.18.0",
27
+ "@types/node": "^22.14.0",
28
+ "@typescript-eslint/eslint-plugin": "^8.29.1",
29
+ "@typescript-eslint/parser": "^8.29.1",
28
30
  "dotenv": "^16.4.5",
29
- "eslint": "^9.17.0",
30
- "eslint-config-prettier": "^9.1.0",
31
- "eslint-plugin-prettier": "^5.2.1",
32
- "prettier": "^3.4.2",
33
- "typescript": "^5.5.4"
31
+ "eslint": "^9.24.0",
32
+ "eslint-config-prettier": "^10.1.1",
33
+ "eslint-plugin-prettier": "^5.2.6",
34
+ "prettier": "^3.5.3",
35
+ "typescript": "^5.8.3"
34
36
  },
35
37
  "dependencies": {
36
- "@coinbase-sample/core-ts": "^0.1.0"
38
+ "@coinbase-sample/core-ts": "^0.1.4"
37
39
  }
38
40
  }
@@ -1,18 +0,0 @@
1
- import { CoinbaseCallOptions } from '../../../core-ts/dist';
2
- import { CoinbasePrimeClient } from '../client';
3
- import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
4
- import { GetActivityRequest, GetActivityResponse, GetPortfolioActivitiesRequest, GetPortfolioActivityResponse, ListPortfolioActivitiesRequest, ListPortfolioActivitiesResponse, ListEntityActivitiesRequest, ListEntityActivitiesResponse } from '../model/services/activitityService';
5
- export interface ActivitiesService {
6
- getActivity(request: GetActivityRequest): Promise<GetActivityResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
7
- getPortfolioActivity(request: GetPortfolioActivitiesRequest): Promise<GetPortfolioActivityResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
8
- listEntityActivities(request: ListEntityActivitiesRequest): Promise<ListEntityActivitiesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
9
- listPortfolioActivities(request: ListPortfolioActivitiesRequest): Promise<ListPortfolioActivitiesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
10
- }
11
- export declare class AssetService implements AssetService {
12
- private client;
13
- constructor(client: CoinbasePrimeClient);
14
- getActivity(request: GetActivityRequest, options?: CoinbaseCallOptions): Promise<GetActivityResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
15
- getPortfolioActivity(request: GetPortfolioActivitiesRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioActivityResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
16
- listEntityActivities(request: ListEntityActivitiesRequest, options?: CoinbaseCallOptions): Promise<ListEntityActivitiesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
17
- listPortfolioActivities(request: ListPortfolioActivitiesRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioActivitiesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
18
- }
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AssetService = void 0;
13
- class AssetService {
14
- constructor(client) {
15
- this.client = client;
16
- }
17
- getActivity(request, options) {
18
- return __awaiter(this, void 0, void 0, function* () {
19
- const response = yield this.client.request({
20
- url: `activities/${request.activityId}`,
21
- callOptions: options,
22
- });
23
- return response.data;
24
- });
25
- }
26
- getPortfolioActivity(request, options) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- const response = yield this.client.request({
29
- url: `portfolios/${request.portfolioId}/activities/${request.activityId}`,
30
- callOptions: options,
31
- });
32
- return response.data;
33
- });
34
- }
35
- listEntityActivities(request, options) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- const response = yield this.client.request({
38
- url: `entities/${request.entityId}/activities`,
39
- callOptions: options,
40
- });
41
- return response.data;
42
- });
43
- }
44
- listPortfolioActivities(request, options) {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- const response = yield this.client.request({
47
- url: `portfolios/${request.portfolioId}/activities/${request.activityId}`,
48
- callOptions: options,
49
- });
50
- return response.data;
51
- });
52
- }
53
- }
54
- exports.AssetService = AssetService;