@coinbase-sample/prime-sdk-ts 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +207 -67
- package/dist/addressBooks/index.js +2 -2
- package/dist/allocations/index.js +3 -3
- package/dist/client-manual.js +84 -0
- package/dist/client-modular.js +57 -0
- package/dist/client-only.js +31 -0
- package/dist/{client.js → clients/client.js} +12 -2
- package/dist/clients/clientWithServices.js +323 -0
- package/dist/{types/client.d.ts → clients/clientWithServicesTypes.js} +3 -6
- package/dist/clients/index.js +28 -0
- package/dist/clients/types.js +2 -0
- package/dist/constants.js +1 -1
- package/dist/futures/index.js +4 -4
- package/dist/index.js +27 -18
- package/dist/onchainAddressBook/index.js +4 -4
- package/dist/orders/index.js +6 -6
- package/dist/services.js +75 -0
- package/dist/shared/envUtils.js +66 -0
- package/dist/staking/index.js +5 -5
- package/dist/transactions/index.js +5 -5
- package/dist/types/activities/index.d.ts +2 -3
- package/dist/types/addressBooks/index.d.ts +2 -3
- package/dist/types/allocations/index.d.ts +2 -3
- package/dist/types/assets/index.d.ts +2 -3
- package/dist/types/balances/index.d.ts +2 -3
- package/dist/types/client-manual.d.ts +58 -0
- package/dist/types/client-modular.d.ts +39 -0
- package/dist/types/client-only.d.ts +18 -0
- package/dist/types/clients/client.d.ts +27 -0
- package/dist/types/clients/clientWithServices.d.ts +229 -0
- package/dist/types/clients/clientWithServicesTypes.d.ts +115 -0
- package/dist/types/clients/index.d.ts +19 -0
- package/dist/types/clients/types.d.ts +48 -0
- package/dist/types/commission/index.d.ts +2 -3
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/financing/index.d.ts +2 -3
- package/dist/types/futures/index.d.ts +2 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/invoices/index.d.ts +2 -3
- package/dist/types/onchainAddressBook/index.d.ts +2 -3
- package/dist/types/orders/index.d.ts +2 -3
- package/dist/types/paymentMethods/index.d.ts +2 -3
- package/dist/types/portfolios/index.d.ts +2 -3
- package/dist/types/positions/index.d.ts +2 -3
- package/dist/types/products/index.d.ts +2 -3
- package/dist/types/services.d.ts +39 -0
- package/dist/types/shared/envUtils.d.ts +36 -0
- package/dist/types/shared/paginatedResponse.d.ts +3 -4
- package/dist/types/staking/index.d.ts +2 -3
- package/dist/types/transactions/index.d.ts +2 -3
- package/dist/types/types.d.ts +37 -0
- package/dist/types/users/index.d.ts +2 -3
- package/dist/types/wallets/index.d.ts +2 -3
- package/dist/types.js +39 -0
- package/dist/wallets/index.js +3 -3
- package/package.json +32 -1
package/dist/types.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.CoinbaseError = exports.CoinbaseClientException = exports.Method = exports.CoinbaseClient = void 0;
|
|
33
|
+
__exportStar(require("./model/enums/"), exports);
|
|
34
|
+
// Export client configuration types
|
|
35
|
+
var clients_1 = require("./clients");
|
|
36
|
+
Object.defineProperty(exports, "CoinbaseClient", { enumerable: true, get: function () { return clients_1.CoinbaseClient; } });
|
|
37
|
+
Object.defineProperty(exports, "Method", { enumerable: true, get: function () { return clients_1.Method; } });
|
|
38
|
+
Object.defineProperty(exports, "CoinbaseClientException", { enumerable: true, get: function () { return clients_1.CoinbaseClientException; } });
|
|
39
|
+
Object.defineProperty(exports, "CoinbaseError", { enumerable: true, get: function () { return clients_1.CoinbaseError; } });
|
package/dist/wallets/index.js
CHANGED
|
@@ -36,7 +36,7 @@ exports.WalletsService = void 0;
|
|
|
36
36
|
* See the License for the specific language governing permissions and
|
|
37
37
|
* limitations under the License.
|
|
38
38
|
*/
|
|
39
|
-
const
|
|
39
|
+
const clients_1 = require("../clients");
|
|
40
40
|
const paginatedResponse_1 = require("../shared/paginatedResponse");
|
|
41
41
|
class WalletsService {
|
|
42
42
|
constructor(client) {
|
|
@@ -108,7 +108,7 @@ class WalletsService {
|
|
|
108
108
|
const response = yield this.client.request({
|
|
109
109
|
url: `portfolios/${request.portfolioId}/wallets`,
|
|
110
110
|
bodyParams,
|
|
111
|
-
method:
|
|
111
|
+
method: clients_1.Method.POST,
|
|
112
112
|
callOptions: options,
|
|
113
113
|
});
|
|
114
114
|
return response.data;
|
|
@@ -122,7 +122,7 @@ class WalletsService {
|
|
|
122
122
|
const response = yield this.client.request({
|
|
123
123
|
url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/addresses`,
|
|
124
124
|
bodyParams,
|
|
125
|
-
method:
|
|
125
|
+
method: clients_1.Method.POST,
|
|
126
126
|
callOptions: options,
|
|
127
127
|
});
|
|
128
128
|
return response.data;
|
package/package.json
CHANGED
|
@@ -1,8 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase-sample/prime-sdk-ts",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/types/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"require": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./manual": {
|
|
13
|
+
"types": "./dist/types/client-manual.d.ts",
|
|
14
|
+
"import": "./dist/client-manual.js",
|
|
15
|
+
"require": "./dist/client-manual.js"
|
|
16
|
+
},
|
|
17
|
+
"./modular": {
|
|
18
|
+
"types": "./dist/types/client-modular.d.ts",
|
|
19
|
+
"import": "./dist/client-modular.js",
|
|
20
|
+
"require": "./dist/client-modular.js"
|
|
21
|
+
},
|
|
22
|
+
"./services": {
|
|
23
|
+
"types": "./dist/types/services.d.ts",
|
|
24
|
+
"import": "./dist/services.js",
|
|
25
|
+
"require": "./dist/services.js"
|
|
26
|
+
},
|
|
27
|
+
"./client": {
|
|
28
|
+
"types": "./dist/types/client-only.d.ts",
|
|
29
|
+
"import": "./dist/client-only.js",
|
|
30
|
+
"require": "./dist/client-only.js"
|
|
31
|
+
},
|
|
32
|
+
"./types": {
|
|
33
|
+
"types": "./dist/types/types.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
6
37
|
"scripts": {
|
|
7
38
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
39
|
"build": "tsc",
|