@dfns/sdk 0.0.0-prealpha.9
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 +96 -0
- package/baseAuthApi.js +73 -0
- package/codegen/Assets/AssetsClient.d.ts +13 -0
- package/codegen/Assets/AssetsClient.js +94 -0
- package/codegen/Assets/DelegatedAssetsClient.d.ts +16 -0
- package/codegen/Assets/DelegatedAssetsClient.js +125 -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 +48 -0
- package/codegen/Auth/AuthClient.js +494 -0
- package/codegen/Auth/DelegatedAuthClient.d.ts +74 -0
- package/codegen/Auth/DelegatedAuthClient.js +882 -0
- package/codegen/Auth/index.d.ts +3 -0
- package/codegen/Auth/index.js +19 -0
- package/codegen/Auth/types.d.ts +169 -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.d.ts +23 -0
- package/codegen/Callbacks/types.js +2 -0
- package/codegen/Permissions/DelegatedPermissionsClient.d.ts +27 -0
- package/codegen/Permissions/DelegatedPermissionsClient.js +285 -0
- package/codegen/Permissions/PermissionsClient.d.ts +18 -0
- package/codegen/Permissions/PermissionsClient.js +157 -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 +62 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.js +46 -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 +241 -0
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +18 -0
- package/codegen/PolicyManagement/PolicyManagementClient.js +147 -0
- package/codegen/PolicyManagement/index.d.ts +3 -0
- package/codegen/PolicyManagement/index.js +19 -0
- package/codegen/PolicyManagement/types.d.ts +51 -0
- package/codegen/PolicyManagement/types.js +2 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.js +191 -0
- package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
- package/codegen/PublicKeys/PublicKeysClient.js +130 -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/Wallets/DelegatedWalletsClient.d.ts +26 -0
- package/codegen/Wallets/DelegatedWalletsClient.js +249 -0
- package/codegen/Wallets/WalletsClient.d.ts +21 -0
- package/codegen/Wallets/WalletsClient.js +188 -0
- package/codegen/Wallets/index.d.ts +3 -0
- package/codegen/Wallets/index.js +19 -0
- package/codegen/Wallets/types.d.ts +87 -0
- package/codegen/Wallets/types.js +2 -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/index.d.ts +2 -0
- package/codegen/datamodel/Auth/index.js +18 -0
- package/codegen/datamodel/Auth/responses.d.ts +348 -0
- package/codegen/datamodel/Auth/responses.js +2 -0
- package/codegen/datamodel/Auth/types.d.ts +610 -0
- package/codegen/datamodel/Auth/types.js +127 -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 +269 -0
- package/codegen/datamodel/Blockchains/types.js +53 -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 +121 -0
- package/codegen/datamodel/Foundations/errors.js +169 -0
- package/codegen/datamodel/Foundations/index.d.ts +2 -0
- package/codegen/datamodel/Foundations/index.js +18 -0
- package/codegen/datamodel/Foundations/types.d.ts +9756 -0
- package/codegen/datamodel/Foundations/types.js +57753 -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 +45 -0
- package/codegen/datamodel/PolicyExecution/types.js +15 -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 +212 -0
- package/codegen/datamodel/PolicyManagement/types.js +77 -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 +222 -0
- package/codegen/datamodel/PublicKeys/types.js +59 -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 +77 -0
- package/codegen/datamodel/Wallets/responses.js +2 -0
- package/codegen/datamodel/Wallets/types.d.ts +277 -0
- package/codegen/datamodel/Wallets/types.js +123 -0
- package/dfnsApiClient.d.ts +27 -0
- package/dfnsApiClient.js +45 -0
- package/dfnsAuthenticator.d.ts +17 -0
- package/dfnsAuthenticator.js +29 -0
- package/dfnsDelegatedApiClient.d.ts +24 -0
- package/dfnsDelegatedApiClient.js +41 -0
- package/dfnsError.d.ts +5 -0
- package/dfnsError.js +11 -0
- package/index.d.ts +7 -0
- package/index.js +23 -0
- package/package.json +11 -0
- package/signer.d.ts +42 -0
- package/signer.js +2 -0
- package/store.d.ts +79 -0
- package/store.js +2 -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 +89 -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 +15 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
|
|
2
|
+
import { PaginatedEventHistory, PaginatedSignatureList, PaginatedTransactionList, PaginatedTransferList, PaginatedWalletList, SignatureRequest, TransactionRequest, TransferRequest, Wallet, WalletAssets, WalletNfts } from './types';
|
|
3
|
+
export type CreateWalletSuccess = Wallet;
|
|
4
|
+
export type CreateWalletError = {
|
|
5
|
+
error: BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
6
|
+
};
|
|
7
|
+
export type CreateWalletResponse = CreateWalletSuccess | CreateWalletError;
|
|
8
|
+
export type GetWalletSuccess = Wallet;
|
|
9
|
+
export type GetWalletError = {
|
|
10
|
+
error: EntityNotFoundError | BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
11
|
+
};
|
|
12
|
+
export type GetWalletResponse = GetWalletSuccess | GetWalletError;
|
|
13
|
+
export type GetWalletAssetsSuccess = WalletAssets;
|
|
14
|
+
export type GetWalletAssetsError = {
|
|
15
|
+
error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
16
|
+
};
|
|
17
|
+
export type GetWalletAssetsResponse = GetWalletAssetsSuccess | GetWalletAssetsError;
|
|
18
|
+
export type GetWalletNftsSuccess = WalletNfts;
|
|
19
|
+
export type GetWalletNftsError = {
|
|
20
|
+
error: EntityNotFoundError | BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
21
|
+
};
|
|
22
|
+
export type GetWalletNftsResponse = GetWalletNftsSuccess | GetWalletNftsError;
|
|
23
|
+
export type ListWalletsSuccess = PaginatedWalletList;
|
|
24
|
+
export type ListWalletsError = {
|
|
25
|
+
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
26
|
+
};
|
|
27
|
+
export type ListWalletsResponse = ListWalletsSuccess | ListWalletsError;
|
|
28
|
+
export type GetWalletHistorySuccess = PaginatedEventHistory;
|
|
29
|
+
export type GetWalletHistoryError = {
|
|
30
|
+
error: EntityNotFoundError | BadRequestError | ForbiddenError | UnauthorizedError;
|
|
31
|
+
};
|
|
32
|
+
export type GetWalletHistoryResponse = GetWalletHistorySuccess | GetWalletHistoryError;
|
|
33
|
+
export type TransferAssetSuccess = TransferRequest;
|
|
34
|
+
export type TransferAssetError = {
|
|
35
|
+
error: BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
36
|
+
};
|
|
37
|
+
export type TransferAssetResponse = TransferAssetSuccess | TransferAssetError;
|
|
38
|
+
export type GetTransferSuccess = TransferRequest;
|
|
39
|
+
export type GetTransferError = {
|
|
40
|
+
error: EntityNotFoundError | BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
41
|
+
};
|
|
42
|
+
export type GetTransferResponse = GetTransferSuccess | GetTransferError;
|
|
43
|
+
export type ListTransfersSuccess = PaginatedTransferList;
|
|
44
|
+
export type ListTransfersError = {
|
|
45
|
+
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
46
|
+
};
|
|
47
|
+
export type ListTransfersResponse = ListTransfersSuccess | ListTransfersError;
|
|
48
|
+
export type BroadcastTransactionSuccess = TransactionRequest;
|
|
49
|
+
export type BroadcastTransactionError = {
|
|
50
|
+
error: BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
51
|
+
};
|
|
52
|
+
export type BroadcastTransactionResponse = BroadcastTransactionSuccess | BroadcastTransactionError;
|
|
53
|
+
export type GetTransactionSuccess = TransactionRequest;
|
|
54
|
+
export type GetTransactionError = {
|
|
55
|
+
error: EntityNotFoundError | BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
56
|
+
};
|
|
57
|
+
export type GetTransactionResponse = GetTransactionSuccess | GetTransactionError;
|
|
58
|
+
export type ListTransactionsSuccess = PaginatedTransactionList;
|
|
59
|
+
export type ListTransactionsError = {
|
|
60
|
+
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
61
|
+
};
|
|
62
|
+
export type ListTransactionsResponse = ListTransactionsSuccess | ListTransactionsError;
|
|
63
|
+
export type GenerateSignatureSuccess = SignatureRequest;
|
|
64
|
+
export type GenerateSignatureError = {
|
|
65
|
+
error: BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
66
|
+
};
|
|
67
|
+
export type GenerateSignatureResponse = GenerateSignatureSuccess | GenerateSignatureError;
|
|
68
|
+
export type GetSignatureSuccess = SignatureRequest;
|
|
69
|
+
export type GetSignatureError = {
|
|
70
|
+
error: EntityNotFoundError | BadRequestError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
71
|
+
};
|
|
72
|
+
export type GetSignatureResponse = GetSignatureSuccess | GetSignatureError;
|
|
73
|
+
export type ListSignaturesSuccess = PaginatedSignatureList;
|
|
74
|
+
export type ListSignaturesError = {
|
|
75
|
+
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
76
|
+
};
|
|
77
|
+
export type ListSignaturesResponse = ListSignaturesSuccess | ListSignaturesError;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { Amount, BlockchainAddress, EntityId, IsoDatetime, Tag } from '../Foundations';
|
|
2
|
+
export type TransferNativeAsset = {
|
|
3
|
+
kind: TransferKind.Native;
|
|
4
|
+
to: BlockchainAddress;
|
|
5
|
+
amount: Amount;
|
|
6
|
+
};
|
|
7
|
+
export type TransferErc20Asset = {
|
|
8
|
+
kind: TransferKind.Erc20;
|
|
9
|
+
contract: BlockchainAddress;
|
|
10
|
+
to: BlockchainAddress;
|
|
11
|
+
amount: Amount;
|
|
12
|
+
};
|
|
13
|
+
export type TransferErc721Asset = {
|
|
14
|
+
kind: TransferKind.Erc721;
|
|
15
|
+
contract: BlockchainAddress;
|
|
16
|
+
to: BlockchainAddress;
|
|
17
|
+
tokenId: string;
|
|
18
|
+
};
|
|
19
|
+
export type BroadcastEvmTransaction = {
|
|
20
|
+
kind: TransactionKind.Evm;
|
|
21
|
+
to?: BlockchainAddress;
|
|
22
|
+
value?: Amount;
|
|
23
|
+
data?: string;
|
|
24
|
+
nonce?: number;
|
|
25
|
+
gasLimit?: Amount;
|
|
26
|
+
gasPrice?: Amount;
|
|
27
|
+
maxPriorityFeePerGas?: Amount;
|
|
28
|
+
maxFeePerGas?: Amount;
|
|
29
|
+
};
|
|
30
|
+
export type SignHash = {
|
|
31
|
+
kind: SignatureKind.Hash;
|
|
32
|
+
hash: string;
|
|
33
|
+
};
|
|
34
|
+
export type Eip712Domain = {
|
|
35
|
+
name?: string;
|
|
36
|
+
version?: string;
|
|
37
|
+
chainId?: number;
|
|
38
|
+
verifyingContract?: BlockchainAddress;
|
|
39
|
+
salt?: string;
|
|
40
|
+
};
|
|
41
|
+
export type SignEip712TypedData = {
|
|
42
|
+
kind: SignatureKind.Eip712;
|
|
43
|
+
types: Record<string, unknown>;
|
|
44
|
+
domain: Eip712Domain;
|
|
45
|
+
message: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
export type Wallet = {
|
|
48
|
+
id: EntityId;
|
|
49
|
+
network: BlockchainNetwork;
|
|
50
|
+
status: WalletStatus;
|
|
51
|
+
address?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
externalId?: string;
|
|
54
|
+
tags: Tag[];
|
|
55
|
+
dateCreated: IsoDatetime;
|
|
56
|
+
};
|
|
57
|
+
export type WalletAssets = {
|
|
58
|
+
walletId: EntityId;
|
|
59
|
+
network: BlockchainNetwork;
|
|
60
|
+
assets: WalletAsset[];
|
|
61
|
+
};
|
|
62
|
+
export type WalletAsset = {
|
|
63
|
+
contract?: string;
|
|
64
|
+
symbol?: string;
|
|
65
|
+
decimals: number;
|
|
66
|
+
verified?: boolean;
|
|
67
|
+
balance: Amount;
|
|
68
|
+
};
|
|
69
|
+
export type WalletNfts = {
|
|
70
|
+
walletId: EntityId;
|
|
71
|
+
network: BlockchainNetwork;
|
|
72
|
+
nfts: WalletNft[];
|
|
73
|
+
};
|
|
74
|
+
export type WalletNft = {
|
|
75
|
+
contract: string;
|
|
76
|
+
symbol?: string;
|
|
77
|
+
verified?: boolean;
|
|
78
|
+
tokenIds: string[];
|
|
79
|
+
count: number;
|
|
80
|
+
};
|
|
81
|
+
export type PaginatedWalletList = {
|
|
82
|
+
items: Wallet[];
|
|
83
|
+
nextPageToken?: string;
|
|
84
|
+
};
|
|
85
|
+
export type NativeTransferEvent = {
|
|
86
|
+
kind: EventKind.NativeTransfer;
|
|
87
|
+
walletId: EntityId;
|
|
88
|
+
network: BlockchainNetwork;
|
|
89
|
+
blockNumber: number;
|
|
90
|
+
txHash: string;
|
|
91
|
+
index?: string;
|
|
92
|
+
timestamp: IsoDatetime;
|
|
93
|
+
fee?: Amount;
|
|
94
|
+
direction: TransferDirection;
|
|
95
|
+
symbol: string;
|
|
96
|
+
decimals: number;
|
|
97
|
+
verified?: boolean;
|
|
98
|
+
from: BlockchainAddress;
|
|
99
|
+
to: BlockchainAddress;
|
|
100
|
+
value: Amount;
|
|
101
|
+
};
|
|
102
|
+
export type Erc20TransferEvent = {
|
|
103
|
+
kind: EventKind.Erc20Transfer;
|
|
104
|
+
walletId: EntityId;
|
|
105
|
+
network: BlockchainNetwork;
|
|
106
|
+
blockNumber: number;
|
|
107
|
+
txHash: string;
|
|
108
|
+
index?: string;
|
|
109
|
+
timestamp: IsoDatetime;
|
|
110
|
+
fee?: Amount;
|
|
111
|
+
direction: TransferDirection;
|
|
112
|
+
contract: BlockchainAddress;
|
|
113
|
+
symbol?: string;
|
|
114
|
+
decimals: number;
|
|
115
|
+
verified?: boolean;
|
|
116
|
+
from: BlockchainAddress;
|
|
117
|
+
to: BlockchainAddress;
|
|
118
|
+
value: Amount;
|
|
119
|
+
};
|
|
120
|
+
export type Erc721TransferEvent = {
|
|
121
|
+
kind: EventKind.Erc721Transfer;
|
|
122
|
+
walletId: EntityId;
|
|
123
|
+
network: BlockchainNetwork;
|
|
124
|
+
blockNumber: number;
|
|
125
|
+
txHash: string;
|
|
126
|
+
index?: string;
|
|
127
|
+
timestamp: IsoDatetime;
|
|
128
|
+
fee?: Amount;
|
|
129
|
+
direction: TransferDirection;
|
|
130
|
+
contract: BlockchainAddress;
|
|
131
|
+
symbol?: string;
|
|
132
|
+
verified?: boolean;
|
|
133
|
+
from: BlockchainAddress;
|
|
134
|
+
to: BlockchainAddress;
|
|
135
|
+
tokenId: string;
|
|
136
|
+
};
|
|
137
|
+
export type PaginatedEventHistory = {
|
|
138
|
+
walletId: EntityId;
|
|
139
|
+
network: BlockchainNetwork;
|
|
140
|
+
items: BlockchainEvent[];
|
|
141
|
+
nextPageToken?: string;
|
|
142
|
+
};
|
|
143
|
+
export type TransferRequest = {
|
|
144
|
+
id: EntityId;
|
|
145
|
+
walletId: EntityId;
|
|
146
|
+
network: BlockchainNetwork;
|
|
147
|
+
txHash?: string;
|
|
148
|
+
requester: RequesterIdentity;
|
|
149
|
+
requestBody: TransferAssetBody;
|
|
150
|
+
status: TransferStatus;
|
|
151
|
+
fee?: Amount;
|
|
152
|
+
error?: string;
|
|
153
|
+
dateRequested: IsoDatetime;
|
|
154
|
+
dateBroadcasted?: IsoDatetime;
|
|
155
|
+
dateConfirmed?: IsoDatetime;
|
|
156
|
+
};
|
|
157
|
+
export type PaginatedTransferList = {
|
|
158
|
+
walletId: EntityId;
|
|
159
|
+
items: TransferRequest[];
|
|
160
|
+
nextPageToken?: string;
|
|
161
|
+
};
|
|
162
|
+
export type TransactionRequest = {
|
|
163
|
+
id: EntityId;
|
|
164
|
+
walletId: EntityId;
|
|
165
|
+
network: BlockchainNetwork;
|
|
166
|
+
txHash?: string;
|
|
167
|
+
requester: RequesterIdentity;
|
|
168
|
+
requestBody: BroadcastTransactionBody;
|
|
169
|
+
status: TransactionStatus;
|
|
170
|
+
error?: string;
|
|
171
|
+
fee?: Amount;
|
|
172
|
+
dateRequested: IsoDatetime;
|
|
173
|
+
dateBroadcasted?: IsoDatetime;
|
|
174
|
+
dateConfirmed?: IsoDatetime;
|
|
175
|
+
};
|
|
176
|
+
export type PaginatedTransactionList = {
|
|
177
|
+
walletId: EntityId;
|
|
178
|
+
items: TransactionRequest[];
|
|
179
|
+
nextPageToken?: string;
|
|
180
|
+
};
|
|
181
|
+
export type Signature = {
|
|
182
|
+
r: string;
|
|
183
|
+
s: string;
|
|
184
|
+
recid?: number;
|
|
185
|
+
};
|
|
186
|
+
export type SignatureRequest = {
|
|
187
|
+
id: EntityId;
|
|
188
|
+
walletId: EntityId;
|
|
189
|
+
requester: RequesterIdentity;
|
|
190
|
+
requestBody: GenerateSignatureBody;
|
|
191
|
+
signature?: Signature;
|
|
192
|
+
status: SignatureStatus;
|
|
193
|
+
error?: string;
|
|
194
|
+
dateRequested: IsoDatetime;
|
|
195
|
+
datePolicyResolved?: IsoDatetime;
|
|
196
|
+
dateSigned?: IsoDatetime;
|
|
197
|
+
};
|
|
198
|
+
export type PaginatedSignatureList = {
|
|
199
|
+
walletId: EntityId;
|
|
200
|
+
items: SignatureRequest[];
|
|
201
|
+
nextPageToken?: string;
|
|
202
|
+
};
|
|
203
|
+
export type RequesterIdentity = {
|
|
204
|
+
userId: EntityId;
|
|
205
|
+
tokenId?: EntityId;
|
|
206
|
+
appId?: EntityId;
|
|
207
|
+
};
|
|
208
|
+
export type CreateWalletBody = {
|
|
209
|
+
network: BlockchainNetwork;
|
|
210
|
+
externalId?: string;
|
|
211
|
+
tags?: Tag[];
|
|
212
|
+
name?: string;
|
|
213
|
+
};
|
|
214
|
+
export type TransferAssetBody = TransferNativeAsset | TransferErc20Asset | TransferErc721Asset;
|
|
215
|
+
export type BroadcastTransactionBody = BroadcastEvmTransaction;
|
|
216
|
+
export type GenerateSignatureBody = SignHash | SignEip712TypedData;
|
|
217
|
+
export type BlockchainEvent = NativeTransferEvent | Erc20TransferEvent | Erc721TransferEvent;
|
|
218
|
+
export declare enum TransferKind {
|
|
219
|
+
Native = "Native",
|
|
220
|
+
Erc20 = "Erc20",
|
|
221
|
+
Erc721 = "Erc721"
|
|
222
|
+
}
|
|
223
|
+
export declare enum TransactionKind {
|
|
224
|
+
Evm = "Evm"
|
|
225
|
+
}
|
|
226
|
+
export declare enum SignatureKind {
|
|
227
|
+
Hash = "Hash",
|
|
228
|
+
Eip712 = "Eip712"
|
|
229
|
+
}
|
|
230
|
+
export declare enum WalletStatus {
|
|
231
|
+
Active = "Active",
|
|
232
|
+
Creating = "Creating",
|
|
233
|
+
Failed = "Failed"
|
|
234
|
+
}
|
|
235
|
+
export declare enum EventKind {
|
|
236
|
+
NativeTransfer = "NativeTransfer",
|
|
237
|
+
Erc20Transfer = "Erc20Transfer",
|
|
238
|
+
Erc721Transfer = "Erc721Transfer"
|
|
239
|
+
}
|
|
240
|
+
export declare enum TransferDirection {
|
|
241
|
+
In = "In",
|
|
242
|
+
Out = "Out"
|
|
243
|
+
}
|
|
244
|
+
export declare enum TransferStatus {
|
|
245
|
+
Pending = "Pending",
|
|
246
|
+
Broadcasted = "Broadcasted",
|
|
247
|
+
Confirmed = "Confirmed",
|
|
248
|
+
Failed = "Failed"
|
|
249
|
+
}
|
|
250
|
+
export declare enum TransactionStatus {
|
|
251
|
+
Pending = "Pending",
|
|
252
|
+
Broadcasted = "Broadcasted",
|
|
253
|
+
Confirmed = "Confirmed",
|
|
254
|
+
Failed = "Failed"
|
|
255
|
+
}
|
|
256
|
+
export declare enum SignatureStatus {
|
|
257
|
+
Pending = "Pending",
|
|
258
|
+
Signed = "Signed",
|
|
259
|
+
Failed = "Failed"
|
|
260
|
+
}
|
|
261
|
+
export declare enum BlockchainNetwork {
|
|
262
|
+
Bitcoin = "Bitcoin",
|
|
263
|
+
BitcoinTestnet = "BitcoinTestnet",
|
|
264
|
+
Bsc = "Bsc",
|
|
265
|
+
BscTestnet = "BscTestnet",
|
|
266
|
+
Ethereum = "Ethereum",
|
|
267
|
+
EthereumGoerli = "EthereumGoerli",
|
|
268
|
+
EthereumSepolia = "EthereumSepolia",
|
|
269
|
+
Polygon = "Polygon",
|
|
270
|
+
PolygonMumbai = "PolygonMumbai",
|
|
271
|
+
Ripple = "Ripple",
|
|
272
|
+
RippleTestnet = "RippleTestnet",
|
|
273
|
+
Solana = "Solana",
|
|
274
|
+
SolanaDevnet = "SolanaDevnet",
|
|
275
|
+
Tron = "Tron",
|
|
276
|
+
TronShasta = "TronShasta"
|
|
277
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlockchainNetwork = exports.SignatureStatus = exports.TransactionStatus = exports.TransferStatus = exports.TransferDirection = exports.EventKind = exports.WalletStatus = exports.SignatureKind = exports.TransactionKind = exports.TransferKind = void 0;
|
|
4
|
+
// FIXME: Missing documentation for TransferKind
|
|
5
|
+
var TransferKind;
|
|
6
|
+
(function (TransferKind) {
|
|
7
|
+
// FIXME: Missing documentation for Native
|
|
8
|
+
TransferKind["Native"] = "Native";
|
|
9
|
+
// FIXME: Missing documentation for Erc20
|
|
10
|
+
TransferKind["Erc20"] = "Erc20";
|
|
11
|
+
// FIXME: Missing documentation for Erc721
|
|
12
|
+
TransferKind["Erc721"] = "Erc721";
|
|
13
|
+
})(TransferKind = exports.TransferKind || (exports.TransferKind = {}));
|
|
14
|
+
// FIXME: Missing documentation for TransactionKind
|
|
15
|
+
var TransactionKind;
|
|
16
|
+
(function (TransactionKind) {
|
|
17
|
+
// FIXME: Missing documentation for Evm
|
|
18
|
+
TransactionKind["Evm"] = "Evm";
|
|
19
|
+
})(TransactionKind = exports.TransactionKind || (exports.TransactionKind = {}));
|
|
20
|
+
// FIXME: Missing documentation for SignatureKind
|
|
21
|
+
var SignatureKind;
|
|
22
|
+
(function (SignatureKind) {
|
|
23
|
+
// FIXME: Missing documentation for Hash
|
|
24
|
+
SignatureKind["Hash"] = "Hash";
|
|
25
|
+
// FIXME: Missing documentation for Eip712
|
|
26
|
+
SignatureKind["Eip712"] = "Eip712";
|
|
27
|
+
})(SignatureKind = exports.SignatureKind || (exports.SignatureKind = {}));
|
|
28
|
+
// FIXME: Missing documentation for WalletStatus
|
|
29
|
+
var WalletStatus;
|
|
30
|
+
(function (WalletStatus) {
|
|
31
|
+
// FIXME: Missing documentation for Active
|
|
32
|
+
WalletStatus["Active"] = "Active";
|
|
33
|
+
//Initial state of `AssetAccount` entity, indicating that it’s being created at the moment.
|
|
34
|
+
WalletStatus["Creating"] = "Creating";
|
|
35
|
+
// FIXME: Missing documentation for Failed
|
|
36
|
+
WalletStatus["Failed"] = "Failed";
|
|
37
|
+
})(WalletStatus = exports.WalletStatus || (exports.WalletStatus = {}));
|
|
38
|
+
// FIXME: Missing documentation for EventKind
|
|
39
|
+
var EventKind;
|
|
40
|
+
(function (EventKind) {
|
|
41
|
+
// FIXME: Missing documentation for NativeTransfer
|
|
42
|
+
EventKind["NativeTransfer"] = "NativeTransfer";
|
|
43
|
+
// FIXME: Missing documentation for Erc20Transfer
|
|
44
|
+
EventKind["Erc20Transfer"] = "Erc20Transfer";
|
|
45
|
+
// FIXME: Missing documentation for Erc721Transfer
|
|
46
|
+
EventKind["Erc721Transfer"] = "Erc721Transfer";
|
|
47
|
+
})(EventKind = exports.EventKind || (exports.EventKind = {}));
|
|
48
|
+
// FIXME: Missing documentation for TransferDirection
|
|
49
|
+
var TransferDirection;
|
|
50
|
+
(function (TransferDirection) {
|
|
51
|
+
// FIXME: Missing documentation for In
|
|
52
|
+
TransferDirection["In"] = "In";
|
|
53
|
+
// FIXME: Missing documentation for Out
|
|
54
|
+
TransferDirection["Out"] = "Out";
|
|
55
|
+
})(TransferDirection = exports.TransferDirection || (exports.TransferDirection = {}));
|
|
56
|
+
// FIXME: Missing documentation for TransferStatus
|
|
57
|
+
var TransferStatus;
|
|
58
|
+
(function (TransferStatus) {
|
|
59
|
+
// FIXME: Missing documentation for Pending
|
|
60
|
+
TransferStatus["Pending"] = "Pending";
|
|
61
|
+
// FIXME: Missing documentation for Broadcasted
|
|
62
|
+
TransferStatus["Broadcasted"] = "Broadcasted";
|
|
63
|
+
// FIXME: Missing documentation for Confirmed
|
|
64
|
+
TransferStatus["Confirmed"] = "Confirmed";
|
|
65
|
+
// FIXME: Missing documentation for Failed
|
|
66
|
+
TransferStatus["Failed"] = "Failed";
|
|
67
|
+
})(TransferStatus = exports.TransferStatus || (exports.TransferStatus = {}));
|
|
68
|
+
// FIXME: Missing documentation for TransactionStatus
|
|
69
|
+
var TransactionStatus;
|
|
70
|
+
(function (TransactionStatus) {
|
|
71
|
+
// FIXME: Missing documentation for Pending
|
|
72
|
+
TransactionStatus["Pending"] = "Pending";
|
|
73
|
+
// FIXME: Missing documentation for Broadcasted
|
|
74
|
+
TransactionStatus["Broadcasted"] = "Broadcasted";
|
|
75
|
+
// FIXME: Missing documentation for Confirmed
|
|
76
|
+
TransactionStatus["Confirmed"] = "Confirmed";
|
|
77
|
+
// FIXME: Missing documentation for Failed
|
|
78
|
+
TransactionStatus["Failed"] = "Failed";
|
|
79
|
+
})(TransactionStatus = exports.TransactionStatus || (exports.TransactionStatus = {}));
|
|
80
|
+
// FIXME: Missing documentation for SignatureStatus
|
|
81
|
+
var SignatureStatus;
|
|
82
|
+
(function (SignatureStatus) {
|
|
83
|
+
// FIXME: Missing documentation for Pending
|
|
84
|
+
SignatureStatus["Pending"] = "Pending";
|
|
85
|
+
// FIXME: Missing documentation for Signed
|
|
86
|
+
SignatureStatus["Signed"] = "Signed";
|
|
87
|
+
// FIXME: Missing documentation for Failed
|
|
88
|
+
SignatureStatus["Failed"] = "Failed";
|
|
89
|
+
})(SignatureStatus = exports.SignatureStatus || (exports.SignatureStatus = {}));
|
|
90
|
+
// FIXME: Missing documentation for BlockchainNetwork
|
|
91
|
+
var BlockchainNetwork;
|
|
92
|
+
(function (BlockchainNetwork) {
|
|
93
|
+
// FIXME: Missing documentation for Bitcoin
|
|
94
|
+
BlockchainNetwork["Bitcoin"] = "Bitcoin";
|
|
95
|
+
// FIXME: Missing documentation for BitcoinTestnet
|
|
96
|
+
BlockchainNetwork["BitcoinTestnet"] = "BitcoinTestnet";
|
|
97
|
+
// FIXME: Missing documentation for Bsc
|
|
98
|
+
BlockchainNetwork["Bsc"] = "Bsc";
|
|
99
|
+
// FIXME: Missing documentation for BscTestnet
|
|
100
|
+
BlockchainNetwork["BscTestnet"] = "BscTestnet";
|
|
101
|
+
// FIXME: Missing documentation for Ethereum
|
|
102
|
+
BlockchainNetwork["Ethereum"] = "Ethereum";
|
|
103
|
+
// FIXME: Missing documentation for EthereumGoerli
|
|
104
|
+
BlockchainNetwork["EthereumGoerli"] = "EthereumGoerli";
|
|
105
|
+
// FIXME: Missing documentation for EthereumSepolia
|
|
106
|
+
BlockchainNetwork["EthereumSepolia"] = "EthereumSepolia";
|
|
107
|
+
// FIXME: Missing documentation for Polygon
|
|
108
|
+
BlockchainNetwork["Polygon"] = "Polygon";
|
|
109
|
+
// FIXME: Missing documentation for PolygonMumbai
|
|
110
|
+
BlockchainNetwork["PolygonMumbai"] = "PolygonMumbai";
|
|
111
|
+
// FIXME: Missing documentation for Ripple
|
|
112
|
+
BlockchainNetwork["Ripple"] = "Ripple";
|
|
113
|
+
// FIXME: Missing documentation for RippleTestnet
|
|
114
|
+
BlockchainNetwork["RippleTestnet"] = "RippleTestnet";
|
|
115
|
+
// FIXME: Missing documentation for Solana
|
|
116
|
+
BlockchainNetwork["Solana"] = "Solana";
|
|
117
|
+
// FIXME: Missing documentation for SolanaDevnet
|
|
118
|
+
BlockchainNetwork["SolanaDevnet"] = "SolanaDevnet";
|
|
119
|
+
// FIXME: Missing documentation for Tron
|
|
120
|
+
BlockchainNetwork["Tron"] = "Tron";
|
|
121
|
+
// FIXME: Missing documentation for TronShasta
|
|
122
|
+
BlockchainNetwork["TronShasta"] = "TronShasta";
|
|
123
|
+
})(BlockchainNetwork = exports.BlockchainNetwork || (exports.BlockchainNetwork = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { WalletsClient } from './codegen/Wallets';
|
|
11
|
+
import { CredentialSigner } from './signer';
|
|
12
|
+
export type DfnsApiClientOptions = DfnsBaseApiOptions & {
|
|
13
|
+
signer: CredentialSigner;
|
|
14
|
+
};
|
|
15
|
+
export declare class DfnsApiClient {
|
|
16
|
+
private apiOptions;
|
|
17
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
18
|
+
get assets(): AssetsClient;
|
|
19
|
+
get auth(): AuthClient;
|
|
20
|
+
get blockchains(): BlockchainsClient;
|
|
21
|
+
get callbacks(): CallbacksClient;
|
|
22
|
+
get permissions(): PermissionsClient;
|
|
23
|
+
get policyExecution(): PolicyExecutionClient;
|
|
24
|
+
get policyManagement(): PolicyManagementClient;
|
|
25
|
+
get publicKeys(): PublicKeysClient;
|
|
26
|
+
get wallets(): WalletsClient;
|
|
27
|
+
}
|
package/dfnsApiClient.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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 Wallets_1 = require("./codegen/Wallets");
|
|
13
|
+
class DfnsApiClient {
|
|
14
|
+
constructor(apiOptions) {
|
|
15
|
+
this.apiOptions = apiOptions;
|
|
16
|
+
}
|
|
17
|
+
get assets() {
|
|
18
|
+
return new Assets_1.AssetsClient(this.apiOptions);
|
|
19
|
+
}
|
|
20
|
+
get auth() {
|
|
21
|
+
return new Auth_1.AuthClient(this.apiOptions);
|
|
22
|
+
}
|
|
23
|
+
get blockchains() {
|
|
24
|
+
return new Blockchains_1.BlockchainsClient(this.apiOptions);
|
|
25
|
+
}
|
|
26
|
+
get callbacks() {
|
|
27
|
+
return new Callbacks_1.CallbacksClient(this.apiOptions);
|
|
28
|
+
}
|
|
29
|
+
get permissions() {
|
|
30
|
+
return new Permissions_1.PermissionsClient(this.apiOptions);
|
|
31
|
+
}
|
|
32
|
+
get policyExecution() {
|
|
33
|
+
return new PolicyExecution_1.PolicyExecutionClient(this.apiOptions);
|
|
34
|
+
}
|
|
35
|
+
get policyManagement() {
|
|
36
|
+
return new PolicyManagement_1.PolicyManagementClient(this.apiOptions);
|
|
37
|
+
}
|
|
38
|
+
get publicKeys() {
|
|
39
|
+
return new PublicKeys_1.PublicKeysClient(this.apiOptions);
|
|
40
|
+
}
|
|
41
|
+
get wallets() {
|
|
42
|
+
return new Wallets_1.WalletsClient(this.apiOptions);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
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,24 @@
|
|
|
1
|
+
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
|
+
import { DelegatedAssetsClient } from './codegen/Assets';
|
|
3
|
+
import { DelegatedBlockchainsClient } from './codegen/Blockchains';
|
|
4
|
+
import { DelegatedCallbacksClient } from './codegen/Callbacks';
|
|
5
|
+
import { DelegatedPermissionsClient } from './codegen/Permissions';
|
|
6
|
+
import { DelegatedPolicyExecutionClient } from './codegen/PolicyExecution';
|
|
7
|
+
import { DelegatedPolicyManagementClient } from './codegen/PolicyManagement';
|
|
8
|
+
import { DelegatedPublicKeysClient } from './codegen/PublicKeys';
|
|
9
|
+
import { DelegatedWalletsClient } from './codegen/Wallets';
|
|
10
|
+
export type DfnsDelegatedApiClientOptions = DfnsBaseApiOptions & {
|
|
11
|
+
authToken: string;
|
|
12
|
+
};
|
|
13
|
+
export declare class DfnsDelegatedApiClient {
|
|
14
|
+
private apiOptions;
|
|
15
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
16
|
+
get assets(): DelegatedAssetsClient;
|
|
17
|
+
get blockchains(): DelegatedBlockchainsClient;
|
|
18
|
+
get callbacks(): DelegatedCallbacksClient;
|
|
19
|
+
get permissions(): DelegatedPermissionsClient;
|
|
20
|
+
get policyExecution(): DelegatedPolicyExecutionClient;
|
|
21
|
+
get policyManagement(): DelegatedPolicyManagementClient;
|
|
22
|
+
get publicKeys(): DelegatedPublicKeysClient;
|
|
23
|
+
get wallets(): DelegatedWalletsClient;
|
|
24
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DfnsDelegatedApiClient = void 0;
|
|
4
|
+
const Assets_1 = require("./codegen/Assets");
|
|
5
|
+
const Blockchains_1 = require("./codegen/Blockchains");
|
|
6
|
+
const Callbacks_1 = require("./codegen/Callbacks");
|
|
7
|
+
const Permissions_1 = require("./codegen/Permissions");
|
|
8
|
+
const PolicyExecution_1 = require("./codegen/PolicyExecution");
|
|
9
|
+
const PolicyManagement_1 = require("./codegen/PolicyManagement");
|
|
10
|
+
const PublicKeys_1 = require("./codegen/PublicKeys");
|
|
11
|
+
const Wallets_1 = require("./codegen/Wallets");
|
|
12
|
+
class DfnsDelegatedApiClient {
|
|
13
|
+
constructor(apiOptions) {
|
|
14
|
+
this.apiOptions = apiOptions;
|
|
15
|
+
}
|
|
16
|
+
get assets() {
|
|
17
|
+
return new Assets_1.DelegatedAssetsClient(this.apiOptions);
|
|
18
|
+
}
|
|
19
|
+
get blockchains() {
|
|
20
|
+
return new Blockchains_1.DelegatedBlockchainsClient(this.apiOptions);
|
|
21
|
+
}
|
|
22
|
+
get callbacks() {
|
|
23
|
+
return new Callbacks_1.DelegatedCallbacksClient(this.apiOptions);
|
|
24
|
+
}
|
|
25
|
+
get permissions() {
|
|
26
|
+
return new Permissions_1.DelegatedPermissionsClient(this.apiOptions);
|
|
27
|
+
}
|
|
28
|
+
get policyExecution() {
|
|
29
|
+
return new PolicyExecution_1.DelegatedPolicyExecutionClient(this.apiOptions);
|
|
30
|
+
}
|
|
31
|
+
get policyManagement() {
|
|
32
|
+
return new PolicyManagement_1.DelegatedPolicyManagementClient(this.apiOptions);
|
|
33
|
+
}
|
|
34
|
+
get publicKeys() {
|
|
35
|
+
return new PublicKeys_1.DelegatedPublicKeysClient(this.apiOptions);
|
|
36
|
+
}
|
|
37
|
+
get wallets() {
|
|
38
|
+
return new Wallets_1.DelegatedWalletsClient(this.apiOptions);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.DfnsDelegatedApiClient = DfnsDelegatedApiClient;
|