Comments (6)
Sure. Let me know if the following works for you:
yarn add @lit-protocol/[email protected]
const pkpWallet = new PKPWallet({
pkpPubKey: PKP_PUBKEY,
controllerAuthSig: CONTROLLER_AUTHSIG,
provider: "https://rpc-mumbai.maticvigil.com",
debug: true,
// if both code and ipfsId are not provided then it will use the default lit action code
// litActionIPFS: "QmRwN9GKHvCn4Vk7biqtr6adjXMs7PzzYPCzNCRjPFiDjm",
litActionCode: `
(async () => {
const sigShare = await LitActions.signEcdsa({ toSign, publicKey, sigName });
console.log("extraParams:", extraParams);
})();
`,
litActionJsParams: {
// this will override the default toSign param
// toSign: [1, 2, 3, 4, 5],
// extraParams
extraParams: [1, 23],
},
});
from js-sdk.
Hey @joshLong145, you can extend our PKPWallet class to add more custom configurations like this repo:
https://github.com/LIT-Protocol/lit-pkp-sdk/blob/main/src/index.js
Would it help?
from js-sdk.
Hey @joshLong145, you can extend our PKPWallet class to add more custom configurations like this repo: https://github.com/LIT-Protocol/lit-pkp-sdk/blob/main/src/index.js
Would it help?
this is essentially what we have done to create custom implementations the pkp's signing mechanism. but it would be nice if configuration options where added to the props
from js-sdk.
great! i'll add that to my to-do
from js-sdk.
Hey @joshLong145 we've added pkp-ethers to this repo now you can install it via:
yarn add @lit-protocol/pkp-ethers
You can now edit your lit action code via the constructor eg:
const pkpWallet = new PKPWallet({
pkpPubKey: PKP_PUBKEY,
controllerAuthSig: CONTROLLER_AUTHSIG,
provider: "https://rpc-mumbai.maticvigil.com",
debug: true,
litActionCode: `
(async () => {
console.log("Testing");
})();
`,
});
Let me know if this work for you?
from js-sdk.
Hey @joshLong145 we've added pkp-ethers to this repo now you can install it via:
yarn add @lit-protocol/pkp-ethers
You can now edit your lit action code via the constructor eg:
const pkpWallet = new PKPWallet({ pkpPubKey: PKP_PUBKEY, controllerAuthSig: CONTROLLER_AUTHSIG, provider: "https://rpc-mumbai.maticvigil.com", debug: true, litActionCode: ` (async () => { console.log("Testing"); })(); `, });Let me know if this work for you?
Would it also be possible to add ipfsId
and jsParams
to the PKPWallet
props? this would allow for usage of registered cids
and to pass arbitrary parameters to action implementations. This would then mean you can define either litActionCode
or ipfsId
making both optional props. If none are provided then perhaps defaulting to the implementation you have outlined above.
from js-sdk.
Related Issues (20)
- I sighted a typographical error in the "What is Lit" section of the documentation. HOT 2
- process not defined in node_modules/util/util.js HOT 1
- ipfs-http-client is deprecated HOT 3
- Error with humanizeAccessControlConditions() when using ERC20 tokens HOT 1
- The signature problem on Integrating with Ceramic HOT 1
- EIP-1271 Authsig failed 401 but the contract return 0x1626ba7e HOT 1
- Request for SPA-Friendly OAuth Redirection Mechanism in lit-auth-client HOT 5
- there is a guide to contribute? HOT 1
- Breaks at decrypt - parsing SIWE message HOT 3
- Create New Logging level uitlities HOT 6
- Add new `e2e` tests for lit action api HOT 3
- Yarn Upgrade Needed HOT 4
- Errors with the React sample app HOT 5
- Cayenne is evaluating Sepolia access conditions based on data from the Ethereum mainnet. HOT 1
- Wrong version of `multiformats` package breaking `@lit-protocol/contracts-sdk` HOT 4
- Module not found error in browser
- Cannot find module './fetch.node' HOT 9
- File uses global instead of globalThis HOT 2
- No known conditions for "./cid" specifier in "multiformats" package HOT 3
- Getting Timeout error from Lit Node Client while generating sessions HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-sdk.