@dfns/sdk 0.7.16 → 0.7.17

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.
@@ -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 { YieldsClient } from './generated/yields/client';
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 yields(): YieldsClient;
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/yields/client");
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 yields() {
47
- return new client_1.YieldsClient(this.apiOptions);
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.YieldsClient = void 0;
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 YieldsClient {
8
+ class AllocationsClient {
9
9
  constructor(apiOptions) {
10
10
  this.apiOptions = apiOptions;
11
11
  }
12
- async createYield(request) {
13
- const path = (0, url_1.buildPathAndQuery)('/yields', {
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 createYieldAction(request) {
25
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
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 getYield(request) {
37
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId', {
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 listYieldActions(request) {
48
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
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 listYields(request) {
59
- const path = (0, url_1.buildPathAndQuery)('/yields', {
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.YieldsClient = YieldsClient;
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.DelegatedYieldsClient = void 0;
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 DelegatedYieldsClient {
7
+ class DelegatedAllocationsClient {
8
8
  constructor(apiOptions) {
9
9
  this.apiOptions = apiOptions;
10
10
  }
11
- async createYieldInit(request) {
12
- const path = (0, url_1.buildPathAndQuery)('/yields', {
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 createYieldComplete(request, signedChallenge) {
25
- const path = (0, url_1.buildPathAndQuery)('/yields', {
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 createYieldActionInit(request) {
39
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
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 createYieldActionComplete(request, signedChallenge) {
52
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
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 getYield(request) {
66
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId', {
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 listYieldActions(request) {
77
- const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
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 listYields(request) {
88
- const path = (0, url_1.buildPathAndQuery)('/yields', {
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.DelegatedYieldsClient = DelegatedYieldsClient;
99
+ exports.DelegatedAllocationsClient = DelegatedAllocationsClient;
@@ -1,4 +1,4 @@
1
- export type CreateYieldBody = {
1
+ export type CreateAllocationBody = {
2
2
  /** Wallet id. */
3
3
  walletId: string;
4
4
  /** Ofns protocol */
@@ -18,14 +18,14 @@ export type CreateYieldBody = {
18
18
  /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
19
19
  slippageBps: number;
20
20
  };
21
- export type CreateYieldResponse = {
22
- /** Unique identifier for the yield investment. */
21
+ export type CreateAllocationResponse = {
22
+ /** Unique identifier for the allocation investment. */
23
23
  id: string;
24
24
  /** Wallet id. */
25
25
  walletId: string;
26
- /** The DeFi protocol used for yield generation. Currently supports OFNS protocol */
26
+ /** The DeFi protocol used for allocation generation. Currently supports OFNS protocol */
27
27
  protocol: "0fns";
28
- /** The total amount currently invested in this yield. */
28
+ /** The total amount currently invested in this allocation. */
29
29
  amount: ({
30
30
  kind: "Native";
31
31
  amount: string;
@@ -42,7 +42,7 @@ export type CreateYieldResponse = {
42
42
  tid?: string | undefined;
43
43
  };
44
44
  };
45
- /** The total interest earned so far in this yield. */
45
+ /** The total rewards earned so far in this allocation. */
46
46
  rewards: ({
47
47
  kind: "Native";
48
48
  amount: string;
@@ -62,15 +62,15 @@ export type CreateYieldResponse = {
62
62
  dateCreated: string;
63
63
  } & {
64
64
  actions: {
65
- /** Unique identifier for the yield action. */
65
+ /** Unique identifier for the allocation action. */
66
66
  id: string;
67
- /** Unique identifier for the yield investment. */
68
- yieldId: string;
67
+ /** Unique identifier for the allocation investment. */
68
+ allocationId: string;
69
69
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
70
70
  externalId?: string | undefined;
71
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
71
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
72
72
  kind: "Deposit" | "Withdraw";
73
- /** Status of the yield action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
73
+ /** Status of the allocation action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
74
74
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
75
75
  requester: {
76
76
  /** User (could be a service account) who requested the resource. */
@@ -78,9 +78,9 @@ export type CreateYieldResponse = {
78
78
  /** Service Account token or Personal Access token used when requesting the resource. */
79
79
  tokenId?: string | undefined;
80
80
  };
81
- /** The full request used for initiating this yield action. */
81
+ /** The full request used for initiating this allocation action. */
82
82
  requestBody: {
83
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
83
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
84
84
  kind: "Deposit" | "Withdraw";
85
85
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
86
86
  externalId?: string | undefined;
@@ -119,11 +119,11 @@ export type CreateYieldResponse = {
119
119
  dateCreated: string;
120
120
  }[];
121
121
  };
122
- export type CreateYieldRequest = {
123
- body: CreateYieldBody;
122
+ export type CreateAllocationRequest = {
123
+ body: CreateAllocationBody;
124
124
  };
125
- export type CreateYieldActionBody = {
126
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
125
+ export type CreateAllocationActionBody = {
126
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
127
127
  kind: "Deposit" | "Withdraw";
128
128
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
129
129
  externalId?: string | undefined;
@@ -140,18 +140,18 @@ export type CreateYieldActionBody = {
140
140
  /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
141
141
  slippageBps: number;
142
142
  };
143
- export type CreateYieldActionParams = {
144
- /** Unique identifier for the yield investment. */
145
- yieldId: string;
143
+ export type CreateAllocationActionParams = {
144
+ /** Unique identifier for the allocation investment. */
145
+ allocationId: string;
146
146
  };
147
- export type CreateYieldActionResponse = {
148
- /** Unique identifier for the yield investment. */
147
+ export type CreateAllocationActionResponse = {
148
+ /** Unique identifier for the allocation investment. */
149
149
  id: string;
150
150
  /** Wallet id. */
151
151
  walletId: string;
152
- /** The DeFi protocol used for yield generation. Currently supports OFNS protocol */
152
+ /** The DeFi protocol used for allocation generation. Currently supports OFNS protocol */
153
153
  protocol: "0fns";
154
- /** The total amount currently invested in this yield. */
154
+ /** The total amount currently invested in this allocation. */
155
155
  amount: ({
156
156
  kind: "Native";
157
157
  amount: string;
@@ -168,7 +168,7 @@ export type CreateYieldActionResponse = {
168
168
  tid?: string | undefined;
169
169
  };
170
170
  };
171
- /** The total interest earned so far in this yield. */
171
+ /** The total rewards earned so far in this allocation. */
172
172
  rewards: ({
173
173
  kind: "Native";
174
174
  amount: string;
@@ -188,15 +188,15 @@ export type CreateYieldActionResponse = {
188
188
  dateCreated: string;
189
189
  } & {
190
190
  actions: {
191
- /** Unique identifier for the yield action. */
191
+ /** Unique identifier for the allocation action. */
192
192
  id: string;
193
- /** Unique identifier for the yield investment. */
194
- yieldId: string;
193
+ /** Unique identifier for the allocation investment. */
194
+ allocationId: string;
195
195
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
196
196
  externalId?: string | undefined;
197
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
197
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
198
198
  kind: "Deposit" | "Withdraw";
199
- /** Status of the yield action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
199
+ /** Status of the allocation action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
200
200
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
201
201
  requester: {
202
202
  /** User (could be a service account) who requested the resource. */
@@ -204,9 +204,9 @@ export type CreateYieldActionResponse = {
204
204
  /** Service Account token or Personal Access token used when requesting the resource. */
205
205
  tokenId?: string | undefined;
206
206
  };
207
- /** The full request used for initiating this yield action. */
207
+ /** The full request used for initiating this allocation action. */
208
208
  requestBody: {
209
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
209
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
210
210
  kind: "Deposit" | "Withdraw";
211
211
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
212
212
  externalId?: string | undefined;
@@ -245,21 +245,21 @@ export type CreateYieldActionResponse = {
245
245
  dateCreated: string;
246
246
  }[];
247
247
  };
248
- export type CreateYieldActionRequest = CreateYieldActionParams & {
249
- body: CreateYieldActionBody;
248
+ export type CreateAllocationActionRequest = CreateAllocationActionParams & {
249
+ body: CreateAllocationActionBody;
250
250
  };
251
- export type GetYieldParams = {
252
- /** Unique identifier for the yield investment. */
253
- yieldId: string;
251
+ export type GetAllocationParams = {
252
+ /** Unique identifier for the allocation investment. */
253
+ allocationId: string;
254
254
  };
255
- export type GetYieldResponse = {
256
- /** Unique identifier for the yield investment. */
255
+ export type GetAllocationResponse = {
256
+ /** Unique identifier for the allocation investment. */
257
257
  id: string;
258
258
  /** Wallet id. */
259
259
  walletId: string;
260
- /** The DeFi protocol used for yield generation. Currently supports OFNS protocol */
260
+ /** The DeFi protocol used for allocation generation. Currently supports OFNS protocol */
261
261
  protocol: "0fns";
262
- /** The total amount currently invested in this yield. */
262
+ /** The total amount currently invested in this allocation. */
263
263
  amount: ({
264
264
  kind: "Native";
265
265
  amount: string;
@@ -276,7 +276,7 @@ export type GetYieldResponse = {
276
276
  tid?: string | undefined;
277
277
  };
278
278
  };
279
- /** The total interest earned so far in this yield. */
279
+ /** The total rewards earned so far in this allocation. */
280
280
  rewards: ({
281
281
  kind: "Native";
282
282
  amount: string;
@@ -296,15 +296,15 @@ export type GetYieldResponse = {
296
296
  dateCreated: string;
297
297
  } & {
298
298
  actions: {
299
- /** Unique identifier for the yield action. */
299
+ /** Unique identifier for the allocation action. */
300
300
  id: string;
301
- /** Unique identifier for the yield investment. */
302
- yieldId: string;
301
+ /** Unique identifier for the allocation investment. */
302
+ allocationId: string;
303
303
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
304
304
  externalId?: string | undefined;
305
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
305
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
306
306
  kind: "Deposit" | "Withdraw";
307
- /** Status of the yield action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
307
+ /** Status of the allocation action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
308
308
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
309
309
  requester: {
310
310
  /** User (could be a service account) who requested the resource. */
@@ -312,9 +312,9 @@ export type GetYieldResponse = {
312
312
  /** Service Account token or Personal Access token used when requesting the resource. */
313
313
  tokenId?: string | undefined;
314
314
  };
315
- /** The full request used for initiating this yield action. */
315
+ /** The full request used for initiating this allocation action. */
316
316
  requestBody: {
317
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
317
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
318
318
  kind: "Deposit" | "Withdraw";
319
319
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
320
320
  externalId?: string | undefined;
@@ -353,29 +353,29 @@ export type GetYieldResponse = {
353
353
  dateCreated: string;
354
354
  }[];
355
355
  };
356
- export type GetYieldRequest = GetYieldParams;
357
- export type ListYieldActionsParams = {
358
- /** Unique identifier for the yield investment. */
359
- yieldId: string;
356
+ export type GetAllocationRequest = GetAllocationParams;
357
+ export type ListAllocationActionsParams = {
358
+ /** Unique identifier for the allocation investment. */
359
+ allocationId: string;
360
360
  };
361
- export type ListYieldActionsQuery = {
361
+ export type ListAllocationActionsQuery = {
362
362
  /** Maximum number of items to return. */
363
363
  limit?: number | undefined;
364
364
  /** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
365
365
  paginationToken?: string | undefined;
366
366
  };
367
- export type ListYieldActionsResponse = {
367
+ export type ListAllocationActionsResponse = {
368
368
  /** Current page items. */
369
369
  items: {
370
- /** Unique identifier for the yield action. */
370
+ /** Unique identifier for the allocation action. */
371
371
  id: string;
372
- /** Unique identifier for the yield investment. */
373
- yieldId: string;
372
+ /** Unique identifier for the allocation investment. */
373
+ allocationId: string;
374
374
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
375
375
  externalId?: string | undefined;
376
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
376
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
377
377
  kind: "Deposit" | "Withdraw";
378
- /** Status of the yield action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
378
+ /** Status of the allocation action. Once initiated, the status will be InProgress, after processing it will be Completed or Failed. */
379
379
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
380
380
  requester: {
381
381
  /** User (could be a service account) who requested the resource. */
@@ -383,9 +383,9 @@ export type ListYieldActionsResponse = {
383
383
  /** Service Account token or Personal Access token used when requesting the resource. */
384
384
  tokenId?: string | undefined;
385
385
  };
386
- /** The full request used for initiating this yield action. */
386
+ /** The full request used for initiating this allocation action. */
387
387
  requestBody: {
388
- /** The type of action being performed on the yield investment: Deposit to add funds or Withdraw to remove funds. */
388
+ /** The type of action being performed on the allocation investment: Deposit to add funds or Withdraw to remove funds. */
389
389
  kind: "Deposit" | "Withdraw";
390
390
  /** An optional external identifier provided by the client to ensure idempotency and prevent duplicate operations. */
391
391
  externalId?: string | undefined;
@@ -426,25 +426,25 @@ export type ListYieldActionsResponse = {
426
426
  /** token to use as `paginationToken` to request the next page. */
427
427
  nextPageToken?: string | undefined;
428
428
  };
429
- export type ListYieldActionsRequest = ListYieldActionsParams & {
430
- query?: ListYieldActionsQuery;
429
+ export type ListAllocationActionsRequest = ListAllocationActionsParams & {
430
+ query?: ListAllocationActionsQuery;
431
431
  };
432
- export type ListYieldsQuery = {
432
+ export type ListAllocationsQuery = {
433
433
  /** Maximum number of items to return. */
434
434
  limit?: number | undefined;
435
435
  /** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
436
436
  paginationToken?: string | undefined;
437
437
  };
438
- export type ListYieldsResponse = {
438
+ export type ListAllocationsResponse = {
439
439
  /** Current page items. */
440
440
  items: {
441
- /** Unique identifier for the yield investment. */
441
+ /** Unique identifier for the allocation investment. */
442
442
  id: string;
443
443
  /** Wallet id. */
444
444
  walletId: string;
445
- /** The DeFi protocol used for yield generation. Currently supports OFNS protocol */
445
+ /** The DeFi protocol used for allocation generation. Currently supports OFNS protocol */
446
446
  protocol: "0fns";
447
- /** The total amount currently invested in this yield. */
447
+ /** The total amount currently invested in this allocation. */
448
448
  amount: ({
449
449
  kind: "Native";
450
450
  amount: string;
@@ -461,7 +461,7 @@ export type ListYieldsResponse = {
461
461
  tid?: string | undefined;
462
462
  };
463
463
  };
464
- /** The total interest earned so far in this yield. */
464
+ /** The total rewards earned so far in this allocation. */
465
465
  rewards: ({
466
466
  kind: "Native";
467
467
  amount: string;
@@ -483,6 +483,6 @@ export type ListYieldsResponse = {
483
483
  /** token to use as `paginationToken` to request the next page. */
484
484
  nextPageToken?: string | undefined;
485
485
  };
486
- export type ListYieldsRequest = {
487
- query?: ListYieldsQuery;
486
+ export type ListAllocationsRequest = {
487
+ query?: ListAllocationsQuery;
488
488
  };