Skip to content

Commit

Permalink
Bump max duration on all endpoints & fix hashing/signing algorithms (#91
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jribbink committed Feb 27, 2024
1 parent b7c1a5a commit dca9293
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 34 deletions.
14 changes: 4 additions & 10 deletions lib/crypto.ts
@@ -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
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
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
@@ -1,6 +1,6 @@
{
"functions": {
"pages/api/fund.ts": {
"pages/api/**/*.ts": {
"maxDuration": 60
}
}
Expand Down

0 comments on commit dca9293

Please sign in to comment.