@coinbase-sample/prime-sdk-ts 0.4.0 → 0.4.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.
@@ -54,8 +54,10 @@ class AllocationService {
54
54
  }
55
55
  listPortfolioAllocations(request, options) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
+ const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
57
58
  const response = yield this.client.request({
58
59
  url: `portfolios/${request.portfolioId}/allocations`,
60
+ queryParams,
59
61
  callOptions: options,
60
62
  });
61
63
  return response.data;
@@ -63,8 +65,10 @@ class AllocationService {
63
65
  }
64
66
  listNetAllocations(request, options) {
65
67
  return __awaiter(this, void 0, void 0, function* () {
68
+ const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
66
69
  const response = yield this.client.request({
67
70
  url: `portfolios/${request.portfolioId}/allocations/net/${request.nettingId}`,
71
+ queryParams,
68
72
  callOptions: options,
69
73
  });
70
74
  return response.data;
@@ -16,8 +16,10 @@ class ProductsService {
16
16
  }
17
17
  listProducts(request, options) {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
+ const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
19
20
  const response = yield this.client.request({
20
21
  url: `portfolios/${request.portfolioId}/products`,
22
+ queryParams,
21
23
  callOptions: options,
22
24
  });
23
25
  return response.data;
@@ -10,16 +10,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.StakingService = void 0;
13
+ /**
14
+ * Copyright 2025-present Coinbase Global, Inc.
15
+ *
16
+ * Licensed under the Apache License, Version 2.0 (the "License");
17
+ * you may not use this file except in compliance with the License.
18
+ * You may obtain a copy of the License at
19
+ *
20
+ * http://www.apache.org/licenses/LICENSE-2.0
21
+ *
22
+ * Unless required by applicable law or agreed to in writing, software
23
+ * distributed under the License is distributed on an "AS IS" BASIS,
24
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
+ * See the License for the specific language governing permissions and
26
+ * limitations under the License.
27
+ */
28
+ const core_ts_1 = require("@coinbase-sample/core-ts");
13
29
  class StakingService {
14
30
  constructor(client) {
15
31
  this.client = client;
16
32
  }
17
33
  createStake(request, options) {
18
34
  return __awaiter(this, void 0, void 0, function* () {
19
- const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
35
+ const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
20
36
  const response = yield this.client.request({
21
37
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/staking/initiate`,
22
- queryParams,
38
+ method: core_ts_1.Method.POST,
39
+ bodyParams,
23
40
  callOptions: options,
24
41
  });
25
42
  return response.data;
@@ -27,10 +44,11 @@ class StakingService {
27
44
  }
28
45
  createUnstake(request, options) {
29
46
  return __awaiter(this, void 0, void 0, function* () {
30
- const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
47
+ const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
31
48
  const response = yield this.client.request({
32
49
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/staking/unstake`,
33
- queryParams,
50
+ method: core_ts_1.Method.POST,
51
+ bodyParams,
34
52
  callOptions: options,
35
53
  });
36
54
  return response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase-sample/prime-sdk-ts",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/types/index.d.ts",
6
6
  "scripts": {