Skip to content

Commit

Permalink
chore: Add Base networks to SDK
Browse files Browse the repository at this point in the history
Signed-off-by: Silas Davis <silas.davis@monaxlabs.io>
  • Loading branch information
Silas Davis committed Oct 24, 2023
1 parent e63556c commit 7ef2c18
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 139 deletions.
2 changes: 1 addition & 1 deletion examples/flows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@monaxlabs/aspen-sdk": "workspace:*",
"@monaxlabs/phloem": "^0.16.55",
"@monaxlabs/phloem": "0.17.2-1-gc2fa1864",
"date-fns": "^2.29.3",
"ethers": "^5.7.2",
"fp-ts": "^2.13.1",
Expand Down
25 changes: 13 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 0 additions & 124 deletions sdk/package.esm.json

This file was deleted.

4 changes: 2 additions & 2 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"print:version": "../scripts/version.sh"
},
"dependencies": {
"@monaxlabs/phloem": "0.16.52",
"@monaxlabs/phloem": "0.17.2-1-gc2fa1864",
"ethers": "^5.7.2",
"axios": "^1.2.2",
"ts-deepmerge": "^6.2.0",
Expand All @@ -67,7 +67,7 @@
"viem": "^1.16.6"
},
"devDependencies": {
"@monaxlabs/spec": "0.16.52",
"@monaxlabs/spec": "0.17.2-1-gc2fa1864",
"@monaxlabs/cambium": "0.16.52",
"@openzeppelin/contracts": "^4.8.1",
"typescript": "^5.2.2",
Expand Down
18 changes: 18 additions & 0 deletions sdk/src/apis/aspen/aspen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4830,6 +4830,22 @@ export const PaymentIntent = t.exact(
]),
);

export interface TermsAcceptanceProofClickWrap {
type: 'clickwrap';
termsAccepted: boolean;
}

export const TermsAcceptanceProofClickWrap = t.exact(
t.type({
type: t.literal('clickwrap'),
termsAccepted: t.boolean,
}),
);

export type TermsAcceptanceProof = t.TypeOf<typeof TermsAcceptanceProofClickWrap> | null;

export const TermsAcceptanceProof = t.union([TermsAcceptanceProofClickWrap, t.null]);

export interface PaymentIntentMetadata {
env: string;
/** Storefront the tokens belong to */
Expand All @@ -4838,6 +4854,7 @@ export interface PaymentIntentMetadata {
receiverAddress: t.TypeOf<typeof Address>;
/** The email of the purchaser */
email?: string;
termsAcceptanceProof: t.TypeOf<typeof TermsAcceptanceProof>;
checkoutCart: Array<t.TypeOf<typeof TokenCheckoutItem>>;
}

Expand All @@ -4849,6 +4866,7 @@ export const PaymentIntentMetadata = t.exact(
storefrontId: UUIDFromString,
/** The address of the tokens receiver */
receiverAddress: Address,
termsAcceptanceProof: TermsAcceptanceProof,
checkoutCart: t.array(TokenCheckoutItem),
}),
t.partial({
Expand Down

0 comments on commit 7ef2c18

Please sign in to comment.