-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(sdks): external opt-in augmentation
- Loading branch information
Showing
47 changed files
with
366 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Holding } from "@morpho-org/blue-sdk"; | ||
import { fetchHolding } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace Holding { | ||
let fetch: typeof fetchHolding; | ||
} | ||
} | ||
|
||
Holding.fetch = fetchHolding; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Market } from "@morpho-org/blue-sdk"; | ||
import { fetchMarket, fetchMarketFromConfig } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace Market { | ||
let fetch: typeof fetchMarket; | ||
let fetchFromConfig: typeof fetchMarketFromConfig; | ||
} | ||
} | ||
|
||
Market.fetch = fetchMarket; | ||
Market.fetchFromConfig = fetchMarketFromConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { MarketConfig } from "@morpho-org/blue-sdk"; | ||
import { fetchMarketConfig } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace MarketConfig { | ||
let fetch: typeof fetchMarketConfig; | ||
} | ||
} | ||
|
||
MarketConfig.fetch = fetchMarketConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { AccrualPosition, Position } from "@morpho-org/blue-sdk"; | ||
|
||
import "./Market"; | ||
import { | ||
fetchAccrualPosition, | ||
fetchAccrualPositionFromConfig, | ||
fetchPosition, | ||
} from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace Position { | ||
let fetch: typeof fetchPosition; | ||
} | ||
|
||
namespace AccrualPosition { | ||
let fetch: typeof fetchAccrualPosition; | ||
let fetchFromConfig: typeof fetchAccrualPositionFromConfig; | ||
} | ||
} | ||
|
||
Position.fetch = fetchPosition; | ||
AccrualPosition.fetch = fetchAccrualPosition; | ||
AccrualPosition.fetchFromConfig = fetchAccrualPositionFromConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Token } from "@morpho-org/blue-sdk"; | ||
import { fetchToken } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace Token { | ||
let fetch: typeof fetchToken; | ||
} | ||
} | ||
|
||
Token.fetch = fetchToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { AccrualVault, Vault } from "@morpho-org/blue-sdk"; | ||
|
||
import "./VaultConfig"; | ||
import "./VaultMarketAllocation"; | ||
import { fetchAccrualVault, fetchVault, fetchVaultFromConfig } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace Vault { | ||
let fetch: typeof fetchVault; | ||
let fetchFromConfig: typeof fetchVaultFromConfig; | ||
} | ||
|
||
namespace AccrualVault { | ||
let fetch: typeof fetchAccrualVault; | ||
} | ||
} | ||
|
||
Vault.fetch = fetchVault; | ||
Vault.fetchFromConfig = fetchVaultFromConfig; | ||
AccrualVault.fetch = fetchAccrualVault; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { VaultConfig } from "@morpho-org/blue-sdk"; | ||
import { fetchVaultConfig } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace VaultConfig { | ||
let fetch: typeof fetchVaultConfig; | ||
} | ||
} | ||
|
||
VaultConfig.fetch = fetchVaultConfig; |
18 changes: 18 additions & 0 deletions
18
packages/blue-sdk-ethers/src/augment/VaultMarketAllocation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { VaultMarketAllocation } from "@morpho-org/blue-sdk"; | ||
|
||
import "./Position"; | ||
import "./VaultMarketConfig"; | ||
import { | ||
fetchVaultMarketAllocation, | ||
fetchVaultMarketAllocationFromConfig, | ||
} from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace VaultMarketAllocation { | ||
let fetch: typeof fetchVaultMarketAllocation; | ||
let fetchFromConfig: typeof fetchVaultMarketAllocationFromConfig; | ||
} | ||
} | ||
|
||
VaultMarketAllocation.fetch = fetchVaultMarketAllocation; | ||
VaultMarketAllocation.fetchFromConfig = fetchVaultMarketAllocationFromConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { VaultMarketConfig } from "@morpho-org/blue-sdk"; | ||
|
||
import "./VaultMarketPublicAllocatorConfig"; | ||
import { fetchVaultMarketConfig } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace VaultMarketConfig { | ||
let fetch: typeof fetchVaultMarketConfig; | ||
} | ||
} | ||
|
||
VaultMarketConfig.fetch = fetchVaultMarketConfig; |
10 changes: 10 additions & 0 deletions
10
packages/blue-sdk-ethers/src/augment/VaultMarketPublicAllocatorConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { VaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk"; | ||
import { fetchVaultMarketPublicAllocatorConfig } from "../fetch"; | ||
|
||
declare module "@morpho-org/blue-sdk" { | ||
namespace VaultMarketPublicAllocatorConfig { | ||
let fetch: typeof fetchVaultMarketPublicAllocatorConfig; | ||
} | ||
} | ||
|
||
VaultMarketPublicAllocatorConfig.fetch = fetchVaultMarketPublicAllocatorConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export * from "./Holding"; | ||
export * from "./Position"; | ||
export * from "./MarketConfig"; | ||
export * from "./Market"; | ||
export * from "./Token"; | ||
export * from "./VaultConfig"; | ||
export * from "./Vault"; | ||
export * from "./VaultMarketConfig"; | ||
export * from "./VaultMarketAllocation"; | ||
export * from "./VaultMarketPublicAllocatorConfig"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.