Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump max duration on all endpoints & fix hashing/signing algorithms #91

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions lib/crypto.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import {
ECDSA_P256,
ECDSA_secp256k1,
SHA2_256,
SHA3_256,
} from "@onflow/util-encode-key"
import {createHash} from "crypto"
import {ec as EC} from "elliptic"
import {SHA3} from "sha3"
Expand All @@ -12,13 +6,13 @@ export type SigAlgoTypes = "ECDSA_P256" | "ECDSA_secp256k1"
export type HashAlgoTypes = "SHA2_256" | "SHA3_256"

export const SigAlgos: Record<SigAlgoTypes, number> = {
ECDSA_P256: ECDSA_P256,
ECDSA_secp256k1: ECDSA_secp256k1,
ECDSA_P256: 1,
ECDSA_secp256k1: 2,
}

export const HashAlgos: Record<HashAlgoTypes, number> = {
SHA2_256: SHA2_256,
SHA3_256: SHA3_256,
SHA2_256: 1,
SHA3_256: 3,
}

const hashSHA2 = (msg: string) => {
Expand Down
1 change: 0 additions & 1 deletion modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,4 @@ declare module "*.cdc" {
export default content
}

declare module "@onflow/util-encode-key"
declare module "@onflow/types"
21 changes: 0 additions & 21 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@hcaptcha/react-hcaptcha": "^0.3.4",
"@onflow/fcl": "1.9.0",
"@onflow/types": "1.2.1",
"@onflow/util-encode-key": "1.2.1",
"@prisma/client": "^4.2.1",
"@theme-ui/match-media": "^0.9.1",
"clipboard-copy": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"functions": {
"pages/api/fund.ts": {
"pages/api/**/*.ts": {
"maxDuration": 60
}
}
Expand Down
Loading