@owney/sdk 0.7.25-beta.16 → 0.7.25-beta.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.
- package/dist/index.cjs +368 -139
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +304 -74
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -145,6 +145,9 @@ interface IAgent {
|
|
|
145
145
|
endFundingBalanceRefresh?(state: ConnectionState, chainId: number, asset: OwneySupportedTokens, read: AssetReadMetadata): boolean;
|
|
146
146
|
getFundingHistory?(state: ConnectionState, chainId: number, options?: HistoryFilters): Promise<OwneyAgentHistory>;
|
|
147
147
|
getFundingWallet?(state: ConnectionState, chainId: number, asset: OwneySupportedTokens): Promise<string>;
|
|
148
|
+
/** Verify the displayed remaining balance after a receipt-confirmed payout.
|
|
149
|
+
* Undefined means unknown; never substitute a failed read with zero. */
|
|
150
|
+
verifyWithdrawalBalance?(state: ConnectionState, evidence: FundingEvidence, balance: AgentBalance): Promise<AssetReadMetadata | undefined>;
|
|
148
151
|
/** Read-only chain proof when indexed withdrawal components are incomplete.
|
|
149
152
|
* Returns raw owner-withdrawable units; unavailable proof must throw.
|
|
150
153
|
* minimumAmount is the raw liquidity required from this agent for a typed
|
|
@@ -381,6 +384,12 @@ interface AssetReadMetadata {
|
|
|
381
384
|
snapshotId?: string;
|
|
382
385
|
blockNumber?: string;
|
|
383
386
|
netDepositsRaw?: string;
|
|
387
|
+
/** Display-only agreement with a post-payout read. Does not prove that
|
|
388
|
+
* provider accounting, history or allocations include the transaction. */
|
|
389
|
+
withdrawalCheck?: {
|
|
390
|
+
txHash: string;
|
|
391
|
+
blockNumber: string;
|
|
392
|
+
};
|
|
384
393
|
positionsStatus: "available" | "unavailable";
|
|
385
394
|
}
|
|
386
395
|
interface OwneyDepositResult {
|
|
@@ -709,6 +718,7 @@ declare class OwneySDK {
|
|
|
709
718
|
private cachedSponsoredCallsCallbacks;
|
|
710
719
|
private readonly agentReads;
|
|
711
720
|
private readonly recoveredFundingReads;
|
|
721
|
+
private fundingBalanceChecks;
|
|
712
722
|
private readonly activationChecks;
|
|
713
723
|
private readAgent;
|
|
714
724
|
private initializingAgentsPromise;
|
|
@@ -882,6 +892,9 @@ declare class OwneySDK {
|
|
|
882
892
|
/** Whether a foreground deposit can resume the same signed batch, never a
|
|
883
893
|
* fresh authorization. The batch rail independently rechecks the exact plan. */
|
|
884
894
|
canResumePendingDeposit(evidences: FundingEvidence[], amount: string): Promise<boolean>;
|
|
895
|
+
/** Optional post-payout display proof; receipt verification and the provider
|
|
896
|
+
* adapter must agree before attaching it to this exact balance object. */
|
|
897
|
+
verifyWithdrawalBalance(evidence: FundingEvidence, balance: AgentBalance): Promise<AgentBalance>;
|
|
885
898
|
/** A display acknowledgement controls polling only; it never confirms a financial outcome. */
|
|
886
899
|
endFundingBalanceRefresh(evidence: FundingEvidence, read: AssetReadMetadata): boolean;
|
|
887
900
|
/** History lookup for receipt recovery; adapters may not authenticate or sign here. */
|
|
@@ -1086,6 +1099,8 @@ declare class YieldseekerAgent implements IAgent {
|
|
|
1086
1099
|
private readonly transactionExecutor?;
|
|
1087
1100
|
private readonly unwindReceiptWaiter?;
|
|
1088
1101
|
private readonly agentContexts;
|
|
1102
|
+
private readonly balanceContexts;
|
|
1103
|
+
private readonly balanceVaults;
|
|
1089
1104
|
private readonly users;
|
|
1090
1105
|
private readonly pendingAgents;
|
|
1091
1106
|
private readonly pendingWalletContexts;
|
|
@@ -1124,6 +1139,7 @@ declare class YieldseekerAgent implements IAgent {
|
|
|
1124
1139
|
private readWithdrawalPositions;
|
|
1125
1140
|
private resolveWithdrawalLiquidity;
|
|
1126
1141
|
getBalances(state: ConnectionState, chainId: number, asset?: OwneySupportedTokens): Promise<AgentBalance>;
|
|
1142
|
+
verifyWithdrawalBalance(state: ConnectionState, evidence: FundingEvidence, balance: AgentBalance): Promise<AssetReadMetadata | undefined>;
|
|
1127
1143
|
invalidateFundingRead(state: ConnectionState, chainId: number, asset: OwneySupportedTokens, refreshUntil?: number): void;
|
|
1128
1144
|
endFundingBalanceRefresh(state: ConnectionState, chainId: number, asset: OwneySupportedTokens, read: AssetReadMetadata): boolean;
|
|
1129
1145
|
getFundingWallet(state: ConnectionState, chainId: number, asset: OwneySupportedTokens): Promise<string>;
|
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,9 @@ interface IAgent {
|
|
|
145
145
|
endFundingBalanceRefresh?(state: ConnectionState, chainId: number, asset: OwneySupportedTokens, read: AssetReadMetadata): boolean;
|
|
146
146
|
getFundingHistory?(state: ConnectionState, chainId: number, options?: HistoryFilters): Promise<OwneyAgentHistory>;
|
|
147
147
|
getFundingWallet?(state: ConnectionState, chainId: number, asset: OwneySupportedTokens): Promise<string>;
|
|
148
|
+
/** Verify the displayed remaining balance after a receipt-confirmed payout.
|
|
149
|
+
* Undefined means unknown; never substitute a failed read with zero. */
|
|
150
|
+
verifyWithdrawalBalance?(state: ConnectionState, evidence: FundingEvidence, balance: AgentBalance): Promise<AssetReadMetadata | undefined>;
|
|
148
151
|
/** Read-only chain proof when indexed withdrawal components are incomplete.
|
|
149
152
|
* Returns raw owner-withdrawable units; unavailable proof must throw.
|
|
150
153
|
* minimumAmount is the raw liquidity required from this agent for a typed
|
|
@@ -381,6 +384,12 @@ interface AssetReadMetadata {
|
|
|
381
384
|
snapshotId?: string;
|
|
382
385
|
blockNumber?: string;
|
|
383
386
|
netDepositsRaw?: string;
|
|
387
|
+
/** Display-only agreement with a post-payout read. Does not prove that
|
|
388
|
+
* provider accounting, history or allocations include the transaction. */
|
|
389
|
+
withdrawalCheck?: {
|
|
390
|
+
txHash: string;
|
|
391
|
+
blockNumber: string;
|
|
392
|
+
};
|
|
384
393
|
positionsStatus: "available" | "unavailable";
|
|
385
394
|
}
|
|
386
395
|
interface OwneyDepositResult {
|
|
@@ -709,6 +718,7 @@ declare class OwneySDK {
|
|
|
709
718
|
private cachedSponsoredCallsCallbacks;
|
|
710
719
|
private readonly agentReads;
|
|
711
720
|
private readonly recoveredFundingReads;
|
|
721
|
+
private fundingBalanceChecks;
|
|
712
722
|
private readonly activationChecks;
|
|
713
723
|
private readAgent;
|
|
714
724
|
private initializingAgentsPromise;
|
|
@@ -882,6 +892,9 @@ declare class OwneySDK {
|
|
|
882
892
|
/** Whether a foreground deposit can resume the same signed batch, never a
|
|
883
893
|
* fresh authorization. The batch rail independently rechecks the exact plan. */
|
|
884
894
|
canResumePendingDeposit(evidences: FundingEvidence[], amount: string): Promise<boolean>;
|
|
895
|
+
/** Optional post-payout display proof; receipt verification and the provider
|
|
896
|
+
* adapter must agree before attaching it to this exact balance object. */
|
|
897
|
+
verifyWithdrawalBalance(evidence: FundingEvidence, balance: AgentBalance): Promise<AgentBalance>;
|
|
885
898
|
/** A display acknowledgement controls polling only; it never confirms a financial outcome. */
|
|
886
899
|
endFundingBalanceRefresh(evidence: FundingEvidence, read: AssetReadMetadata): boolean;
|
|
887
900
|
/** History lookup for receipt recovery; adapters may not authenticate or sign here. */
|
|
@@ -1086,6 +1099,8 @@ declare class YieldseekerAgent implements IAgent {
|
|
|
1086
1099
|
private readonly transactionExecutor?;
|
|
1087
1100
|
private readonly unwindReceiptWaiter?;
|
|
1088
1101
|
private readonly agentContexts;
|
|
1102
|
+
private readonly balanceContexts;
|
|
1103
|
+
private readonly balanceVaults;
|
|
1089
1104
|
private readonly users;
|
|
1090
1105
|
private readonly pendingAgents;
|
|
1091
1106
|
private readonly pendingWalletContexts;
|
|
@@ -1124,6 +1139,7 @@ declare class YieldseekerAgent implements IAgent {
|
|
|
1124
1139
|
private readWithdrawalPositions;
|
|
1125
1140
|
private resolveWithdrawalLiquidity;
|
|
1126
1141
|
getBalances(state: ConnectionState, chainId: number, asset?: OwneySupportedTokens): Promise<AgentBalance>;
|
|
1142
|
+
verifyWithdrawalBalance(state: ConnectionState, evidence: FundingEvidence, balance: AgentBalance): Promise<AssetReadMetadata | undefined>;
|
|
1127
1143
|
invalidateFundingRead(state: ConnectionState, chainId: number, asset: OwneySupportedTokens, refreshUntil?: number): void;
|
|
1128
1144
|
endFundingBalanceRefresh(state: ConnectionState, chainId: number, asset: OwneySupportedTokens, read: AssetReadMetadata): boolean;
|
|
1129
1145
|
getFundingWallet(state: ConnectionState, chainId: number, asset: OwneySupportedTokens): Promise<string>;
|