Skip to content

Instantly share code, notes, and snippets.

@MaritalWheat
MaritalWheat / flow-google-kms.ts
Last active November 8, 2022 17:54
@onflow GC KMS tx signing
import * as fcl from "@onflow/fcl"
import { KeyManagementServiceClient } from "@google-cloud/kms"
import * as crypto from "crypto"
import { fromBER, Sequence, Integer } from "asn1js"
var crc32c = require("fast-crc32c")
/////////////////////////////////////////////////////////////////////////////////////////////////
// This gist shows a quick example of using a Google Cloud managed key to sign a Flow transaction
// This would be called in a pattern similar to the below:
//