@dfns/sdk 0.7.16 → 0.7.18
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 -2
- package/dfnsApiClient.js +3 -3
- package/generated/allocations/client.d.ts +11 -0
- package/generated/{yields → allocations}/client.js +13 -13
- package/generated/allocations/delegatedClient.d.ts +14 -0
- package/generated/{yields → allocations}/delegatedClient.js +17 -17
- package/generated/{yields → allocations}/types.d.ts +80 -80
- package/generated/auth/types.d.ts +289 -24
- package/generated/exchanges/types.d.ts +2 -2
- package/generated/feeSponsors/types.d.ts +6 -6
- package/generated/keys/types.d.ts +266 -94
- package/generated/permissions/types.d.ts +2 -2
- package/generated/policies/types.d.ts +670 -211
- package/generated/swaps/types.d.ts +10 -10
- package/generated/wallets/client.d.ts +1 -0
- package/generated/wallets/client.js +12 -0
- package/generated/wallets/delegatedClient.d.ts +2 -0
- package/generated/wallets/delegatedClient.js +27 -0
- package/generated/wallets/types.d.ts +765 -249
- package/package.json +1 -1
- package/generated/yields/client.d.ts +0 -11
- package/generated/yields/delegatedClient.d.ts +0 -14
- /package/generated/{yields → allocations}/index.d.ts +0 -0
- /package/generated/{yields → allocations}/index.js +0 -0
- /package/generated/{yields → allocations}/types.js +0 -0
package/dfnsApiClient.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { WebhooksClient } from './generated/webhooks';
|
|
|
13
13
|
import { CredentialSigner } from './signer';
|
|
14
14
|
import { SwapsClient } from './generated/swaps';
|
|
15
15
|
import { AgreementsClient } from './generated/agreements';
|
|
16
|
-
import {
|
|
16
|
+
import { AllocationsClient } from './generated/allocations/client';
|
|
17
17
|
export type DfnsApiClientOptions = DfnsBaseApiOptions & {
|
|
18
18
|
/** Needs to be specified to use any endpoint that required User Action Signing flow */
|
|
19
19
|
signer?: CredentialSigner;
|
|
@@ -29,7 +29,7 @@ export declare class DfnsApiClient {
|
|
|
29
29
|
get permissions(): PermissionsClient;
|
|
30
30
|
get policies(): PoliciesClient;
|
|
31
31
|
get staking(): StakingClient;
|
|
32
|
-
get
|
|
32
|
+
get allocations(): AllocationsClient;
|
|
33
33
|
get swaps(): SwapsClient;
|
|
34
34
|
get agreements(): AgreementsClient;
|
|
35
35
|
get signers(): SignersClient;
|
package/dfnsApiClient.js
CHANGED
|
@@ -14,7 +14,7 @@ const wallets_1 = require("./generated/wallets");
|
|
|
14
14
|
const webhooks_1 = require("./generated/webhooks");
|
|
15
15
|
const swaps_1 = require("./generated/swaps");
|
|
16
16
|
const agreements_1 = require("./generated/agreements");
|
|
17
|
-
const client_1 = require("./generated/
|
|
17
|
+
const client_1 = require("./generated/allocations/client");
|
|
18
18
|
class DfnsApiClient {
|
|
19
19
|
constructor(apiOptions) {
|
|
20
20
|
this.apiOptions = apiOptions;
|
|
@@ -43,8 +43,8 @@ class DfnsApiClient {
|
|
|
43
43
|
get staking() {
|
|
44
44
|
return new staking_1.StakingClient(this.apiOptions);
|
|
45
45
|
}
|
|
46
|
-
get
|
|
47
|
-
return new client_1.
|
|
46
|
+
get allocations() {
|
|
47
|
+
return new client_1.AllocationsClient(this.apiOptions);
|
|
48
48
|
}
|
|
49
49
|
get swaps() {
|
|
50
50
|
return new swaps_1.SwapsClient(this.apiOptions);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../types/generic';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class AllocationsClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createAllocation(request: T.CreateAllocationRequest): Promise<T.CreateAllocationResponse>;
|
|
7
|
+
createAllocationAction(request: T.CreateAllocationActionRequest): Promise<T.CreateAllocationActionResponse>;
|
|
8
|
+
getAllocation(request: T.GetAllocationRequest): Promise<T.GetAllocationResponse>;
|
|
9
|
+
listAllocationActions(request: T.ListAllocationActionsRequest): Promise<T.ListAllocationActionsResponse>;
|
|
10
|
+
listAllocations(request?: T.ListAllocationsRequest): Promise<T.ListAllocationsResponse>;
|
|
11
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint @typescript-eslint/no-unused-vars: 0 */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.AllocationsClient = void 0;
|
|
5
5
|
const fetch_1 = require("../../utils/fetch");
|
|
6
6
|
const userActionFetch_1 = require("../../utils/userActionFetch");
|
|
7
7
|
const url_1 = require("../../utils/url");
|
|
8
|
-
class
|
|
8
|
+
class AllocationsClient {
|
|
9
9
|
constructor(apiOptions) {
|
|
10
10
|
this.apiOptions = apiOptions;
|
|
11
11
|
}
|
|
12
|
-
async
|
|
13
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
12
|
+
async createAllocation(request) {
|
|
13
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations', {
|
|
14
14
|
path: request ?? {},
|
|
15
15
|
query: {},
|
|
16
16
|
});
|
|
@@ -21,8 +21,8 @@ class YieldsClient {
|
|
|
21
21
|
});
|
|
22
22
|
return response.json();
|
|
23
23
|
}
|
|
24
|
-
async
|
|
25
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
24
|
+
async createAllocationAction(request) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId/actions', {
|
|
26
26
|
path: request ?? {},
|
|
27
27
|
query: {},
|
|
28
28
|
});
|
|
@@ -33,8 +33,8 @@ class YieldsClient {
|
|
|
33
33
|
});
|
|
34
34
|
return response.json();
|
|
35
35
|
}
|
|
36
|
-
async
|
|
37
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
36
|
+
async getAllocation(request) {
|
|
37
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId', {
|
|
38
38
|
path: request ?? {},
|
|
39
39
|
query: {},
|
|
40
40
|
});
|
|
@@ -44,8 +44,8 @@ class YieldsClient {
|
|
|
44
44
|
});
|
|
45
45
|
return response.json();
|
|
46
46
|
}
|
|
47
|
-
async
|
|
48
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
47
|
+
async listAllocationActions(request) {
|
|
48
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId/actions', {
|
|
49
49
|
path: request ?? {},
|
|
50
50
|
query: request.query ?? {},
|
|
51
51
|
});
|
|
@@ -55,8 +55,8 @@ class YieldsClient {
|
|
|
55
55
|
});
|
|
56
56
|
return response.json();
|
|
57
57
|
}
|
|
58
|
-
async
|
|
59
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
58
|
+
async listAllocations(request) {
|
|
59
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations', {
|
|
60
60
|
path: request ?? {},
|
|
61
61
|
query: request?.query ?? {},
|
|
62
62
|
});
|
|
@@ -67,4 +67,4 @@ class YieldsClient {
|
|
|
67
67
|
return response.json();
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
exports.
|
|
70
|
+
exports.AllocationsClient = AllocationsClient;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedAllocationsClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createAllocationInit(request: T.CreateAllocationRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createAllocationComplete(request: T.CreateAllocationRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateAllocationResponse>;
|
|
9
|
+
createAllocationActionInit(request: T.CreateAllocationActionRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
+
createAllocationActionComplete(request: T.CreateAllocationActionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateAllocationActionResponse>;
|
|
11
|
+
getAllocation(request: T.GetAllocationRequest): Promise<T.GetAllocationResponse>;
|
|
12
|
+
listAllocationActions(request: T.ListAllocationActionsRequest): Promise<T.ListAllocationActionsResponse>;
|
|
13
|
+
listAllocations(request?: T.ListAllocationsRequest): Promise<T.ListAllocationsResponse>;
|
|
14
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DelegatedAllocationsClient = void 0;
|
|
4
4
|
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
5
|
const fetch_1 = require("../../utils/fetch");
|
|
6
6
|
const url_1 = require("../../utils/url");
|
|
7
|
-
class
|
|
7
|
+
class DelegatedAllocationsClient {
|
|
8
8
|
constructor(apiOptions) {
|
|
9
9
|
this.apiOptions = apiOptions;
|
|
10
10
|
}
|
|
11
|
-
async
|
|
12
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
11
|
+
async createAllocationInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations', {
|
|
13
13
|
path: request ?? {},
|
|
14
14
|
query: {},
|
|
15
15
|
});
|
|
@@ -21,8 +21,8 @@ class DelegatedYieldsClient {
|
|
|
21
21
|
}, this.apiOptions);
|
|
22
22
|
return challenge;
|
|
23
23
|
}
|
|
24
|
-
async
|
|
25
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
24
|
+
async createAllocationComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations', {
|
|
26
26
|
path: request ?? {},
|
|
27
27
|
query: {},
|
|
28
28
|
});
|
|
@@ -35,8 +35,8 @@ class DelegatedYieldsClient {
|
|
|
35
35
|
});
|
|
36
36
|
return response.json();
|
|
37
37
|
}
|
|
38
|
-
async
|
|
39
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
38
|
+
async createAllocationActionInit(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId/actions', {
|
|
40
40
|
path: request ?? {},
|
|
41
41
|
query: {},
|
|
42
42
|
});
|
|
@@ -48,8 +48,8 @@ class DelegatedYieldsClient {
|
|
|
48
48
|
}, this.apiOptions);
|
|
49
49
|
return challenge;
|
|
50
50
|
}
|
|
51
|
-
async
|
|
52
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
51
|
+
async createAllocationActionComplete(request, signedChallenge) {
|
|
52
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId/actions', {
|
|
53
53
|
path: request ?? {},
|
|
54
54
|
query: {},
|
|
55
55
|
});
|
|
@@ -62,8 +62,8 @@ class DelegatedYieldsClient {
|
|
|
62
62
|
});
|
|
63
63
|
return response.json();
|
|
64
64
|
}
|
|
65
|
-
async
|
|
66
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
65
|
+
async getAllocation(request) {
|
|
66
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId', {
|
|
67
67
|
path: request ?? {},
|
|
68
68
|
query: {},
|
|
69
69
|
});
|
|
@@ -73,8 +73,8 @@ class DelegatedYieldsClient {
|
|
|
73
73
|
});
|
|
74
74
|
return response.json();
|
|
75
75
|
}
|
|
76
|
-
async
|
|
77
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
76
|
+
async listAllocationActions(request) {
|
|
77
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations/:allocationId/actions', {
|
|
78
78
|
path: request ?? {},
|
|
79
79
|
query: request.query ?? {},
|
|
80
80
|
});
|
|
@@ -84,8 +84,8 @@ class DelegatedYieldsClient {
|
|
|
84
84
|
});
|
|
85
85
|
return response.json();
|
|
86
86
|
}
|
|
87
|
-
async
|
|
88
|
-
const path = (0, url_1.buildPathAndQuery)('/
|
|
87
|
+
async listAllocations(request) {
|
|
88
|
+
const path = (0, url_1.buildPathAndQuery)('/allocations', {
|
|
89
89
|
path: request ?? {},
|
|
90
90
|
query: request?.query ?? {},
|
|
91
91
|
});
|
|
@@ -96,4 +96,4 @@ class DelegatedYieldsClient {
|
|
|
96
96
|
return response.json();
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
exports.
|
|
99
|
+
exports.DelegatedAllocationsClient = DelegatedAllocationsClient;
|