2024-10-25 19:10:37 +00:00
|
|
|
import { string } from '@/lib/yup'
|
2024-08-18 16:36:55 +00:00
|
|
|
|
|
|
|
export const galoyBlinkUrl = 'https://api.blink.sv/graphql'
|
|
|
|
export const galoyBlinkDashboardUrl = 'https://dashboard.blink.sv/'
|
|
|
|
|
|
|
|
export const name = 'blink'
|
2024-10-14 15:49:06 +00:00
|
|
|
export const walletType = 'BLINK'
|
|
|
|
export const walletField = 'walletBlink'
|
2024-08-18 16:36:55 +00:00
|
|
|
|
|
|
|
export const fields = [
|
|
|
|
{
|
|
|
|
name: 'apiKey',
|
|
|
|
label: 'api key',
|
|
|
|
type: 'password',
|
|
|
|
help: `you can get an API key from [Blink Dashboard](${galoyBlinkDashboardUrl})`,
|
2024-10-25 19:10:37 +00:00
|
|
|
placeholder: 'blink_...',
|
|
|
|
clientOnly: true,
|
|
|
|
validate: string()
|
|
|
|
.matches(/^blink_[A-Za-z0-9]+$/, { message: 'must match pattern blink_A-Za-z0-9' })
|
2024-08-18 16:36:55 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'currency',
|
|
|
|
label: 'wallet type',
|
|
|
|
type: 'text',
|
|
|
|
help: 'the blink wallet to use (BTC or USD for stablesats)',
|
|
|
|
placeholder: 'BTC',
|
|
|
|
optional: true,
|
|
|
|
clear: true,
|
2024-10-25 19:10:37 +00:00
|
|
|
autoComplete: 'off',
|
|
|
|
clientOnly: true,
|
|
|
|
validate: string()
|
|
|
|
.transform(value => value ? value.toUpperCase() : 'BTC')
|
|
|
|
.oneOf(['USD', 'BTC'], 'must be BTC or USD')
|
2024-08-18 16:36:55 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
export const card = {
|
|
|
|
title: 'Blink',
|
|
|
|
subtitle: 'use [Blink](https://blink.sv/) for payments',
|
|
|
|
badges: ['send only']
|
|
|
|
}
|