Skip to content

Commit ee5e248

Browse files
feat(api): api update
Stainless-Generated-From: 85248fb1eaae8f868292172b2d793495f23c32d7
1 parent 7007769 commit ee5e248

11 files changed

Lines changed: 132 additions & 22 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 97
1+
configured_endpoints: 99

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ Methods:
360360

361361
- <code title="post /v1/wallets/{wallet_id}/earn/ethereum/deposit">client.wallets.earn.ethereum.<a href="./src/resources/wallets/earn/ethereum/ethereum.ts">\_deposit</a>(walletID, { ...params }) -> EarnDepositActionResponse</code>
362362
- <code title="post /v1/wallets/{wallet_id}/earn/ethereum/withdraw">client.wallets.earn.ethereum.<a href="./src/resources/wallets/earn/ethereum/ethereum.ts">\_withdraw</a>(walletID, { ...params }) -> EarnWithdrawActionResponse</code>
363+
- <code title="get /v1/earn/ethereum/vaults/{vault_id}">client.wallets.earn.ethereum.<a href="./src/resources/wallets/earn/ethereum/ethereum.ts">vaultDetails</a>(vaultID) -> EthereumEarnVaultDetailsResponse</code>
364+
- <code title="get /v1/wallets/{wallet_id}/earn/ethereum/vaults">client.wallets.earn.ethereum.<a href="./src/resources/wallets/earn/ethereum/ethereum.ts">vaultPosition</a>(walletID, { ...params }) -> EthereumEarnPositionResponse</code>
363365

364366
#### Incentive
365367

