Skip to content

Commit

Permalink
repl: add arweave secret fn
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpure committed Jun 19, 2022
1 parent d29c8ef commit d52a560
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/services/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ Promise.all([
console.log('done')
return (async () => {
try {
var secretClient = async (projectId) => secretService.build({ projectId })
var projectId = 'kernel-signature-staging'
global.client = await secretClient(projectId)
global.secretClient = async (projectId) => secretService.build({ projectId })
global.addArweaveSecret = async (filename) => {
if (!filename) {
console.log('missing filename')
return
}
const data = fs.readFileSync(filename)
const projectId = 'kernel-signature-prod'
const client = await secretClient(projectId)
const secretId = 'arweaveJwk'
//const result = await client.list()
const result = await client.add({ secretId, data })
return result
}
//var secret = await client.access({secretId: 'arweaveJwk'})
} catch (error) {
console.log(error)
Expand Down

0 comments on commit d52a560

Please sign in to comment.