The following regular expressions are crafted to match some commonly used cryptocurrency wallet address types. This document details the Regex components and pattern tests to match Ethereum, Bitcoin, Dash and Monero addresses.
/^0x[a-fA-F0-9]{40}$/g
The following regular expressions are crafted to match some commonly used cryptocurrency wallet address types. This document details the Regex components and pattern tests to match Ethereum, Bitcoin, Dash and Monero addresses.
/^0x[a-fA-F0-9]{40}$/g
| import crypto from 'crypto'; | |
| const ALGORITHM = 'aes-256-cbc'; | |
| const ENCODING = 'hex'; | |
| const IV_LENGTH = 16; | |
| const KEY = process.env.ENCRYPTION_KEY!; | |
| export const encrypt = (data: string) => { | |
| const iv = crypto.randomBytes(IV_LENGTH); | |
| const cipher = crypto.createCipheriv(ALGORITHM, new Buffer(KEY), iv); |
| apiVersion: configuration.konghq.com/v1 | |
| kind: KongPlugin | |
| metadata: | |
| namespace: kong | |
| name: cache-hello-app | |
| config: | |
| response_code: | |
| - 200 | |
| request_method: | |
| - GET |
| apiVersion: configuration.konghq.com/v1 | |
| kind: KongPlugin | |
| metadata: | |
| namespace: kong | |
| name: cors-helloa-app | |
| config: | |
| origins: | |
| - http://localhost:3000 | |
| - https://acme-v02.api.letsencrypt.org | |
| methods: |
| apiVersion: configuration.konghq.com/v1 | |
| kind: KongPlugin | |
| metadata: | |
| namespace: kong | |
| name: ratelimit-helloa-app | |
| config: | |
| second: 20 | |
| hour: 10000 | |
| policy: local | |
| plugin: rate-limiting |
| apiVersion: cert-manager.io/v1 | |
| kind: ClusterIssuer | |
| metadata: | |
| name: letsencrypt-prod | |
| namespace: cert-manager | |
| spec: | |
| acme: | |
| email: [email protected] #please change this | |
| privateKeySecretRef: | |
| name: letsencrypt-prod |
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: cname-example-com | |
| annotations: | |
| kubernetes.io/tls-acme: "true" | |
| cert-manager.io/cluster-issuer: letsencrypt-prod | |
| spec: | |
| ingressClassName: kong | |
| tls: |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| app: hello-app | |
| name: hello-app | |
| annotations: | |
| konghq.com/plugins: cache-hello-app,ratelimit-hello-app,cors-hello-app | |
| spec: | |
| ports: |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| app: hello-app | |
| name: hello-app | |
| spec: | |
| ports: | |
| - name: https | |
| protocol: TCP |
| docker build -t hello-app:latest . | |
| docker tag hello-app:latest gcr.io/<your-project-id>/hello-app:latest | |
| docker push gcr.io/<your-project-id>/hello-app:latest |