-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
7,276 additions
and
566 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from "./funding.js" | ||
export * from "./funding.js"; | ||
export * from "./ordinals/index.js"; |
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,11 @@ | ||
import { IOrdinalIncrementingRevealModel } from "@0xflick/ordinals-models"; | ||
|
||
export interface IIncrementingRevealMeta | ||
extends IOrdinalIncrementingRevealModel {} | ||
interface IIncrementingRevealReturn { | ||
tokenId: number; | ||
} | ||
|
||
export interface IIncrementingRevealDao { | ||
nextTokenId(): Promise<IIncrementingRevealReturn>; | ||
} |
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 @@ | ||
export * from "./incrementingReveal.js"; |
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 |
---|---|---|
@@ -1,10 +1,48 @@ | ||
import type { IFundingDao } from "../dao/funding.js"; | ||
import { tableNames } from "../utils/config.js"; | ||
import { createDb } from "./create.js"; | ||
import { FundingDao } from "./funding.js"; | ||
import { | ||
FundingDao, | ||
TFundingCollectionReturner, | ||
TFundingItemReturner, | ||
} from "./funding.js"; | ||
|
||
export function createDynamoDbFundingDao(): IFundingDao { | ||
export function createDynamoDbFundingDao< | ||
ItemInputType extends Record<string, any> = {}, | ||
ItemMeta extends Record<string, any> = {}, | ||
ItemReturnType = any, | ||
CollectionInputType extends Record<string, any> = {}, | ||
CollectionMeta extends Record<string, any> = {}, | ||
CollectionReturnType = any | ||
>({ | ||
itemFundingUpdater, | ||
collectionFundingUpdater, | ||
}: { | ||
itemFundingUpdater: TFundingItemReturner<ItemInputType, ItemReturnType>; | ||
collectionFundingUpdater: TFundingCollectionReturner< | ||
CollectionInputType, | ||
CollectionReturnType | ||
>; | ||
}): IFundingDao< | ||
ItemInputType, | ||
ItemMeta, | ||
ItemReturnType, | ||
CollectionInputType, | ||
CollectionMeta, | ||
CollectionReturnType | ||
> { | ||
const allTableNames = tableNames.get(); | ||
FundingDao.TABLE_NAME = allTableNames.funding ?? FundingDao.TABLE_NAME; | ||
return new FundingDao(createDb()); | ||
return new FundingDao< | ||
ItemInputType, | ||
ItemMeta, | ||
ItemReturnType, | ||
CollectionInputType, | ||
CollectionMeta, | ||
CollectionReturnType | ||
>({ | ||
client: createDb(), | ||
itemFundingUpdater, | ||
collectionFundingUpdater, | ||
}); | ||
} |
Oops, something went wrong.