src/resources/apps/apps.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ export interface AppResponse {
188188

189189
legacy_wallet_ui_config: boolean;
190190

191+
/**
192+
* The legal name of the company that operates the app.
193+
*/
194+
legal_name: string | null;
195+
191196
line_oauth: boolean;
192197

193198
linkedin_oauth: boolean;

src/resources/cards.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export interface CardIssuingCardResponse {
7474
*/
7575
chain_id: AppsAPI.Caip2;
7676

77+
/**
78+
* Unix timestamp, in seconds, of when the card was created.
79+
*/
80+
created_at: number;
81+
7782
/**
7883
* Card expiration month from 1 to 12, or null when unavailable.
7984
*/

src/resources/wallets/deposit-accounts/crypto.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../../core/resource';
4-
import * as WalletAutomationsAPI from '../../wallet-automations';
54
import * as WalletsAPI from '../wallets';
65
import { APIPromise } from '../../../core/api-promise';
76
import { buildHeaders } from '../../../internal/headers';
@@ -87,18 +86,16 @@ export declare namespace CryptoCreateParams {
8786

8887
export interface CreateCryptoDepositAccountWithRouteRequestBody {
8988
/**
90-
* Body param: A destination asset spec accepting either raw identifiers
91-
* (asset_address, caip2) or human-readable aliases (asset, chain). Exactly one of
92-
* asset_address or asset must be provided; exactly one of caip2 or chain must be
93-
* provided.
89+
* Body param: An asset on a chain. Uses a human-readable alias (usdc, base) when
90+
* one is on file, otherwise the raw asset address and CAIP-2.
9491
*/
95-
destination: WalletAutomationsAPI.AutomationDestinationAssetInput;
92+
destination: WalletsAPI.CryptoDepositAsset;
9693

9794
/**
98-
* Body param: Which assets to include/exclude for an automation trigger (input
99-
* form with alias support).
95+
* Body param: Which assets a deposit address accepts. Asset and chain use
96+
* human-readable aliases when known.
10097
*/
101-
source: WalletAutomationsAPI.AutomationAssetFilterInput;
98+
source: WalletsAPI.CryptoDepositAssetFilter;
10299

103100
/**
104101
* Header param: Request authorization signature. If multiple signatures are

src/resources/wallets/earn/earn.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
import { APIResource } from '../../../core/resource';
44
import * as EthereumAPI from './ethereum/ethereum';
5-
import { Ethereum, EthereumDepositParams, EthereumWithdrawParams } from './ethereum/ethereum';
5+
import {
6+
Ethereum,
7+
EthereumDepositParams,
8+
EthereumVaultPositionParams,
9+
EthereumWithdrawParams,
10+
} from './ethereum/ethereum';
611

712
export class Earn extends APIResource {
813
_ethereum: EthereumAPI.Ethereum = new EthereumAPI.Ethereum(this._client);
@@ -15,5 +20,6 @@ export declare namespace Earn {
1520
Ethereum as Ethereum,
1621
type EthereumDepositParams as EthereumDepositParams,
1722
type EthereumWithdrawParams as EthereumWithdrawParams,
23+
type EthereumVaultPositionParams as EthereumVaultPositionParams,
1824
};
1925
}

src/resources/wallets/earn/ethereum/ethereum.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,46 @@ export class Ethereum extends APIResource {
9696
]),
9797
});
9898
}
99+
100+
/**
101+
* Retrieve detailed information about an earn vault, including current APY and
102+
* liquidity.
103+
*
104+
* @example
105+
* ```ts
106+
* const ethereumEarnVaultDetailsResponse =
107+
* await client.wallets.earn.ethereum.vaultDetails(
108+
* 'vault_id',
109+
* );
110+
* ```
111+
*/
112+
vaultDetails(
113+
vaultID: string,
114+
options?: RequestOptions,
115+
): APIPromise<ActionsAPI.EthereumEarnVaultDetailsResponse> {
116+
return this._client.get(path`/v1/earn/ethereum/vaults/${vaultID}`, options);
117+
}
118+
119+
/**
120+
* Retrieve a wallet's current position in a specific earn vault, including
121+
* deposit/withdraw totals and current onchain vault shares.
122+
*
123+
* @example
124+
* ```ts
125+
* const ethereumEarnPositionResponse =
126+
* await client.wallets.earn.ethereum.vaultPosition(
127+
* 'wallet_id',
128+
* { vault_id: 'vault_id' },
129+
* );
130+
* ```
131+
*/
132+
vaultPosition(
133+
walletID: string,
134+
query: EthereumVaultPositionParams,
135+
options?: RequestOptions,
136+
): APIPromise<ActionsAPI.EthereumEarnPositionResponse> {
137+
return this._client.get(path`/v1/wallets/${walletID}/earn/ethereum/vaults`, { query, ...options });
138+
}
99139
}
100140

101141
export interface EthereumDepositParams {
@@ -184,12 +224,25 @@ export interface EthereumWithdrawParams {
184224
'privy-request-expiry'?: string;
185225
}
186226

227+
export interface EthereumVaultPositionParams {
228+
/**
229+
* The vault ID to get position for.
230+
*/
231+
vault_id: string;
232+
233+
/**
234+
* Include archived wallets in lookup. Defaults to false.
235+
*/
236+
include_archived?: boolean;
237+
}
238+
187239
Ethereum.Incentive = Incentive;
188240

189241
export declare namespace Ethereum {
190242
export {
191243
type EthereumDepositParams as EthereumDepositParams,
192244
type EthereumWithdrawParams as EthereumWithdrawParams,
245+
type EthereumVaultPositionParams as EthereumVaultPositionParams,
193246
};
194247

195248
export { Incentive as Incentive, type IncentiveClaimParams as IncentiveClaimParams };
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { Ethereum, type EthereumDepositParams, type EthereumWithdrawParams } from './ethereum';
3+
export {
4+
Ethereum,
5+
type EthereumDepositParams,
6+
type EthereumWithdrawParams,
7+
type EthereumVaultPositionParams,
8+
} from './ethereum';
49
export { Incentive, type IncentiveClaimParams } from './incentive';
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export { Earn } from './earn';
4-
export { Ethereum, type EthereumDepositParams, type EthereumWithdrawParams } from './ethereum/index';
4+
export {
5+
Ethereum,
6+
type EthereumDepositParams,
7+
type EthereumWithdrawParams,
8+
type EthereumVaultPositionParams,
9+
} from './ethereum/index';

src/resources/wallets/wallets.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -749,17 +749,16 @@ export interface CreateCryptoDepositAccountWithConfigRequestBody {
749749
*/
750750
export interface CreateCryptoDepositAccountWithRouteRequestBody {
751751
/**
752-
* A destination asset spec accepting either raw identifiers (asset_address, caip2)
753-
* or human-readable aliases (asset, chain). Exactly one of asset_address or asset
754-
* must be provided; exactly one of caip2 or chain must be provided.
752+
* An asset on a chain. Uses a human-readable alias (usdc, base) when one is on
753+
* file, otherwise the raw asset address and CAIP-2.
755754
*/
756-
destination: WalletAutomationsAPI.AutomationDestinationAssetInput;
755+
destination: CryptoDepositAsset;
757756

758757
/**
759-
* Which assets to include/exclude for an automation trigger (input form with alias
760-
* support).
758+
* Which assets a deposit address accepts. Asset and chain use human-readable
759+
* aliases when known.
761760
*/
762-
source: WalletAutomationsAPI.AutomationAssetFilterInput;
761+
source: CryptoDepositAssetFilter;
763762
}
764763

765764
/**
@@ -794,9 +793,10 @@ export interface CryptoDepositAsset {
794793
asset: string;
795794

796795
/**
797-
* Known alias (base) or CAIP-2.
796+
* Known alias (base) or CAIP-2. Omit on a source value to match every supported
797+
* chain for that asset.
798798
*/
799-
chain: string;
799+
chain?: string;
800800
}
801801

802802
/**

0 commit comments

Comments
 (0)