@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,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlockchainNetwork = exports.SignatureStatus = exports.TransactionStatus = exports.TransferStatus = exports.TransferDirection = exports.EventKind = exports.BalanceKind = exports.KeyProtocol = exports.KeyCurve = exports.KeyScheme = exports.WalletStatus = exports.SignatureKind = exports.TransactionKind = exports.TransferKind = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
6
|
+
*/
|
|
7
|
+
var TransferKind;
|
|
8
|
+
(function (TransferKind) {
|
|
9
|
+
// FIXME: Missing documentation for Native
|
|
10
|
+
TransferKind["Native"] = "Native";
|
|
11
|
+
// FIXME: Missing documentation for Erc20
|
|
12
|
+
TransferKind["Erc20"] = "Erc20";
|
|
13
|
+
// FIXME: Missing documentation for Erc721
|
|
14
|
+
TransferKind["Erc721"] = "Erc721";
|
|
15
|
+
// FIXME: Missing documentation for Trc10
|
|
16
|
+
TransferKind["Trc10"] = "Trc10";
|
|
17
|
+
// FIXME: Missing documentation for Trc20
|
|
18
|
+
TransferKind["Trc20"] = "Trc20";
|
|
19
|
+
// FIXME: Missing documentation for Trc721
|
|
20
|
+
TransferKind["Trc721"] = "Trc721";
|
|
21
|
+
})(TransferKind || (exports.TransferKind = TransferKind = {}));
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
24
|
+
*/
|
|
25
|
+
var TransactionKind;
|
|
26
|
+
(function (TransactionKind) {
|
|
27
|
+
// FIXME: Missing documentation for Transaction
|
|
28
|
+
TransactionKind["Transaction"] = "Transaction";
|
|
29
|
+
// FIXME: Missing documentation for Evm
|
|
30
|
+
TransactionKind["Evm"] = "Evm";
|
|
31
|
+
// FIXME: Missing documentation for Eip1559
|
|
32
|
+
TransactionKind["Eip1559"] = "Eip1559";
|
|
33
|
+
// FIXME: Missing documentation for EvmLegacy
|
|
34
|
+
TransactionKind["EvmLegacy"] = "EvmLegacy";
|
|
35
|
+
// FIXME: Missing documentation for Psbt
|
|
36
|
+
TransactionKind["Psbt"] = "Psbt";
|
|
37
|
+
})(TransactionKind || (exports.TransactionKind = TransactionKind = {}));
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
40
|
+
*/
|
|
41
|
+
var SignatureKind;
|
|
42
|
+
(function (SignatureKind) {
|
|
43
|
+
// FIXME: Missing documentation for Hash
|
|
44
|
+
SignatureKind["Hash"] = "Hash";
|
|
45
|
+
// FIXME: Missing documentation for Message
|
|
46
|
+
SignatureKind["Message"] = "Message";
|
|
47
|
+
// FIXME: Missing documentation for Transaction
|
|
48
|
+
SignatureKind["Transaction"] = "Transaction";
|
|
49
|
+
// FIXME: Missing documentation for Eip712
|
|
50
|
+
SignatureKind["Eip712"] = "Eip712";
|
|
51
|
+
// FIXME: Missing documentation for Psbt
|
|
52
|
+
SignatureKind["Psbt"] = "Psbt";
|
|
53
|
+
})(SignatureKind || (exports.SignatureKind = SignatureKind = {}));
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
56
|
+
*/
|
|
57
|
+
var WalletStatus;
|
|
58
|
+
(function (WalletStatus) {
|
|
59
|
+
// FIXME: Missing documentation for Active
|
|
60
|
+
WalletStatus["Active"] = "Active";
|
|
61
|
+
// FIXME: Missing documentation for Archived
|
|
62
|
+
WalletStatus["Archived"] = "Archived";
|
|
63
|
+
})(WalletStatus || (exports.WalletStatus = WalletStatus = {}));
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
66
|
+
*/
|
|
67
|
+
var KeyScheme;
|
|
68
|
+
(function (KeyScheme) {
|
|
69
|
+
// FIXME: Missing documentation for ECDSA
|
|
70
|
+
KeyScheme["ECDSA"] = "ECDSA";
|
|
71
|
+
// FIXME: Missing documentation for EdDSA
|
|
72
|
+
KeyScheme["EdDSA"] = "EdDSA";
|
|
73
|
+
})(KeyScheme || (exports.KeyScheme = KeyScheme = {}));
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
76
|
+
*/
|
|
77
|
+
var KeyCurve;
|
|
78
|
+
(function (KeyCurve) {
|
|
79
|
+
// FIXME: Missing documentation for ed25519
|
|
80
|
+
KeyCurve["ed25519"] = "ed25519";
|
|
81
|
+
// FIXME: Missing documentation for secp256k1
|
|
82
|
+
KeyCurve["secp256k1"] = "secp256k1";
|
|
83
|
+
// FIXME: Missing documentation for stark
|
|
84
|
+
KeyCurve["stark"] = "stark";
|
|
85
|
+
})(KeyCurve || (exports.KeyCurve = KeyCurve = {}));
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
88
|
+
*/
|
|
89
|
+
var KeyProtocol;
|
|
90
|
+
(function (KeyProtocol) {
|
|
91
|
+
// FIXME: Missing documentation for CGGMP21
|
|
92
|
+
KeyProtocol["CGGMP21"] = "CGGMP21";
|
|
93
|
+
// FIXME: Missing documentation for BINANCE_EDDSA
|
|
94
|
+
KeyProtocol["BINANCE_EDDSA"] = "BINANCE_EDDSA";
|
|
95
|
+
})(KeyProtocol || (exports.KeyProtocol = KeyProtocol = {}));
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
98
|
+
*/
|
|
99
|
+
var BalanceKind;
|
|
100
|
+
(function (BalanceKind) {
|
|
101
|
+
// FIXME: Missing documentation for Native
|
|
102
|
+
BalanceKind["Native"] = "Native";
|
|
103
|
+
// FIXME: Missing documentation for Erc20
|
|
104
|
+
BalanceKind["Erc20"] = "Erc20";
|
|
105
|
+
// FIXME: Missing documentation for Erc721
|
|
106
|
+
BalanceKind["Erc721"] = "Erc721";
|
|
107
|
+
})(BalanceKind || (exports.BalanceKind = BalanceKind = {}));
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
110
|
+
*/
|
|
111
|
+
var EventKind;
|
|
112
|
+
(function (EventKind) {
|
|
113
|
+
// FIXME: Missing documentation for NativeTransfer
|
|
114
|
+
EventKind["NativeTransfer"] = "NativeTransfer";
|
|
115
|
+
// FIXME: Missing documentation for Erc20Transfer
|
|
116
|
+
EventKind["Erc20Transfer"] = "Erc20Transfer";
|
|
117
|
+
// FIXME: Missing documentation for Erc721Transfer
|
|
118
|
+
EventKind["Erc721Transfer"] = "Erc721Transfer";
|
|
119
|
+
})(EventKind || (exports.EventKind = EventKind = {}));
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
122
|
+
*/
|
|
123
|
+
var TransferDirection;
|
|
124
|
+
(function (TransferDirection) {
|
|
125
|
+
// FIXME: Missing documentation for In
|
|
126
|
+
TransferDirection["In"] = "In";
|
|
127
|
+
// FIXME: Missing documentation for Out
|
|
128
|
+
TransferDirection["Out"] = "Out";
|
|
129
|
+
})(TransferDirection || (exports.TransferDirection = TransferDirection = {}));
|
|
130
|
+
/**
|
|
131
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
132
|
+
*/
|
|
133
|
+
var TransferStatus;
|
|
134
|
+
(function (TransferStatus) {
|
|
135
|
+
// FIXME: Missing documentation for Pending
|
|
136
|
+
TransferStatus["Pending"] = "Pending";
|
|
137
|
+
// FIXME: Missing documentation for Executing
|
|
138
|
+
TransferStatus["Executing"] = "Executing";
|
|
139
|
+
// FIXME: Missing documentation for Broadcasted
|
|
140
|
+
TransferStatus["Broadcasted"] = "Broadcasted";
|
|
141
|
+
// FIXME: Missing documentation for Confirmed
|
|
142
|
+
TransferStatus["Confirmed"] = "Confirmed";
|
|
143
|
+
// FIXME: Missing documentation for Failed
|
|
144
|
+
TransferStatus["Failed"] = "Failed";
|
|
145
|
+
// FIXME: Missing documentation for Rejected
|
|
146
|
+
TransferStatus["Rejected"] = "Rejected";
|
|
147
|
+
})(TransferStatus || (exports.TransferStatus = TransferStatus = {}));
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
150
|
+
*/
|
|
151
|
+
var TransactionStatus;
|
|
152
|
+
(function (TransactionStatus) {
|
|
153
|
+
// FIXME: Missing documentation for Pending
|
|
154
|
+
TransactionStatus["Pending"] = "Pending";
|
|
155
|
+
// FIXME: Missing documentation for Executing
|
|
156
|
+
TransactionStatus["Executing"] = "Executing";
|
|
157
|
+
// FIXME: Missing documentation for Broadcasted
|
|
158
|
+
TransactionStatus["Broadcasted"] = "Broadcasted";
|
|
159
|
+
// FIXME: Missing documentation for Confirmed
|
|
160
|
+
TransactionStatus["Confirmed"] = "Confirmed";
|
|
161
|
+
// FIXME: Missing documentation for Failed
|
|
162
|
+
TransactionStatus["Failed"] = "Failed";
|
|
163
|
+
// FIXME: Missing documentation for Rejected
|
|
164
|
+
TransactionStatus["Rejected"] = "Rejected";
|
|
165
|
+
})(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
|
|
166
|
+
/**
|
|
167
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
168
|
+
*/
|
|
169
|
+
var SignatureStatus;
|
|
170
|
+
(function (SignatureStatus) {
|
|
171
|
+
// FIXME: Missing documentation for Pending
|
|
172
|
+
SignatureStatus["Pending"] = "Pending";
|
|
173
|
+
// FIXME: Missing documentation for Executing
|
|
174
|
+
SignatureStatus["Executing"] = "Executing";
|
|
175
|
+
// FIXME: Missing documentation for Signed
|
|
176
|
+
SignatureStatus["Signed"] = "Signed";
|
|
177
|
+
// FIXME: Missing documentation for Confirmed
|
|
178
|
+
SignatureStatus["Confirmed"] = "Confirmed";
|
|
179
|
+
// FIXME: Missing documentation for Failed
|
|
180
|
+
SignatureStatus["Failed"] = "Failed";
|
|
181
|
+
// FIXME: Missing documentation for Rejected
|
|
182
|
+
SignatureStatus["Rejected"] = "Rejected";
|
|
183
|
+
})(SignatureStatus || (exports.SignatureStatus = SignatureStatus = {}));
|
|
184
|
+
/**
|
|
185
|
+
* @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
|
|
186
|
+
*/
|
|
187
|
+
var BlockchainNetwork;
|
|
188
|
+
(function (BlockchainNetwork) {
|
|
189
|
+
// FIXME: Missing documentation for ArbitrumOne
|
|
190
|
+
BlockchainNetwork["ArbitrumOne"] = "ArbitrumOne";
|
|
191
|
+
// FIXME: Missing documentation for ArbitrumGoerli
|
|
192
|
+
BlockchainNetwork["ArbitrumGoerli"] = "ArbitrumGoerli";
|
|
193
|
+
// FIXME: Missing documentation for ArbitrumSepolia
|
|
194
|
+
BlockchainNetwork["ArbitrumSepolia"] = "ArbitrumSepolia";
|
|
195
|
+
// FIXME: Missing documentation for AvalancheC
|
|
196
|
+
BlockchainNetwork["AvalancheC"] = "AvalancheC";
|
|
197
|
+
// FIXME: Missing documentation for AvalancheCFuji
|
|
198
|
+
BlockchainNetwork["AvalancheCFuji"] = "AvalancheCFuji";
|
|
199
|
+
// FIXME: Missing documentation for Base
|
|
200
|
+
BlockchainNetwork["Base"] = "Base";
|
|
201
|
+
// FIXME: Missing documentation for BaseGoerli
|
|
202
|
+
BlockchainNetwork["BaseGoerli"] = "BaseGoerli";
|
|
203
|
+
// FIXME: Missing documentation for Bitcoin
|
|
204
|
+
BlockchainNetwork["Bitcoin"] = "Bitcoin";
|
|
205
|
+
// FIXME: Missing documentation for BitcoinTestnet3
|
|
206
|
+
BlockchainNetwork["BitcoinTestnet3"] = "BitcoinTestnet3";
|
|
207
|
+
// FIXME: Missing documentation for Bsc
|
|
208
|
+
BlockchainNetwork["Bsc"] = "Bsc";
|
|
209
|
+
// FIXME: Missing documentation for BscTestnet
|
|
210
|
+
BlockchainNetwork["BscTestnet"] = "BscTestnet";
|
|
211
|
+
// FIXME: Missing documentation for Ethereum
|
|
212
|
+
BlockchainNetwork["Ethereum"] = "Ethereum";
|
|
213
|
+
// FIXME: Missing documentation for EthereumGoerli
|
|
214
|
+
BlockchainNetwork["EthereumGoerli"] = "EthereumGoerli";
|
|
215
|
+
// FIXME: Missing documentation for EthereumSepolia
|
|
216
|
+
BlockchainNetwork["EthereumSepolia"] = "EthereumSepolia";
|
|
217
|
+
// FIXME: Missing documentation for FantomOpera
|
|
218
|
+
BlockchainNetwork["FantomOpera"] = "FantomOpera";
|
|
219
|
+
// FIXME: Missing documentation for FantomTestnet
|
|
220
|
+
BlockchainNetwork["FantomTestnet"] = "FantomTestnet";
|
|
221
|
+
// FIXME: Missing documentation for Optimism
|
|
222
|
+
BlockchainNetwork["Optimism"] = "Optimism";
|
|
223
|
+
// FIXME: Missing documentation for OptimismGoerli
|
|
224
|
+
BlockchainNetwork["OptimismGoerli"] = "OptimismGoerli";
|
|
225
|
+
// FIXME: Missing documentation for Polygon
|
|
226
|
+
BlockchainNetwork["Polygon"] = "Polygon";
|
|
227
|
+
// FIXME: Missing documentation for PolygonMumbai
|
|
228
|
+
BlockchainNetwork["PolygonMumbai"] = "PolygonMumbai";
|
|
229
|
+
// FIXME: Missing documentation for Ripple
|
|
230
|
+
BlockchainNetwork["Ripple"] = "Ripple";
|
|
231
|
+
// FIXME: Missing documentation for RippleTestnet
|
|
232
|
+
BlockchainNetwork["RippleTestnet"] = "RippleTestnet";
|
|
233
|
+
// FIXME: Missing documentation for Solana
|
|
234
|
+
BlockchainNetwork["Solana"] = "Solana";
|
|
235
|
+
// FIXME: Missing documentation for SolanaDevnet
|
|
236
|
+
BlockchainNetwork["SolanaDevnet"] = "SolanaDevnet";
|
|
237
|
+
// FIXME: Missing documentation for Tezos
|
|
238
|
+
BlockchainNetwork["Tezos"] = "Tezos";
|
|
239
|
+
// FIXME: Missing documentation for TezosGhostnet
|
|
240
|
+
BlockchainNetwork["TezosGhostnet"] = "TezosGhostnet";
|
|
241
|
+
// FIXME: Missing documentation for Tron
|
|
242
|
+
BlockchainNetwork["Tron"] = "Tron";
|
|
243
|
+
// FIXME: Missing documentation for TronNile
|
|
244
|
+
BlockchainNetwork["TronNile"] = "TronNile";
|
|
245
|
+
// FIXME: Missing documentation for KeyECDSA
|
|
246
|
+
BlockchainNetwork["KeyECDSA"] = "KeyECDSA";
|
|
247
|
+
// FIXME: Missing documentation for KeyEdDSA
|
|
248
|
+
BlockchainNetwork["KeyEdDSA"] = "KeyEdDSA";
|
|
249
|
+
// FIXME: Missing documentation for KeyECDSAStark
|
|
250
|
+
BlockchainNetwork["KeyECDSAStark"] = "KeyECDSAStark";
|
|
251
|
+
})(BlockchainNetwork || (exports.BlockchainNetwork = BlockchainNetwork = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
|
+
import { AssetsClient } from './codegen/Assets';
|
|
3
|
+
import { AuthClient } from './codegen/Auth';
|
|
4
|
+
import { BlockchainsClient } from './codegen/Blockchains';
|
|
5
|
+
import { CallbacksClient } from './codegen/Callbacks';
|
|
6
|
+
import { PermissionsClient } from './codegen/Permissions';
|
|
7
|
+
import { PolicyExecutionClient } from './codegen/PolicyExecution';
|
|
8
|
+
import { PolicyManagementClient } from './codegen/PolicyManagement';
|
|
9
|
+
import { PublicKeysClient } from './codegen/PublicKeys';
|
|
10
|
+
import { PoliciesClient } from './generated/policies';
|
|
11
|
+
import { SignersClient } from './generated/signers';
|
|
12
|
+
import { WalletsClient } from './generated/wallets';
|
|
13
|
+
import { WebhooksClient } from './generated/webhooks';
|
|
14
|
+
import { CredentialSigner } from './signer';
|
|
15
|
+
export type DfnsApiClientOptions = DfnsBaseApiOptions & {
|
|
16
|
+
signer: CredentialSigner;
|
|
17
|
+
};
|
|
18
|
+
export declare class DfnsApiClient {
|
|
19
|
+
private apiOptions;
|
|
20
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
21
|
+
get assets(): AssetsClient;
|
|
22
|
+
get auth(): AuthClient;
|
|
23
|
+
get blockchains(): BlockchainsClient;
|
|
24
|
+
get callbacks(): CallbacksClient;
|
|
25
|
+
get permissions(): PermissionsClient;
|
|
26
|
+
get policies(): PoliciesClient;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated use the new policy engine instead
|
|
29
|
+
*/
|
|
30
|
+
get policyExecution(): PolicyExecutionClient;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated use the new policy engine instead
|
|
33
|
+
*/
|
|
34
|
+
get policyManagement(): PolicyManagementClient;
|
|
35
|
+
get publicKeys(): PublicKeysClient;
|
|
36
|
+
get wallets(): WalletsClient;
|
|
37
|
+
get webhooks(): WebhooksClient;
|
|
38
|
+
get signers(): SignersClient;
|
|
39
|
+
}
|
package/dfnsApiClient.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DfnsApiClient = void 0;
|
|
4
|
+
const Assets_1 = require("./codegen/Assets");
|
|
5
|
+
const Auth_1 = require("./codegen/Auth");
|
|
6
|
+
const Blockchains_1 = require("./codegen/Blockchains");
|
|
7
|
+
const Callbacks_1 = require("./codegen/Callbacks");
|
|
8
|
+
const Permissions_1 = require("./codegen/Permissions");
|
|
9
|
+
const PolicyExecution_1 = require("./codegen/PolicyExecution");
|
|
10
|
+
const PolicyManagement_1 = require("./codegen/PolicyManagement");
|
|
11
|
+
const PublicKeys_1 = require("./codegen/PublicKeys");
|
|
12
|
+
const policies_1 = require("./generated/policies");
|
|
13
|
+
const signers_1 = require("./generated/signers");
|
|
14
|
+
const wallets_1 = require("./generated/wallets");
|
|
15
|
+
const webhooks_1 = require("./generated/webhooks");
|
|
16
|
+
class DfnsApiClient {
|
|
17
|
+
constructor(apiOptions) {
|
|
18
|
+
this.apiOptions = apiOptions;
|
|
19
|
+
}
|
|
20
|
+
get assets() {
|
|
21
|
+
return new Assets_1.AssetsClient(this.apiOptions);
|
|
22
|
+
}
|
|
23
|
+
get auth() {
|
|
24
|
+
return new Auth_1.AuthClient(this.apiOptions);
|
|
25
|
+
}
|
|
26
|
+
get blockchains() {
|
|
27
|
+
return new Blockchains_1.BlockchainsClient(this.apiOptions);
|
|
28
|
+
}
|
|
29
|
+
get callbacks() {
|
|
30
|
+
return new Callbacks_1.CallbacksClient(this.apiOptions);
|
|
31
|
+
}
|
|
32
|
+
get permissions() {
|
|
33
|
+
return new Permissions_1.PermissionsClient(this.apiOptions);
|
|
34
|
+
}
|
|
35
|
+
get policies() {
|
|
36
|
+
return new policies_1.PoliciesClient(this.apiOptions);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated use the new policy engine instead
|
|
40
|
+
*/
|
|
41
|
+
get policyExecution() {
|
|
42
|
+
return new PolicyExecution_1.PolicyExecutionClient(this.apiOptions);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated use the new policy engine instead
|
|
46
|
+
*/
|
|
47
|
+
get policyManagement() {
|
|
48
|
+
return new PolicyManagement_1.PolicyManagementClient(this.apiOptions);
|
|
49
|
+
}
|
|
50
|
+
get publicKeys() {
|
|
51
|
+
return new PublicKeys_1.PublicKeysClient(this.apiOptions);
|
|
52
|
+
}
|
|
53
|
+
get wallets() {
|
|
54
|
+
return new wallets_1.WalletsClient(this.apiOptions);
|
|
55
|
+
}
|
|
56
|
+
get webhooks() {
|
|
57
|
+
return new webhooks_1.WebhooksClient(this.apiOptions);
|
|
58
|
+
}
|
|
59
|
+
get signers() {
|
|
60
|
+
return new signers_1.SignersClient(this.apiOptions);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.DfnsApiClient = DfnsApiClient;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CredentialStore } from './store';
|
|
2
|
+
import { CredentialSigner } from './signer';
|
|
3
|
+
import { CreateUserLoginChallengeRequest, CreateUserRegistrationChallengeRequest, DfnsBaseApiOptions, UserLoginResponse, UserRegistrationResponse } from './baseAuthApi';
|
|
4
|
+
export type LoginRequest = CreateUserLoginChallengeRequest;
|
|
5
|
+
export type LoginResponse = UserLoginResponse;
|
|
6
|
+
export type RegisterRequest = CreateUserRegistrationChallengeRequest;
|
|
7
|
+
export type RegisterResponse = UserRegistrationResponse;
|
|
8
|
+
export type DfnsAuthenticatorOptions = Omit<DfnsBaseApiOptions, 'authToken'> & {
|
|
9
|
+
signer: CredentialSigner & Partial<CredentialStore>;
|
|
10
|
+
};
|
|
11
|
+
export declare class DfnsAuthenticator {
|
|
12
|
+
private apiOptions;
|
|
13
|
+
private api;
|
|
14
|
+
constructor(apiOptions: DfnsAuthenticatorOptions);
|
|
15
|
+
login(request: LoginRequest): Promise<LoginResponse>;
|
|
16
|
+
register(request: RegisterRequest): Promise<RegisterResponse>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DfnsAuthenticator = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("./baseAuthApi");
|
|
5
|
+
class DfnsAuthenticator {
|
|
6
|
+
constructor(apiOptions) {
|
|
7
|
+
this.apiOptions = apiOptions;
|
|
8
|
+
}
|
|
9
|
+
async login(request) {
|
|
10
|
+
const { challenge, challengeIdentifier, allowCredentials } = await baseAuthApi_1.BaseAuthApi.createUserLoginChallenge(request, this.apiOptions);
|
|
11
|
+
const assertion = await this.apiOptions.signer.sign(challenge, allowCredentials);
|
|
12
|
+
return baseAuthApi_1.BaseAuthApi.createUserLogin({
|
|
13
|
+
challengeIdentifier,
|
|
14
|
+
firstFactor: assertion,
|
|
15
|
+
}, this.apiOptions);
|
|
16
|
+
}
|
|
17
|
+
async register(request) {
|
|
18
|
+
if (!this.apiOptions.signer.create) {
|
|
19
|
+
throw new Error(`Provided signer does not implement 'create'`);
|
|
20
|
+
}
|
|
21
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserRegistrationChallenge(request, this.apiOptions);
|
|
22
|
+
const attestation = await this.apiOptions.signer.create(challenge);
|
|
23
|
+
return baseAuthApi_1.BaseAuthApi.createUserRegistration({ firstFactorCredential: attestation }, {
|
|
24
|
+
...this.apiOptions,
|
|
25
|
+
authToken: challenge.temporaryAuthenticationToken,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.DfnsAuthenticator = DfnsAuthenticator;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
|
+
import { DelegatedAssetsClient } from './codegen/Assets';
|
|
3
|
+
import { DelegatedAuthClient } from './codegen/Auth';
|
|
4
|
+
import { DelegatedBlockchainsClient } from './codegen/Blockchains';
|
|
5
|
+
import { DelegatedCallbacksClient } from './codegen/Callbacks';
|
|
6
|
+
import { DelegatedPermissionsClient } from './codegen/Permissions';
|
|
7
|
+
import { DelegatedPolicyExecutionClient } from './codegen/PolicyExecution';
|
|
8
|
+
import { DelegatedPolicyManagementClient } from './codegen/PolicyManagement';
|
|
9
|
+
import { DelegatedPublicKeysClient } from './codegen/PublicKeys';
|
|
10
|
+
import { DelegatedPoliciesClient } from './generated/policies';
|
|
11
|
+
import { DelegatedSignersClient } from './generated/signers';
|
|
12
|
+
import { DelegatedWalletsClient } from './generated/wallets';
|
|
13
|
+
import { DelegatedWebhooksClient } from './generated/webhooks';
|
|
14
|
+
export type DfnsDelegatedApiClientOptions = DfnsBaseApiOptions & {
|
|
15
|
+
authToken: string;
|
|
16
|
+
};
|
|
17
|
+
export declare class DfnsDelegatedApiClient {
|
|
18
|
+
private apiOptions;
|
|
19
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
20
|
+
get assets(): DelegatedAssetsClient;
|
|
21
|
+
get auth(): DelegatedAuthClient;
|
|
22
|
+
get blockchains(): DelegatedBlockchainsClient;
|
|
23
|
+
get callbacks(): DelegatedCallbacksClient;
|
|
24
|
+
get permissions(): DelegatedPermissionsClient;
|
|
25
|
+
get policies(): DelegatedPoliciesClient;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated use the new policy engine instead
|
|
28
|
+
*/
|
|
29
|
+
get policyExecution(): DelegatedPolicyExecutionClient;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated use the new policy engine instead
|
|
32
|
+
*/
|
|
33
|
+
get policyManagement(): DelegatedPolicyManagementClient;
|
|
34
|
+
get publicKeys(): DelegatedPublicKeysClient;
|
|
35
|
+
get wallets(): DelegatedWalletsClient;
|
|
36
|
+
get webhooks(): DelegatedWebhooksClient;
|
|
37
|
+
get signers(): DelegatedSignersClient;
|
|
38
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DfnsDelegatedApiClient = void 0;
|
|
4
|
+
const Assets_1 = require("./codegen/Assets");
|
|
5
|
+
const Auth_1 = require("./codegen/Auth");
|
|
6
|
+
const Blockchains_1 = require("./codegen/Blockchains");
|
|
7
|
+
const Callbacks_1 = require("./codegen/Callbacks");
|
|
8
|
+
const Permissions_1 = require("./codegen/Permissions");
|
|
9
|
+
const PolicyExecution_1 = require("./codegen/PolicyExecution");
|
|
10
|
+
const PolicyManagement_1 = require("./codegen/PolicyManagement");
|
|
11
|
+
const PublicKeys_1 = require("./codegen/PublicKeys");
|
|
12
|
+
const policies_1 = require("./generated/policies");
|
|
13
|
+
const signers_1 = require("./generated/signers");
|
|
14
|
+
const wallets_1 = require("./generated/wallets");
|
|
15
|
+
const webhooks_1 = require("./generated/webhooks");
|
|
16
|
+
class DfnsDelegatedApiClient {
|
|
17
|
+
constructor(apiOptions) {
|
|
18
|
+
this.apiOptions = apiOptions;
|
|
19
|
+
}
|
|
20
|
+
get assets() {
|
|
21
|
+
return new Assets_1.DelegatedAssetsClient(this.apiOptions);
|
|
22
|
+
}
|
|
23
|
+
get auth() {
|
|
24
|
+
return new Auth_1.DelegatedAuthClient(this.apiOptions);
|
|
25
|
+
}
|
|
26
|
+
get blockchains() {
|
|
27
|
+
return new Blockchains_1.DelegatedBlockchainsClient(this.apiOptions);
|
|
28
|
+
}
|
|
29
|
+
get callbacks() {
|
|
30
|
+
return new Callbacks_1.DelegatedCallbacksClient(this.apiOptions);
|
|
31
|
+
}
|
|
32
|
+
get permissions() {
|
|
33
|
+
return new Permissions_1.DelegatedPermissionsClient(this.apiOptions);
|
|
34
|
+
}
|
|
35
|
+
get policies() {
|
|
36
|
+
return new policies_1.DelegatedPoliciesClient(this.apiOptions);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated use the new policy engine instead
|
|
40
|
+
*/
|
|
41
|
+
get policyExecution() {
|
|
42
|
+
return new PolicyExecution_1.DelegatedPolicyExecutionClient(this.apiOptions);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated use the new policy engine instead
|
|
46
|
+
*/
|
|
47
|
+
get policyManagement() {
|
|
48
|
+
return new PolicyManagement_1.DelegatedPolicyManagementClient(this.apiOptions);
|
|
49
|
+
}
|
|
50
|
+
get publicKeys() {
|
|
51
|
+
return new PublicKeys_1.DelegatedPublicKeysClient(this.apiOptions);
|
|
52
|
+
}
|
|
53
|
+
get wallets() {
|
|
54
|
+
return new wallets_1.DelegatedWalletsClient(this.apiOptions);
|
|
55
|
+
}
|
|
56
|
+
get webhooks() {
|
|
57
|
+
return new webhooks_1.DelegatedWebhooksClient(this.apiOptions);
|
|
58
|
+
}
|
|
59
|
+
get signers() {
|
|
60
|
+
return new signers_1.DelegatedSignersClient(this.apiOptions);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.DfnsDelegatedApiClient = DfnsDelegatedApiClient;
|
package/dfnsError.d.ts
ADDED
package/dfnsError.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DfnsError = void 0;
|
|
4
|
+
class DfnsError extends Error {
|
|
5
|
+
constructor(httpStatus, message, context) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.httpStatus = httpStatus;
|
|
8
|
+
this.context = context;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.DfnsError = DfnsError;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class PoliciesClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
archivePolicy(request: T.ArchivePolicyRequest): Promise<T.ArchivePolicyResponse>;
|
|
7
|
+
createApprovalDecision(request: T.CreateApprovalDecisionRequest): Promise<T.CreateApprovalDecisionResponse>;
|
|
8
|
+
createPolicy(request: T.CreatePolicyRequest): Promise<T.CreatePolicyResponse>;
|
|
9
|
+
getPolicy(request: T.GetPolicyRequest): Promise<T.GetPolicyResponse>;
|
|
10
|
+
listApprovals(request?: T.ListApprovalsRequest): Promise<T.ListApprovalsResponse>;
|
|
11
|
+
listPolicies(request?: T.ListPoliciesRequest): Promise<T.ListPoliciesResponse>;
|
|
12
|
+
updatePolicy(request: T.UpdatePolicyRequest): Promise<T.UpdatePolicyResponse>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PoliciesClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class PoliciesClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async archivePolicy(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
12
|
+
path: request ?? {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
16
|
+
method: 'DELETE',
|
|
17
|
+
body: {},
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async createApprovalDecision(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals/:approvalId/decisions', {
|
|
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 createPolicy(request) {
|
|
35
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies', {
|
|
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 getPolicy(request) {
|
|
47
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
48
|
+
path: request ?? {},
|
|
49
|
+
query: {},
|
|
50
|
+
});
|
|
51
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
52
|
+
method: 'GET',
|
|
53
|
+
apiOptions: this.apiOptions,
|
|
54
|
+
});
|
|
55
|
+
return response.json();
|
|
56
|
+
}
|
|
57
|
+
async listApprovals(request) {
|
|
58
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals', {
|
|
59
|
+
path: request ?? {},
|
|
60
|
+
query: request?.query ?? {},
|
|
61
|
+
});
|
|
62
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
63
|
+
method: 'GET',
|
|
64
|
+
apiOptions: this.apiOptions,
|
|
65
|
+
});
|
|
66
|
+
return response.json();
|
|
67
|
+
}
|
|
68
|
+
async listPolicies(request) {
|
|
69
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies', {
|
|
70
|
+
path: request ?? {},
|
|
71
|
+
query: request?.query ?? {},
|
|
72
|
+
});
|
|
73
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
74
|
+
method: 'GET',
|
|
75
|
+
apiOptions: this.apiOptions,
|
|
76
|
+
});
|
|
77
|
+
return response.json();
|
|
78
|
+
}
|
|
79
|
+
async updatePolicy(request) {
|
|
80
|
+
const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
|
|
81
|
+
path: request ?? {},
|
|
82
|
+
query: {},
|
|
83
|
+
});
|
|
84
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
85
|
+
method: 'PUT',
|
|
86
|
+
body: request.body,
|
|
87
|
+
apiOptions: this.apiOptions,
|
|
88
|
+
});
|
|
89
|
+
return response.json();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.PoliciesClient = PoliciesClient;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedPoliciesClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
archivePolicyInit(request: T.ArchivePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
archivePolicyComplete(request: T.ArchivePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyResponse>;
|
|
9
|
+
createApprovalDecisionInit(request: T.CreateApprovalDecisionRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
+
createApprovalDecisionComplete(request: T.CreateApprovalDecisionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateApprovalDecisionResponse>;
|
|
11
|
+
createPolicyInit(request: T.CreatePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
12
|
+
createPolicyComplete(request: T.CreatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyResponse>;
|
|
13
|
+
getPolicy(request: T.GetPolicyRequest): Promise<T.GetPolicyResponse>;
|
|
14
|
+
listApprovals(request?: T.ListApprovalsRequest): Promise<T.ListApprovalsResponse>;
|
|
15
|
+
listPolicies(request?: T.ListPoliciesRequest): Promise<T.ListPoliciesResponse>;
|
|
16
|
+
updatePolicyInit(request: T.UpdatePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
17
|
+
updatePolicyComplete(request: T.UpdatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyResponse>;
|
|
18
|
+
}
|