@dfns/sdk 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/baseAuthApi.d.ts +53 -0
  2. package/baseAuthApi.js +39 -0
  3. package/codegen/ApiKeys/ApiKeysClient.d.ts +10 -0
  4. package/codegen/ApiKeys/ApiKeysClient.js +56 -0
  5. package/codegen/ApiKeys/DelegatedApiKeysClient.d.ts +13 -0
  6. package/codegen/ApiKeys/DelegatedApiKeysClient.js +88 -0
  7. package/codegen/ApiKeys/index.d.ts +3 -0
  8. package/codegen/ApiKeys/index.js +19 -0
  9. package/codegen/ApiKeys/types.d.ts +16 -0
  10. package/codegen/ApiKeys/types.js +2 -0
  11. package/codegen/Assets/AssetsClient.d.ts +14 -0
  12. package/codegen/Assets/AssetsClient.js +105 -0
  13. package/codegen/Assets/DelegatedAssetsClient.d.ts +18 -0
  14. package/codegen/Assets/DelegatedAssetsClient.js +152 -0
  15. package/codegen/Assets/index.d.ts +3 -0
  16. package/codegen/Assets/index.js +19 -0
  17. package/codegen/Assets/types.d.ts +39 -0
  18. package/codegen/Assets/types.js +2 -0
  19. package/codegen/Auth/AuthClient.d.ts +62 -0
  20. package/codegen/Auth/AuthClient.js +667 -0
  21. package/codegen/Auth/DelegatedAuthClient.d.ts +98 -0
  22. package/codegen/Auth/DelegatedAuthClient.js +1223 -0
  23. package/codegen/Auth/index.d.ts +3 -0
  24. package/codegen/Auth/index.js +19 -0
  25. package/codegen/Auth/types.d.ts +243 -0
  26. package/codegen/Auth/types.js +2 -0
  27. package/codegen/Callbacks/CallbacksClient.d.ts +12 -0
  28. package/codegen/Callbacks/CallbacksClient.js +78 -0
  29. package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +15 -0
  30. package/codegen/Callbacks/DelegatedCallbacksClient.js +110 -0
  31. package/codegen/Callbacks/index.d.ts +3 -0
  32. package/codegen/Callbacks/index.js +19 -0
  33. package/codegen/Callbacks/types.d.ts +23 -0
  34. package/codegen/Callbacks/types.js +2 -0
  35. package/codegen/Permissions/DelegatedPermissionsClient.d.ts +28 -0
  36. package/codegen/Permissions/DelegatedPermissionsClient.js +297 -0
  37. package/codegen/Permissions/PermissionsClient.d.ts +19 -0
  38. package/codegen/Permissions/PermissionsClient.js +169 -0
  39. package/codegen/Permissions/index.d.ts +3 -0
  40. package/codegen/Permissions/index.js +19 -0
  41. package/codegen/Permissions/types.d.ts +71 -0
  42. package/codegen/Permissions/types.js +2 -0
  43. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
  44. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +62 -0
  45. package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
  46. package/codegen/PolicyExecution/PolicyExecutionClient.js +46 -0
  47. package/codegen/PolicyExecution/index.d.ts +3 -0
  48. package/codegen/PolicyExecution/index.js +19 -0
  49. package/codegen/PolicyExecution/types.d.ts +16 -0
  50. package/codegen/PolicyExecution/types.js +2 -0
  51. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +31 -0
  52. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +324 -0
  53. package/codegen/PolicyManagement/PolicyManagementClient.d.ts +21 -0
  54. package/codegen/PolicyManagement/PolicyManagementClient.js +185 -0
  55. package/codegen/PolicyManagement/index.d.ts +3 -0
  56. package/codegen/PolicyManagement/index.js +19 -0
  57. package/codegen/PolicyManagement/types.d.ts +91 -0
  58. package/codegen/PolicyManagement/types.js +2 -0
  59. package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
  60. package/codegen/PublicKeys/DelegatedPublicKeysClient.js +191 -0
  61. package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
  62. package/codegen/PublicKeys/PublicKeysClient.js +130 -0
  63. package/codegen/PublicKeys/index.d.ts +3 -0
  64. package/codegen/PublicKeys/index.js +19 -0
  65. package/codegen/PublicKeys/types.d.ts +51 -0
  66. package/codegen/PublicKeys/types.js +2 -0
  67. package/codegen/Wallets/DelegatedWalletsClient.d.ts +26 -0
  68. package/codegen/Wallets/DelegatedWalletsClient.js +249 -0
  69. package/codegen/Wallets/WalletsClient.d.ts +21 -0
  70. package/codegen/Wallets/WalletsClient.js +188 -0
  71. package/codegen/Wallets/index.d.ts +3 -0
  72. package/codegen/Wallets/index.js +19 -0
  73. package/codegen/Wallets/types.d.ts +87 -0
  74. package/codegen/Wallets/types.js +2 -0
  75. package/codegen/datamodel/ApiKeys/errors.d.ts +6 -0
  76. package/codegen/datamodel/ApiKeys/errors.js +15 -0
  77. package/codegen/datamodel/ApiKeys/index.d.ts +3 -0
  78. package/codegen/datamodel/ApiKeys/index.js +19 -0
  79. package/codegen/datamodel/ApiKeys/responses.d.ts +25 -0
  80. package/codegen/datamodel/ApiKeys/responses.js +2 -0
  81. package/codegen/datamodel/ApiKeys/types.d.ts +32 -0
  82. package/codegen/datamodel/ApiKeys/types.js +11 -0
  83. package/codegen/datamodel/Assets/errors.d.ts +11 -0
  84. package/codegen/datamodel/Assets/errors.js +17 -0
  85. package/codegen/datamodel/Assets/index.d.ts +3 -0
  86. package/codegen/datamodel/Assets/index.js +19 -0
  87. package/codegen/datamodel/Assets/responses.d.ts +45 -0
  88. package/codegen/datamodel/Assets/responses.js +2 -0
  89. package/codegen/datamodel/Assets/types.d.ts +225 -0
  90. package/codegen/datamodel/Assets/types.js +75 -0
  91. package/codegen/datamodel/Auth/index.d.ts +2 -0
  92. package/codegen/datamodel/Auth/index.js +18 -0
  93. package/codegen/datamodel/Auth/responses.d.ts +348 -0
  94. package/codegen/datamodel/Auth/responses.js +2 -0
  95. package/codegen/datamodel/Auth/types.d.ts +610 -0
  96. package/codegen/datamodel/Auth/types.js +127 -0
  97. package/codegen/datamodel/Callbacks/index.d.ts +2 -0
  98. package/codegen/datamodel/Callbacks/index.js +18 -0
  99. package/codegen/datamodel/Callbacks/responses.d.ts +36 -0
  100. package/codegen/datamodel/Callbacks/responses.js +2 -0
  101. package/codegen/datamodel/Callbacks/types.d.ts +43 -0
  102. package/codegen/datamodel/Callbacks/types.js +39 -0
  103. package/codegen/datamodel/Foundations/errors.d.ts +121 -0
  104. package/codegen/datamodel/Foundations/errors.js +169 -0
  105. package/codegen/datamodel/Foundations/index.d.ts +2 -0
  106. package/codegen/datamodel/Foundations/index.js +18 -0
  107. package/codegen/datamodel/Foundations/types.d.ts +9754 -0
  108. package/codegen/datamodel/Foundations/types.js +57741 -0
  109. package/codegen/datamodel/Permissions/index.d.ts +2 -0
  110. package/codegen/datamodel/Permissions/index.js +18 -0
  111. package/codegen/datamodel/Permissions/responses.d.ts +75 -0
  112. package/codegen/datamodel/Permissions/responses.js +2 -0
  113. package/codegen/datamodel/Permissions/types.d.ts +106 -0
  114. package/codegen/datamodel/Permissions/types.js +65 -0
  115. package/codegen/datamodel/PolicyExecution/errors.d.ts +11 -0
  116. package/codegen/datamodel/PolicyExecution/errors.js +17 -0
  117. package/codegen/datamodel/PolicyExecution/index.d.ts +3 -0
  118. package/codegen/datamodel/PolicyExecution/index.js +19 -0
  119. package/codegen/datamodel/PolicyExecution/responses.d.ts +17 -0
  120. package/codegen/datamodel/PolicyExecution/responses.js +2 -0
  121. package/codegen/datamodel/PolicyExecution/types.d.ts +45 -0
  122. package/codegen/datamodel/PolicyExecution/types.js +15 -0
  123. package/codegen/datamodel/PolicyManagement/index.d.ts +2 -0
  124. package/codegen/datamodel/PolicyManagement/index.js +18 -0
  125. package/codegen/datamodel/PolicyManagement/responses.d.ts +83 -0
  126. package/codegen/datamodel/PolicyManagement/responses.js +2 -0
  127. package/codegen/datamodel/PolicyManagement/types.d.ts +252 -0
  128. package/codegen/datamodel/PolicyManagement/types.js +81 -0
  129. package/codegen/datamodel/PublicKeys/index.d.ts +2 -0
  130. package/codegen/datamodel/PublicKeys/index.js +18 -0
  131. package/codegen/datamodel/PublicKeys/responses.d.ts +56 -0
  132. package/codegen/datamodel/PublicKeys/responses.js +2 -0
  133. package/codegen/datamodel/PublicKeys/types.d.ts +222 -0
  134. package/codegen/datamodel/PublicKeys/types.js +59 -0
  135. package/codegen/datamodel/Wallets/index.d.ts +2 -0
  136. package/codegen/datamodel/Wallets/index.js +18 -0
  137. package/codegen/datamodel/Wallets/responses.d.ts +77 -0
  138. package/codegen/datamodel/Wallets/responses.js +2 -0
  139. package/codegen/datamodel/Wallets/types.d.ts +261 -0
  140. package/codegen/datamodel/Wallets/types.js +89 -0
  141. package/dfnsApiClient.d.ts +27 -0
  142. package/dfnsApiClient.js +45 -0
  143. package/dfnsAuthenticator.d.ts +11 -0
  144. package/dfnsAuthenticator.js +18 -0
  145. package/dfnsDelegatedApiClient.d.ts +24 -0
  146. package/dfnsDelegatedApiClient.js +41 -0
  147. package/dfnsError.d.ts +5 -0
  148. package/dfnsError.js +11 -0
  149. package/index.d.ts +3 -0
  150. package/index.js +19 -0
  151. package/package.json +11 -0
  152. package/signer.d.ts +47 -0
  153. package/signer.js +2 -0
  154. package/utils/base64.d.ts +3 -0
  155. package/utils/base64.js +20 -0
  156. package/utils/fetch.d.ts +12 -0
  157. package/utils/fetch.js +89 -0
  158. package/utils/nonce.d.ts +1 -0
  159. package/utils/nonce.js +12 -0
  160. package/utils/url.d.ts +4 -0
  161. package/utils/url.js +15 -0
