Skip to content

Commit 20e2d53

Browse files
committed
wip
1 parent 922a1c4 commit 20e2d53

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ JWT_SECRET=
5959
HOST=127.0.0.1
6060
# Port to listen on
6161
PORT=3000
62+
# PubKey Protocol Community
63+
PUBKEY_PROTOCOL_COMMUNITY=pubkey
6264
# PubKey Protocol Signer (Byte array as a comma-separated list of numbers with brackets: '[1,2,3]')
6365
# FEESyimdmwzSQA99FqCVMn8rYYQdnRBguXh8AWdwJUcc
6466
PUBKEY_PROTOCOL_SIGNER_SECRET_KEY='[152,222,146,61,189,252,198,154,44,101,236,177,170,27,231,52,185,128,234,101,214,247,206,97,166,183,126,170,165,179,147,21,211,103,95,129,144,43,47,17,229,174,40,46,25,82,14,6,95,118,169,245,129,172,149,69,220,91,111,240,248,63,102,37]'

.github/workflows/e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
HOST: 127.0.0.1
1616
JWT_SECRET: 1dfe5003518560c6362eab48f8220edf8708bbc67efbd4ed8cdf621965e938ee
1717
PORT: 3000
18+
PUBKEY_PROTOCOL_COMMUNITY: pubkey
1819
PUBKEY_PROTOCOL_SIGNER_SECRET_KEY: '[152,222,146,61,189,252,198,154,44,101,236,177,170,27,231,52,185,128,234,101,214,247,206,97,166,183,126,170,165,179,147,21,211,103,95,129,144,43,47,17,229,174,40,46,25,82,14,6,95,118,169,245,129,172,149,69,220,91,111,240,248,63,102,37]'
1920
SESSION_SECRET: 1dfe5003518560c6362eab48f8220edf8708bbc67efbd4ed8cdf621965e938ee
2021
SOLANA_ENDPOINT: 'https://api.devnet.solana.com'

libs/api/core/data-access/src/lib/config/api-core-config.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ export class ApiCoreConfigService {
238238
return '/api'
239239
}
240240

241+
get pubkeyProtocolCommunity(): string {
242+
return this.service.get<string>('pubkeyProtocolCommunity') as string
243+
}
244+
241245
get pubkeyProtocolSigner(): Keypair {
242246
return this.service.get<Keypair>('pubkeyProtocolSigner') as Keypair
243247
}

libs/api/core/data-access/src/lib/config/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export interface ApiCoreConfig {
6464
jwtSecret: string
6565
port: number
6666
sessionSecret: string
67+
pubkeyProtocolCommunity: string
6768
pubkeyProtocolSigner: Keypair
6869
pubkeyProtocolSignerMinimalBalance: number
6970
solanaEndpoint: string
@@ -106,6 +107,7 @@ export function configuration(): ApiCoreConfig {
106107
host: process.env['HOST'] as string,
107108
jwtSecret: process.env['JWT_SECRET'] as string,
108109
port: parseInt(process.env['PORT'] as string, 10) || 3000,
110+
pubkeyProtocolCommunity: process.env['PUBKEY_PROTOCOL_COMMUNITY'] as string,
109111
pubkeyProtocolSigner: getKeypairFromByteArray(
110112
JSON.parse(process.env['PUBKEY_PROTOCOL_SIGNER_SECRET_KEY'] as string),
111113
),

libs/api/core/data-access/src/lib/config/validation-schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const validationSchema = Joi.object({
4747
HOST: Joi.string().default('0.0.0.0'),
4848
NODE_ENV: Joi.string().valid('development', 'production', 'test', 'provision').default('development'),
4949
PORT: Joi.number().default(3000),
50+
PUBKEY_PROTOCOL_COMMUNITY: Joi.string().required(),
5051
PUBKEY_PROTOCOL_SIGNER_SECRET_KEY: Joi.string().required(),
5152
PUBKEY_PROTOCOL_SIGNER_MINIMAL_BALANCE: Joi.number().default(1),
5253
SESSION_SECRET: Joi.string().required(),

0 commit comments

Comments
 (0)