@augustdigital/sdk 8.10.0 → 8.12.0
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/lib/adapters/evm/index.d.ts +17 -1
- package/lib/adapters/evm/index.js +20 -0
- package/lib/adapters/stellar/actions.js +4 -4
- package/lib/adapters/stellar/getters.d.ts +9 -3
- package/lib/adapters/stellar/getters.js +18 -6
- package/lib/adapters/stellar/index.d.ts +17 -2
- package/lib/adapters/stellar/index.js +24 -5
- package/lib/adapters/stellar/soroban.d.ts +89 -2
- package/lib/adapters/stellar/soroban.js +487 -64
- package/lib/adapters/stellar/submit.d.ts +4 -1
- package/lib/adapters/stellar/submit.js +7 -3
- package/lib/adapters/stellar/types.d.ts +12 -0
- package/lib/core/analytics/method-taxonomy.js +1 -0
- package/lib/core/analytics/sanitize.js +19 -3
- package/lib/core/analytics/version.d.ts +1 -1
- package/lib/core/analytics/version.js +1 -1
- package/lib/core/base.class.d.ts +2 -1
- package/lib/core/constants/swap-router.d.ts +2 -0
- package/lib/core/constants/swap-router.js +1 -0
- package/lib/core/constants/web3.d.ts +19 -0
- package/lib/core/constants/web3.js +37 -1
- package/lib/core/helpers/multicall.d.ts +68 -0
- package/lib/core/helpers/multicall.js +103 -0
- package/lib/core/helpers/swap-router.d.ts +36 -1
- package/lib/core/helpers/swap-router.js +80 -0
- package/lib/core/helpers/vault-version.d.ts +4 -1
- package/lib/core/helpers/vaults.d.ts +1 -1
- package/lib/core/index.d.ts +1 -0
- package/lib/core/index.js +1 -0
- package/lib/main.js +6 -1
- package/lib/modules/vaults/getters.d.ts +25 -2
- package/lib/modules/vaults/getters.js +46 -12
- package/lib/modules/vaults/main.d.ts +28 -0
- package/lib/modules/vaults/main.js +89 -0
- package/lib/modules/vaults/prefetch.d.ts +65 -0
- package/lib/modules/vaults/prefetch.js +120 -0
- package/lib/modules/vaults/types.d.ts +11 -1
- package/lib/sdk.d.ts +6725 -6507
- package/lib/types/subgraph.d.ts +9 -0
- package/lib/types/vaults.d.ts +44 -0
- package/lib/types/web3.d.ts +15 -0
- package/package.json +1 -1
package/lib/types/subgraph.d.ts
CHANGED
|
@@ -12,6 +12,15 @@ export interface ISubgraphUserHistoryItem extends ISubgraphBase {
|
|
|
12
12
|
type: 'withdraw-request' | 'deposit' | 'withdraw-processed';
|
|
13
13
|
decimals?: number;
|
|
14
14
|
isInstant?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Receipt-token (vault share) amount burned, raw base units. Present on
|
|
17
|
+
* withdraw-request rows: an async withdrawal burns shares up front, but the
|
|
18
|
+
* assets ultimately received are only known once the request settles (share
|
|
19
|
+
* price can move). Consumers showing a pending request should surface these
|
|
20
|
+
* shares (the concrete on-chain fact) rather than the request's `assets`
|
|
21
|
+
* preview. Absent on deposits and settled withdraws.
|
|
22
|
+
*/
|
|
23
|
+
shares?: string;
|
|
15
24
|
/**
|
|
16
25
|
* Deposit asset token address, when known. Pre-deposit vaults accept
|
|
17
26
|
* multiple deposit assets with differing decimals (e.g. USDS at 18,
|
package/lib/types/vaults.d.ts
CHANGED
|
@@ -48,6 +48,26 @@ export type IVaultUserHistoryItem = {
|
|
|
48
48
|
chainId: number;
|
|
49
49
|
type: 'withdraw-request' | 'deposit' | 'withdraw-processed' | 'redeem';
|
|
50
50
|
transactionHash: IAddress;
|
|
51
|
+
/**
|
|
52
|
+
* The token address that was actually deposited, when known. Pre-deposit
|
|
53
|
+
* vaults accept multiple deposit assets (e.g. a sentUSD vault taking RLUSD,
|
|
54
|
+
* USDC, and USDT), so the vault's own metadata cannot tell a consumer which
|
|
55
|
+
* asset a given deposit used — only this per-row address can. UIs should
|
|
56
|
+
* resolve the displayed asset symbol/logo from `assetIn` rather than assuming
|
|
57
|
+
* the vault's first deposit asset. Absent for single-asset vaults and for
|
|
58
|
+
* withdraw/redeem rows, where the vault's underlying asset applies.
|
|
59
|
+
*/
|
|
60
|
+
assetIn?: IAddress;
|
|
61
|
+
/**
|
|
62
|
+
* Receipt-token (vault share) amount burned on a withdraw **request**. An
|
|
63
|
+
* async withdrawal burns shares immediately, but the assets received are not
|
|
64
|
+
* known until the request settles (share price can drift), so `amount`'s
|
|
65
|
+
* asset figure is only a preview. UIs rendering a pending request should show
|
|
66
|
+
* these `shares` with the receipt symbol — the concrete on-chain fact — and
|
|
67
|
+
* reserve the asset amount for the settled ("processed") row. Present only on
|
|
68
|
+
* `withdraw-request` items.
|
|
69
|
+
*/
|
|
70
|
+
shares?: INormalizedNumber;
|
|
51
71
|
};
|
|
52
72
|
/**
|
|
53
73
|
* A single reward paired with its backend-provided logo.
|
|
@@ -561,3 +581,27 @@ export interface ISwapRouterDepositOptions extends Omit<ISwapRouterBaseOptions,
|
|
|
561
581
|
*/
|
|
562
582
|
slippageBps?: number;
|
|
563
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* Options for {@link getSwapRouterDepositResult} — resolves the real,
|
|
586
|
+
* post-execution outcome of a SwapRouter deposit from its mined transaction
|
|
587
|
+
* receipt, rather than the pre-trade quote shown before submission.
|
|
588
|
+
*/
|
|
589
|
+
export interface ISwapRouterDepositResultOptions {
|
|
590
|
+
/** Hash of a mined SwapRouter deposit transaction (e.g. from {@link swapRouterDeposit}). */
|
|
591
|
+
txHash: string;
|
|
592
|
+
/** The vault that was deposited into — isolates its own `Deposit` event from the router's unrelated logs. */
|
|
593
|
+
vault: IAddress;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Real, on-chain outcome of a SwapRouter deposit, decoded from the vault's own
|
|
597
|
+
* `Deposit` event (the SwapRouter contract itself emits no deposit/amount-out
|
|
598
|
+
* event — see {@link getSwapRouterDepositResult}). For a swap deposit this is
|
|
599
|
+
* the actual post-swap amount that reached the vault, which can differ from
|
|
600
|
+
* the pre-trade quote a UI shows before the user submits.
|
|
601
|
+
*/
|
|
602
|
+
export interface ISwapRouterDepositResult {
|
|
603
|
+
/** Raw amount of the vault's reference asset recorded as deposited (reference-asset decimals). */
|
|
604
|
+
amountOut: bigint;
|
|
605
|
+
/** Raw vault shares minted to the receiver (share-token decimals). */
|
|
606
|
+
sharesOut: bigint;
|
|
607
|
+
}
|
package/lib/types/web3.d.ts
CHANGED
|
@@ -34,3 +34,18 @@ export interface ISolanaConfig {
|
|
|
34
34
|
rpcUrl: string;
|
|
35
35
|
network: ISolanaNetwork;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Stellar-specific configuration for `new AugustSDK({ stellar })`. All
|
|
39
|
+
* fields are optional — omit it entirely to target Stellar mainnet through the
|
|
40
|
+
* SDK's built-in public Soroban RPC endpoints.
|
|
41
|
+
*/
|
|
42
|
+
export interface IStellarConfig {
|
|
43
|
+
/**
|
|
44
|
+
* Override Soroban RPC endpoint (e.g. a consumer's keyed Alchemy URL). When
|
|
45
|
+
* set it becomes the primary, with the SDK's built-in public endpoints kept
|
|
46
|
+
* behind it as failover. Optional — omit to use the public endpoints.
|
|
47
|
+
*/
|
|
48
|
+
rpcUrl?: string;
|
|
49
|
+
/** Stellar network; defaults to mainnet when omitted. */
|
|
50
|
+
network?: IStellarNetwork;
|
|
51
|
+
}
|