@@ -0,0 +1,32 @@
1
+ import { EntityId, IsoDatetime } from '../Foundations';
2
+ export type ApiKeyRecord = {
3
+ id: EntityId;
4
+ status: ApiKeyStatus;
5
+ externalId?: string;
6
+ orgId: EntityId;
7
+ dateCreated: IsoDatetime;
8
+ name?: string;
9
+ authorId: EntityId;
10
+ scopes: string[];
11
+ };
12
+ export type ApiKeyRecordWithToken = {
13
+ id: EntityId;
14
+ status: ApiKeyStatus;
15
+ externalId?: string;
16
+ orgId: EntityId;
17
+ dateCreated: IsoDatetime;
18
+ name?: string;
19
+ authorId: EntityId;
20
+ scopes: string[];
21
+ token: ApiKeyValue;
22
+ };
23
+ export type ApiKeyValue = string;
24
+ export type CreateApiKeyInput = {
25
+ scopes: string[];
26
+ externalId?: string;
27
+ name: string;
28
+ };
29
+ export declare enum ApiKeyStatus {
30
+ Active = "Active",
31
+ Archived = "Archived"
32
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiKeyStatus = void 0;
4
+ // FIXME: Missing documentation for ApiKeyStatus
5
+ var ApiKeyStatus;
6
+ (function (ApiKeyStatus) {
7
+ // FIXME: Missing documentation for Active
8
+ ApiKeyStatus["Active"] = "Active";
9
+ // FIXME: Missing documentation for Archived
10
+ ApiKeyStatus["Archived"] = "Archived";
11
+ })(ApiKeyStatus = exports.ApiKeyStatus || (exports.ApiKeyStatus = {}));
@@ -0,0 +1,11 @@
1
+ import { DfnsError } from '../Foundations';
2
+ export declare class InsufficientFunds extends DfnsError {
3
+ name: string;
4
+ serviceName: string;
5
+ message: string;
6
+ causes?: string[];
7
+ shouldTriggerInvestigaton: boolean;
8
+ isDfnsError: boolean;
9
+ httpStatus: number;
10
+ errorName: string;
11
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InsufficientFunds = void 0;
4
+ const Foundations_1 = require("../Foundations");
5
+ class InsufficientFunds extends Foundations_1.DfnsError {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.name = 'InsufficientFunds';
9
+ // FIXME: Missing documentation for isDfnsError
10
+ this.isDfnsError = true;
11
+ // FIXME: Missing documentation for httpStatus
12
+ this.httpStatus = 422;
13
+ // FIXME: Missing documentation for errorName
14
+ this.errorName = 'Insufficient funds in asset account';
15
+ }
16
+ }
17
+ exports.InsufficientFunds = InsufficientFunds;
@@ -0,0 +1,3 @@
1
+ export * from './errors';
2
+ export * from './responses';
3
+ export * from './types';
@@ -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("./errors"), exports);
18
+ __exportStar(require("./responses"), exports);
19
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,45 @@
1
+ import { BadRequestError, EntityNotFoundError, ForbiddenError, PaymentRequiredError, UnauthorizedError } from '../Foundations';
2
+ import { InsufficientFunds } from './errors';
3
+ import { AssetAccount, AssetAccountBalance, Payment } from './types';
4
+ export type InitiatePaymentSuccess = Payment;
5
+ export type InitiatePaymentError = {
6
+ error: BadRequestError | PaymentRequiredError | InsufficientFunds | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
7
+ };
8
+ export type InitiatePaymentResponse = InitiatePaymentSuccess | InitiatePaymentError;
9
+ export type GetPaymentByIdSuccess = Payment;
10
+ export type GetPaymentByIdError = {
11
+ error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
12
+ };
13
+ export type GetPaymentByIdResponse = GetPaymentByIdSuccess | GetPaymentByIdError;
14
+ export type ListPaymentsSuccess = Payment;
15
+ export type ListPaymentsError = {
16
+ error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
17
+ };
18
+ export type ListPaymentsResponse = ListPaymentsSuccess | ListPaymentsError;
19
+ export type CreateAssetAccountSuccess = AssetAccount;
20
+ export type CreateAssetAccountError = {
21
+ error: EntityNotFoundError | BadRequestError | PaymentRequiredError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
22
+ };
23
+ export type CreateAssetAccountResponse = CreateAssetAccountSuccess | CreateAssetAccountError;
24
+ export type GetAssetAccountByIdSuccess = AssetAccount;
25
+ export type GetAssetAccountByIdError = {
26
+ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
27
+ };
28
+ export type GetAssetAccountByIdResponse = GetAssetAccountByIdSuccess | GetAssetAccountByIdError;
29
+ export type ListAssetAccountsSuccess = {
30
+ items: AssetAccount[];
31
+ };
32
+ export type ListAssetAccountsError = {
33
+ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
34
+ };
35
+ export type ListAssetAccountsResponse = ListAssetAccountsSuccess | ListAssetAccountsError;
36
+ export type ArchiveAssetAccountSuccess = AssetAccount;
37
+ export type ArchiveAssetAccountError = {
38
+ error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
39
+ };
40
+ export type ArchiveAssetAccountResponse = ArchiveAssetAccountSuccess | ArchiveAssetAccountError;
41
+ export type GetAssetAccountBalanceByIdSuccess = AssetAccountBalance;
42
+ export type GetAssetAccountBalanceByIdError = {
43
+ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
44
+ };
45
+ export type GetAssetAccountBalanceByIdResponse = GetAssetAccountBalanceByIdSuccess | GetAssetAccountBalanceByIdError;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,225 @@
1
+ import { Amount, AssetSymbol, DfnsCertificate, EntityId, Initiator, IntegerPositiveStrict, IsoDatetime, PublicKey, Tag } from '../Foundations';
2
+ export type PaymentInitiation = {
3
+ id: EntityId;
4
+ paymentId: EntityId;
5
+ externalId?: EntityId;
6
+ status: PaymentInitiationStatus;
7
+ orgId?: EntityId;
8
+ initiator: Initiator;
9
+ assetSymbol: AssetSymbol;
10
+ amount: Amount;
11
+ sender: DfnsAssetAccount;
12
+ receiver: PaymentInstrument;
13
+ dateInitiated: IsoDatetime;
14
+ /**
15
+ * In case payment initiation is rejected by the system, this field will contain information about it.
16
+ *
17
+ */
18
+ rejectionReason?: string;
19
+ };
20
+ export type BlockchainWalletAddress = {
21
+ kind: PaymentInstrumentKind.BlockchainWalletAddress;
22
+ address: string;
23
+ };
24
+ export type DfnsAssetAccount = {
25
+ kind: PaymentInstrumentKind.DfnsAssetAccount;
26
+ id: EntityId;
27
+ };
28
+ export type AssetAccount = {
29
+ /**
30
+ * Multiple tags can be attached to an entity to categorise or otherwise mark it. For example tags could indicate risk (High, Medium, Low), departments (Trading, Sales, IT), purpose (Treasury, Hot, Deposits), and jurisdictions (US, EU, DE).
31
+ *
32
+ * Multiple tags can be attached to same entity.
33
+ */
34
+ tags?: Tag[];
35
+ /**
36
+ * Field can be used if entity is created in external (customer’s) system first. This way the external id can be attached to identify entity from Dfns’s data store.
37
+ */
38
+ externalId?: string;
39
+ /**
40
+ * Indicates id of the Organisation, such as usually a customer, or sub-devision, sub-tenant, and others.
41
+ */
42
+ orgId: EntityId;
43
+ id: EntityId;
44
+ /**
45
+ * Indicates whether account is ready to be used.
46
+ */
47
+ status: AssetAccountStatus;
48
+ /**
49
+ * Blockchain address for a chosen Blockchain network.
50
+ */
51
+ address?: string;
52
+ /**
53
+ * `PublicKey` which is used by `AssetAccount`. Usually this is used to derive addresses on a given blockchain network.
54
+ *
55
+ * Alternatively can be used to verify signatures produced by the platform.
56
+ */
57
+ publicKey?: string;
58
+ publicKeyId?: EntityId;
59
+ /**
60
+ * # [ENUM]
61
+ *
62
+ * Asset symbol indicating which asset this account is managing. BTC or ETH are obvious examples, but there are thousands of possible symbols. In case of coins (ERC20 and alike) use `COIN.BLOCKCHAIN` syntax, such as USDC.ETH or USDC.SOL to indicate that USDC on Ethereum or USDC on Solana is required. To get a list of all allowed values, send a `CreateAssetAccount` request with the `assetSymbol` field empty.
63
+ */
64
+ assetSymbol: AssetSymbol;
65
+ /**
66
+ * Custom name that can be added for an account.
67
+ */
68
+ name: string;
69
+ dateCreated: IsoDatetime;
70
+ dateUpdate: IsoDatetime;
71
+ authorizations?: AssetAccountAuthorization[];
72
+ };
73
+ export type Payment = {
74
+ /**
75
+ * Multiple tags can be attached to an entity to categorise or otherwise mark it. For example tags could indicate risk (High, Medium, Low), departments (Trading, Sales, IT), purpose (Treasury, Hot, Deposits), and jurisdictions (US, EU, DE).
76
+ *
77
+ * Multiple tags can be attached to same entity.
78
+ */
79
+ tags?: Tag[];
80
+ /**
81
+ * Field can be used if entity is created in external (customer’s) system first. This way the external id can be attached to identify entity from Dfns’s data store.
82
+ */
83
+ externalId?: string;
84
+ /**
85
+ * Indicates id of the Organisation, such as usually a customer, or sub-devision, sub-tenant, and others.
86
+ */
87
+ orgId: EntityId;
88
+ id: EntityId;
89
+ status: PaymentStatus;
90
+ initiator: Initiator;
91
+ assetAccountId: EntityId;
92
+ assetSymbol: AssetSymbol;
93
+ amount: Amount;
94
+ sender: PaymentInstrument;
95
+ receiver: PaymentInstrument;
96
+ /**
97
+ * SWIFT (MT, ISO15022) field. Represents additional information about payment.
98
+ *
99
+ */
100
+ narrative?: string;
101
+ note?: string;
102
+ receiverAddress: string;
103
+ policyCertificate?: DfnsCertificate;
104
+ dateCreated: IsoDatetime;
105
+ dateUpdated: IsoDatetime;
106
+ dateExecuted?: IsoDatetime;
107
+ dateBroadcasted?: IsoDatetime;
108
+ dateFirstConfirmed?: IsoDatetime;
109
+ dateConfirmed?: IsoDatetime;
110
+ dateSettled?: IsoDatetime;
111
+ txHash?: string;
112
+ blockHeight?: number;
113
+ direction: PaymentDirection;
114
+ fee?: Amount;
115
+ };
116
+ export type AssetAccountAuthorization = {
117
+ kind: AssetAccountAuthorizationKind;
118
+ entityId: EntityId;
119
+ permission: AssetAccountPermissions;
120
+ };
121
+ /**
122
+ * Balance of one asset account.
123
+ */
124
+ export type AssetAccountBalance = {
125
+ /**
126
+ * Id of the AssetAccount.
127
+ */
128
+ id: EntityId;
129
+ /**
130
+ * Asset Symbol of the account.
131
+ */
132
+ assetSymbol: AssetSymbol;
133
+ /**
134
+ * Balance of the account.
135
+ */
136
+ balance: Amount;
137
+ maxUnitBalance: Amount;
138
+ };
139
+ export type UpdateAssetAccountPayload = {
140
+ /**
141
+ * Indicates whether account is ready to be used.
142
+ */
143
+ status: AssetAccountStatus;
144
+ /**
145
+ * Blockchain address for a chosen Blockchain network.
146
+ */
147
+ address?: string;
148
+ /**
149
+ * `PublicKey` which is used by `AssetAccount`. Usually this is used to derive addresses on a given blockchain network.
150
+ *
151
+ * Alternatively can be used to verify signatures produced by the platform.
152
+ */
153
+ publicKey?: string;
154
+ /**
155
+ * Custom name that can be added for an account.
156
+ */
157
+ name?: string;
158
+ };
159
+ export type CreateAssetAccountInput = {
160
+ /**
161
+ * # [ENUM]
162
+ *
163
+ * Asset symbol indicating which asset this account is managing. BTC or ETH are obvious examples, but there are thousands of possible symbols. In case of coins (ERC20 and alike) use `COIN.BLOCKCHAIN` syntax, such as USDC.ETH or USDC.SOL to indicate that USDC on Ethereum or USDC on Solana is required. To get a list of all allowed values, send a `CreateAssetAccount` request with the `assetSymbol` field empty.
164
+ */
165
+ assetSymbol: AssetSymbol;
166
+ groupSize?: IntegerPositiveStrict;
167
+ groupThreshold?: IntegerPositiveStrict;
168
+ /**
169
+ * `PublicKey` which is used by `AssetAccount`. Usually this is used to derive addresses on a given blockchain network.
170
+ *
171
+ * Alternatively can be used to verify signatures produced by the platform.
172
+ */
173
+ publicKey?: PublicKey;
174
+ externalId?: string;
175
+ tags?: Tag[];
176
+ /**
177
+ * Custom name that can be added for an account.
178
+ */
179
+ name?: string;
180
+ };
181
+ export type CreatePaymentInput = {
182
+ externalId?: string;
183
+ assetSymbol: AssetSymbol;
184
+ amount: Amount;
185
+ receiver: PaymentInstrument;
186
+ note?: string;
187
+ narrative?: string;
188
+ };
189
+ export type PaymentInstrument = BlockchainWalletAddress | DfnsAssetAccount;
190
+ export declare enum PaymentInstrumentKind {
191
+ DfnsAssetAccount = "DfnsAssetAccount",
192
+ BlockchainWalletAddress = "BlockchainWalletAddress"
193
+ }
194
+ export declare enum PaymentInitiationStatus {
195
+ Initiated = "Initiated",
196
+ Canceled = "Canceled",
197
+ Rejected = "Rejected"
198
+ }
199
+ export declare enum AssetAccountStatus {
200
+ Creating = "Creating",
201
+ Enabled = "Enabled",
202
+ Failed = "Failed"
203
+ }
204
+ export declare enum PaymentStatus {
205
+ Initiated = "Initiated",
206
+ Rejected = "Rejected",
207
+ Approved = "Approved",
208
+ Executed = "Executed",
209
+ Failed = "Failed",
210
+ Confirmed = "Confirmed"
211
+ }
212
+ export declare enum AssetAccountAuthorizationKind {
213
+ Employee = "Employee",
214
+ Group = "Group",
215
+ ApiKey = "ApiKey"
216
+ }
217
+ export declare enum AssetAccountPermissions {
218
+ InitiatePayments = "InitiatePayments",
219
+ ReadBalance = "ReadBalance",
220
+ ReadPublicKey = "ReadPublicKey"
221
+ }
222
+ export declare enum PaymentDirection {
223
+ Incoming = "Incoming",
224
+ Outgoing = "Outgoing"
225
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentDirection = exports.AssetAccountPermissions = exports.AssetAccountAuthorizationKind = exports.PaymentStatus = exports.AssetAccountStatus = exports.PaymentInitiationStatus = exports.PaymentInstrumentKind = void 0;
4
+ // FIXME: Missing documentation for PaymentInstrumentKind
5
+ var PaymentInstrumentKind;
6
+ (function (PaymentInstrumentKind) {
7
+ // FIXME: Missing documentation for DfnsAssetAccount
8
+ PaymentInstrumentKind["DfnsAssetAccount"] = "DfnsAssetAccount";
9
+ // FIXME: Missing documentation for BlockchainWalletAddress
10
+ PaymentInstrumentKind["BlockchainWalletAddress"] = "BlockchainWalletAddress";
11
+ })(PaymentInstrumentKind = exports.PaymentInstrumentKind || (exports.PaymentInstrumentKind = {}));
12
+ // FIXME: Missing documentation for PaymentInitiationStatus
13
+ var PaymentInitiationStatus;
14
+ (function (PaymentInitiationStatus) {
15
+ // FIXME: Missing documentation for Initiated
16
+ PaymentInitiationStatus["Initiated"] = "Initiated";
17
+ // FIXME: Missing documentation for Canceled
18
+ PaymentInitiationStatus["Canceled"] = "Canceled";
19
+ // FIXME: Missing documentation for Rejected
20
+ PaymentInitiationStatus["Rejected"] = "Rejected";
21
+ })(PaymentInitiationStatus = exports.PaymentInitiationStatus || (exports.PaymentInitiationStatus = {}));
22
+ // FIXME: Missing documentation for AssetAccountStatus
23
+ var AssetAccountStatus;
24
+ (function (AssetAccountStatus) {
25
+ //Initial state of `AssetAccount` entity, indicating that it’s being created at the moment.
26
+ AssetAccountStatus["Creating"] = "Creating";
27
+ // FIXME: Missing documentation for Enabled
28
+ AssetAccountStatus["Enabled"] = "Enabled";
29
+ // FIXME: Missing documentation for Failed
30
+ AssetAccountStatus["Failed"] = "Failed";
31
+ })(AssetAccountStatus = exports.AssetAccountStatus || (exports.AssetAccountStatus = {}));
32
+ // FIXME: Missing documentation for PaymentStatus
33
+ var PaymentStatus;
34
+ (function (PaymentStatus) {
35
+ //Payment order is received and initiated. It will execute later.
36
+ PaymentStatus["Initiated"] = "Initiated";
37
+ //Some Policy blocked the payment, it is not approved.
38
+ PaymentStatus["Rejected"] = "Rejected";
39
+ //Payment passed Policies, it is approved.
40
+ PaymentStatus["Approved"] = "Approved";
41
+ //Payment is successfully Executed and Broadcasted on the blockchain.
42
+ PaymentStatus["Executed"] = "Executed";
43
+ //Payment tried to execute, but failed doing so.
44
+ PaymentStatus["Failed"] = "Failed";
45
+ //Payment transaction is confirmed on the blockchain.
46
+ PaymentStatus["Confirmed"] = "Confirmed";
47
+ })(PaymentStatus = exports.PaymentStatus || (exports.PaymentStatus = {}));
48
+ // FIXME: Missing documentation for AssetAccountAuthorizationKind
49
+ var AssetAccountAuthorizationKind;
50
+ (function (AssetAccountAuthorizationKind) {
51
+ // FIXME: Missing documentation for Employee
52
+ AssetAccountAuthorizationKind["Employee"] = "Employee";
53
+ // FIXME: Missing documentation for Group
54
+ AssetAccountAuthorizationKind["Group"] = "Group";
55
+ // FIXME: Missing documentation for ApiKey
56
+ AssetAccountAuthorizationKind["ApiKey"] = "ApiKey";
57
+ })(AssetAccountAuthorizationKind = exports.AssetAccountAuthorizationKind || (exports.AssetAccountAuthorizationKind = {}));
58
+ // FIXME: Missing documentation for AssetAccountPermissions
59
+ var AssetAccountPermissions;
60
+ (function (AssetAccountPermissions) {
61
+ // FIXME: Missing documentation for InitiatePayments
62
+ AssetAccountPermissions["InitiatePayments"] = "InitiatePayments";
63
+ // FIXME: Missing documentation for ReadBalance
64
+ AssetAccountPermissions["ReadBalance"] = "ReadBalance";
65
+ // FIXME: Missing documentation for ReadPublicKey
66
+ AssetAccountPermissions["ReadPublicKey"] = "ReadPublicKey";
67
+ })(AssetAccountPermissions = exports.AssetAccountPermissions || (exports.AssetAccountPermissions = {}));
68
+ // FIXME: Missing documentation for PaymentDirection
69
+ var PaymentDirection;
70
+ (function (PaymentDirection) {
71
+ // FIXME: Missing documentation for Incoming
72
+ PaymentDirection["Incoming"] = "Incoming";
73
+ // FIXME: Missing documentation for Outgoing
74
+ PaymentDirection["Outgoing"] = "Outgoing";
75
+ })(PaymentDirection = exports.PaymentDirection || (exports.PaymentDirection = {}));
@@ -0,0 +1,2 @@
1
+ export * from './responses';
2
+ export * from './types';
@@ -0,0 +1,18 @@
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("./responses"), exports);
18
+ __exportStar(require("./types"), exports);