-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ETH/POL): Added support for ETH and POL/matic wallets. #9
base: main
Are you sure you want to change the base?
Conversation
@@ -20,7 +21,9 @@ Before using `permaweb-deploy`, you must: | |||
```bash | |||
base64 -i wallet.json | pbcopy | |||
``` | |||
3. Ensure that the secret name for the encoded wallet is `DEPLOY_KEY`. | |||
2. Ensure that the secret name for the encoded wallet is `DEPLOY_KEY`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought here, would be preferable to store as json string. B64 encoding doesnt actually gain any protection - its still a string, just like a json string, and requires more work to decode it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And considering eth and pol wallets dont use b64 encoding... well it seems even stranger to still have this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but updating the required method for providing an Arweave wallet's jwk would be a major breaking change. It should be discussed in more detail with the repo owner directly before any community prs are made to address it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twilson63 wdyt? I think either we stick to b64 encoding at all times or revert it for arweave addresses.
src/index.js
Outdated
@@ -67,29 +76,86 @@ export function getTagValue(list, name) { | |||
return; | |||
} | |||
|
|||
let jwk = JSON.parse(Buffer.from(DEPLOY_KEY, 'base64').toString('utf-8')); | |||
// Throw an error if both --eth and --pol are true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a very scalable method i think. An argument of sig-type
or something that passes in values like would remove the need for these checks. Ideally it matches up with the arbundles signature config so we can map from their, but we can also use named values like polygon
or ethereum
to map to the right signers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand. We want deployments to default to Arweave unless something else is explicitly specified. Requiring a declaration of signer type in all cases would be a major breaking change.
Can you clarify what you're requesting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the -e and -p flags to use a single --sig-type flag instead, that defaults to arweave, and only valid signer types may be provided.
await ant.setRecord( | ||
{ | ||
undername: argv.undername, | ||
transactionId: manifestId, | ||
ttlSeconds: 3600, | ||
},{ | ||
}, | ||
{ | ||
tags: [ | ||
{ | ||
name: 'GIT-HASH', | ||
value: process.env.GITHUB_SHA, | ||
value: process.env.GITHUB_SHA || '', | ||
}, | ||
{ | ||
name: 'App-Name', | ||
value: 'Permaweb-Deploy', | ||
}, | ||
] | ||
{ | ||
name: 'anchor', | ||
value: new Date().toISOString(), | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add options for custom tags in the cli here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but this is outside the scope of this pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to add anchor here - the github sha will be unique - and i believe we add this anchor in the ario sdk already
Added support for using ETH and POL/Matic wallets to sign and pay for data uploads, and update ArNS records.
Simplified Turbo upload logic, using
turbo.uploadFolder
rather than manually uploading each file and generating a custom manifest.Added fallback value for GIT_HASH to enable simpler local operation.
README updates.