@dfns/sdk 0.2.3-rc.1 → 0.2.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/baseAuthApi.d.ts +113 -0
- package/baseAuthApi.js +97 -0
- package/codegen/Assets/AssetsClient.d.ts +13 -0
- package/codegen/Assets/AssetsClient.js +93 -0
- package/codegen/Assets/DelegatedAssetsClient.d.ts +16 -0
- package/codegen/Assets/DelegatedAssetsClient.js +124 -0
- package/codegen/Assets/index.d.ts +3 -0
- package/codegen/Assets/index.js +19 -0
- package/codegen/Assets/types.d.ts +37 -0
- package/codegen/Assets/types.js +2 -0
- package/codegen/Auth/AuthClient.d.ts +50 -0
- package/codegen/Auth/AuthClient.js +518 -0
- package/codegen/Auth/DelegatedAuthClient.d.ts +78 -0
- package/codegen/Auth/DelegatedAuthClient.js +936 -0
- package/codegen/Auth/index.d.ts +3 -0
- package/codegen/Auth/index.js +19 -0
- package/codegen/Auth/types.d.ts +177 -0
- package/codegen/Auth/types.js +2 -0
- package/codegen/Blockchains/BlockchainsClient.d.ts +7 -0
- package/codegen/Blockchains/BlockchainsClient.js +23 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +7 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.js +23 -0
- package/codegen/Blockchains/index.d.ts +3 -0
- package/codegen/Blockchains/index.js +19 -0
- package/codegen/Blockchains/types.d.ts +6 -0
- package/codegen/Blockchains/types.js +2 -0
- package/codegen/Callbacks/CallbacksClient.d.ts +12 -0
- package/codegen/Callbacks/CallbacksClient.js +78 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +15 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.js +110 -0
- package/codegen/Callbacks/index.d.ts +3 -0
- package/codegen/Callbacks/index.js +19 -0
- package/codegen/Callbacks/{types.ts → types.d.ts} +18 -26
- package/codegen/Callbacks/types.js +2 -0
- package/codegen/Permissions/DelegatedPermissionsClient.d.ts +27 -0
- package/codegen/Permissions/DelegatedPermissionsClient.js +284 -0
- package/codegen/Permissions/PermissionsClient.d.ts +18 -0
- package/codegen/Permissions/PermissionsClient.js +156 -0
- package/codegen/Permissions/index.d.ts +3 -0
- package/codegen/Permissions/index.js +19 -0
- package/codegen/Permissions/types.d.ts +62 -0
- package/codegen/Permissions/types.js +2 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +61 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.js +45 -0
- package/codegen/PolicyExecution/index.d.ts +3 -0
- package/codegen/PolicyExecution/index.js +19 -0
- package/codegen/PolicyExecution/types.d.ts +18 -0
- package/codegen/PolicyExecution/types.js +2 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +25 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +240 -0
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +18 -0
- package/codegen/PolicyManagement/PolicyManagementClient.js +146 -0
- package/codegen/PolicyManagement/index.d.ts +3 -0
- package/codegen/PolicyManagement/index.js +19 -0
- package/codegen/PolicyManagement/{types.ts → types.d.ts} +40 -56
- package/codegen/PolicyManagement/types.js +2 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.js +189 -0
- package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
- package/codegen/PublicKeys/PublicKeysClient.js +128 -0
- package/codegen/PublicKeys/index.d.ts +3 -0
- package/codegen/PublicKeys/index.js +19 -0
- package/codegen/PublicKeys/types.d.ts +51 -0
- package/codegen/PublicKeys/types.js +2 -0
- package/codegen/Signers/DelegatedSignersClient.d.ts +7 -0
- package/codegen/Signers/DelegatedSignersClient.js +22 -0
- package/codegen/Signers/SignersClient.d.ts +7 -0
- package/codegen/Signers/SignersClient.js +22 -0
- package/codegen/Signers/index.d.ts +3 -0
- package/codegen/Signers/index.js +19 -0
- package/codegen/Signers/types.d.ts +2 -0
- package/codegen/Signers/types.js +2 -0
- package/codegen/Wallets/DelegatedWalletsClient.d.ts +32 -0
- package/codegen/Wallets/DelegatedWalletsClient.js +325 -0
- package/codegen/Wallets/WalletsClient.d.ts +24 -0
- package/codegen/Wallets/WalletsClient.js +219 -0
- package/codegen/Wallets/index.d.ts +3 -0
- package/codegen/Wallets/index.js +19 -0
- package/codegen/Wallets/types.d.ts +101 -0
- package/codegen/Wallets/types.js +2 -0
- package/codegen/datamodel/ApiKeys/errors.d.ts +6 -0
- package/codegen/datamodel/ApiKeys/errors.js +15 -0
- package/codegen/datamodel/ApiKeys/index.d.ts +3 -0
- package/codegen/datamodel/ApiKeys/index.js +19 -0
- package/codegen/datamodel/ApiKeys/responses.d.ts +25 -0
- package/codegen/datamodel/ApiKeys/responses.js +2 -0
- package/codegen/datamodel/ApiKeys/types.d.ts +32 -0
- package/codegen/datamodel/ApiKeys/types.js +11 -0
- package/codegen/datamodel/Assets/errors.d.ts +11 -0
- package/codegen/datamodel/Assets/errors.js +17 -0
- package/codegen/datamodel/Assets/index.d.ts +3 -0
- package/codegen/datamodel/Assets/index.js +19 -0
- package/codegen/datamodel/Assets/responses.d.ts +47 -0
- package/codegen/datamodel/Assets/responses.js +2 -0
- package/codegen/datamodel/Assets/types.d.ts +225 -0
- package/codegen/datamodel/Assets/types.js +75 -0
- package/codegen/datamodel/Auth/errors.js +1 -0
- package/codegen/datamodel/Auth/index.d.ts +2 -0
- package/codegen/datamodel/Auth/index.js +18 -0
- package/codegen/datamodel/Auth/responses.d.ts +358 -0
- package/codegen/datamodel/Auth/responses.js +2 -0
- package/codegen/datamodel/Auth/types.d.ts +615 -0
- package/codegen/datamodel/Auth/types.js +127 -0
- package/codegen/datamodel/BlockchainIndexing/errors.js +1 -0
- package/codegen/datamodel/BlockchainIndexing/index.d.ts +1 -0
- package/codegen/datamodel/BlockchainIndexing/index.js +17 -0
- package/codegen/datamodel/BlockchainIndexing/{responses.ts → responses.d.ts} +5 -10
- package/codegen/datamodel/BlockchainIndexing/responses.js +2 -0
- package/codegen/datamodel/BlockchainIndexing/types.js +1 -0
- package/codegen/datamodel/Blockchains/errors.js +1 -0
- package/codegen/datamodel/Blockchains/index.d.ts +2 -0
- package/codegen/datamodel/Blockchains/index.js +18 -0
- package/codegen/datamodel/Blockchains/responses.d.ts +12 -0
- package/codegen/datamodel/Blockchains/responses.js +2 -0
- package/codegen/datamodel/Blockchains/types.d.ts +270 -0
- package/codegen/datamodel/Blockchains/types.js +53 -0
- package/codegen/datamodel/Callbacks/errors.js +1 -0
- package/codegen/datamodel/Callbacks/index.d.ts +2 -0
- package/codegen/datamodel/Callbacks/index.js +18 -0
- package/codegen/datamodel/Callbacks/responses.d.ts +36 -0
- package/codegen/datamodel/Callbacks/responses.js +2 -0
- package/codegen/datamodel/Callbacks/types.d.ts +43 -0
- package/codegen/datamodel/Callbacks/types.js +39 -0
- package/codegen/datamodel/Foundations/errors.d.ts +131 -0
- package/codegen/datamodel/Foundations/errors.js +182 -0
- package/codegen/datamodel/Foundations/index.d.ts +2 -0
- package/codegen/datamodel/Foundations/index.js +18 -0
- package/codegen/datamodel/Foundations/responses.js +1 -0
- package/codegen/datamodel/Foundations/types.d.ts +9759 -0
- package/codegen/datamodel/Foundations/types.js +57755 -0
- package/codegen/datamodel/Orgs/errors.js +1 -0
- package/codegen/datamodel/Orgs/index.d.ts +2 -0
- package/codegen/datamodel/Orgs/index.js +18 -0
- package/codegen/datamodel/Orgs/responses.d.ts +45 -0
- package/codegen/datamodel/Orgs/responses.js +2 -0
- package/codegen/datamodel/Orgs/types.d.ts +240 -0
- package/codegen/datamodel/Orgs/types.js +39 -0
- package/codegen/datamodel/Permissions/errors.js +1 -0
- package/codegen/datamodel/Permissions/index.d.ts +2 -0
- package/codegen/datamodel/Permissions/index.js +18 -0
- package/codegen/datamodel/Permissions/responses.d.ts +75 -0
- package/codegen/datamodel/Permissions/responses.js +2 -0
- package/codegen/datamodel/Permissions/types.d.ts +93 -0
- package/codegen/datamodel/Permissions/types.js +43 -0
- package/codegen/datamodel/PolicyExecution/errors.d.ts +11 -0
- package/codegen/datamodel/PolicyExecution/errors.js +17 -0
- package/codegen/datamodel/PolicyExecution/index.d.ts +3 -0
- package/codegen/datamodel/PolicyExecution/index.js +19 -0
- package/codegen/datamodel/PolicyExecution/responses.d.ts +19 -0
- package/codegen/datamodel/PolicyExecution/responses.js +2 -0
- package/codegen/datamodel/PolicyExecution/types.d.ts +60 -0
- package/codegen/datamodel/PolicyExecution/types.js +17 -0
- package/codegen/datamodel/PolicyManagement/errors.js +1 -0
- package/codegen/datamodel/PolicyManagement/index.d.ts +2 -0
- package/codegen/datamodel/PolicyManagement/index.js +18 -0
- package/codegen/datamodel/PolicyManagement/responses.d.ts +83 -0
- package/codegen/datamodel/PolicyManagement/responses.js +2 -0
- package/codegen/datamodel/PolicyManagement/types.d.ts +391 -0
- package/codegen/datamodel/PolicyManagement/types.js +95 -0
- package/codegen/datamodel/PublicKeys/errors.js +1 -0
- package/codegen/datamodel/PublicKeys/index.d.ts +2 -0
- package/codegen/datamodel/PublicKeys/index.js +18 -0
- package/codegen/datamodel/PublicKeys/responses.d.ts +56 -0
- package/codegen/datamodel/PublicKeys/responses.js +2 -0
- package/codegen/datamodel/PublicKeys/types.d.ts +223 -0
- package/codegen/datamodel/PublicKeys/types.js +59 -0
- package/codegen/datamodel/Signers/errors.js +1 -0
- package/codegen/datamodel/Signers/index.d.ts +2 -0
- package/codegen/datamodel/Signers/index.js +18 -0
- package/codegen/datamodel/Signers/responses.d.ts +27 -0
- package/codegen/datamodel/Signers/responses.js +2 -0
- package/codegen/datamodel/Signers/types.d.ts +21 -0
- package/codegen/datamodel/Signers/types.js +2 -0
- package/codegen/datamodel/Wallets/errors.js +1 -0
- package/codegen/datamodel/Wallets/index.d.ts +2 -0
- package/codegen/datamodel/Wallets/index.js +18 -0
- package/codegen/datamodel/Wallets/responses.d.ts +92 -0
- package/codegen/datamodel/Wallets/responses.js +2 -0
- package/codegen/datamodel/Wallets/types.d.ts +677 -0
- package/codegen/datamodel/Wallets/types.js +251 -0
- package/dfnsApiClient.d.ts +39 -0
- package/dfnsApiClient.js +63 -0
- package/dfnsAuthenticator.d.ts +17 -0
- package/dfnsAuthenticator.js +29 -0
- package/dfnsDelegatedApiClient.d.ts +38 -0
- package/dfnsDelegatedApiClient.js +63 -0
- package/dfnsError.d.ts +5 -0
- package/dfnsError.js +11 -0
- package/generated/policies/client.d.ts +13 -0
- package/generated/policies/client.js +92 -0
- package/generated/policies/delegatedClient.d.ts +18 -0
- package/generated/policies/delegatedClient.js +153 -0
- package/generated/policies/index.d.ts +3 -0
- package/generated/policies/index.js +19 -0
- package/generated/policies/{types.ts → types.d.ts} +17 -29
- package/generated/policies/types.js +2 -0
- package/generated/signers/client.d.ts +7 -0
- package/generated/signers/client.js +22 -0
- package/generated/signers/delegatedClient.d.ts +7 -0
- package/generated/signers/delegatedClient.js +22 -0
- package/generated/signers/index.d.ts +3 -0
- package/generated/signers/index.js +19 -0
- package/generated/signers/{types.ts → types.d.ts} +0 -1
- package/generated/signers/types.js +2 -0
- package/generated/wallets/client.d.ts +25 -0
- package/generated/wallets/client.js +228 -0
- package/generated/wallets/delegatedClient.d.ts +34 -0
- package/generated/wallets/delegatedClient.js +349 -0
- package/generated/wallets/index.d.ts +3 -0
- package/generated/wallets/index.js +19 -0
- package/generated/wallets/{types.ts → types.d.ts} +45 -86
- package/generated/wallets/types.js +2 -0
- package/generated/webhooks/client.d.ts +14 -0
- package/generated/webhooks/client.js +103 -0
- package/generated/webhooks/delegatedClient.d.ts +19 -0
- package/generated/webhooks/delegatedClient.js +164 -0
- package/generated/webhooks/index.d.ts +3 -0
- package/generated/webhooks/index.js +19 -0
- package/generated/webhooks/{types.ts → types.d.ts} +16 -34
- package/generated/webhooks/types.js +2 -0
- package/index.d.ts +7 -0
- package/index.js +23 -0
- package/package.json +8 -1
- package/signer.d.ts +52 -0
- package/signer.js +2 -0
- package/store.d.ts +79 -0
- package/store.js +2 -0
- package/types/policies.d.ts +1 -0
- package/types/policies.js +17 -0
- package/types/signers.d.ts +1 -0
- package/types/signers.js +17 -0
- package/types/wallets.d.ts +1 -0
- package/types/wallets.js +17 -0
- package/types/webhooks.d.ts +1 -0
- package/types/webhooks.js +17 -0
- package/utils/base64.d.ts +3 -0
- package/utils/base64.js +20 -0
- package/utils/fetch.d.ts +12 -0
- package/utils/fetch.js +94 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.js +20 -0
- package/utils/nonce.d.ts +1 -0
- package/utils/nonce.js +12 -0
- package/utils/url.d.ts +4 -0
- package/utils/url.js +16 -0
- package/baseAuthApi.ts +0 -236
- package/codegen/Assets/AssetsClient.ts +0 -137
- package/codegen/Assets/DelegatedAssetsClient.ts +0 -201
- package/codegen/Assets/index.ts +0 -3
- package/codegen/Assets/types.ts +0 -45
- package/codegen/Auth/AuthClient.ts +0 -729
- package/codegen/Auth/DelegatedAuthClient.ts +0 -1508
- package/codegen/Auth/index.ts +0 -3
- package/codegen/Auth/types.ts +0 -262
- package/codegen/Blockchains/BlockchainsClient.ts +0 -25
- package/codegen/Blockchains/DelegatedBlockchainsClient.ts +0 -25
- package/codegen/Blockchains/index.ts +0 -3
- package/codegen/Blockchains/types.ts +0 -8
- package/codegen/Callbacks/CallbacksClient.ts +0 -107
- package/codegen/Callbacks/DelegatedCallbacksClient.ts +0 -172
- package/codegen/Callbacks/index.ts +0 -3
- package/codegen/Permissions/DelegatedPermissionsClient.ts +0 -468
- package/codegen/Permissions/PermissionsClient.ts +0 -223
- package/codegen/Permissions/index.ts +0 -3
- package/codegen/Permissions/types.ts +0 -82
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.ts +0 -99
- package/codegen/PolicyExecution/PolicyExecutionClient.ts +0 -63
- package/codegen/PolicyExecution/index.ts +0 -3
- package/codegen/PolicyExecution/types.ts +0 -24
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.ts +0 -384
- package/codegen/PolicyManagement/PolicyManagementClient.ts +0 -205
- package/codegen/PolicyManagement/index.ts +0 -3
- package/codegen/PublicKeys/DelegatedPublicKeysClient.ts +0 -299
- package/codegen/PublicKeys/PublicKeysClient.ts +0 -179
- package/codegen/PublicKeys/index.ts +0 -3
- package/codegen/PublicKeys/types.ts +0 -68
- package/codegen/Signers/DelegatedSignersClient.ts +0 -22
- package/codegen/Signers/SignersClient.ts +0 -22
- package/codegen/Signers/index.ts +0 -3
- package/codegen/Signers/types.ts +0 -3
- package/codegen/Wallets/DelegatedWalletsClient.ts +0 -511
- package/codegen/Wallets/WalletsClient.ts +0 -310
- package/codegen/Wallets/index.ts +0 -3
- package/codegen/Wallets/types.ts +0 -137
- package/codegen/datamodel/ApiKeys/errors.ts +0 -9
- package/codegen/datamodel/ApiKeys/index.ts +0 -3
- package/codegen/datamodel/ApiKeys/responses.ts +0 -68
- package/codegen/datamodel/ApiKeys/types.ts +0 -81
- package/codegen/datamodel/Assets/errors.ts +0 -24
- package/codegen/datamodel/Assets/index.ts +0 -3
- package/codegen/datamodel/Assets/responses.ts +0 -146
- package/codegen/datamodel/Assets/types.ts +0 -417
- package/codegen/datamodel/Auth/index.ts +0 -2
- package/codegen/datamodel/Auth/responses.ts +0 -1110
- package/codegen/datamodel/Auth/types.ts +0 -1404
- package/codegen/datamodel/BlockchainIndexing/index.ts +0 -1
- package/codegen/datamodel/Blockchains/index.ts +0 -2
- package/codegen/datamodel/Blockchains/responses.ts +0 -41
- package/codegen/datamodel/Blockchains/types.ts +0 -695
- package/codegen/datamodel/Callbacks/index.ts +0 -2
- package/codegen/datamodel/Callbacks/responses.ts +0 -110
- package/codegen/datamodel/Callbacks/types.ts +0 -100
- package/codegen/datamodel/Foundations/errors.ts +0 -299
- package/codegen/datamodel/Foundations/index.ts +0 -2
- package/codegen/datamodel/Foundations/types.ts +0 -57921
- package/codegen/datamodel/Orgs/index.ts +0 -2
- package/codegen/datamodel/Orgs/responses.ts +0 -104
- package/codegen/datamodel/Orgs/types.ts +0 -322
- package/codegen/datamodel/Permissions/index.ts +0 -2
- package/codegen/datamodel/Permissions/responses.ts +0 -258
- package/codegen/datamodel/Permissions/types.ts +0 -221
- package/codegen/datamodel/PolicyExecution/errors.ts +0 -24
- package/codegen/datamodel/PolicyExecution/index.ts +0 -3
- package/codegen/datamodel/PolicyExecution/responses.ts +0 -59
- package/codegen/datamodel/PolicyExecution/types.ts +0 -122
- package/codegen/datamodel/PolicyManagement/index.ts +0 -2
- package/codegen/datamodel/PolicyManagement/responses.ts +0 -255
- package/codegen/datamodel/PolicyManagement/types.ts +0 -711
- package/codegen/datamodel/PublicKeys/index.ts +0 -2
- package/codegen/datamodel/PublicKeys/responses.ts +0 -190
- package/codegen/datamodel/PublicKeys/types.ts +0 -558
- package/codegen/datamodel/Signers/index.ts +0 -2
- package/codegen/datamodel/Signers/responses.ts +0 -64
- package/codegen/datamodel/Signers/types.ts +0 -31
- package/codegen/datamodel/Wallets/errors.ts +0 -0
- package/codegen/datamodel/Wallets/index.ts +0 -2
- package/codegen/datamodel/Wallets/responses.ts +0 -318
- package/codegen/datamodel/Wallets/types.ts +0 -1268
- package/dfnsApiClient.ts +0 -76
- package/dfnsAuthenticator.ts +0 -59
- package/dfnsDelegatedApiClient.ts +0 -75
- package/dfnsError.ts +0 -5
- package/generated/permissions/client.ts +0 -125
- package/generated/permissions/delegatedClient.ts +0 -266
- package/generated/permissions/index.ts +0 -3
- package/generated/permissions/types.ts +0 -202
- package/generated/policies/client.ts +0 -110
- package/generated/policies/delegatedClient.ts +0 -223
- package/generated/policies/index.ts +0 -3
- package/generated/signers/client.ts +0 -22
- package/generated/signers/delegatedClient.ts +0 -23
- package/generated/signers/index.ts +0 -3
- package/generated/wallets/client.ts +0 -282
- package/generated/wallets/delegatedClient.ts +0 -507
- package/generated/wallets/index.ts +0 -3
- package/generated/webhooks/client.ts +0 -124
- package/generated/webhooks/delegatedClient.ts +0 -237
- package/generated/webhooks/index.ts +0 -3
- package/index.ts +0 -7
- package/project.json +0 -14
- package/signer.ts +0 -60
- package/store.ts +0 -99
- package/tsconfig.json +0 -7
- package/typedoc.json +0 -21
- package/types/policies.ts +0 -1
- package/types/signers.ts +0 -1
- package/types/wallets.ts +0 -1
- package/types/webhooks.ts +0 -1
- package/utils/base64.ts +0 -19
- package/utils/fetch.ts +0 -130
- package/utils/index.ts +0 -4
- package/utils/nonce.ts +0 -12
- package/utils/url.ts +0 -19
- /package/{README.md → codegen/datamodel/Auth/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Auth/errors.ts → BlockchainIndexing/errors.d.ts} +0 -0
- /package/codegen/datamodel/BlockchainIndexing/{errors.ts → types.d.ts} +0 -0
- /package/codegen/datamodel/{BlockchainIndexing/types.ts → Blockchains/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Blockchains/errors.ts → Callbacks/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Callbacks/errors.ts → Foundations/responses.d.ts} +0 -0
- /package/codegen/datamodel/{Foundations/responses.ts → Orgs/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Orgs/errors.ts → Permissions/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Permissions/errors.ts → PolicyManagement/errors.d.ts} +0 -0
- /package/codegen/datamodel/{PolicyManagement/errors.ts → PublicKeys/errors.d.ts} +0 -0
- /package/codegen/datamodel/{PublicKeys/errors.ts → Signers/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Signers/errors.ts → Wallets/errors.d.ts} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedPoliciesClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedPoliciesClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async archivePolicyInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
13
|
+
path: request ?? {},
|
|
14
|
+
query: {},
|
|
15
|
+
});
|
|
16
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
17
|
+
userActionHttpMethod: 'DELETE',
|
|
18
|
+
userActionHttpPath: path,
|
|
19
|
+
userActionPayload: JSON.stringify({}),
|
|
20
|
+
userActionServerKind: 'Api',
|
|
21
|
+
}, this.apiOptions);
|
|
22
|
+
return challenge;
|
|
23
|
+
}
|
|
24
|
+
async archivePolicyComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
26
|
+
path: request ?? {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
30
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
31
|
+
method: 'DELETE',
|
|
32
|
+
body: {},
|
|
33
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
34
|
+
apiOptions: this.apiOptions,
|
|
35
|
+
});
|
|
36
|
+
return response.json();
|
|
37
|
+
}
|
|
38
|
+
async createApprovalDecisionInit(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals/:approvalId/decisions', {
|
|
40
|
+
path: request ?? {},
|
|
41
|
+
query: {},
|
|
42
|
+
});
|
|
43
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
44
|
+
userActionHttpMethod: 'POST',
|
|
45
|
+
userActionHttpPath: path,
|
|
46
|
+
userActionPayload: JSON.stringify(request.body),
|
|
47
|
+
userActionServerKind: 'Api',
|
|
48
|
+
}, this.apiOptions);
|
|
49
|
+
return challenge;
|
|
50
|
+
}
|
|
51
|
+
async createApprovalDecisionComplete(request, signedChallenge) {
|
|
52
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals/:approvalId/decisions', {
|
|
53
|
+
path: request ?? {},
|
|
54
|
+
query: {},
|
|
55
|
+
});
|
|
56
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
57
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
body: request.body,
|
|
60
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
61
|
+
apiOptions: this.apiOptions,
|
|
62
|
+
});
|
|
63
|
+
return response.json();
|
|
64
|
+
}
|
|
65
|
+
async createPolicyInit(request) {
|
|
66
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies', {
|
|
67
|
+
path: request ?? {},
|
|
68
|
+
query: {},
|
|
69
|
+
});
|
|
70
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
71
|
+
userActionHttpMethod: 'POST',
|
|
72
|
+
userActionHttpPath: path,
|
|
73
|
+
userActionPayload: JSON.stringify(request.body),
|
|
74
|
+
userActionServerKind: 'Api',
|
|
75
|
+
}, this.apiOptions);
|
|
76
|
+
return challenge;
|
|
77
|
+
}
|
|
78
|
+
async createPolicyComplete(request, signedChallenge) {
|
|
79
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies', {
|
|
80
|
+
path: request ?? {},
|
|
81
|
+
query: {},
|
|
82
|
+
});
|
|
83
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
84
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
body: request.body,
|
|
87
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
88
|
+
apiOptions: this.apiOptions,
|
|
89
|
+
});
|
|
90
|
+
return response.json();
|
|
91
|
+
}
|
|
92
|
+
async getPolicy(request) {
|
|
93
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
94
|
+
path: request ?? {},
|
|
95
|
+
query: {},
|
|
96
|
+
});
|
|
97
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
98
|
+
method: 'GET',
|
|
99
|
+
apiOptions: this.apiOptions,
|
|
100
|
+
});
|
|
101
|
+
return response.json();
|
|
102
|
+
}
|
|
103
|
+
async listApprovals(request) {
|
|
104
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals', {
|
|
105
|
+
path: request ?? {},
|
|
106
|
+
query: request?.query ?? {},
|
|
107
|
+
});
|
|
108
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
109
|
+
method: 'GET',
|
|
110
|
+
apiOptions: this.apiOptions,
|
|
111
|
+
});
|
|
112
|
+
return response.json();
|
|
113
|
+
}
|
|
114
|
+
async listPolicies(request) {
|
|
115
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies', {
|
|
116
|
+
path: request ?? {},
|
|
117
|
+
query: request?.query ?? {},
|
|
118
|
+
});
|
|
119
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
120
|
+
method: 'GET',
|
|
121
|
+
apiOptions: this.apiOptions,
|
|
122
|
+
});
|
|
123
|
+
return response.json();
|
|
124
|
+
}
|
|
125
|
+
async updatePolicyInit(request) {
|
|
126
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
127
|
+
path: request ?? {},
|
|
128
|
+
query: {},
|
|
129
|
+
});
|
|
130
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
131
|
+
userActionHttpMethod: 'PUT',
|
|
132
|
+
userActionHttpPath: path,
|
|
133
|
+
userActionPayload: JSON.stringify(request.body),
|
|
134
|
+
userActionServerKind: 'Api',
|
|
135
|
+
}, this.apiOptions);
|
|
136
|
+
return challenge;
|
|
137
|
+
}
|
|
138
|
+
async updatePolicyComplete(request, signedChallenge) {
|
|
139
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
140
|
+
path: request ?? {},
|
|
141
|
+
query: {},
|
|
142
|
+
});
|
|
143
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
144
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
145
|
+
method: 'PUT',
|
|
146
|
+
body: request.body,
|
|
147
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
148
|
+
apiOptions: this.apiOptions,
|
|
149
|
+
});
|
|
150
|
+
return response.json();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
exports.DelegatedPoliciesClient = DelegatedPoliciesClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
19
|
+
__exportStar(require("./delegatedClient"), exports);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export type ArchivePolicyParams = {
|
|
2
2
|
policyId: string;
|
|
3
3
|
};
|
|
4
|
-
|
|
5
4
|
export type ArchivePolicyResponse = {
|
|
6
5
|
id: string;
|
|
7
6
|
orgId: string;
|
|
@@ -20,14 +19,11 @@ export type ArchivePolicyResponse = {
|
|
|
20
19
|
dateCreated: Date;
|
|
21
20
|
dateResolved: Date;
|
|
22
21
|
};
|
|
23
|
-
|
|
24
|
-
export type ArchivePolicyRequest = ArchivePolicyParams
|
|
25
|
-
|
|
22
|
+
export type ArchivePolicyRequest = ArchivePolicyParams;
|
|
26
23
|
export type CreateApprovalDecisionBody = {
|
|
27
24
|
value: "Approved" | "Denied";
|
|
28
25
|
reason?: string | undefined;
|
|
29
26
|
};
|
|
30
|
-
|
|
31
27
|
export type CreateApprovalDecisionResponse = {
|
|
32
28
|
id: string;
|
|
33
29
|
orgId: string;
|
|
@@ -54,9 +50,9 @@ export type CreateApprovalDecisionResponse = {
|
|
|
54
50
|
value: "Approved" | "Denied";
|
|
55
51
|
}[];
|
|
56
52
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
export type CreateApprovalDecisionRequest = {
|
|
54
|
+
body: CreateApprovalDecisionBody;
|
|
55
|
+
};
|
|
60
56
|
export type CreatePolicyBody = {
|
|
61
57
|
name: string;
|
|
62
58
|
approvalGroups: {
|
|
@@ -152,7 +148,6 @@ export type CreatePolicyBody = {
|
|
|
152
148
|
};
|
|
153
149
|
} | undefined;
|
|
154
150
|
};
|
|
155
|
-
|
|
156
151
|
export type CreatePolicyResponse = {
|
|
157
152
|
id: string;
|
|
158
153
|
orgId: string;
|
|
@@ -171,13 +166,12 @@ export type CreatePolicyResponse = {
|
|
|
171
166
|
dateCreated: Date;
|
|
172
167
|
dateResolved: Date;
|
|
173
168
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
169
|
+
export type CreatePolicyRequest = {
|
|
170
|
+
body: CreatePolicyBody;
|
|
171
|
+
};
|
|
177
172
|
export type GetPolicyParams = {
|
|
178
173
|
policyId: string;
|
|
179
174
|
};
|
|
180
|
-
|
|
181
175
|
export type GetPolicyResponse = ({
|
|
182
176
|
name: string;
|
|
183
177
|
approvalGroups: {
|
|
@@ -278,9 +272,7 @@ export type GetPolicyResponse = ({
|
|
|
278
272
|
dateCreated?: string | undefined;
|
|
279
273
|
dateUpdated?: string | undefined;
|
|
280
274
|
};
|
|
281
|
-
|
|
282
|
-
export type GetPolicyRequest = GetPolicyParams
|
|
283
|
-
|
|
275
|
+
export type GetPolicyRequest = GetPolicyParams;
|
|
284
276
|
export type ListApprovalsQuery = {
|
|
285
277
|
limit?: string | undefined;
|
|
286
278
|
paginationToken?: string | undefined;
|
|
@@ -289,7 +281,6 @@ export type ListApprovalsQuery = {
|
|
|
289
281
|
initiatorId?: string | undefined;
|
|
290
282
|
approverId?: string | undefined;
|
|
291
283
|
};
|
|
292
|
-
|
|
293
284
|
export type ListApprovalsResponse = {
|
|
294
285
|
items: {
|
|
295
286
|
id: string;
|
|
@@ -319,14 +310,13 @@ export type ListApprovalsResponse = {
|
|
|
319
310
|
}[];
|
|
320
311
|
nextPageToken?: string | undefined;
|
|
321
312
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
313
|
+
export type ListApprovalsRequest = {
|
|
314
|
+
query?: ListApprovalsQuery;
|
|
315
|
+
};
|
|
325
316
|
export type ListPoliciesQuery = {
|
|
326
317
|
limit?: string | undefined;
|
|
327
318
|
paginationToken?: string | undefined;
|
|
328
319
|
};
|
|
329
|
-
|
|
330
320
|
export type ListPoliciesResponse = {
|
|
331
321
|
items: (({
|
|
332
322
|
name: string;
|
|
@@ -430,9 +420,9 @@ export type ListPoliciesResponse = {
|
|
|
430
420
|
})[];
|
|
431
421
|
nextPageToken?: string | undefined;
|
|
432
422
|
};
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
423
|
+
export type ListPoliciesRequest = {
|
|
424
|
+
query?: ListPoliciesQuery;
|
|
425
|
+
};
|
|
436
426
|
export type UpdatePolicyBody = {
|
|
437
427
|
name: string;
|
|
438
428
|
approvalGroups: {
|
|
@@ -528,11 +518,9 @@ export type UpdatePolicyBody = {
|
|
|
528
518
|
};
|
|
529
519
|
} | undefined;
|
|
530
520
|
};
|
|
531
|
-
|
|
532
521
|
export type UpdatePolicyParams = {
|
|
533
522
|
policyId: string;
|
|
534
523
|
};
|
|
535
|
-
|
|
536
524
|
export type UpdatePolicyResponse = {
|
|
537
525
|
id: string;
|
|
538
526
|
orgId: string;
|
|
@@ -551,6 +539,6 @@ export type UpdatePolicyResponse = {
|
|
|
551
539
|
dateCreated: Date;
|
|
552
540
|
dateResolved: Date;
|
|
553
541
|
};
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
542
|
+
export type UpdatePolicyRequest = UpdatePolicyParams & {
|
|
543
|
+
body: UpdatePolicyBody;
|
|
544
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SignersClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class SignersClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async listSigners() {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/signers', {
|
|
12
|
+
path: {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
apiOptions: this.apiOptions,
|
|
18
|
+
});
|
|
19
|
+
return response.json();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.SignersClient = SignersClient;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class DelegatedSignersClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
6
|
+
listSigners(): Promise<T.ListSignersResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedSignersClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class DelegatedSignersClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async listSigners() {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/signers', {
|
|
12
|
+
path: {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
apiOptions: this.apiOptions,
|
|
18
|
+
});
|
|
19
|
+
return response.json();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.DelegatedSignersClient = DelegatedSignersClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
19
|
+
__exportStar(require("./delegatedClient"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class WalletsClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
broadcastTransaction(request: T.BroadcastTransactionRequest): Promise<T.BroadcastTransactionResponse>;
|
|
7
|
+
createWallet(request: T.CreateWalletRequest): Promise<T.CreateWalletResponse>;
|
|
8
|
+
delegateWallet(request: T.DelegateWalletRequest): Promise<T.DelegateWalletResponse>;
|
|
9
|
+
exportWallet(request: T.ExportWalletRequest): Promise<T.ExportWalletResponse>;
|
|
10
|
+
generateSignature(request: T.GenerateSignatureRequest): Promise<T.GenerateSignatureResponse>;
|
|
11
|
+
getSignature(request: T.GetSignatureRequest): Promise<T.GetSignatureResponse>;
|
|
12
|
+
getTransaction(request: T.GetTransactionRequest): Promise<T.GetTransactionResponse>;
|
|
13
|
+
getTransfer(request: T.GetTransferRequest): Promise<T.GetTransferResponse>;
|
|
14
|
+
getWallet(request: T.GetWalletRequest): Promise<T.GetWalletResponse>;
|
|
15
|
+
getWalletAssets(request: T.GetWalletAssetsRequest): Promise<T.GetWalletAssetsResponse>;
|
|
16
|
+
getWalletHistory(request: T.GetWalletHistoryRequest): Promise<T.GetWalletHistoryResponse>;
|
|
17
|
+
getWalletNfts(request: T.GetWalletNftsRequest): Promise<T.GetWalletNftsResponse>;
|
|
18
|
+
importWallet(request: T.ImportWalletRequest): Promise<T.ImportWalletResponse>;
|
|
19
|
+
listSignatures(request: T.ListSignaturesRequest): Promise<T.ListSignaturesResponse>;
|
|
20
|
+
listTransactions(request: T.ListTransactionsRequest): Promise<T.ListTransactionsResponse>;
|
|
21
|
+
listTransfers(request: T.ListTransfersRequest): Promise<T.ListTransfersResponse>;
|
|
22
|
+
listWallets(request?: T.ListWalletsRequest): Promise<T.ListWalletsResponse>;
|
|
23
|
+
transferAsset(request: T.TransferAssetRequest): Promise<T.TransferAssetResponse>;
|
|
24
|
+
updateWallet(request: T.UpdateWalletRequest): Promise<T.UpdateWalletResponse>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletsClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class WalletsClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async broadcastTransaction(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
12
|
+
path: request ?? {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: request.body,
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async createWallet(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
24
|
+
path: request ?? {},
|
|
25
|
+
query: {},
|
|
26
|
+
});
|
|
27
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
body: request.body,
|
|
30
|
+
apiOptions: this.apiOptions,
|
|
31
|
+
});
|
|
32
|
+
return response.json();
|
|
33
|
+
}
|
|
34
|
+
async delegateWallet(request) {
|
|
35
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/delegate', {
|
|
36
|
+
path: request ?? {},
|
|
37
|
+
query: {},
|
|
38
|
+
});
|
|
39
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
body: request.body,
|
|
42
|
+
apiOptions: this.apiOptions,
|
|
43
|
+
});
|
|
44
|
+
return response.json();
|
|
45
|
+
}
|
|
46
|
+
async exportWallet(request) {
|
|
47
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/export', {
|
|
48
|
+
path: request ?? {},
|
|
49
|
+
query: {},
|
|
50
|
+
});
|
|
51
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
body: request.body,
|
|
54
|
+
apiOptions: this.apiOptions,
|
|
55
|
+
});
|
|
56
|
+
return response.json();
|
|
57
|
+
}
|
|
58
|
+
async generateSignature(request) {
|
|
59
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
60
|
+
path: request ?? {},
|
|
61
|
+
query: {},
|
|
62
|
+
});
|
|
63
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
body: request.body,
|
|
66
|
+
apiOptions: this.apiOptions,
|
|
67
|
+
});
|
|
68
|
+
return response.json();
|
|
69
|
+
}
|
|
70
|
+
async getSignature(request) {
|
|
71
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures/:signatureId', {
|
|
72
|
+
path: request ?? {},
|
|
73
|
+
query: {},
|
|
74
|
+
});
|
|
75
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
76
|
+
method: 'GET',
|
|
77
|
+
apiOptions: this.apiOptions,
|
|
78
|
+
});
|
|
79
|
+
return response.json();
|
|
80
|
+
}
|
|
81
|
+
async getTransaction(request) {
|
|
82
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions/:transactionId', {
|
|
83
|
+
path: request ?? {},
|
|
84
|
+
query: {},
|
|
85
|
+
});
|
|
86
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
87
|
+
method: 'GET',
|
|
88
|
+
apiOptions: this.apiOptions,
|
|
89
|
+
});
|
|
90
|
+
return response.json();
|
|
91
|
+
}
|
|
92
|
+
async getTransfer(request) {
|
|
93
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers/:transferId', {
|
|
94
|
+
path: request ?? {},
|
|
95
|
+
query: {},
|
|
96
|
+
});
|
|
97
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
98
|
+
method: 'GET',
|
|
99
|
+
apiOptions: this.apiOptions,
|
|
100
|
+
});
|
|
101
|
+
return response.json();
|
|
102
|
+
}
|
|
103
|
+
async getWallet(request) {
|
|
104
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId', {
|
|
105
|
+
path: request ?? {},
|
|
106
|
+
query: {},
|
|
107
|
+
});
|
|
108
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
109
|
+
method: 'GET',
|
|
110
|
+
apiOptions: this.apiOptions,
|
|
111
|
+
});
|
|
112
|
+
return response.json();
|
|
113
|
+
}
|
|
114
|
+
async getWalletAssets(request) {
|
|
115
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/assets', {
|
|
116
|
+
path: request ?? {},
|
|
117
|
+
query: {},
|
|
118
|
+
});
|
|
119
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
120
|
+
method: 'GET',
|
|
121
|
+
apiOptions: this.apiOptions,
|
|
122
|
+
});
|
|
123
|
+
return response.json();
|
|
124
|
+
}
|
|
125
|
+
async getWalletHistory(request) {
|
|
126
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/history', {
|
|
127
|
+
path: request ?? {},
|
|
128
|
+
query: request.query ?? {},
|
|
129
|
+
});
|
|
130
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
131
|
+
method: 'GET',
|
|
132
|
+
apiOptions: this.apiOptions,
|
|
133
|
+
});
|
|
134
|
+
return response.json();
|
|
135
|
+
}
|
|
136
|
+
async getWalletNfts(request) {
|
|
137
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/nfts', {
|
|
138
|
+
path: request ?? {},
|
|
139
|
+
query: {},
|
|
140
|
+
});
|
|
141
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
142
|
+
method: 'GET',
|
|
143
|
+
apiOptions: this.apiOptions,
|
|
144
|
+
});
|
|
145
|
+
return response.json();
|
|
146
|
+
}
|
|
147
|
+
async importWallet(request) {
|
|
148
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/import', {
|
|
149
|
+
path: request ?? {},
|
|
150
|
+
query: {},
|
|
151
|
+
});
|
|
152
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
153
|
+
method: 'POST',
|
|
154
|
+
body: request.body,
|
|
155
|
+
apiOptions: this.apiOptions,
|
|
156
|
+
});
|
|
157
|
+
return response.json();
|
|
158
|
+
}
|
|
159
|
+
async listSignatures(request) {
|
|
160
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
161
|
+
path: request ?? {},
|
|
162
|
+
query: request.query ?? {},
|
|
163
|
+
});
|
|
164
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
165
|
+
method: 'GET',
|
|
166
|
+
apiOptions: this.apiOptions,
|
|
167
|
+
});
|
|
168
|
+
return response.json();
|
|
169
|
+
}
|
|
170
|
+
async listTransactions(request) {
|
|
171
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
172
|
+
path: request ?? {},
|
|
173
|
+
query: request.query ?? {},
|
|
174
|
+
});
|
|
175
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
176
|
+
method: 'GET',
|
|
177
|
+
apiOptions: this.apiOptions,
|
|
178
|
+
});
|
|
179
|
+
return response.json();
|
|
180
|
+
}
|
|
181
|
+
async listTransfers(request) {
|
|
182
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
183
|
+
path: request ?? {},
|
|
184
|
+
query: request.query ?? {},
|
|
185
|
+
});
|
|
186
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
187
|
+
method: 'GET',
|
|
188
|
+
apiOptions: this.apiOptions,
|
|
189
|
+
});
|
|
190
|
+
return response.json();
|
|
191
|
+
}
|
|
192
|
+
async listWallets(request) {
|
|
193
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
194
|
+
path: request ?? {},
|
|
195
|
+
query: request?.query ?? {},
|
|
196
|
+
});
|
|
197
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
198
|
+
method: 'GET',
|
|
199
|
+
apiOptions: this.apiOptions,
|
|
200
|
+
});
|
|
201
|
+
return response.json();
|
|
202
|
+
}
|
|
203
|
+
async transferAsset(request) {
|
|
204
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
205
|
+
path: request ?? {},
|
|
206
|
+
query: {},
|
|
207
|
+
});
|
|
208
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
209
|
+
method: 'POST',
|
|
210
|
+
body: request.body,
|
|
211
|
+
apiOptions: this.apiOptions,
|
|
212
|
+
});
|
|
213
|
+
return response.json();
|
|
214
|
+
}
|
|
215
|
+
async updateWallet(request) {
|
|
216
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId', {
|
|
217
|
+
path: request ?? {},
|
|
218
|
+
query: {},
|
|
219
|
+
});
|
|
220
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
221
|
+
method: 'PUT',
|
|
222
|
+
body: request.body,
|
|
223
|
+
apiOptions: this.apiOptions,
|
|
224
|
+
});
|
|
225
|
+
return response.json();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
exports.WalletsClient = WalletsClient;
|