@owney/sdk 0.6.2-beta.0 → 0.6.2

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/dist/index.cjs CHANGED
@@ -1984,17 +1984,17 @@ var OwneySDK = class {
1984
1984
  * preserve the user's scroll position should keep using cursors from the
1985
1985
  * original snapshot.
1986
1986
  *
1987
- * @param params.agentId - Optional. Agent to query. Omit for all active agents.
1988
- * @param params.filters - Optional. Pagination + date filters.
1987
+ * @param options.agentId - Optional. Agent to query. Omit for all active agents.
1988
+ * @param options.filters - Optional. Pagination + date filters.
1989
1989
  * - `limit`: max entries per page (default 10)
1990
1990
  * - `cursor`: opaque cursor returned by a previous call
1991
1991
  * - `fromDate` / `toDate`: ISO 8601 date strings
1992
1992
  * @returns {OwneyAgentHistory} `data` (up to `limit` entries), `hasMore`, `nextCursor`.
1993
1993
  */
1994
- async getHistory(params) {
1994
+ async getHistory(options) {
1995
1995
  const state = this.requireState();
1996
1996
  const chainId = this.requireChainId();
1997
- const { agentId, filters } = params ?? {};
1997
+ const { agentId, filters } = options ?? {};
1998
1998
  if (agentId) {
1999
1999
  return this.getAgent(agentId).getHistory(state, chainId, filters);
2000
2000
  }
package/dist/index.d.cts CHANGED
@@ -236,6 +236,9 @@ type AccountApyOptions = {
236
236
  agentId?: AgentId;
237
237
  days: DailyApyDays;
238
238
  };
239
+ type AllocationApyOptions = {
240
+ agentId?: AgentId;
241
+ };
239
242
  type AgentsApyOptions = {
240
243
  agentId?: AgentId;
241
244
  days: DailyApyDays;
@@ -386,14 +389,14 @@ declare class OwneySDK {
386
389
  * preserve the user's scroll position should keep using cursors from the
387
390
  * original snapshot.
388
391
  *
389
- * @param params.agentId - Optional. Agent to query. Omit for all active agents.
390
- * @param params.filters - Optional. Pagination + date filters.
392
+ * @param options.agentId - Optional. Agent to query. Omit for all active agents.
393
+ * @param options.filters - Optional. Pagination + date filters.
391
394
  * - `limit`: max entries per page (default 10)
392
395
  * - `cursor`: opaque cursor returned by a previous call
393
396
  * - `fromDate` / `toDate`: ISO 8601 date strings
394
397
  * @returns {OwneyAgentHistory} `data` (up to `limit` entries), `hasMore`, `nextCursor`.
395
398
  */
396
- getHistory(params?: HistoryOptions): Promise<OwneyAgentHistory>;
399
+ getHistory(options?: HistoryOptions): Promise<OwneyAgentHistory>;
397
400
  /**
398
401
  * Get the user's profile for a specific agent, or all agents.
399
402
  * @param agentId - Optional. Agent to query. Omit for all agents.
@@ -420,9 +423,7 @@ declare class OwneySDK {
420
423
  * @param options.agentId - Optional. Scope to one agent. Omit to aggregate
421
424
  * positions across all active agents.
422
425
  */
423
- getAllocationApy({ agentId, }?: {
424
- agentId?: AgentId;
425
- }): Promise<OwneyAllocationApy>;
426
+ getAllocationApy({ agentId, }?: AllocationApyOptions): Promise<OwneyAllocationApy>;
426
427
  }
427
428
 
428
429
  type OwneyErrorCode = "NOT_CONNECTED" | "NO_ACTIVE_CHAIN" | "WALLET_NO_ACCOUNTS" | "WALLET_ADDRESS_REQUIRED" | "AGENT_NOT_FOUND" | "AGENT_CHAIN_INCOMPATIBLE" | "AGENT_EMPTY_LIST" | "AGENT_DISABLED" | "CHAIN_UNSUPPORTED" | "CHAIN_NO_COMPATIBLE_AGENTS" | "ASSET_UNSUPPORTED" | "ASSET_NO_COMPATIBLE_AGENTS" | "DEPOSIT_AMOUNT_BELOW_MINIMUM" | "DEPOSIT_CALLBACK_REQUIRED" | "DEPOSIT_CALLBACK_INVALID" | "DEPOSIT_NO_PERMITTED_TOKENS" | "WITHDRAW_NO_PERMITTED_TOKENS" | "WITHDRAW_INSUFFICIENT_BALANCE" | "WITHDRAW_ALL_FAILED" | "WITHDRAW_PARTIAL_FAILURE" | "WITHDRAW_FAILED" | "API_ROUTING_ERROR" | "API_ROUTING_FAILED" | "API_SAIL_ERROR" | "API_SAIL_TIMEOUT" | "API_NO_AGENTS" | "SPONSOR_REQUEST_FAILED" | "BALANCE_ALL_FAILED" | "ALLOCATION_ALL_FAILED" | "VALIDATION_INVALID_DAYS";
@@ -468,4 +469,4 @@ type OwneySIWXConfig = {
468
469
  */
469
470
  declare function createOwneySIWX(config: OwneySIWXConfig): SIWXConfig;
470
471
 
471
- export { AccountAgentApy, AccountApyOptions, AgentApy, AgentApyDetails, AgentBalance, AgentChainIncompatibleError, AgentEarnings, AgentHistoryEntry, AgentHistoryPosition, AgentId, AgentNotFoundError, AgentSupportedAsset, AgentSupportedAssets, AgentUserProfile, AgentWithdrawResult, AgentsApyOptions, AllocationAgentApy, ApyByChainAndAsset, Asset, ConnectionState, DailyApyDays, DepositCallback, DepositOptions, HistoryAction, HistoryFilters, HistoryOptions, HistoryTransaction, IAgent, InvalidHistoryCursorError, NotConnectedError, OwneyAccountApy, OwneyAgentApy, OwneyAgentHistory, OwneyAllocationApy, OwneyBalances, OwneyDepositResult, OwneyEarnings, OwneyError, OwneyErrorCode, OwneyMultiDepositResult, OwneyPosition, OwneySDK, OwneySDKConfig, OwneySIWXConfig, OwneySupportedChainId, OwneySupportedChains, OwneySupportedTokens, OwneyToken, OwneyUserProfile, OwneyWithdrawResult, RebalanceLog, WithdrawOptions, createOwneySIWX };
472
+ export { AccountAgentApy, AccountApyOptions, AgentApy, AgentApyDetails, AgentBalance, AgentChainIncompatibleError, AgentEarnings, AgentHistoryEntry, AgentHistoryPosition, AgentId, AgentNotFoundError, AgentSupportedAsset, AgentSupportedAssets, AgentUserProfile, AgentWithdrawResult, AgentsApyOptions, AllocationAgentApy, AllocationApyOptions, ApyByChainAndAsset, Asset, ConnectionState, DailyApyDays, DepositCallback, DepositOptions, HistoryAction, HistoryFilters, HistoryOptions, HistoryTransaction, IAgent, InvalidHistoryCursorError, NotConnectedError, OwneyAccountApy, OwneyAgentApy, OwneyAgentHistory, OwneyAllocationApy, OwneyBalances, OwneyDepositResult, OwneyEarnings, OwneyError, OwneyErrorCode, OwneyMultiDepositResult, OwneyPosition, OwneySDK, OwneySDKConfig, OwneySIWXConfig, OwneySupportedChainId, OwneySupportedChains, OwneySupportedTokens, OwneyToken, OwneyUserProfile, OwneyWithdrawResult, RebalanceLog, WithdrawOptions, createOwneySIWX };
package/dist/index.d.ts CHANGED
@@ -236,6 +236,9 @@ type AccountApyOptions = {
236
236
  agentId?: AgentId;
237
237
  days: DailyApyDays;
238
238
  };
239
+ type AllocationApyOptions = {
240
+ agentId?: AgentId;
241
+ };
239
242
  type AgentsApyOptions = {
240
243
  agentId?: AgentId;
241
244
  days: DailyApyDays;
@@ -386,14 +389,14 @@ declare class OwneySDK {
386
389
  * preserve the user's scroll position should keep using cursors from the
387
390
  * original snapshot.
388
391
  *
389
- * @param params.agentId - Optional. Agent to query. Omit for all active agents.
390
- * @param params.filters - Optional. Pagination + date filters.
392
+ * @param options.agentId - Optional. Agent to query. Omit for all active agents.
393
+ * @param options.filters - Optional. Pagination + date filters.
391
394
  * - `limit`: max entries per page (default 10)
392
395
  * - `cursor`: opaque cursor returned by a previous call
393
396
  * - `fromDate` / `toDate`: ISO 8601 date strings
394
397
  * @returns {OwneyAgentHistory} `data` (up to `limit` entries), `hasMore`, `nextCursor`.
395
398
  */
396
- getHistory(params?: HistoryOptions): Promise<OwneyAgentHistory>;
399
+ getHistory(options?: HistoryOptions): Promise<OwneyAgentHistory>;
397
400
  /**
398
401
  * Get the user's profile for a specific agent, or all agents.
399
402
  * @param agentId - Optional. Agent to query. Omit for all agents.
@@ -420,9 +423,7 @@ declare class OwneySDK {
420
423
  * @param options.agentId - Optional. Scope to one agent. Omit to aggregate
421
424
  * positions across all active agents.
422
425
  */
423
- getAllocationApy({ agentId, }?: {
424
- agentId?: AgentId;
425
- }): Promise<OwneyAllocationApy>;
426
+ getAllocationApy({ agentId, }?: AllocationApyOptions): Promise<OwneyAllocationApy>;
426
427
  }
427
428
 
428
429
  type OwneyErrorCode = "NOT_CONNECTED" | "NO_ACTIVE_CHAIN" | "WALLET_NO_ACCOUNTS" | "WALLET_ADDRESS_REQUIRED" | "AGENT_NOT_FOUND" | "AGENT_CHAIN_INCOMPATIBLE" | "AGENT_EMPTY_LIST" | "AGENT_DISABLED" | "CHAIN_UNSUPPORTED" | "CHAIN_NO_COMPATIBLE_AGENTS" | "ASSET_UNSUPPORTED" | "ASSET_NO_COMPATIBLE_AGENTS" | "DEPOSIT_AMOUNT_BELOW_MINIMUM" | "DEPOSIT_CALLBACK_REQUIRED" | "DEPOSIT_CALLBACK_INVALID" | "DEPOSIT_NO_PERMITTED_TOKENS" | "WITHDRAW_NO_PERMITTED_TOKENS" | "WITHDRAW_INSUFFICIENT_BALANCE" | "WITHDRAW_ALL_FAILED" | "WITHDRAW_PARTIAL_FAILURE" | "WITHDRAW_FAILED" | "API_ROUTING_ERROR" | "API_ROUTING_FAILED" | "API_SAIL_ERROR" | "API_SAIL_TIMEOUT" | "API_NO_AGENTS" | "SPONSOR_REQUEST_FAILED" | "BALANCE_ALL_FAILED" | "ALLOCATION_ALL_FAILED" | "VALIDATION_INVALID_DAYS";
@@ -468,4 +469,4 @@ type OwneySIWXConfig = {
468
469
  */
469
470
  declare function createOwneySIWX(config: OwneySIWXConfig): SIWXConfig;
470
471
 
471
- export { AccountAgentApy, AccountApyOptions, AgentApy, AgentApyDetails, AgentBalance, AgentChainIncompatibleError, AgentEarnings, AgentHistoryEntry, AgentHistoryPosition, AgentId, AgentNotFoundError, AgentSupportedAsset, AgentSupportedAssets, AgentUserProfile, AgentWithdrawResult, AgentsApyOptions, AllocationAgentApy, ApyByChainAndAsset, Asset, ConnectionState, DailyApyDays, DepositCallback, DepositOptions, HistoryAction, HistoryFilters, HistoryOptions, HistoryTransaction, IAgent, InvalidHistoryCursorError, NotConnectedError, OwneyAccountApy, OwneyAgentApy, OwneyAgentHistory, OwneyAllocationApy, OwneyBalances, OwneyDepositResult, OwneyEarnings, OwneyError, OwneyErrorCode, OwneyMultiDepositResult, OwneyPosition, OwneySDK, OwneySDKConfig, OwneySIWXConfig, OwneySupportedChainId, OwneySupportedChains, OwneySupportedTokens, OwneyToken, OwneyUserProfile, OwneyWithdrawResult, RebalanceLog, WithdrawOptions, createOwneySIWX };
472
+ export { AccountAgentApy, AccountApyOptions, AgentApy, AgentApyDetails, AgentBalance, AgentChainIncompatibleError, AgentEarnings, AgentHistoryEntry, AgentHistoryPosition, AgentId, AgentNotFoundError, AgentSupportedAsset, AgentSupportedAssets, AgentUserProfile, AgentWithdrawResult, AgentsApyOptions, AllocationAgentApy, AllocationApyOptions, ApyByChainAndAsset, Asset, ConnectionState, DailyApyDays, DepositCallback, DepositOptions, HistoryAction, HistoryFilters, HistoryOptions, HistoryTransaction, IAgent, InvalidHistoryCursorError, NotConnectedError, OwneyAccountApy, OwneyAgentApy, OwneyAgentHistory, OwneyAllocationApy, OwneyBalances, OwneyDepositResult, OwneyEarnings, OwneyError, OwneyErrorCode, OwneyMultiDepositResult, OwneyPosition, OwneySDK, OwneySDKConfig, OwneySIWXConfig, OwneySupportedChainId, OwneySupportedChains, OwneySupportedTokens, OwneyToken, OwneyUserProfile, OwneyWithdrawResult, RebalanceLog, WithdrawOptions, createOwneySIWX };
package/dist/index.js CHANGED
@@ -1956,17 +1956,17 @@ var OwneySDK = class {
1956
1956
  * preserve the user's scroll position should keep using cursors from the
1957
1957
  * original snapshot.
1958
1958
  *
1959
- * @param params.agentId - Optional. Agent to query. Omit for all active agents.
1960
- * @param params.filters - Optional. Pagination + date filters.
1959
+ * @param options.agentId - Optional. Agent to query. Omit for all active agents.
1960
+ * @param options.filters - Optional. Pagination + date filters.
1961
1961
  * - `limit`: max entries per page (default 10)
1962
1962
  * - `cursor`: opaque cursor returned by a previous call
1963
1963
  * - `fromDate` / `toDate`: ISO 8601 date strings
1964
1964
  * @returns {OwneyAgentHistory} `data` (up to `limit` entries), `hasMore`, `nextCursor`.
1965
1965
  */
1966
- async getHistory(params) {
1966
+ async getHistory(options) {
1967
1967
  const state = this.requireState();
1968
1968
  const chainId = this.requireChainId();
1969
- const { agentId, filters } = params ?? {};
1969
+ const { agentId, filters } = options ?? {};
1970
1970
  if (agentId) {
1971
1971
  return this.getAgent(agentId).getHistory(state, chainId, filters);
1972
1972
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owney/sdk",
3
- "version": "0.6.2-beta.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",