@dfns/sdk 0.5.4 → 0.5.5-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.
- package/dfnsApiClient.d.ts +2 -0
- package/dfnsApiClient.js +4 -0
- package/dfnsDelegatedApiClient.d.ts +2 -0
- package/dfnsDelegatedApiClient.js +4 -0
- package/generated/auth/client.d.ts +0 -1
- package/generated/auth/client.js +0 -12
- package/generated/auth/delegatedClient.d.ts +0 -1
- package/generated/auth/delegatedClient.js +0 -12
- package/generated/auth/types.d.ts +0 -15
- package/generated/exchanges/client.d.ts +13 -0
- package/generated/exchanges/client.js +91 -0
- package/generated/exchanges/delegatedClient.d.ts +17 -0
- package/generated/exchanges/delegatedClient.js +137 -0
- package/generated/exchanges/index.d.ts +3 -0
- package/generated/exchanges/index.js +19 -0
- package/generated/exchanges/types.d.ts +302 -0
- package/generated/exchanges/types.js +2 -0
- package/generated/permissions/types.d.ts +2 -2
- package/package.json +1 -1
- package/types/exchanges.d.ts +1 -0
- package/types/exchanges.js +17 -0
package/dfnsApiClient.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
2
|
import { AuthClient } from './generated/auth';
|
|
3
|
+
import { ExchangesClient } from './generated/exchanges';
|
|
3
4
|
import { NetworksClient } from './generated/networks';
|
|
4
5
|
import { PermissionsClient } from './generated/permissions';
|
|
5
6
|
import { PoliciesClient } from './generated/policies';
|
|
@@ -15,6 +16,7 @@ export declare class DfnsApiClient {
|
|
|
15
16
|
private apiOptions;
|
|
16
17
|
constructor(apiOptions: DfnsApiClientOptions);
|
|
17
18
|
get auth(): AuthClient;
|
|
19
|
+
get exchanges(): ExchangesClient;
|
|
18
20
|
get networks(): NetworksClient;
|
|
19
21
|
get permissions(): PermissionsClient;
|
|
20
22
|
get policies(): PoliciesClient;
|
package/dfnsApiClient.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DfnsApiClient = void 0;
|
|
4
4
|
const auth_1 = require("./generated/auth");
|
|
5
|
+
const exchanges_1 = require("./generated/exchanges");
|
|
5
6
|
const networks_1 = require("./generated/networks");
|
|
6
7
|
const permissions_1 = require("./generated/permissions");
|
|
7
8
|
const policies_1 = require("./generated/policies");
|
|
@@ -15,6 +16,9 @@ class DfnsApiClient {
|
|
|
15
16
|
get auth() {
|
|
16
17
|
return new auth_1.AuthClient(this.apiOptions);
|
|
17
18
|
}
|
|
19
|
+
get exchanges() {
|
|
20
|
+
return new exchanges_1.ExchangesClient(this.apiOptions);
|
|
21
|
+
}
|
|
18
22
|
get networks() {
|
|
19
23
|
return new networks_1.NetworksClient(this.apiOptions);
|
|
20
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
2
|
import { DelegatedAuthClient } from './generated/auth';
|
|
3
|
+
import { DelegatedExchangesClient } from './generated/exchanges';
|
|
3
4
|
import { DelegatedNetworksClient } from './generated/networks';
|
|
4
5
|
import { DelegatedPermissionsClient } from './generated/permissions';
|
|
5
6
|
import { DelegatedPoliciesClient } from './generated/policies';
|
|
@@ -11,6 +12,7 @@ export declare class DfnsDelegatedApiClient {
|
|
|
11
12
|
private apiOptions;
|
|
12
13
|
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
13
14
|
get auth(): DelegatedAuthClient;
|
|
15
|
+
get exchanges(): DelegatedExchangesClient;
|
|
14
16
|
get networks(): DelegatedNetworksClient;
|
|
15
17
|
get permissions(): DelegatedPermissionsClient;
|
|
16
18
|
get policies(): DelegatedPoliciesClient;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DfnsDelegatedApiClient = void 0;
|
|
4
4
|
const auth_1 = require("./generated/auth");
|
|
5
|
+
const exchanges_1 = require("./generated/exchanges");
|
|
5
6
|
const networks_1 = require("./generated/networks");
|
|
6
7
|
const permissions_1 = require("./generated/permissions");
|
|
7
8
|
const policies_1 = require("./generated/policies");
|
|
@@ -15,6 +16,9 @@ class DfnsDelegatedApiClient {
|
|
|
15
16
|
get auth() {
|
|
16
17
|
return new auth_1.DelegatedAuthClient(this.apiOptions);
|
|
17
18
|
}
|
|
19
|
+
get exchanges() {
|
|
20
|
+
return new exchanges_1.DelegatedExchangesClient(this.apiOptions);
|
|
21
|
+
}
|
|
18
22
|
get networks() {
|
|
19
23
|
return new networks_1.DelegatedNetworksClient(this.apiOptions);
|
|
20
24
|
}
|
|
@@ -52,7 +52,6 @@ export declare class AuthClient {
|
|
|
52
52
|
getServiceAccount(request: T.GetServiceAccountRequest): Promise<T.GetServiceAccountResponse>;
|
|
53
53
|
getUser(request: T.GetUserRequest): Promise<T.GetUserResponse>;
|
|
54
54
|
listApplications(): Promise<T.ListApplicationsResponse>;
|
|
55
|
-
listAvailableOrgs(request: T.ListAvailableOrgsRequest): Promise<T.ListAvailableOrgsResponse>;
|
|
56
55
|
listCredentials(): Promise<T.ListCredentialsResponse>;
|
|
57
56
|
/** @deprecated, use listCredentials instead */
|
|
58
57
|
listUserCredentials(): Promise<T.ListCredentialsResponse>;
|
package/generated/auth/client.js
CHANGED
|
@@ -470,18 +470,6 @@ class AuthClient {
|
|
|
470
470
|
});
|
|
471
471
|
return response.json();
|
|
472
472
|
}
|
|
473
|
-
async listAvailableOrgs(request) {
|
|
474
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/login/orgs', {
|
|
475
|
-
path: request ?? {},
|
|
476
|
-
query: {},
|
|
477
|
-
});
|
|
478
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
479
|
-
method: 'POST',
|
|
480
|
-
body: request.body,
|
|
481
|
-
apiOptions: this.apiOptions,
|
|
482
|
-
});
|
|
483
|
-
return response.json();
|
|
484
|
-
}
|
|
485
473
|
async listCredentials() {
|
|
486
474
|
const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
|
|
487
475
|
path: {},
|
|
@@ -68,7 +68,6 @@ export declare class DelegatedAuthClient {
|
|
|
68
68
|
getServiceAccount(request: T.GetServiceAccountRequest): Promise<T.GetServiceAccountResponse>;
|
|
69
69
|
getUser(request: T.GetUserRequest): Promise<T.GetUserResponse>;
|
|
70
70
|
listApplications(): Promise<T.ListApplicationsResponse>;
|
|
71
|
-
listAvailableOrgs(request: T.ListAvailableOrgsRequest): Promise<T.ListAvailableOrgsResponse>;
|
|
72
71
|
listCredentials(): Promise<T.ListCredentialsResponse>;
|
|
73
72
|
/** @deprecated, use listCredentials instead */
|
|
74
73
|
listUserCredentials(): Promise<T.ListCredentialsResponse>;
|
|
@@ -800,18 +800,6 @@ class DelegatedAuthClient {
|
|
|
800
800
|
});
|
|
801
801
|
return response.json();
|
|
802
802
|
}
|
|
803
|
-
async listAvailableOrgs(request) {
|
|
804
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/login/orgs', {
|
|
805
|
-
path: request ?? {},
|
|
806
|
-
query: {},
|
|
807
|
-
});
|
|
808
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
809
|
-
method: 'POST',
|
|
810
|
-
body: request.body,
|
|
811
|
-
apiOptions: this.apiOptions,
|
|
812
|
-
});
|
|
813
|
-
return response.json();
|
|
814
|
-
}
|
|
815
803
|
async listCredentials() {
|
|
816
804
|
const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
|
|
817
805
|
path: {},
|
|
@@ -1494,21 +1494,6 @@ export type ListApplicationsResponse = {
|
|
|
1494
1494
|
}[];
|
|
1495
1495
|
}[];
|
|
1496
1496
|
};
|
|
1497
|
-
export type ListAvailableOrgsBody = {
|
|
1498
|
-
username: string;
|
|
1499
|
-
orgId?: string | undefined;
|
|
1500
|
-
permissions?: string[] | undefined;
|
|
1501
|
-
origin: string;
|
|
1502
|
-
};
|
|
1503
|
-
export type ListAvailableOrgsResponse = {
|
|
1504
|
-
items: {
|
|
1505
|
-
orgId: string;
|
|
1506
|
-
appId: string;
|
|
1507
|
-
}[];
|
|
1508
|
-
};
|
|
1509
|
-
export type ListAvailableOrgsRequest = {
|
|
1510
|
-
body: ListAvailableOrgsBody;
|
|
1511
|
-
};
|
|
1512
1497
|
export type ListCredentialsResponse = {
|
|
1513
1498
|
items: {
|
|
1514
1499
|
kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class ExchangesClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createDeposit(request: T.CreateDepositRequest): Promise<T.CreateDepositResponse>;
|
|
7
|
+
createExchange(request: T.CreateExchangeRequest): Promise<T.CreateExchangeResponse>;
|
|
8
|
+
deleteExchange(request: T.DeleteExchangeRequest): Promise<T.DeleteExchangeResponse>;
|
|
9
|
+
getExchange(request: T.GetExchangeRequest): Promise<T.GetExchangeResponse>;
|
|
10
|
+
listAccountAssets(request?: T.ListAccountAssetsRequest): Promise<T.ListAccountAssetsResponse>;
|
|
11
|
+
listAccounts(request: T.ListAccountsRequest): Promise<T.ListAccountsResponse>;
|
|
12
|
+
listExchanges(request?: T.ListExchangesRequest): Promise<T.ListExchangesResponse>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExchangesClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class ExchangesClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async createDeposit(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/deposits', {
|
|
12
|
+
path: request ?? {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: request.body,
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async createExchange(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges', {
|
|
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 deleteExchange(request) {
|
|
35
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId', {
|
|
36
|
+
path: request ?? {},
|
|
37
|
+
query: {},
|
|
38
|
+
});
|
|
39
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
40
|
+
method: 'DELETE',
|
|
41
|
+
body: {},
|
|
42
|
+
apiOptions: this.apiOptions,
|
|
43
|
+
});
|
|
44
|
+
return response.json();
|
|
45
|
+
}
|
|
46
|
+
async getExchange(request) {
|
|
47
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId', {
|
|
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 listAccountAssets(request) {
|
|
58
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/assets', {
|
|
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 listAccounts(request) {
|
|
69
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts', {
|
|
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 listExchanges(request) {
|
|
80
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges', {
|
|
81
|
+
path: request ?? {},
|
|
82
|
+
query: request?.query ?? {},
|
|
83
|
+
});
|
|
84
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
85
|
+
method: 'GET',
|
|
86
|
+
apiOptions: this.apiOptions,
|
|
87
|
+
});
|
|
88
|
+
return response.json();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.ExchangesClient = ExchangesClient;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedExchangesClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createDepositInit(request: T.CreateDepositRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createDepositComplete(request: T.CreateDepositRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateDepositResponse>;
|
|
9
|
+
createExchangeInit(request: T.CreateExchangeRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
+
createExchangeComplete(request: T.CreateExchangeRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateExchangeResponse>;
|
|
11
|
+
deleteExchangeInit(request: T.DeleteExchangeRequest): Promise<UserActionChallengeResponse>;
|
|
12
|
+
deleteExchangeComplete(request: T.DeleteExchangeRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DeleteExchangeResponse>;
|
|
13
|
+
getExchange(request: T.GetExchangeRequest): Promise<T.GetExchangeResponse>;
|
|
14
|
+
listAccountAssets(request?: T.ListAccountAssetsRequest): Promise<T.ListAccountAssetsResponse>;
|
|
15
|
+
listAccounts(request: T.ListAccountsRequest): Promise<T.ListAccountsResponse>;
|
|
16
|
+
listExchanges(request?: T.ListExchangesRequest): Promise<T.ListExchangesResponse>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedExchangesClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedExchangesClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async createDepositInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/deposits', {
|
|
13
|
+
path: request ?? {},
|
|
14
|
+
query: {},
|
|
15
|
+
});
|
|
16
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
17
|
+
userActionHttpMethod: 'POST',
|
|
18
|
+
userActionHttpPath: path,
|
|
19
|
+
userActionPayload: JSON.stringify(request.body),
|
|
20
|
+
userActionServerKind: 'Api',
|
|
21
|
+
}, this.apiOptions);
|
|
22
|
+
return challenge;
|
|
23
|
+
}
|
|
24
|
+
async createDepositComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/deposits', {
|
|
26
|
+
path: request ?? {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
30
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: request.body,
|
|
33
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
34
|
+
apiOptions: this.apiOptions,
|
|
35
|
+
});
|
|
36
|
+
return response.json();
|
|
37
|
+
}
|
|
38
|
+
async createExchangeInit(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges', {
|
|
40
|
+
path: request ?? {},
|
|
41
|
+
query: {},
|
|
42
|
+
});
|
|
43
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
44
|
+
userActionHttpMethod: 'POST',
|
|
45
|
+
userActionHttpPath: path,
|
|
46
|
+
userActionPayload: JSON.stringify(request.body),
|
|
47
|
+
userActionServerKind: 'Api',
|
|
48
|
+
}, this.apiOptions);
|
|
49
|
+
return challenge;
|
|
50
|
+
}
|
|
51
|
+
async createExchangeComplete(request, signedChallenge) {
|
|
52
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges', {
|
|
53
|
+
path: request ?? {},
|
|
54
|
+
query: {},
|
|
55
|
+
});
|
|
56
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
57
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
body: request.body,
|
|
60
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
61
|
+
apiOptions: this.apiOptions,
|
|
62
|
+
});
|
|
63
|
+
return response.json();
|
|
64
|
+
}
|
|
65
|
+
async deleteExchangeInit(request) {
|
|
66
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId', {
|
|
67
|
+
path: request ?? {},
|
|
68
|
+
query: {},
|
|
69
|
+
});
|
|
70
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
71
|
+
userActionHttpMethod: 'DELETE',
|
|
72
|
+
userActionHttpPath: path,
|
|
73
|
+
userActionPayload: JSON.stringify({}),
|
|
74
|
+
userActionServerKind: 'Api',
|
|
75
|
+
}, this.apiOptions);
|
|
76
|
+
return challenge;
|
|
77
|
+
}
|
|
78
|
+
async deleteExchangeComplete(request, signedChallenge) {
|
|
79
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId', {
|
|
80
|
+
path: request ?? {},
|
|
81
|
+
query: {},
|
|
82
|
+
});
|
|
83
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
84
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
85
|
+
method: 'DELETE',
|
|
86
|
+
body: {},
|
|
87
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
88
|
+
apiOptions: this.apiOptions,
|
|
89
|
+
});
|
|
90
|
+
return response.json();
|
|
91
|
+
}
|
|
92
|
+
async getExchange(request) {
|
|
93
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId', {
|
|
94
|
+
path: request ?? {},
|
|
95
|
+
query: {},
|
|
96
|
+
});
|
|
97
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
98
|
+
method: 'GET',
|
|
99
|
+
apiOptions: this.apiOptions,
|
|
100
|
+
});
|
|
101
|
+
return response.json();
|
|
102
|
+
}
|
|
103
|
+
async listAccountAssets(request) {
|
|
104
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/assets', {
|
|
105
|
+
path: request ?? {},
|
|
106
|
+
query: request?.query ?? {},
|
|
107
|
+
});
|
|
108
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
109
|
+
method: 'GET',
|
|
110
|
+
apiOptions: this.apiOptions,
|
|
111
|
+
});
|
|
112
|
+
return response.json();
|
|
113
|
+
}
|
|
114
|
+
async listAccounts(request) {
|
|
115
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts', {
|
|
116
|
+
path: request ?? {},
|
|
117
|
+
query: request.query ?? {},
|
|
118
|
+
});
|
|
119
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
120
|
+
method: 'GET',
|
|
121
|
+
apiOptions: this.apiOptions,
|
|
122
|
+
});
|
|
123
|
+
return response.json();
|
|
124
|
+
}
|
|
125
|
+
async listExchanges(request) {
|
|
126
|
+
const path = (0, url_1.buildPathAndQuery)('/exchanges', {
|
|
127
|
+
path: request ?? {},
|
|
128
|
+
query: request?.query ?? {},
|
|
129
|
+
});
|
|
130
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
131
|
+
method: 'GET',
|
|
132
|
+
apiOptions: this.apiOptions,
|
|
133
|
+
});
|
|
134
|
+
return response.json();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.DelegatedExchangesClient = DelegatedExchangesClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
19
|
+
__exportStar(require("./delegatedClient"), exports);
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
export type CreateDepositBody = {
|
|
2
|
+
kind: "Native";
|
|
3
|
+
amount: string;
|
|
4
|
+
priority?: ("Slow" | "Standard" | "Fast") | undefined;
|
|
5
|
+
from: string | string | string | string | string | string | string | string | string | string | string | string;
|
|
6
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
7
|
+
} | {
|
|
8
|
+
kind: "Erc20";
|
|
9
|
+
contract: string;
|
|
10
|
+
amount: string;
|
|
11
|
+
priority?: ("Slow" | "Standard" | "Fast") | undefined;
|
|
12
|
+
from: string;
|
|
13
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
14
|
+
} | {
|
|
15
|
+
kind: "Erc721";
|
|
16
|
+
contract: string;
|
|
17
|
+
tokenId: string;
|
|
18
|
+
priority?: ("Slow" | "Standard" | "Fast") | undefined;
|
|
19
|
+
from: string;
|
|
20
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
21
|
+
} | {
|
|
22
|
+
kind: "Trc10";
|
|
23
|
+
tokenId: string;
|
|
24
|
+
amount: string;
|
|
25
|
+
from: string;
|
|
26
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
27
|
+
} | {
|
|
28
|
+
kind: "Trc20";
|
|
29
|
+
contract: string;
|
|
30
|
+
amount: string;
|
|
31
|
+
from: string;
|
|
32
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
33
|
+
} | {
|
|
34
|
+
kind: "Trc721";
|
|
35
|
+
contract: string;
|
|
36
|
+
tokenId: string;
|
|
37
|
+
from: string;
|
|
38
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
39
|
+
} | {
|
|
40
|
+
kind: "Asa";
|
|
41
|
+
assetId: string;
|
|
42
|
+
amount: string;
|
|
43
|
+
from: string;
|
|
44
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
45
|
+
} | {
|
|
46
|
+
kind: "Sep41";
|
|
47
|
+
issuer: string;
|
|
48
|
+
assetCode: string;
|
|
49
|
+
amount: string;
|
|
50
|
+
from: string;
|
|
51
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
52
|
+
} | {
|
|
53
|
+
kind: "Spl" | "Spl2022";
|
|
54
|
+
amount: string;
|
|
55
|
+
mint: string;
|
|
56
|
+
createDestinationAccount?: boolean | undefined;
|
|
57
|
+
from: string;
|
|
58
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
59
|
+
} | {
|
|
60
|
+
kind: "Tep74";
|
|
61
|
+
master: string;
|
|
62
|
+
amount: string;
|
|
63
|
+
from: string;
|
|
64
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
65
|
+
};
|
|
66
|
+
export type CreateDepositParams = {
|
|
67
|
+
exchangeId: string;
|
|
68
|
+
accountId: string;
|
|
69
|
+
};
|
|
70
|
+
export type CreateDepositResponse = {
|
|
71
|
+
id: string;
|
|
72
|
+
walletId: string;
|
|
73
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Polkadot" | "Westend" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Tezos" | "TezosGhostnet" | "Tron" | "TronNile" | "Ton" | "TonTestnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyECDSA" | "KeyECDSAStark" | "KeyEdDSA";
|
|
74
|
+
requester: {
|
|
75
|
+
userId: string;
|
|
76
|
+
tokenId?: string | undefined;
|
|
77
|
+
appId?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
requestBody: {
|
|
80
|
+
kind: "Native";
|
|
81
|
+
to: string | string | string | string | string | string | string | string | string | string | string | string;
|
|
82
|
+
amount: string;
|
|
83
|
+
memo?: string | undefined;
|
|
84
|
+
priority?: ("Slow" | "Standard" | "Fast") | undefined;
|
|
85
|
+
} | {
|
|
86
|
+
kind: "Erc20";
|
|
87
|
+
contract: string;
|
|
88
|
+
to: string;
|
|
89
|
+
amount: string;
|
|
90
|
+
priority?: ("Slow" | "Standard" | "Fast") | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
kind: "Erc721";
|
|
93
|
+
contract: string;
|
|
94
|
+
to: string;
|
|
95
|
+
tokenId: string;
|
|
96
|
+
priority?: ("Slow" | "Standard" | "Fast") | undefined;
|
|
97
|
+
} | {
|
|
98
|
+
kind: "Trc10";
|
|
99
|
+
tokenId: string;
|
|
100
|
+
to: string;
|
|
101
|
+
amount: string;
|
|
102
|
+
} | {
|
|
103
|
+
kind: "Trc20";
|
|
104
|
+
contract: string;
|
|
105
|
+
to: string;
|
|
106
|
+
amount: string;
|
|
107
|
+
} | {
|
|
108
|
+
kind: "Trc721";
|
|
109
|
+
contract: string;
|
|
110
|
+
to: string;
|
|
111
|
+
tokenId: string;
|
|
112
|
+
} | {
|
|
113
|
+
kind: "Asa";
|
|
114
|
+
assetId: string;
|
|
115
|
+
to: string;
|
|
116
|
+
amount: string;
|
|
117
|
+
} | {
|
|
118
|
+
kind: "Sep41";
|
|
119
|
+
issuer: string;
|
|
120
|
+
assetCode: string;
|
|
121
|
+
to: string;
|
|
122
|
+
amount: string;
|
|
123
|
+
memo?: string | undefined;
|
|
124
|
+
} | {
|
|
125
|
+
kind: "Spl" | "Spl2022";
|
|
126
|
+
to: string;
|
|
127
|
+
amount: string;
|
|
128
|
+
mint: string;
|
|
129
|
+
createDestinationAccount?: boolean | undefined;
|
|
130
|
+
} | {
|
|
131
|
+
kind: "Tep74";
|
|
132
|
+
to: string;
|
|
133
|
+
master: string;
|
|
134
|
+
amount: string;
|
|
135
|
+
memo?: string | undefined;
|
|
136
|
+
};
|
|
137
|
+
metadata: {
|
|
138
|
+
asset: {
|
|
139
|
+
symbol?: string | undefined;
|
|
140
|
+
decimals?: number | undefined;
|
|
141
|
+
verified?: boolean | undefined;
|
|
142
|
+
quotes?: {
|
|
143
|
+
[x: string]: number;
|
|
144
|
+
} | undefined;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
status: "Pending" | "Executing" | "Broadcasted" | "Confirmed" | "Failed" | "Rejected";
|
|
148
|
+
reason?: string | undefined;
|
|
149
|
+
txHash?: string | undefined;
|
|
150
|
+
fee?: string | undefined;
|
|
151
|
+
dateRequested: string;
|
|
152
|
+
datePolicyResolved?: string | undefined;
|
|
153
|
+
dateBroadcasted?: string | undefined;
|
|
154
|
+
dateConfirmed?: string | undefined;
|
|
155
|
+
approvalId?: string | undefined;
|
|
156
|
+
};
|
|
157
|
+
export type CreateDepositRequest = CreateDepositParams & {
|
|
158
|
+
body: CreateDepositBody;
|
|
159
|
+
};
|
|
160
|
+
export type CreateExchangeBody = {
|
|
161
|
+
name?: string | undefined;
|
|
162
|
+
kind: "Binance" | "Kraken" | "Coinbase" | "OKX" | "Bitstamp";
|
|
163
|
+
readConfiguration: {
|
|
164
|
+
publicApiKey: string;
|
|
165
|
+
privateApiKey: string;
|
|
166
|
+
password?: string | undefined;
|
|
167
|
+
};
|
|
168
|
+
writeConfiguration: {
|
|
169
|
+
publicApiKey: string;
|
|
170
|
+
privateApiKey: string;
|
|
171
|
+
password?: string | undefined;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
export type CreateExchangeResponse = {
|
|
175
|
+
id: string;
|
|
176
|
+
name?: string | undefined;
|
|
177
|
+
kind: "Binance" | "Kraken" | "Coinbase" | "OKX" | "Bitstamp";
|
|
178
|
+
dateCreated: string;
|
|
179
|
+
};
|
|
180
|
+
export type CreateExchangeRequest = {
|
|
181
|
+
body: CreateExchangeBody;
|
|
182
|
+
};
|
|
183
|
+
export type DeleteExchangeParams = {
|
|
184
|
+
exchangeId: string;
|
|
185
|
+
};
|
|
186
|
+
export type DeleteExchangeResponse = {
|
|
187
|
+
deleted: true;
|
|
188
|
+
};
|
|
189
|
+
export type DeleteExchangeRequest = DeleteExchangeParams;
|
|
190
|
+
export type GetExchangeParams = {
|
|
191
|
+
exchangeId: string;
|
|
192
|
+
};
|
|
193
|
+
export type GetExchangeResponse = {
|
|
194
|
+
id: string;
|
|
195
|
+
name?: string | undefined;
|
|
196
|
+
kind: "Binance" | "Kraken" | "Coinbase" | "OKX" | "Bitstamp";
|
|
197
|
+
dateCreated: string;
|
|
198
|
+
};
|
|
199
|
+
export type GetExchangeRequest = GetExchangeParams;
|
|
200
|
+
export type ListAccountAssetsQuery = {
|
|
201
|
+
limit?: number | undefined;
|
|
202
|
+
paginationToken?: string | undefined;
|
|
203
|
+
};
|
|
204
|
+
export type ListAccountAssetsResponse = {
|
|
205
|
+
items: {
|
|
206
|
+
symbol: string;
|
|
207
|
+
balance: string;
|
|
208
|
+
networks: (({
|
|
209
|
+
kind: "Native";
|
|
210
|
+
symbol?: string | undefined;
|
|
211
|
+
decimals: number;
|
|
212
|
+
verified?: boolean | undefined;
|
|
213
|
+
balance: string;
|
|
214
|
+
} | {
|
|
215
|
+
kind: "Asa";
|
|
216
|
+
assetId: string;
|
|
217
|
+
symbol?: string | undefined;
|
|
218
|
+
decimals: number;
|
|
219
|
+
verified?: boolean | undefined;
|
|
220
|
+
balance: string;
|
|
221
|
+
} | {
|
|
222
|
+
kind: "Erc20" | "Trc20";
|
|
223
|
+
contract: string;
|
|
224
|
+
symbol?: string | undefined;
|
|
225
|
+
decimals: number;
|
|
226
|
+
verified?: boolean | undefined;
|
|
227
|
+
balance: string;
|
|
228
|
+
} | {
|
|
229
|
+
kind: "Sep41";
|
|
230
|
+
issuer: string;
|
|
231
|
+
assetCode: string;
|
|
232
|
+
symbol?: string | undefined;
|
|
233
|
+
decimals: number;
|
|
234
|
+
verified?: boolean | undefined;
|
|
235
|
+
balance: string;
|
|
236
|
+
} | {
|
|
237
|
+
kind: "Trc10";
|
|
238
|
+
tokenId: string;
|
|
239
|
+
symbol?: string | undefined;
|
|
240
|
+
decimals: number;
|
|
241
|
+
verified?: boolean | undefined;
|
|
242
|
+
balance: string;
|
|
243
|
+
} | {
|
|
244
|
+
kind: "Spl" | "Spl2022";
|
|
245
|
+
mint: string;
|
|
246
|
+
symbol?: string | undefined;
|
|
247
|
+
decimals: number;
|
|
248
|
+
verified?: boolean | undefined;
|
|
249
|
+
balance: string;
|
|
250
|
+
} | {
|
|
251
|
+
kind: "Tep74";
|
|
252
|
+
master: string;
|
|
253
|
+
symbol?: string | undefined;
|
|
254
|
+
decimals: number;
|
|
255
|
+
verified?: boolean | undefined;
|
|
256
|
+
balance: string;
|
|
257
|
+
}) & {
|
|
258
|
+
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
|
|
259
|
+
})[];
|
|
260
|
+
}[];
|
|
261
|
+
nextPageToken?: string | undefined;
|
|
262
|
+
};
|
|
263
|
+
export type ListAccountAssetsRequest = {
|
|
264
|
+
query?: ListAccountAssetsQuery;
|
|
265
|
+
};
|
|
266
|
+
export type ListAccountsParams = {
|
|
267
|
+
exchangeId: string;
|
|
268
|
+
};
|
|
269
|
+
export type ListAccountsQuery = {
|
|
270
|
+
limit?: number | undefined;
|
|
271
|
+
paginationToken?: string | undefined;
|
|
272
|
+
symbol?: string | undefined;
|
|
273
|
+
network?: ("Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Polkadot" | "Westend" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Tezos" | "TezosGhostnet" | "Tron" | "TronNile" | "Ton" | "TonTestnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyECDSA" | "KeyECDSAStark" | "KeyEdDSA") | undefined;
|
|
274
|
+
};
|
|
275
|
+
export type ListAccountsResponse = {
|
|
276
|
+
items: {
|
|
277
|
+
id: string;
|
|
278
|
+
name?: string | undefined;
|
|
279
|
+
exchangeId: string;
|
|
280
|
+
exchangeName?: string | undefined;
|
|
281
|
+
}[];
|
|
282
|
+
nextPageToken?: string | undefined;
|
|
283
|
+
};
|
|
284
|
+
export type ListAccountsRequest = ListAccountsParams & {
|
|
285
|
+
query?: ListAccountsQuery;
|
|
286
|
+
};
|
|
287
|
+
export type ListExchangesQuery = {
|
|
288
|
+
limit?: number | undefined;
|
|
289
|
+
paginationToken?: string | undefined;
|
|
290
|
+
};
|
|
291
|
+
export type ListExchangesResponse = {
|
|
292
|
+
items: {
|
|
293
|
+
id: string;
|
|
294
|
+
name?: string | undefined;
|
|
295
|
+
kind: "Binance" | "Kraken" | "Coinbase" | "OKX" | "Bitstamp";
|
|
296
|
+
dateCreated: string;
|
|
297
|
+
}[];
|
|
298
|
+
nextPageToken?: string | undefined;
|
|
299
|
+
};
|
|
300
|
+
export type ListExchangesRequest = {
|
|
301
|
+
query?: ListExchangesQuery;
|
|
302
|
+
};
|
|
@@ -36,7 +36,7 @@ export type CreateAssignmentRequest = CreateAssignmentParams & {
|
|
|
36
36
|
};
|
|
37
37
|
export type CreatePermissionBody = {
|
|
38
38
|
name: string;
|
|
39
|
-
operations: ("Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "
|
|
39
|
+
operations: ("Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "Exchanges:Deposits:Create" | "Orgs:Read" | "Orgs:Update" | "Orgs:Settings:Read" | "Orgs:Settings:Update" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke" | "PermissionPredicates:Archive" | "PermissionPredicates:Create" | "PermissionPredicates:Read" | "PermissionPredicates:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "Signers:ListSigners" | "Wallets:BroadcastTransaction" | "Wallets:Create" | "Wallets:Delegate" | "Wallets:Export" | "Wallets:GenerateSignature" | "Wallets:Import" | "Wallets:Read" | "Wallets:ReadSignature" | "Wallets:ReadTransaction" | "Wallets:ReadTransfer" | "Wallets:TransferAsset" | "Wallets:Update" | "Wallets:Tags:Add" | "Wallets:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read")[];
|
|
40
40
|
};
|
|
41
41
|
export type CreatePermissionResponse = {
|
|
42
42
|
id: string;
|
|
@@ -178,7 +178,7 @@ export type ListPermissionsRequest = {
|
|
|
178
178
|
};
|
|
179
179
|
export type UpdatePermissionBody = {
|
|
180
180
|
name?: string | undefined;
|
|
181
|
-
operations?: ("Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "
|
|
181
|
+
operations?: ("Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "Exchanges:Deposits:Create" | "Orgs:Read" | "Orgs:Update" | "Orgs:Settings:Read" | "Orgs:Settings:Update" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke" | "PermissionPredicates:Archive" | "PermissionPredicates:Create" | "PermissionPredicates:Read" | "PermissionPredicates:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "Signers:ListSigners" | "Wallets:BroadcastTransaction" | "Wallets:Create" | "Wallets:Delegate" | "Wallets:Export" | "Wallets:GenerateSignature" | "Wallets:Import" | "Wallets:Read" | "Wallets:ReadSignature" | "Wallets:ReadTransaction" | "Wallets:ReadTransfer" | "Wallets:TransferAsset" | "Wallets:Update" | "Wallets:Tags:Add" | "Wallets:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read")[] | undefined;
|
|
182
182
|
};
|
|
183
183
|
export type UpdatePermissionParams = {
|
|
184
184
|
permissionId: string;
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../generated/exchanges/types';
|
|
@@ -0,0 +1,17 @@
|
|
|
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("../generated/exchanges/types"), exports);
|